// JavaScript Document
function Fensterhoehe() {
	if (window.innerHeight) return window.innerWidth;
	else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
	else return 0;
}

function neuAufbau() {
	document.getElementById("theMenu").style.left = (Fensterweite()-parseInt(document.getElementById("theMenu").style.width))/2;
	document.getElementById("theMenu").style.top = (Fensterhoehe()-600)/2+4;
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function setSize(theElem,width,height) {
	var elemInt = MM_findObj(theElem);
	//alert("theElem="+theElem+"; elemInt="+elemInt);
	if(width!=-1) { elemInt.style.width = width; }
	if(height!=-1) { elemInt.style.height = height; }
}

function checkBrowser() {
	var theBrowser = navigator.appName;
	var theCompany = theBrowser.substr(0,theBrowser.indexOf(" "));
	if(theCompany.toLowerCase()=="microsoft") {
		var theVersionC = navigator.appVersion;
		var theVersion = theVersionC.substr(theVersionC.indexOf("MSIE ")+5,1)
		//alert("theVersion="+theVersion+"; theVersionC="+theVersionC);
		if(theVersion<7) {
			var windowH = Fensterhoehe();
			//alert(windowH+"; "+window.innerHeight+"; "+document.body.offsetHeight);
			var theDivs = new Array();
			theDivs[0] = new Array("SYNEcontainer",-1,windowH-15);
			theDivs[1] = new Array("SYNEshadowLeft",-1,windowH-15);
			theDivs[2] = new Array("SYNEshadowRight",-1,windowH-15);
			theDivs[3] = new Array("SYNENaviContainer",830,-1);
			theDivs[6] = new Array("SYNEshowcaseD",850,-1);
			theDivs[7] = new Array("SYNEspacerLine1",850,-1);
			theDivs[8] = new Array("SYNEheader",850,-1);
			theDivs[4] = new Array("SYNEnavi2",-1,windowH-153-30);
			theDivs[5] = new Array("SYNEcontent",667,windowH-153-23);
			for(var i=0; i<theDivs.length; i++) {
				setSize(theDivs[i][0],theDivs[i][1],theDivs[i][2]);
			}
		}
	}
}

window.onresize = checkBrowser;
window.onload = checkBrowser;

