
// Modus feststellen: Standardkomform=CSS1compat oder Quirks=BackCompat
//alert ("Modus: "+document.compatMode);

//Paspartut
var ppt = true;


/*  Autor, Entwicklung 8/2002 Kristof Lipfert Duesseldorf    */
 /*  Version 2005-12-09                                  */

if(document.ids)x='nc4';
else if( document.all && !document.getElementById )x='ie4';
else if( window.opera && !document.createElement )x='op5';
else if( window.opera && window.getComputedStyle )  {
          if(document.createRange)x='op8';
            else if(window.navigate)x='op7.5';
                             else x='op7.2';                   }
else if( window.opera && document.compatMode )x='op7';
else if( window.opera && document.releaseEvents )x='op6';
else if( document.contains && !window.opera )x='kq3';
else if(window.pkcs11&&window.XML)x='f15';
else if( window.getSelection && window.atob )x='nn7';
else if( window.getSelection && !document.compatMode )x='nn6';
else if( window.clipboardData && document.compatMode )
  x=window.XMLHttpRequest? 'ie7' : 'ie6';
else if( window.clipboardData ){x='ie5';
     if( !document.createDocumentFragment ) x+='.5';
     if( document.doctype && !window.print ) x+='m';}
else if( document.getElementById && !document.all ) x='op4';
else if( document.images && !document.all ) x='nn3';
else if(document.clientWidth&&!window.RegExp)x='kq2';
else x='???';

//alert(x);

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;

//Rand oben und unten
//hoehe=hoehe-30;

//Border festlegen
var border=1;

//Gesamthöhe - Höhe des oberen, nicht scrollbaren Bereichs (Rand wird nicht abgezogen)
var scroll = hoehe-130; 
 
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 : 970px;');
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 : Gray;');
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>');

}
