// Objekt-Referenz holen
function getObject(id) { 
	if (document.all) {
		if (typeof document.all[id] != "undefined" && document.all[id] != null)
			return document.all[id];
	}
	else if (document.getElementById) { 
		if (typeof document.getElementById(id) != "undefined" && document.getElementById(id) != null)
			return document.getElementById(id);
	}
	return false;
}

function schreiben(name, second, top) {
	var theaddy = name + "@" + second + "." + top;
	var thetext = (schreiben.arguments.length > 3) ? schreiben.arguments[3] : theaddy;
	document.write("<a href=\"mailto:" + theaddy + "\">" + thetext + "</a>");
}

snContainers = new Object();

function setSubnavi(elId) {
	snContainers[elId] = getObject(elId);
}

function subnavi(elId, mode) {
	if (snContainers[elId]) {
		snContainers[elId].style.display = mode == "hide" ? "none" : "block";
		snContainers[elId].parentNode.className = mode == "hide" ? "normal" : "over";
	}
}

function subnaviClear() { 
	for (var elId in snContainers) {
		subnavi(elId, "hide");
	}
}

function subnaviOff() { 
	start_timer();
}

function subnaviOn(elId) {
	subnaviClear();
	stop_timer();
	subnavi(elId);
}

timeout = 0;
function start_timer() {
	stop_timer();
	timeout = setTimeout("subnaviClear()", 700);
}
function stop_timer() { 
	if (timeout) clearTimeout(timeout);
}





function toggleSearchForm() {
	var sf = getObject("searchForm");
	var sb = getObject("searchNavButton");
	if (sf.style.display == "block") {
		sf.style.display = "none";
		sb.className = "";
		sb.blur();
	}
	else {
		sf.style.display = "block";
		sb.className = "hier";
		getObject("searchField").focus();
	}
}
function hideSearchForm() {
	getObject("searchForm").style.display = "none";
}

