var BROWSER=new altProps();

function buttonOver(text) {
window.onerror = stopErrors;
document.getElementById("" + text +"").style.backgroundColor=ButtonFarbeOver;
}

function buttonOut(text) {
window.onerror = stopErrors;
document.getElementById("" + text +"").style.backgroundColor=ButtonFarbeOut;
}

function zentrieren() {
window.onerror = stopErrors;
var BROWSER=new altProps();
  if(! BROWSER.ns4) {
	if(BROWSER.ns6) {var rand=(window.innerWidth-764)/2;}
	else if (document.all){var rand=(document.body.offsetWidth-764)/2;}
	else {var rand=(screen.availWidth-764)/2;}
document.open();
document.write("<style type='text/css'>body {margin-left:" + rand + "px;margin-right:" + rand + "px;}</style>");
document.close();
}
}

function layout(cssFile) {
window.onerror = stopErrors;
var BROWSER=new altProps();
if(screen.width <1024) {
text="<link rel='stylesheet' href='styles/" + cssFile + "800.css' type='text/css'>";
}
else if (screen.width >= 1024 && screen.width < 1200){
text="<link rel='stylesheet' href='styles/" + cssFile + "1024.css' type='text/css'>";
}
else if (screen.width >= 1200){
text="<link rel='stylesheet' href='styles/" + cssFile + "1200.css' type='text/css'>";
}
else {
text="<link rel='stylesheet' href='styles/" + cssFile + ".css' type='text/css'>";
}


if(BROWSER.op) {
text=text + "<link rel='stylesheet' href='styles/" + cssFile + "_op.css' type='text/css'>";
} else if (BROWSER.ns4) {
text="<link rel='stylesheet'  href='styles/" + cssFile + "_ns4.css' type='text/css'>";
} else if (BROWSER.ff) {
text=text + "<link rel='stylesheet' href='styles/" + cssFile + "_ff.css' type='text/css'>";
}

document.open();
document.write(text);
document.close();
}

function altProps(){
this.w3c=(document.getElementById)?true:false;
this.ns4=(document.layers)?true:false;
this.ie4=(document.all && !this.w3c)?true:false;
this.ie5=(document.all && this.w3c)?true:false;
this.ns6=(this.w3c && navigator.appName.indexOf("Netscape")>=0 )?true:false;
this.op=(navigator.userAgent.search(/Opera/)>=0)?true:false;
this.ff=(navigator.userAgent.search(/Firefox/)>=0)?true:false;
}

function InfoFenster(FensterLink,FensterName,breite,hoehe) {
window.onerror = stopErrors;
var NeuesFenster= window.open(FensterLink,FensterName,'dependent=yes,scrollbars=yes,status=no,menubar=no,resizable=yes,location=no,toolbar=no,width='+ breite +',height=' + hoehe +'');
NeuesFenster.focus();

}

 function stopErrors() {
 return true;
}
window.onerror = stopErrors;



