function checkresize() {
 docH = (self.innerHeight > 1) ? self.innerHeight : document.body.offsetHeight;
 marT = Math.floor(docH / 2 - 535 / 2) - 2;
 if (document.getElementById('bg')) document.getElementById('bg').style.marginTop = ((marT > 2) ? marT : 2) + "px";
}
window.onresize = checkresize;

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

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;
}
  // JS function for uncrypting spam-protected emails:
function linkTo_UnCryptMailto(s)	{	//
	location.href=UnCryptMailto(s);
}

function popup(url) {
   fenster=window.open(url, "Popupfenster", "width=440,height=550,resizable=no,scrollbars=no");
   fenster.focus(); return false;
   }
   

function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}