function warning(inp) 
{
	inp.style.backgroundColor = "#ffffff";
	inp.style.borderColor = "#ff0000";
}
function aktiv(inp) 
{
	inp.style.backgroundColor = "#ffffff";
	inp.style.borderColor = "#CBCB2C";
}
function inaktiv(inp)
{
	inp.style.backgroundColor = "#ffffff";
	inp.style.borderColor = "#B9B9AB";
}


function openw(theURL,winName,features) {
imagenews = new Image();imagenews.src = ""+theURL;
var fenster = window.open("",winName,features);

fenster.document.open();
fenster.document.write("<html><head><title>::  Spinoff ::</title><link rel='stylesheet' href='style.css' type='text/css'></head><body bgcolor='#ECECE7'><table width='100%' height='100%' cellpadding='0' cellspacing='0' border='0'><tr><td align='center'><img src='"+imagenews.src+"' class='bild'></td></tr><tr><td align='center' height='25'><a href='javascript:window.close()'>Fenster schlie&szlig;en</a></td></tr></table></body></html>");
fenster.document.close();


fenster.focus();
}


function fenster(Url,breite,hoehe)
    { 
      
      // Fenstergrösse festlegen
      var fenster_property = "width=" + breite + ",height=" + hoehe + ",resizable=0,scrollbars=1";
      // Ausrichtung Bildschirmmitte 
      var abstand_links = Math.ceil((screen.width - breite) / 2);
      var abstand_oben = Math.ceil((screen.height - hoehe - 60) / 2);
      fenster_property += ",screenX=" + abstand_links + ",screenY=" + abstand_oben +",left=" + abstand_links + ",top=" + abstand_oben;
	  
      // Fenster öffnen
	  fensternew = window.open(Url,"spinoff",fenster_property);
	  fensternew.focus();
   }



function getsize()
{
	// Breite und Hoehe des Anzeigebereiches im Browserfenster ermitleln 
	if (self.innerWidth) // all except Explorer 
	{ 
		breite = self.innerWidth; 
	} 
	else if (document.documentElement && document.documentElement.offsetWidth) // Explorer 6 Strict Mode 
	{ 
		breite = document.documentElement.offsetWidth; 
	} 
	else if (document.body) // other Explorers 
	{ 
		breite = document.body.clientWidth; 
	}// Breite und Hoehe des Anzeigebereiches im Browserfenster ermitleln 
	
	
	
	if (self.innerHeight) // all except Explorer 
	{ 
		hoehe = self.innerHeight; 
	} 
	else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode 
	{ 
		hoehe = document.body.clientHeight;
	} 
	else if (document.body) // other Explorers 
	{ 
		hoehe = document.body.clientHeight;
	}
	
	vbreite = (breite - 10)/100*100;
	vhoehe = hoehe - 10;
	startx = (vbreite - 827)/2;
	starty = 0;
	xschriftzug = hoehe - 90;
	if(startx < 0){startx = 0};
	if(starty < 0){starty = 0};
	leftpadding = 0;
	toppadding = 0;
	bottompadding = 0;
	
}



function setelements(korrektur)
{
	document.getElementById("hauptfenster").style.left = (startx+korrektur)+"px";
	document.getElementById("inhalt").style.left = leftpadding+"px";
	document.getElementById("inhalt").style.top = toppadding+"px";
	//alert(breite);
}



var seiteaktiv;

function siteaktiv(zustand)
{
	seiteaktiv = zustand;
}

function setfocusscrollContentDiv()
{
	if(seiteaktiv)
	{
		document.getElementById("scrollContentDiv").focus();
	}
}

window.onresize = function() 
{
	getsize();
	setelements(0);
}

