//	Avoid framing
	if(top!=self) top.location=self.location;
//	Decode Email
	function DecodeMailto(x) {
		var n=0;
		var r="";
		for(var i=0; i<x.length; i++) { 
			n = x.charCodeAt(i); 
			if(n>=8364) n=128;
			r += String.fromCharCode(n-2); 
		}
		return r;
	}
	function OpenMailClient(x)	{
		var x="ocknvq<"+x;
		location.href=DecodeMailto(x);
	}
//	Manipulate Links
	function Links() {
		if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var anchor = anchors[i];
			/*anchor.tabindex = i;*/
			if (anchor.getAttribute("href")) {
				anchor.onfocus = function() {
					this.blur();
				}
				if (anchor.className == "link-extern" || anchor.className == "link-download") {
					anchor.target = "_blank";
					if (!anchor.title) anchor.title = "in neuem Fenster öffnen"
					else anchor.title += " (neues Fenster)";
				}
			}
		}
	}
//	RollOver Preload
	var iPath = '/images/global/';
	var suffix = new Array('on','off');
	function preLoadGIF() {
		GIFs = arguments;
		preLoad(GIFs, 'gif');
	}
	function preLoadJPG() {
		JPGs = arguments;
		preLoad(JPGs, 'jpg');
	}
	function preLoad(Pics, Ext) {
		if(document.images) {
			var argLen = Pics.length;
			var iExt = Ext;
			for(var i = 0; i < argLen; i++) {
				var arg = Pics[i];
				var sufLen = suffix.length;
				for(j = 0; j < sufLen; j++) {
					var suf = suffix[j]
					self[arg + '-' + suf] = new Image();
					self[arg + '-' + suf].src = iPath + arg + '-' + suf + '.' + iExt;
				}
			}
		}
	}
//	RollOver Menu
	function rollOver(iSrc, iState) {
		if(document.images && self[iSrc + '-' + iState]) document.getElementById(iSrc).firstChild.firstChild.src = self[iSrc + '-' + iState].src;
	}
	function rollOver2(iThis2, iState2) {
		if(iThis2.parentNode.getAttribute("class") != "on") {
			iSrc2 = iThis2.parentNode.getAttribute("id");
			if(document.images && self[iSrc2 + '-' + iState2]) document.getElementById(iSrc2).firstChild.firstChild.src = self[iSrc2 + '-' + iState2].src;
		}
	}
//	RollOver Content
	function rollOver3(iSrc, iState) {
		if(document.images && self[iSrc + '-' + iState]) document.getElementById(iSrc).src = self[iSrc + '-' + iState].src;
	}
//	Menu DropDown for IE + be nice to MacIE
	function startList() {
		macie =	(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1);
		if (document.all&&document.getElementById) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					if(macie) {
						node.onmousemove=function() {
						this.style.backgroundColor = "#ffffff";
						}
					}
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						if(macie) this.style.backgroundColor = "transparent";
						this.className=this.className.replace(" over", "");
					}
				}
			}
	 	}
	}
//	Call onLoad
	window.onload = function() {
		Links();
		preLoadGIF('menu1','menu2','menu3','menu4','pfeil','pfeil_tr','pfeil_br','pfeil_t');
		preLoadJPG('logo_ws_1','logo_ws_2','logo_ws_3','logo_ws_4','logo_ws_5','logo_ws_6','logo_ws_7','logo_ws_8','logo_ws_9');
		startList();
	}