var g_Resolution = "SMALL"
var g_BodyOffsetHeight = 0;
var g_SizeOffset = 0;
var g_Browser = false;

function Init()
{
	setTimeout("floatBox()",100);
}

function floatMenu() 
{
	//window.status = document.body.scrollTop	 
	document.all["iMenu"].style.top = document.body.scrollTop
}

function WriteEmTo(argEmailAddress)
{
	  parent.location = decodeURI(argEmailAddress);    
}


function OpenWindow(argStatus)
{	
	 var tmpFileName = "Anfahrtsbeschreibung" + argStatus + ".html";
	 var tmpWindowName = "win0" + argStatus; 
	 window.open(tmpFileName,tmpWindowName,"scrollbars=yes,status=yes,toolbar=no,location=no,directories=no,resizable=yes,menubar=yes,width=820px,height=520px")
}



function floatBox() 
{
	 
	 g_SizeOffset = 40;
		  
	 if(g_Browser) //IE und Opera
	 {
		 g_BodyOffsetHeight = document.body.offsetHeight;
	 }
	 else
	 {
		 g_BodyOffsetHeight = document.images.initHeight.height;
	 }
	 
	 if(g_BodyOffsetHeight < 600 && !(g_Resolution == "SMALL"))
	 {
		  g_SizeOffset = 70;
		  g_Resolution = "SMALL";
	 }
	 else if ((g_BodyOffsetHeight >= 600 && g_BodyOffsetHeight < 1200)  && !(g_Resolution == "MEDIUM"))
	 {
		  g_SizeOffset = 70;
		  g_Resolution = "MEDIUM";
	 }
	 else if ((g_BodyOffsetHeight >= 1200)  && !(g_Resolution == "SMALL"))
	 {
		  g_SizeOffset = 70;
		  g_Resolution = "LARGE";
	 }

	 SetLogo(g_Resolution);
}


function SetLogo(argSize)
{
/*
	 switch(argSize)
	 {
	 case "SMALL":
					 document.images.logoLeft.src= "images/conplementAGlogoLeft2.gif"
					 document.images.logoRight.src = "images/conplementAGlogoRight2.gif"
					 break;
	 case "MEDIUM":
					 document.images.logoLeft.src= "images/conplementAGlogoLeft2.gif"
					 document.images.logoRight.src = "images/conplementAGlogoRight2.gif"
					 break;
	 case "LARGE":
					 document.images.logoLeft.src= "images/conplementAGlogoLeft2.gif"
					 document.images.logoRight.src = "images/conplementAGlogoRight2.gif"
					 break;
	 }
	 */
}

function SetPageProp()
{
	 var logoHeight;
	 var line01Height = 20;    
	 var headlineHeight = 35;
	 var bottomlineHeight = 20;
	 var line02Height = Math.round(g_BodyOffsetHeight/5)
	 
	 if(g_Browser)
	 {
		  document.all.initLine1.height = line02Height;
		  var logoHeight = document.all.logoLeft.height;
	 }
	 else
	 {
		  document.images.initLine1.height = line02Height;
		  var logoHeight = document.images.logoLeft.height; //100
	 }
	     
	 var contentHeight = (g_BodyOffsetHeight - (logoHeight + line01Height + line02Height + headlineHeight + bottomlineHeight) - g_SizeOffset);
		  
	 if(g_Browser)
	{
		  window.status = g_BodyOffsetHeight + " Height - "	+ contentHeight + " Content " + line02Height + "line" + "-res:" + g_Resolution;
		  //if(typeof(document.all.sContent) != "undefined") document.all.sContent.style.height = contentHeight   
          //if(typeof(document.all.sMenu) != "undefined") document.all.sMenu.style.height = g_BodyOffsetHeight - line01Height -  bottomlineHeight
		  //if(typeof(document.all.sContent2) != "undefined") document.all.sContent2.style.height = contentHeight;
	}
	else
	{
		//alert(g_BodyOffsetHeight + " Height - "	+ contentHeight + " Content " + line02Height + " - line" + "-res:" + g_Resolution + "-Logo[height]:" + logoHeight);
		  //alert(document.getElementById('sContent').style.height)
		  //if(typeof(document.getElementById('sContent')) != "undefined") document.getElementById('sContent').style.height = contentHeight + "px"; 
		  //if(typeof(document.getElementById('sMenu')) != "undefined") document.getElementById('sMenu').style.height = (g_BodyOffsetHeight - line01Height -  bottomlineHeight) + "" + "px"
		  //if(typeof(document.getElementById('sContent2')) != "undefined") document.getElementById('sContent2').style.height = contentHeight + "px";  
			  
	}

		  
}
