BrowserName = navigator.appName;
BrowserVersion = parseInt(navigator.appVersion);
var isNav = 0;
var animate = 0;

if (BrowserName == "Netscape" && BrowserVersion >= 4) {
	animate = 1;
	isNav = 1;	
}
else if (BrowserName == "Microsoft Internet Explorer" && BrowserVersion >= 3) {
	animate = 1;
}

var block = 100;

function msover(num) {
	if (animate == 1) {
		if (isNav) {
			parent.menu.document.layers["pic" + num].document.images["bild" + num].src = "pictures/mdotred.gif";
			parent.menu.document.layers["pic" + (num + 1)].document.images["bild" + (num + 1)].src = "pictures/tmen_on_" + num + ".gif";
		}
		else {
			parent.menu.document.images[num].src = "pictures/mdotred.gif";
			parent.menu.document.images[num + 1].src = "pictures/tmen_on_" + num + ".gif";
		}
	}
}

function msout(num) {
	if (animate == 1) {
		getblockval();
		if (num != block) {
			if (isNav == 1) {
				parent.menu.document.layers["pic" + num].document.images["bild" + num].src = "pictures/mdotgreen.gif";
				parent.menu.document.layers["pic" + (num + 1)].document.images["bild" + (num + 1)].src = "pictures/tmen_off_" + num + ".gif";
			}
			else {
				parent.menu.document.images[num].src = "pictures/mdotgreen.gif";
				parent.menu.document.images[num + 1].src = "pictures/tmen_off_" + num + ".gif";
			}
		}
	}
}	

function msoverhead(num) {
	if (animate == 1) {
		parent.head.document.images["bhead_" + num].src = "pictures/bdotred.gif";
		parent.head.document.images["thead_" + num].src = "pictures/thead_on_" + num + ".gif";
	}
}

function msouthead(num) {
	if (animate == 1) {
		getblockval();
		if (num != block) {
			parent.head.document.images["bhead_" + num].src = "pictures/dotyellow.gif";
			parent.head.document.images["thead_" + num].src = "pictures/thead_off_" + num + ".gif";
		}
	}
}	

function onmenu(num) {
	if (parent.location.href == document.location.href || num == 0) { return };
	changehead(num);
	if (animate == 1) {	
		resetpic();
		msover(num);
	}
}

function onheadmenu(num) {
	
	if (parent.location.href == document.location.href) { return };

	if (animate == 1) {
		resetheadpic();
		msoverhead(num);
	}
}

function resetpic() {
	for (var i = 2; i <= 16; i = i + 2 ) {
		msout(i);
	}
}

function resetheadpic(num) {
	for (var i = 0; i <= 8; i = i + 2 ) {
		msouthead(i);
	}
}

function getblockval() {
	var mystr;
	mystr = parent.show.location.href;
	mystr = mystr.substring(mystr.length-7,mystr.length-5);
	block = parseInt(mystr);
}

function changehead(num) {
	var mystr;
	mystr = parent.head.location.href;
	mystr = mystr.substring(mystr.length-7,mystr.length-5);
	mystr = parseInt(mystr);

	if (num == 6) {
		parent.head.location.href = "head_06.html";
	}
	else if (num == 0) {
		parent.head.location.href = "head_00.html";
	}
	else if (num == 16) {
		parent.head.location.href = "head_16.html";
	}
	else if (num == 18) {
		parent.head.location.href = "head_18.html";
	}	
	else if (num == 14) {
		parent.head.location.href = "head_14.html";
	}
	else {
		if (mystr != 1) { parent.head.location.href = "head_01.html"; }
	}
}