window.defaultStatus = 'ITB Ingenieure';
function changeframes(cont) { parent.frames.itbright.location = cont; }
function popup(url) { extrawindow = window.open(url,'extrawindow','width=700, height=500, resizable=0, menubar=0, locationbar=0, scrollbars=0, status=0'); }
function popup_weg(url) { extrawindow = window.open(url,'extrawindow','width=900, height=700, resizable=0, menubar=0, locationbar=0, scrollbars=0, status=0'); }

// dropdown im content
function quick(x) { parent.frames.itbright.location = x; }

// verrŠter-funktion
function snitch(a,b,c,d,e){
	window.top.document.getElementById("say_clicked_main").innerHTML = window.top.clicked_main;
	window.top.document.getElementById("say_clicked_sub").innerHTML = window.top.clicked_sub;
	window.top.document.getElementById("say_quickfinder_click").innerHTML = window.top.quickfinder_click;
	window.top.document.getElementById("say_language_clicked_sub").innerHTML = window.top.language_clicked_sub;
	window.top.document.getElementById("say_language_change").innerHTML = window.top.language_change;
}

// rollover
function flipit(Bildname,zustand,maus) {
	if (Bildname == window.top.clicked_main) {
		if (maus == "over") { window.document.images[Bildname].src = zustand.src; }
		else if (maus == "out") {
			if (window.top.clicked_sub == "null") { window.document.images[Bildname].src = "img/nav_" + Bildname + "_a.gif"; }
			else { window.document.images[Bildname].src = "img/nav_" + Bildname + "_a2.gif"; }
		 }
	} else {
		if (Bildname == window.top.clicked_sub) {
			if (maus == "over") { window.document.images[Bildname].src = zustand.src; }
			else if (maus == "out") { window.document.images[Bildname].src = "img/" + Bildname + "_a.gif"; }
		} else { window.document.images[Bildname].src = zustand.src; }
	}
}

// click
function klick(Bildname,zustand) {
	if (window.top.clicked_sub != "null") { window.document.images[window.top.clicked_sub].src = "img/" + window.top.clicked_sub + ".gif"; }
	// hauptrubrik
	if (Bildname == window.top.clicked_main) {
		// unterrubrik zurŸcksetzen, hauptrubrik auf a
		
		window.document.images[Bildname].src = "img/nav_" + Bildname + "_a.gif";
		window.top.clicked_sub = "null";
	} else {
		// hauptrubrik auf a2
		window.document.images[window.top.clicked_main].src = "img/nav_" + window.top.clicked_main + "_a2.gif";
		window.document.images[Bildname].src = zustand.src;
		window.top.clicked_sub = Bildname;
	}
}

// sprache Šndern
function change_language(language) {
	window.top.language_clicked_sub = window.top.clicked_sub;
	window.top.language_change = "true";
	if (window.top.clicked_main == "null") {
		parent.frames.itbleft.location = "../" + language + "/index_nav.htm";
	} else {
		parent.frames.itbleft.location = "../" + language + "/nav_" + window.top.clicked_main + ".htm";
		if (window.top.clicked_sub == "null") { parent.frames.itbright.location = "../" + language + "/" + window.top.clicked_main + ".htm"; }
		else { parent.frames.itbright.location = "../" + language + "/" + window.top.clicked_sub + ".htm"; }
	}
	parent.frames.itb_bot.location = "../" + language + "/itb_bot.htm";
	
}

// sprachŠnderungen, immer am ende
function language_check() {
	if (window.top.language_change == "true") {
		window.top.clicked_sub = window.top.language_clicked_sub;
		if (window.top.language_clicked_sub != "null") {
			if (window.top.clicked_main != "null") {
				window.document.images[window.top.clicked_main].src = "img/nav_" + window.top.clicked_main + "_a2.gif";
				window.document.images[window.top.clicked_sub].src = "img/" + window.top.clicked_sub + "_a.gif";
			}
		}
	window.top.language_change = "null";
	}
}

// prŸfen, ob im quickfinder ausgewŠhlt oder die sprache geŠndert wurde und entsprechend bilder tauschen
function quickfinder_change() {
	// clicked_sub ŸberprŸfen
	if (window.top.language_clicked_sub != "null") {
		window.top.clicked_sub = window.top.language_clicked_sub;
		window.top.language_clicked_sub = "null";
	}

	//quickfinder prŸfen
	if (window.top.quickfinder_click == "1"){
		window.top.clicked_sub = window.top.quickfinder_clicked_sub;
		window.top.quickfinder_click = "null";
		if (window.top.clicked_main != "null") {
			if (window.top.quickfinder_clicked_sub == "null") {
				window.document.images[window.top.clicked_main].src = "img/nav_" + window.top.clicked_main + "_a.gif";
			} else {
				window.document.images[window.top.clicked_main].src = "img/nav_" + window.top.clicked_main + "_a2.gif";
				window.document.images[window.top.clicked_sub].src = "img/" + window.top.clicked_sub + "_a.gif";
			}
		}
	}
}

// navigationsframe Šndern, wenn im contentframe ausgewŠhlt wird
function change_nav(x,y) {
	parent.itbleft.document.images[y].src = 'img/nav_' + y + '_a2.gif';
	parent.itbleft.document.images[x].src = 'img/' + x + '_a.gif';
	window.top.clicked_main = y;
	window.top.clicked_sub = x;
}

