// JavaScript Document

/* E-Mailadressen verschlüsseln */
function UnCryptMailto(s) {
	var n=0;
	var r="";
	for(var i=0;i<s.length;i++) { 
		n=s.charCodeAt(i); 
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(1)); 
	}
	return r;
}
function linkTo_UnCryptMailto(s)	{
	location.href=UnCryptMailto(s);
}

// toggle function 
function divToggle(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
   } else {
      obj.style.display="block";
   }
}

// show function
function showDiv(item) {
    obj=document.getElementById(item);
	key=document.getElementById("x" + item);
	obj.style.display="block";
   
}

// hide function
function hideDiv(item) {
    obj=document.getElementById(item);
	key=document.getElementById("x" + item);
	obj.style.display="none";
}

/* fwd | 002* thanks to forss, very nice script, indeed. */
function popupMaster(sURL, iWidth, iHeight) { 
	posLeft = (screen.width - iWidth)/2; posTop = (screen.height - iHeight)/2; 
	hPopup = window.open(sURL, 'EDIT'+Math.round(Math.random() * 10000), 'left='+posLeft+',top='+posTop+',width=' + iWidth + ',height=' + iHeight + ',resizable=no,scrollbars=0'); 
	hPopup.moveTo((screen.width - iWidth)/2, (screen.height - iHeight)/2);
	hPopup.focus(); 
}
