
// Modus feststellen: Standardkomform=CSS1compat oder Quirks=BackCompat
//alert(document.compatMode);



// Bei 800x600 wird as Script nicht ausgeführt
if(screen.width >= 1024) {

//Höhe des inneren Fensters ermitteln
if (window.innerHeight)
{
  var hoehe = window.innerHeight;	   // hoehe ns / mozilla
}
else if(document.documentElement.offsetHeight)
{
  var hoehe = document.documentElement.offsetHeight;  // hoehe ie
}
 else
{
  var hoehe = 594;  			   // standardhoehe festlegen, wenn nicht ermittelt
}

//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-190; 
 
var top = (hoehe/2)-hoehe;
top = top -(border);

//alert ('Höhe: '+hoehe+' Scroll: '+scroll);
//CSS mit variablen Maßen schreiben 

document.writeln ('<style type="text/css">');
document.writeln ('/* <![CDATA[ */');

document.writeln ('@media all {'); 

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 ('font-family : Verdana, Arial, Helvetica, sans-serif;');
document.writeln ('} ');

document.writeln ('#container { ');
document.writeln ('position : absolute;');
document.writeln ('top : 50%;');
document.writeln ('left : 50%;');
document.writeln ('margin-top : '+top+'px;');
document.writeln ('margin-left : -512px;');
document.writeln ('height : '+hoehe+'px;');
document.writeln ('width : 1024px;');
document.writeln ('background-color : #ffffcc;');
document.writeln ('visibility : visible;');
document.writeln ('border : '+border+'px;');
document.writeln ('border-style : solid;');
document.writeln ('border-color : #000000;');
document.writeln ('} ');

document.writeln ('#scroll { ');
document.writeln ('height : '+scroll+'px;');
document.writeln ('width : 1024px;');
document.writeln ('overflow : auto;');
document.writeln ('} ');
document.writeln ('}');

//nur in diesem Web
var miketta = hoehe-75;
document.writeln ('#Ebene3 {');
document.writeln ('position:absolute;');
if (hoehe < 593) document.writeln ('visibility: hidden;');
document.writeln ('width:220px;');
document.writeln ('height:54px;');
document.writeln ('z-index:3;');
document.writeln ('left: 0px;');
document.writeln ('top: '+miketta+'px;');
document.writeln ('}');

document.writeln ('/* ]]> */');
document.writeln ('</style>');

}

