click_status_1=0
click_status_2=0
click_status_3=0
click_status_4=0
var clicked=""
var gtype=".gif"
var selstate="_over"
if (typeof(loc)=="undefined" || loc==""){
	var loc=""
	if (document.body&&document.body.innerHTML){
		var tt = document.body.innerHTML.toLowerCase();
		var last = tt.indexOf("nav_bottom.js\"");
		if (last>0){
			var first = tt.lastIndexOf("\"", last);
			if (first>0 && first<last) loc = document.body.innerHTML.substr(first+1,last-first-1);
		}
	}
}

document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>");
document.write("<td><img src=\"../images/nav_bottom/nav_bottom_left.gif\" alt=\"\" width=\"6\" height=\"17\"></td>");
tr(false);
writeButton("","../fruehstueck/fruehstueck.html","nav_bottom_b1",104,17,"frühstück","main",0);
writeButton("","../speisen/suppen.html","nav_bottom_b2",104,17,"speisen","main",0);
writeButton("","../getraenke/kaffee.html","nav_bottom_b3",104,17,"getränke","main",0);
writeButton("","../nav_bottom/wochenkarte.html","nav_bottom_b4",104,17,"wochenkarte","main",0);
tr(true);
document.write("<td><img src=\"../images/nav_bottom/nav_bottom_right.gif\" alt=\"\" width=\"4\" height=\"17\"></td>");
document.write("</tr></table>")
loc="";

function tr(b){}

function turn_over(name) {

	if (document.images != null && clicked != name) {
		document[name].src = document[name+"_over"].src;

		if (document[name].src == document["nav_bottom_b1"].src && click_status_1 != 1) 
			parent.bottom_1.document.images[0].src = "images/frames/bottom_1_over.gif";
	
		if (document[name].src == document["nav_bottom_b2"].src && click_status_2 != 1) 
			parent.bottom_2.document.images[0].src = "images/frames/bottom_2_over.gif";

	
		if (document[name].src == document["nav_bottom_b3"].src && click_status_3 != 1) 
			parent.bottom_3.document.images[0].src = "images/frames/bottom_3_over.gif";

	
		if (document[name].src == document["nav_bottom_b4"].src && click_status_4 != 1) 
			parent.bottom_4.document.images[0].src = "images/frames/bottom_4_over.gif";
	}
}

function turn_off(name) {
	if (document.images != null && clicked != name) {
		document[name].src = document[name+"_off"].src;

		if (document[name].src == document["nav_bottom_b1"].src && click_status_1 != 1)
			parent.bottom_1.document.images[0].src = "images/frames/bottom_1.gif";

		if (document[name].src == document["nav_bottom_b2"].src && click_status_2 != 1) 
			parent.bottom_2.document.images[0].src = "images/frames/bottom_2.gif";

	
		if (document[name].src == document["nav_bottom_b3"].src && click_status_3 != 1) 
			parent.bottom_3.document.images[0].src = "images/frames/bottom_3.gif";

	
		if (document[name].src == document["nav_bottom_b4"].src && click_status_4 != 1) 
			parent.bottom_4.document.images[0].src = "images/frames/bottom_4.gif";
	}
}

function reg(gname,name)
{
if (document.images)
	{
	document[name+"_off"] = new Image();
	document[name+"_off"].src = "../images/nav_bottom/"+gname+gtype;
	document[name+"_over"] = new Image();
	document[name+"_over"].src = "../images/nav_bottom/"+gname+"_over"+gtype;
	}
}


function button_click(name) {

 parent.nav_top_under.document.images[0].src = "images/frames/nav_top_under_context.gif";
 parent.nav_bottom_over.document.images[0].src = "images/frames/nav_bottom_under_context.gif";

 parent.top_1.document.images[0].src = "images/frames/top_1.gif";
 parent.top_2.document.images[0].src = "images/frames/top_2.gif";
 parent.top_3.document.images[0].src = "images/frames/top_3.gif";
 parent.top_4.document.images[0].src = "images/frames/top_4.gif";


 if (document[name].src == document["nav_bottom_b1"].src){
	click_status_1=1;

	click_status_2=0;
	click_status_3=0;
	click_status_4=0;

 	parent.bottom_1.document.images[0].src = "images/frames/bottom_1_over.gif";

	parent.main_right.location.href = "../fruehstueck/fruehstueck1.html";

 	parent.bottom_2.document.images[0].src = "images/frames/bottom_2.gif";
 	parent.bottom_3.document.images[0].src = "images/frames/bottom_3.gif";
 	parent.bottom_4.document.images[0].src = "images/frames/bottom_4.gif";

 }
 if (document[name].src == document["nav_bottom_b2"].src){
	click_status_2=1;

	click_status_1=0;
	click_status_3=0;
	click_status_4=0;

 	parent.bottom_2.document.images[0].src = "images/frames/bottom_2_over.gif";

	parent.main_right.location.href = "../speisen/speisen.html";

 	parent.bottom_1.document.images[0].src = "images/frames/bottom_1.gif";
 	parent.bottom_3.document.images[0].src = "images/frames/bottom_3.gif";
 	parent.bottom_4.document.images[0].src = "images/frames/bottom_4.gif";

 }
 if (document[name].src == document["nav_bottom_b3"].src){
	click_status_3=1;

	click_status_1=0;
	click_status_2=0;
	click_status_4=0;

 	parent.bottom_3.document.images[0].src = "images/frames/bottom_3_over.gif";

	parent.main_right.location.href = "../getraenke/getraenke.html";

 	parent.bottom_2.document.images[0].src = "images/frames/bottom_2.gif";
 	parent.bottom_1.document.images[0].src = "images/frames/bottom_1.gif";
 	parent.bottom_4.document.images[0].src = "images/frames/bottom_4.gif";

 }
 if (document[name].src == document["nav_bottom_b4"].src){
	click_status_4=1;

	click_status_1=0;
	click_status_2=0;
	click_status_3=0;

 	parent.bottom_4.document.images[0].src = "images/frames/bottom_4_over.gif";

	parent.main_right.location.href = "../wochenkarte/wochenkarte.html";

 	parent.bottom_2.document.images[0].src = "images/frames/bottom_2.gif";
 	parent.bottom_3.document.images[0].src = "images/frames/bottom_3.gif";
 	parent.bottom_1.document.images[0].src = "images/frames/bottom_1.gif";
	
	parent.nav_top_under.document.images[0].src = "images/frames/nav_top_under_context.gif";
    parent.nav_bottom_over.document.images[0].src = "images/frames/nav_bottom_under_context.gif";
 }
}

function evs(name){ 
 return " onmouseover=\"turn_over('"+ name + "')\" onClick=\"button_click('"+ name + "')\" onmouseout=\"turn_off('"+ name + "')\"";
}

function writeButton(urld, url, name, w, h, alt, target, hsp)
{
	gname = name;
	while(typeof(document[name])!="undefined") name += "x";
	reg(gname, name);
	tr(true);
	document.write("<td>");
	if (alt != "") alt = " alt=\"" + alt + "\"";
	if (target != "") target = " target=\"" + target + "\"";
	if (w > 0) w = " width=\""+w+"\""; else w = "";
	if (h > 0) h = " height=\""+h+"\""; else h = "";	
	if (url != "") url = " href=\"" + urld + url + "\"";
	
	document.write("<a " + url + evs(name) + target + ">");	
	
	if (hsp == -1) hsp =" align=\"right\"";
	else if (hsp > 0) hsp = " hspace=\""+hsp+"\"";
	else hsp = "";
	
	document.write("<img src=\"../images/nav_bottom/"+gname+gtype+"\" name=\"" + name + "\"" + w + h + alt + hsp + " border=\"0\" /></a></td>");
	tr(false);
}
