﻿function position_left (breite)
{
	var breite01 = breite;
	//window.alert(breite01);
	if (breite01 > 900)
	{
		breite01=breite01-900;
		breite01=breite01 / 2;
	}
	else
	{
		breite01=0;
		
	}
	if (breite01<=0)
	{
		breite01=0;
	}
	if (document.getElementById("main"))
	{
		document.getElementById("main").style.left = breite01+'px';
	}
}
function position_top (hoehe)
{
	var hoehe01 = hoehe;
	if (hoehe01 > 675)
	{
		hoehe01=hoehe01-675;
		hoehe01=hoehe01 / 2;
	}
	else
	{
		hoehe01=0;
	}
	if (hoehe01<=0)
	{
		hoehe01=0;
	}
	if (document.getElementById("main"))
	{
		document.getElementById("main").style.top = hoehe01+'px';
	}
}

function fenster_hoehe () 
{
	  if (window.innerHeight) 
	  {
	  	  //window.alert("window:"+window.innerHeight);
	  	  return window.innerHeight;
	  } 
	  else if (document.body && document.body.offsetHeight) 
	  {
		 //window.alert("offset:"+document.body.offsetHeight);
	    return document.body.offsetHeight;
	  }
	  else if (document.documentElement.clientHeight) 
	  {
		//window.alert("client:"+document.body.offsetHeight);
	    return document.documentElement.clientHeight;
	  }
	  else 
	  {
	    return 0;
	  }
}
function fenster_breite () 
{
	  if (window.innerWidth) 
	  {
	  	  // Netscape
	  	  //window.alert("window:"+window.innerWidth);
	  	  return window.innerWidth;
	  } 
	  else if (document.body && document.body.offsetWidth) 
	  {
		 // IE 
		 //window.alert("offset:"+document.body.offsetWidth);
	    return document.body.offsetWidth;
	  }
	  else if (document.documentElement.clientWidth) 
	  {
		// IE je nach Modus
		//window.alert("client:"+document.body.clientHeight);
	    return document.documentElement.clientWidth;
	  }
	  else 
	  {
	    return 0;
	  }
}


