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=450,toolbar=yes,statusbar=yes,scrollbars=yes,menubar=no,resizable=yes");		f1.focus()		}else		{		top.location.href=url		}			}}//----------------------------------------------------------------------------------------------------------function openAuthorItems( vorname, nachname ){if(top.openAuthorItems && top.location.href != location.href) 	{ top.openAuthorItems( vorname, nachname )}//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)	}	lizeSuffix = (top.lize=="1") ? "_LIZE" : "";	url = kosmospath + ".nsf?openDatabase&_autor=" + nachname+ "~" + vorname +"&_lang=" + lang + "&_lize=" + top.lize	url_intern = kosmospath + ".nsf/$ProdukteListe_AutorAZ" + lizeSuffix + "?openView&RestrictToCategory=" + nachname+ "~" + vorname +"&count=10&openFirstProduct=1&_lang=" + lang				if(top.frames[0])			{			try{top.openURL(url_intern,"leer.html","leer.html")}			catch(e){location.href=url;}			}		else			{			if(opener)				{				try{opener.focus()}catch(e){	}				try{opener.top.openURL(url_intern,"leer.html","leer.html")}				catch(e){location.href=url;}					}			else				{				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"		}	}}//-------------------------------------------------------------------------------------------------------------------function LizenzModus(beschriftung){var aktion = 'top.location = "' + kosmospath + '.nsf/index.html?openPage&_lang="+top.lang+"&_lize=1"'document.write("<INPUT TYPE=BUTTON VALUE='"+beschriftung+"' ONCLICK='"+aktion+"'>")}//-------------------------------------------------------------------------------------------------------------------function openLizenzModus(){top.location = kosmospath + '.nsf/index.html?openPage&_lang='+top.lang+'&_lize=1'}//-------------------------------------------------------------------------------------------------------------------function ButtonFormularAbdruckrechte(beschriftung){var aktion = 'top.openURL("' + kosmospath + '.nsf/$dlgAbdruckrechte?openForm&_lang="+top.lang,"","*");'document.write("<INPUT TYPE=BUTTON VALUE='"+beschriftung+"' ONCLICK='"+aktion+"'>")}//-------------------------------------------------------------------------------------------------------------------function ButtonFormularPruefexemplare(beschriftung){var aktion2 = 'top.openURL("' + kosmospath + '.nsf/$dlgPruefexemplare?openForm&_lang="+top.lang,"","*");'document.write("<INPUT TYPE=BUTTON VALUE='"+beschriftung+"' ONCLICK='"+aktion2+"'>")}//-------------------------------------------------------------------------------------------------------------------function ButtonGewinnspiel(beschriftung, code){var aktion3 = 'openLink("' + kosmospath + '.nsf/gewinnspiel_.html?openForm&_g=' + code + '&_lang="+top.lang);'document.write("<INPUT TYPE=BUTTON VALUE='"+beschriftung+"' ONCLICK='"+aktion3+"'>")}//-------------------------------------------------------------------------------------------------------------------function ButtonNewsletter( thema, beschriftung ){var url = "newsletter_iframe.html?openForm&_url=" ;//OLD: document.write("<FORM onsubmit=\"openLink('../newsletter.html?openForm&_email='+this._email.value+ '&_thema=" + thema + "');return false;\">");if(thema=="Hunde") url += encodeURI("http://news.kosmos.de/cust/5216/cpi/subscribe.php");if(thema=="Pferde") url += encodeURI("http://www.nl-services.com/subscribe/kosmos_pferde/subscribe.php");if(thema=="Astro") url += encodeURI("http://www.nl-services.com/subscribe/kosmos_astronomie/subscribe.php");if(thema=="Digital") url += encodeURI("http://www.nl-services.com/subscribe/kosmos_digital/subscribe.php");document.write("</FORM>");document.write("<FORM onsubmit=\"if(top.openURL){top.openURL('"+url+"?email='+this.email.value,'','*')}else{location.href='../"+url+"?email='+this.email.value};return false;\">");document.write("<INPUT type=text name=\"email\" style=\"margin-top:7px;margin-bottom:3px;\" class=\"newsletter_input\">");document.write("<BR>");document.write("<INPUT TYPE=\"submit\" value=\"" + beschriftung + "\" class=\"newsletter_button\">");document.write("</FORM>");}//---------------------------------------------------------------------------------------------------------function replaceAttachedFileImagesByLinks(){identifier = ("OpenElement&FieldElemFormat=gif").toLowerCase();iconSrc = "../KOS_icon_link";images = document.getElementsByTagName("IMG");for(i=images.length-1;i>=0;i--)	{	if( images[i].src.toLowerCase().indexOf(identifier) > 0 && images[i].alt!="" )		{		txtNode = document.createTextNode(images[i].alt);		iconNode = document.createElement("IMG");		iconNode.setAttribute("border","0");		iconNode.setAttribute("src",iconSrc);		images[i].parentNode.appendChild(txtNode);		images[i].parentNode.appendChild(iconNode);		images[i].parentNode.removeChild(images[i]);		}	}}//------------------------------------------------------------------------------------------------------------------------------------------function writeAuthorItemsLink( txt, vorname, nachname  ){vorname = encodeURI(vorname)nachname = encodeURI(nachname)document.write("<A HREF='#' ONCLICK='openAuthorItems( \"" + vorname +"\", \"" + nachname + "\" );return false;'>")document.write( txt )document.write("</A>")}//------------------------------------------------------------------------------------------------------------------------------------------function writeDigiguideLink( typ, txt  ){typ = encodeURI(typ)url = kosmospath + ".nsf/digiguide.html?openForm&_typ=" + typ + "&_lang=DE"document.write("<A HREF='#' ONCLICK='openLink(\"" + url + "\");return false;'>")document.write( txt )document.write("</A>")}//----------------------------------------------------------------------------------------------------------------------------------------------function writeFlash( filename , unid ){/*Flashdatei wird an dieser Position, an der diese Funktion aufgerufwn wird eingebunden*/ if (AC_FL_RunContent == 0) {		 alert("Diese Seite erfordert die Datei \"AC_RunActiveContent.js\".");		 } else {		 		 AC_FL_RunContent(		 		 		 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',		 		 		 'width', '605',		 		 		 'height', '180',		 		 		 'src', unid + '/$File/' + filename,		 		 		 'quality', 'medium',		 		 		 'pluginspage', 'http://www.macromedia.com/go/getflashplayer',		 		 		 'align', 'middle',		 		 		 'play', 'true',		 		 		 'loop', 'true',		 		 		 'scale', 'showall',		 		 		 'wmode', 'opaque',		 		 		 'devicefont', 'false',		 		 		 'id', filename,		 		 		 'bgcolor', '#ffffff',		 		 		 'name', filename,		 		 		 'menu', 'true',		 		 		 'allowFullScreen', 'false',		 		 		 'allowScriptAccess','sameDomain',		 		 		 'movie',  unid + '/$File/' + filename,		 		 		 'salign', ''		 		 		 ); //end AC code		 }}//----------------------------------------------------------------------------------------------------------------------------------------------function resizeLogobg(){/*bei PopUps onresize*/elem = document.getElementById("logobg");if(elem){	elem.style.height="99%"	elem.style.height="100%"	}}//---------------------------------------------------------------------------------------------------------function resizeImages(){images = document.getElementsByTagName("IMG");for(i=images.length-1;i>=0;i--)	{	if( images[i].width > 615  )		{		images[i].width = 615		}	}}