var cacheImgList = new Array();
function addCacheImg() {
	for (i=0;i<addCacheImg.arguments.length;i++) {
		cacheImgList.push(addCacheImg.arguments[i]);
	}
}
function cacheImages() {
	if (cacheImgList.length < 1) return;
	var cacheImg = new Array();
	for (i=0;i<cacheImgList.length;i++) {
		cacheImg[i]=new Image();
		cacheImg[i].src=cacheImgList[i];
	}
}



var ib_thumb_active = "";
function zoomInSite(pThumb, pPath) {
	if (pPath == "" || pThumb == "") return;
	if (pPath != "none") {
		if (document.getElementById("zoom_img")) document.getElementById("zoom_img").src = pPath;
		if (document.getElementById("ib_thumb_"+pThumb)) document.getElementById("ib_thumb_"+pThumb).blur();
		if (document.getElementById("bilddownloadlink")) {
			if (document.getElementById("bilddownloadlink").name != "") document.getElementById("bilddownloadlink").href = document.getElementById("bilddownloadlink").name + "&ebene5=" +pThumb;
		}
	}
	for (var i=0; i < 20; i++) {
		if (document.getElementById("ib_thumb_"+i)) document.getElementById("ib_thumb_"+i).className = "";
	}
	if (document.getElementById("ib_thumb_"+pThumb)) {
		document.getElementById("ib_thumb_"+pThumb).className = "active-th";
		ib_thumb_active = pThumb;
	}
}
function switchActiveThumb(pStat) {
	if (pStat == "" || ib_thumb_active == "") return;
	if (pStat == "on") {
		document.getElementById("ib_thumb_"+ib_thumb_active).className = "active-th";
	} else {
		document.getElementById("ib_thumb_"+ib_thumb_active).className = "";
	}
}




var slot_active = "";
function setActiveSlot(pSlot) {
	if (pSlot == "") return;
	slot_active = pSlot;
}
function switchActiveSlot(pStat) {
	if (pStat == "") return;
	if (pStat == "on") {
		document.getElementById("id_slot_"+slot_active).className = "slot_"+slot_active+" slot_aktiv";
	} else {
		document.getElementById("id_slot_"+slot_active).className = "slot_"+slot_active;
	}
}
function zoomSlot(pSlot, pPath, pWidth, pHeight) {
	if (pPath == "" || pSlot == "") return;
	if (document.getElementById("zoom_slot")) {
		document.getElementById("zoom_slot").src = pPath;
		document.getElementById("zoom_slot").width = pWidth;
		document.getElementById("zoom_slot").height = pHeight;
	}
	if (document.getElementById("id_slot_"+pSlot)) {
		document.getElementById("id_slot_"+pSlot).className = "slot_"+pSlot+" slot_aktiv";
		document.getElementById("id_slot_"+pSlot).blur();
		slot_active = pSlot;
	}
}




function showCopyrightInfo() {
	document.getElementById("copyright").className="showcpr";
	setTimeout("hideCopyrightInfo()",1000);
}
function hideCopyrightInfo() {
	document.getElementById("copyright").className="hidecpr";
}
function copyright() {
	var imgs = document.getElementsByTagName("IMG");
	for(var i = 0; imgs != null && i < imgs.length; i++) {
		if(imgs[i].src.search(/logo/)==-1 && imgs[i].src.search(/schluessel/)==-1) imgs[i].oncontextmenu= new Function("showCopyrightInfo(); return false;");
	}
	var divs = document.getElementsByTagName("DIV");
	for(var i = 0; divs != null && i < divs.length; i++) {
		if (divs[i].style.getAttribute) {
			if(divs[i].style.getAttribute("backgroundImage","false")) divs[i].oncontextmenu= new Function("showCopyrightInfo(); return false;");
		} else {
			if(divs[i].style.backgroundImage) divs[i].oncontextmenu= new Function("showCopyrightInfo(); return false;");
		}
	}
}

function dialogKreuze() {
	if (!document.getElementById("dialog")) return;
	var linkElems = document.getElementById("dialog").getElementsByTagName("a");
	document.getElementById("dialog").scrollIntoView(true);
	for (var i=0; i<linkElems.length; i++) {
		if (linkElems[i].className.indexOf("dclose") != -1) {
			linkElems[i].onclick = function() {
				if (document.getElementById("dialog")) {
					document.getElementById("dialog").style.display = "none";
				}
				return false;
			}
		}
	}
}

function disableAuswahllinks() {
	var seitenlinks = document.getElementsByTagName("a");
	for(var i = 0; i < seitenlinks.length; i++) {
		if (seitenlinks[i].className.indexOf("auswahllink") != -1) {
			if (seitenlinks[i].className.indexOf("pfeil") != -1) {
				seitenlinks[i].className = seitenlinks[i].className + " disabled disabled-pfeil";
			} else {
				seitenlinks[i].className = seitenlinks[i].className + " disabled";
			}
			seitenlinks[i].href = "#";
			seitenlinks[i].onclick = function() {
					return false;
			}
		}
		document.getElementsByTagName("body")[0].style.cursor = "wait";
	}
	return true;
}

