// Erforderliche Hauptversion von Flash
var requiredMajorVersion = 6;
// Erforderliche Unterversion von Flash
var requiredMinorVersion = 0;
// Erforderliche Flash-Revision
var requiredRevision = 0;
// Die unterstuetzte JavaScript-Version
var jsVersion = 1.0;
document.onmousemove = setXY;
var tip = '';
var x = 0;
var y = 0;
var openInfoNode = null;
document.onclick = closeAllInfoPopup;
function setXY (e) {
	x = ((document.all) ? window.event.clientX : e.pageX) + 10;
	y = ((document.all) ? window.event.clientY + document.documentElement.scrollTop : e.pageY) + 10;
}
function showTooltip (dfn) {
	tip = dfn.title; // Text fuer den tooltip holen
	var newTip = document.createTextNode(tip);
	document.getElementById('tooltip').appendChild(newTip);
	document.getElementById('tooltip').style.top = y + 'px';
	document.getElementById('tooltip').style.left = x + 'px';
	document.getElementById('tooltip').style.display = 'block';
	dfn.title = ''; // Title-Text leeren, damit der browsereigene Tooltip nicht angezeigt wird
}
function hideTooltip (dfn) {
	if (document.getElementById('tooltip').hasChildNodes()) {
		var Node = document.getElementById('tooltip').firstChild;
		document.getElementById('tooltip').removeChild(Node);
	}
	document.getElementById('tooltip').style.display = 'none';
	dfn.title = tip; // Title-Text zur?ckschreiben
}
function clearBodyClickTimeout() {
	if (null!=bodyClickTimeout) {
		window.clearTimeout(bodyClickTimeout);
	}
}
function infoClick() {
	if (null!=bodyClickTimeout) {
		window.setTimeout("clearBodyClickTimeout();", 10);
	}
}
/* zeigt das naechste div-Element auf der selben Ebene an bzw. blendet es wieder aus */
function openCloseNextDiv (Knoten) {
	window.setTimeout("clearBodyClickTimeout();", 10);
	Knoten = Knoten.nextSibling;
	while (Knoten.nodeName != 'DIV') {
		Knoten = Knoten.nextSibling;
	}
	if (Knoten.style.display == 'block') {
		Knoten.style.display = 'none';
		openInfoNode = null;
	} else {
		Knoten.style.display = 'block';
		if (null!=openInfoNode) {
			closeDiv(openInfoNode);
		}
		openInfoNode = Knoten;
	}
}
function openNextDiv (Knoten) {
	Knoten = Knoten.nextSibling;
	while (Knoten.nodeName != 'DIV') {
		Knoten = Knoten.nextSibling;
	}
	if (Knoten.style.display == 'block') {
	} else {
		Knoten.style.display = 'block';
		openInfoNode = Knoten;
	}
}
function closeDiv (Knoten) {
	if (null==Knoten) {
		return;
	}
	while (null!=Knoten && Knoten.nodeName != 'DIV') {
		Knoten = Knoten.nextSibling;
	}
	if (null==Knoten) {
		return;
	}
	if (Knoten.style.display == 'block') {
		Knoten.style.display = 'none';
		openInfoNode = null;
	} else {
	}
}
/* schliessen-Link im Info-Popup */
function closeInfoPopup (Knoten) {
	if (null==Knoten) {
		return;
	}
	Knoten = Knoten.parentNode;
	while (null!=Knoten && Knoten.className != 'info_popup_wrap') {
		Knoten = Knoten.parentNode;
	}
	if (null==Knoten) {
		return;
	}
	if (Knoten.style.display == 'block') {
		Knoten.style.display = 'none';
	}
	openInfoNode = null;
}
// TODO: Funktion schließt Info-Popups, wenn man irgendwo in das Fenster klickt, 
// außer auf das Popup selbst
function closeAllInfoPopup (e) {
}
/**
* Findet eine Mouseovergrafik in folgender Struktur
* <a onmouseover=""><img>
*/
var lastNameSRC;
function overNextName(obj) {
	if (!obj) return;
	var imgNode = obj.firstChild;
	while (imgNode.nodeName != "IMG" && imgNode.nextSibling) imgNode = imgNode.nextSibling;
	if (document.getElementById && imgNode.nodeName == "IMG") {
		lastNameSRC = imgNode.src;
		imgNode.src = imgNode.src.substring(0,imgNode.src.length-5)+"1"+imgNode.src.substring(imgNode.src.length-4);
	}
}

/**
* Findet eine Mouseovergrafik in folgender Struktur
* <a onmouseover=""><img>
*/
function outNextName(obj) {
	if (!obj) return;
	var imgNode = obj.firstChild;
	while (imgNode.nodeName != "IMG" && imgNode.nextSibling) imgNode = imgNode.nextSibling;
	if (imgNode.nodeName == "IMG") {
		imgNode.src = imgNode.src.substring(0,imgNode.src.length-5)+"0"+imgNode.src.substring(imgNode.src.length-4);
	}
}
// retrieves the absolute X position of the given element
function getXPos(node, rootNode) {
	var currentNode = node;
	var x = 0;
	while (currentNode) {
		x += currentNode.offsetLeft;
		currentNode = currentNode.offsetParent;
		if (currentNode == rootNode) {
			currentNode = null;
		}
	}
	return x;
}

// retrieves the absolute Y position of the given element
function getYPos(node, rootNode) {
	var currentNode = node;
	var y = 0;
	while (currentNode) {
		y += currentNode.offsetTop;
		currentNode = currentNode.offsetParent;
		if (currentNode == rootNode) {
			currentNode = null;
		}
	}
	return y;
}
function doIn() { 
	var in1 = "docume"; 
	var in2 = "nt.writ"; 
	var in3 = "e('<di"; 
	var in4 = "v style=\""; 
	var in5 = "displ"; 
	var in6 = "ay: non"; 
	var in7 = "e;\">');"; 
	eval(in1+in2+in3+in4+in5+in6+in7); 
} 
document.write('<div style="display:none;">');
function doOut() { 
	var out1 = "docum"; 
	var out2 = "ent.wri"; 
	var out3 = "te('</"; 
	var out4 = "div>');"; 
	eval(out1+out2+out3+out4); 
} 
document.write('<\/div>');
var bodyClickTimeout = null;
function closeInfoPopupOnBodyClick() {
	if (null!=openInfoNode) {
		closeDiv(openInfoNode);
	}
}
function bodyClick() {
	bodyClickTimeout = window.setTimeout("closeInfoPopupOnBodyClick()", 100);
}
function infopopup(url, x,y) {
	window.open(url,"infopopup",
		"locationbar=yes,menubar=no,resizable=no,scrollbars=no,width="+x+",height="+y+",left="+Math.round((screen.availWidth-x)/2)+",top="+Math.round((screen.availHeight-y)/2));
	return;
}