
// Modus feststellen: Standardkomform=CSS1compat oder Quirks=BackCompat
//alert ("Modus: "+document.compatMode);

//Paspartut
var ppt = true;

// josh: Browserabfage über browser.js

if (x=="nc4") {
    ppt = false; 
    //alert ("nc4"); 
	}
 else if (x=="op7")   {
     ppt = false; 
     //alert ("op7"); 
	 }
else if (x=="op7.2")   {
     ppt = false; 
     //alert ("op7.5"); 
	 }
else if (x=="op7")   {
     ppt = false; 
     //alert ("op7"); 
	 }	 
 else if (x=="op8") {
     ppt = true;  
     //alert ("op8");
	}	
 else if (x=="nn7")   {
     ppt = true; 
     //alert ("nn7"); 
	 }
 else if (x=="nn6")   {
     ppt = false; 
     //alert ("nn6"); 
	 document.writeln ('#menue { top: 300px; }');
	 }
 else if (x=="ie4")  {
     ppt = false;
     //alert ("ie4"); 
}
else if (x=="ie5")  {
     ppt = true;
     //alert ("ie5"); 
}
else if (x=="ie6")  {
     ppt = true;
     //alert ("ie6"); 
}
else if (x=="ie7")  {
     ppt = true;
     //alert ("ie7"); 
}
else if (x=="f15")  {
     ppt = true;
     //alert ("ie7"); 
}
else if (x=="???")  {
     ppt = false;
     //alert ("unbekannt"); 
}

//Höhe des inneren Fensters ermitteln
if (window.innerHeight)
{
  var hoehe = window.innerHeight;	   // hoehe ns / mozilla
}
else if(document.documentElement)
{
  var hoehe = document.documentElement.offsetHeight;  // hoehe ie
}
 else
{
  var hoehe = 594;  			   // standardhoehe festlegen, wenn nicht ermittelt
}


// Bei 800x600 wird as Script nicht ausgeführt

if(screen.width >= 1024 && ppt == true) {
//alert (hoehe);

//maximale Höhe bestimmen (Firefox), die gleiche Höhe wird für hohe Auflösung durch css gesetzt!
var max= 640;
if (hoehe > max) hoehe=max;

//Border festlegen
var border=1;

//Gesamthöhe - Höhe des oberen, nicht scrollbaren Bereichs (Rand wird nicht abgezogen)
var scroll = hoehe-164; 
 
var top1 = (hoehe/2)-hoehe;
top1 = top1 -(border);

//alert ('Höhe: '+hoehe+' Scroll: '+scroll);
//CSS mit variablen Maßen schreiben 

document.writeln ('<style type="text/css">');
document.writeln ('/* <![CDATA[ */');

//Body  - Hintergrund löschen
document.writeln ('body {'); 
//document.writeln ('background-image : none !important'); 
document.writeln ('}'); 

document.writeln ('@media screen {'); 

//Body
document.writeln ('html, body {');
document.writeln ('margin-top : 0;');
document.writeln ('margin-left : 0;');
document.writeln ('height : 100%;');
document.writeln ('width : 100%;');
document.writeln ('overflow : hidden;');
document.writeln ('} ');

//Container
document.writeln ('#container { ');
document.writeln ('position : absolute;');
document.writeln ('top : 50%;');
document.writeln ('left : 50%;');
document.writeln ('margin-top : '+top1+'px;');
document.writeln ('margin-left : -512px;');
document.writeln ('height : '+hoehe+'px;');
document.writeln ('width : 1024px;');
document.writeln ('background-color : #ffffff;');
document.writeln ('background-image : url(../grafik/bg.gif);');
document.writeln ('background-repeat: no-repeat;');
document.writeln ('visibility : visible;');
document.writeln ('border : '+border+'px;');
document.writeln ('border-style : solid;');
document.writeln ('border-color : #185B2E;');
document.writeln ('} ');

//Scrollbereich
document.writeln ('#scroll { ');
document.writeln ('clear: both;');
document.writeln ('height : '+scroll+'px;');
document.writeln ('width : 1024px;');
document.writeln ('overflow : auto;');
document.writeln ('} ');
document.writeln ('}');

document.writeln ('/* ]]> */');
document.writeln ('</style>');

}

