var isNS4 = isIE4 = isNS6 = false;

var path = (site!=null)? "../" : "";



function clientCheck() {

	if (navigator.appName.indexOf("Microsoft")>-1){

		isIE4 = true;

	}

	else if (navigator.appName=="Netscape") {

		if (parseInt(navigator.appVersion)==4){

			isNS4 = true;

			alert("Ihr Netscape Browser wird nicht unterstützt.\nBitte besuchen Sie die Seite mit Browserversion 6+ oder InternetExplorer ab Version 4+");

		}

		else if (parseInt(navigator.appVersion)>=5) {

			isNS6 = true;

		}

	}

	else {	alert("Unknown Browser!\nBitte verwenden Sie einen Netscape-(NS6+) oder MS-Browser(IE4+)!"); }

}

//clientCheck();



var button = new Array();

var button_o = new Array();

function navload(){

	for(var i=1; i < 10; i++){

	                button[i] = new Image();

	                button[i].src = path + "img/button_0" + i + ".gif";

					button_o[i] = new Image();

	                button_o[i].src = path + "img/button_0" + i + "_o.gif";

	}

}

navload();



function chgImg(imgLayer,imgName,imgObject,imgUrl){

	var imgInterim = (imgObject!=0)?imgObject.src:imgUrl;

	/*if(isIE4)*/ eval("document.all."+ imgLayer +".document." + imgName + ".src = \""+ imgInterim +"\"");

	if(isNS4) eval("document."+ imgLayer +".document.images['"+ imgName +"'].src = \""+ imgInterim +"\"");

	if(isNS6) eval("document.getElementById(\""+imgName+"\").src = \""+imgInterim+"\"");

}



function setBGcolor(item,color){

/*if(isIE4)*/ eval("document.all." + item + ".style.backgroundColor='" + color + "'");

if(isNS4){}

if(isNS6) eval("document.getElementById('" + item + "').style.backgroundColor='" + color + "'");

}



function setColor(item,color){

/*if(isIE4)*/ eval("document.all." + item + ".style.color='" + color + "'");

if(isNS4){}

if(isNS6) eval("document.getElementById('" + item + "').style.color='" + color + "'");

}



function timeColor(){

var jetzt = new Date();

var m = jetzt.getMinutes();

var hex = "#000000";

if((0<=m)&&(m<=9)) hex = "#591B00";

if((10<=m)&&(m<=18)) hex = "#513D00";

if((17<=m)&&(m<=23)) hex = "#404400";

if((24<=m)&&(m<=30)) hex = "#00332C";

if((31<=m)&&(m<=37)) hex = "#000000";

if((38<=m)&&(m<=44)) hex = "#000342";

if((45<=m)&&(m<=51)) hex = "#3C0015";

if((52<=m)&&(m<=59)) hex = "#000000";

//591B00(drot) 513D00(sepia) 404400(dgruen) 00332C(dtuerkis) 000342(dblau) 3C0015(dvio)

//alert(m);

setColor('tr_text',hex);

setBGcolor('td_title',hex);

setBGcolor('tr_nav',hex);

}



function showLayer(layerName){

	/*if(isIE4)*/ eval("document.all."+ layerName +".style.visibility = \"visible\"");

	if(isNS4) eval("document."+ layerName +".visibility = \"visible\"");

	if(isNS6) eval("document.getElementById('"+layerName+"').style.visibility = \"visible\"");

}



function hideLayer(layerName){

	/*if(isIE4)*/ eval('document.all.'+ layerName +'.style.visibility = \'hidden\'');

	if(isNS4) eval('document.'+ layerName +'.visibility = \'hidden\'');

	if(isNS6) eval("document.getElementById('"+layerName+"').style.visibility = \'hidden\'");

}
