var kosmospath = "";kosmospath = location.pathname.substring(0,location.pathname.indexOf(".nsf"))if(kosmospath=="") kosmospath = "/kosmos/wrs/wrs" //wenn wir uns auf der Startseite befinden (www.kosmos.de)//----------------------------------------------------------------------------------------------------------function openInhalt( fs ){if( top.lang )	{	lang = top.lang	}else	{	lang = location.search.substr(location.search.indexOf("&_lang=")+7,2)	}url = kosmospath + ".nsf/$WebFirstSource/" + fs + "?openDocument&_lang=" +lang	if(top.frames[0])		{		try{top.openURL(url,"","*")}		catch(e){location.href=url}		}else		{		if(opener)			{			try{opener.focus()}catch(e){}			try{opener.top.openURL(url,"","*")}catch(e){}					}		else			{			location.href=url			}		}}//----------------------------------------------------------------------------------------------------------function openNews( fs ){if( top.lang )	{	lang = top.lang	}else	{	lang = location.search.substr(location.search.indexOf("&_lang=")+7,2)	}url = kosmospath + ".nsf/$WebFirstSource/" + fs + "?openDocument&_lang=" +lang	if(top.frames[0])		{		try{top.openURL("*","",url)}		catch(e){location.href=url}		}else		{		if(opener)			{			try{opener.focus()}catch(e){}			try{opener.top.openURL("*","",url)}catch(e){}					}		else			{			location.href=url			}		}}//----------------------------------------------------------------------------------------------------------function openProdukt( fs ){if( top.lang )	{	lang = top.lang	}else	{	lang = location.search.substr(location.search.indexOf("&_lang=")+7,2)	}	var zeit = new Date(); //zum Anh\u00E4ngen eines eindeutig Strings, um das Neuladen des Dokuments zu erzwingen, damit die View und das Newsdokument im onload des Produkts nachgeladen werdenurl = kosmospath + ".nsf/$WebFirstSource/" + fs + "?openDocument&_lang=" +lang + "&unique=" + zeit.getMilliseconds();	if(top.frames[0])		{		//alert("1")		try{top.openURL("leer.html",url,"leer.html")}		catch(e){location.href=url; /*alert("1e")*/ }		}else		{		if(opener)			{			//alert("2")			try{opener.focus()}catch(e){	/*alert("2e")*/}			try{opener.top.openURL("leer.html",url,"leer.html")}catch(e){ /*alert("2ee")*/ }					}		else			{			//alert("3")			location.href=url			}		}}//----------------------------------------------------------------------------------------------------------function openLink( fs ){if(top.openLink && top.location.href != location.href) 	{top.openLink(fs)} //sonst kommt es beim Aufruf von mehreren Links aus einem Popup heraus zu Fehlernelse	{if( top.lang )	{	lang = top.lang	}else	{	lang = location.search.substr(location.search.indexOf("&_lang=")+7,2)	}	if(fs.substring(0,2)=="FS")	{	url = kosmospath + ".nsf/$WebFirstSource/" + fs + "?openDocument&_lang=" + lang	}else	{	url = fs	}if(top.frames[0])		{		f1=window.open(url,"KOSMOSPOPUP","width=600,height=500,toolbar=yes,statusbar=yes,scrollbars=yes,menubar=no,resizable=yes");		f1.focus()		}else		{		top.location.href=url		}			}}//-------------------------------------------------------------------------------------------------------------function cursorHand(thisObject){try	{	thisObject.style.cursor = "pointer"	}catch(e)	{	thisObject.style.cursor = "hand"	}	}//-------------------------------------------------------------------------------------------------------------------function getWKID(){WKID = "";cookies = document.cookie.split("; ") /*Cookie wurde auf der Index-Seite gesetzt*/for( i=0; i<cookies.length; i++ )	{	if( cookies[i].substring(0,5)=="WKID=" ) WKID = cookies[i].substring(5,9999)	}return WKID}//-------------------------------------------------------------------------------------------------------------------function sendePost( empf ){/*Zum Verstecken der Emailadresse vor Spam-Bots*/empf = empf.replace(/xXx/gi,".")empf = empf.replace(/yYy/gi,"@")document.write("<A HREF='mailto:" + empf + "'>" + empf + "</A>")}//-------------------------------------------------------------------------------------------------------------------function setTargetForFileattachments(){for( i=0; i<document.links.length; i++ )	{		L = document.links[i]	if(L.href)		{		fileextension = L.href.substr( L.href.length-4,4 ).toLowerCase()		if( fileextension == ".pdf" || fileextension == ".jpg" || fileextension == ".gif" || fileextension == ".doc" || fileextension == ".xls"  || fileextension == ".zip"  || fileextension == ".bmp" )				L.target="_blank"		}	}}
