function Is(){ 
  this.ver=navigator.appVersion;
  // alert(this.ver)
  this.agent=navigator.userAgent;
  this.dom=document.getElementById?1:0;
  this.opera5=this.agent.indexOf("Opera 5")>-1;
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
  this.ie6=( ( this.ver.indexOf("MSIE 6")>-1 || this.ver.indexOf("MSIE 7")>-1 ) && this.dom && !this.opera5)?1:0;
  this.ie7=(this.ver.indexOf("MSIE 7")>-1)?1:0;
  this.ie8=(this.ver.indexOf("MSIE 8")>-1)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6||this.ie8;
  this.mac=this.agent.indexOf("Mac")>-1;
  this.safari = (this.ver.indexOf("Safari")>-1 && this.dom)?1:0; 
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);
  return this;
}

var is = new Is();


function gwh() { 
  return ( (is.ie==1)?document.body.offsetHeight:window.innerHeight );
}
function gww() { 
  return ( (is.ie==1)?document.body.offsetWidth:window.innerWidth );
}

function j1() {

  i = document.getElementById("vg")

  // Korrekturfaktoren aufgrund von Hoehe und Breite des DIV
  var kh  = document.getElementById("vg").style.height.substring(0,i.style.height.length-2);
  var kw  = i.style.width.substring(0,i.style.width.length-2);
  kh = kh/2;
  kw = kw/2;
  
  mh = gwh();
  mw = gww();

  mh = mh/2 - kh;
  mw = mw/2 - kw;

  //alert("mh:"+mh + "   mw:"+mw );
   
  o = document.getElementById("hg");
  o.style.position   = "fixed";
  if ((is.ie6==1)&&(is.ie7==0)&&(is.ie8==0)) { o.style.position = "absolute"; o.style.height = "125%"; }
  if (is.ie8==1) { o.style.marginLeft = "-100px"; /*o.style.width = "125%";*/  }
  o.style.visibility = "visible";

  o = document.getElementById("vg");
  o.style.position   = "relative";
  o.style.left       = mw + "px";
  o.style.top        = mh + "px";
  if (is.ie8==1) { o.style.top = mh - 42 + "px"; }
  o.style.visibility = "visible";

  o = document.getElementById("aufgehts");
  o.style.position   = "absolute";
  o.style.left       = mw + 510 + "px";
  o.style.top        = mh + 59 + "px";
  o.style.visibility = "visible";

  o = document.getElementById("vielspass");
  o.style.position   = "absolute";
  o.style.left       = mw + 669 + "px";
  o.style.top        = mh + 502 + "px";
  o.style.visibility = "visible";

  o = document.getElementById("links-klein");
  o.style.position   = "absolute";
  o.style.left       = mw + 55 + "px";
  o.style.top        = mh + 65 + "px";
  o.style.visibility = "visible";

}


function launchWindow(url, features,x,y) {
	var xMax = screen.width, yMax = screen.height;
	var xOffset = 1, yOffset = 1;
    if (features=='') {
	    var Neufenster = window.open(url, "_blank", 'height='+y+',width='+x+',innerHeight='+y+',innerWidth='+x+',screenX=0,screenY=0,top='+yOffset+',left='+xOffset+',toolbar=0,menubar=0,allwaysRaised,location=1, scrollbars=yes,reziable=no,fullscreen=no,channelmode=no');
	} else {
	    var Neufenster = window.open(url, "_blank", 'height='+y+',width='+x+',innerHeight='+y+',innerWidth='+x+',screenX=0,screenY=0,top='+yOffset+',left='+xOffset+',toolbar=0,menubar=0,allwaysRaised,location=1, scrollbars=yes,fullscreen=no,channelmode=no,'+features);
	}
}


function launchWindow_maxsize(url,features) {
    launchWindow(url, features,screen.width, screen.height);
}

function ucmt(s, shift) {
	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-(shift)); 
	}
	return r;
}

function ltucmt(s, shift)	{
	location.href=ucmt(s, shift);
}


function hoverImg(divId, bgImgName) {
	if ((is.ie6==1)&&(is.ie7==0)&&(is.ie8==0)) {
		obj = document.getElementById(divId);
		if (bgImgName=="") {
			obj.style.backgroundImage = "none";
		}
		else {
			obj.style.backgroundImage = "url("+bgImgName+")";
		}
		obj.style.cursor = "pointer";
	}
	return false;
}

function hoverColor(divId, colorNum) {
	if ((is.ie6==1)&&(is.ie7==0)&&(is.ie8==0)) {
		obj = document.getElementById(divId);
		if (colorNum!=="") {
			obj.style.color = colorNum;
		}
		obj.style.cursor = "pointer";
	}
	return false;
}


function maximizeThisWindow() {

	// aber nur, wenn nicht gerade die Mail abgeschickt wurde!
	
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth,screen.availHeight);
	window.blur();

}