chk = 0;

	isIE = (navigator.appName.indexOf("Internet Explorer") != -1) ? true : false;

	isNS = (navigator.appName.indexOf("Netscape") != -1) ? true : false;

	isMac = (navigator.platform.indexOf("Mac") != -1) ? true : false;



function ow(file,w,h){

	

	

	window.open(file,"picWindow","width="+(w+25)+", height="+(h+30)+", toolbar=no,directories=no,statusbar=no,menubar=no");

	//picWindow.resizeTo(imgO.width,imgO.height);

}



function checkDel(did){

		var check = confirm("Wollen Sie das Bild wirklich löschen?");

		if (check){

			if (document.URL.indexOf("?del=") != -1) {

				var tmpUrl = document.URL.substring(0,document.URL.indexOf("?"));

				document.location.href = tmpUrl + "?del=" + did;

			}else{

				document.location.href = document.URL + "?del=" + did;

			}

		}

	}



function loadImg(imgp){

	imgO = new Image();

	

	

	

		imgO.src = imgp;

		

		

		lint = window.setInterval("checkPicLoad()",10);

}



function checkPicLoad(){

	chk++;

			

	if (imgO.complete){			

		window.clearInterval(lint);

			

		ow(imgO.src,imgO.width,imgO.height);

	}

	}

	

function dcMail2(encaddr){

	var realAddr = encaddr.replace(/\[bei\]/,"@");

	realAddr = realAddr.replace(/\[punkt\]/,".");

	document.location.href = "mailto:"+realAddr;

}





function zp(picp,ptxt){

		if (picp){

		//document.getElementById("zoomPic").src = "/img/ph.gif";

		document.getElementById("loadingSign").style.visibility = "visible";

		document.getElementById("zoomArea").style.visibility = "visible";

		swapImg = new Image();

		if (isNS && !isMac) swapImg.onload = checkZoomPicLoad;

		swapImg.src = picp;

		dtxt = ptxt;

		if (isIE || isMac) lint = window.setInterval("checkZoomPicLoad()",10);

		

		

		}

	}

	function checkZoomPicLoad(){

			chk++;

			

		if (swapImg.complete){

			document.getElementById("descr").innerHTML = dtxt;

			document.getElementById("loadingSign").style.visibility = "hidden";

			document.getElementById("zoomArea").style.visibility = "hidden";

			var tmpHeight = swapImg.height;

			var tmpWidth = swapImg.width;

			var wHeight = (isIE) ? document.body.offsetHeight : window.innerHeight;

			var padd = (Math.round((wHeight/2) - (tmpHeight/2)));

			document.getElementById("zoomPic").src = swapImg.src;

			document.getElementById("zoomArea").style.visibility = "visible";

			if (padd > 0) {

				if (isIE && isMac) {

					

				}else{

					document.getElementById("zoomArea").style.paddingTop = padd + "px";

				}

			}else{

				if (isIE && isMac) {

					document.getElementById("zoomArea").style.top = padd +"px";

				}else{

					document.getElementById("zoomArea").style.margingTop = padd + "px";

				}

			}

			if (isNS) document.getElementById("zoomArea").style.height = (99 - Math.round((wHeight/2 - tmpHeight/2) / (wHeight/100))) + "%";

			

			

			

			if (isIE || isMac) window.clearInterval(lint);

			

		}

	}

	

	function setVisibility(did,prop){

		document.getElementById(did).style.visibility = prop;

		document.getElementById("zoomPic").src = "img/1x1trans.gif";

		document.getElementById("loadingSign").style.visibility = "hidden";

		

	}