// JavaScript Document
function Mausklick (Ereignis) {
	if (!Ereignis)
		Ereignis = window.event;

	hide('nav1');
}
function show (n) {
	hideAll();
	if (document.getElementById && document.getElementById(n) && !document.getElementById('iframeBox')) 
		document.getElementById(n).style.visibility = "visible";
}

function hide (n) {
	if (document.getElementById&&document.getElementById(n)) document.getElementById(n).style.visibility = "hidden";
}
function hideAll(){
		hide('nav1');
		hide('nav2');
		if (document.getElementById('nav3'))hide('nav3');
		hide('nav4');
}
function checkFrame(){
	if(window.self!=window.top){
		if(document.getElementById('hpTop'))
			document.getElementById('hpTop').style.display='none';
		if(document.getElementById('topNav'))
			document.getElementById('topNav').style.display='none';
	}
}
function infos(adr){
	newWin=window.open(adr,'Infos','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=655');
	newWin.focus();
}
function insertWBR() {
	if(!document.all){//ie?
		objArr=document.getElementsByTagName("a"); //Array mit allen Links der Seite
		//Tauschen von '-' gegen '-<wbr>'
		for(var i=0;i<objArr.length;i++){
			if(objArr[i].firstChild && objArr[i].firstChild.nodeValue && objArr[i].firstChild.nodeValue.indexOf("-")>0 && objArr[i].firstChild.nodeValue.lastIndexOf("-")!=objArr[i].firstChild.nodeValue.length-1){
				//mit innerHTML gelöst, da Browser dann auch neu rendert und erst dann umbricht
				objArr[i].innerHTML=objArr[i].firstChild.nodeValue.replace("-","-<wbr/>"); 
			}
		}
	}
}
function resizeMedia(){
	resizePDF();
}
function resizePDF(){
	if(document.all){
		document.getElementById('mediaFrame').style.height=(document.documentElement.clientHeight-80)+'px';
	}else{
		document.getElementById('mediaFrame').style.height=(innerHeight-80)+'px';
	}
}
function showSysInfos(control){
	if(document.getElementById('systemInfoFull')){
		if((document.getElementById('systemInfoFull').style.display=='' 
			|| (document.getElementById('systemInfoFull').style.display)=='none')
			&& control==0){
			document.getElementById('systemInfoFull').style.display='block';
		}else{
			document.getElementById('systemInfoFull').style.display='none';
		}
	}
}
function initMinWidth(){
	if(document.getElementById && document.getElementById("mainBox") && document.URL.indexOf("bestWoman")<0 && document.URL.indexOf("bestwoman")<0 && location.search.indexOf("print=1")<0 && location.search.indexOf("print=2")<0){
		if(document.body.clientWidth < 990){
			document.getElementById("mainBox").style.marginLeft="8px";
			document.getElementById("mainBox").style.left="0%";
		}else{
			document.getElementById("mainBox").style.marginLeft="-500px";
			document.getElementById("mainBox").style.left="50%";
		}
	}
}
function jsControl(){
	checkFrame();
	insertWBR();
	initMinWidth();
	
	if(document.URL.toLowerCase().indexOf("admsuche.asp")>=0 || document.URL.toLowerCase().indexOf("admsuchename.asp")>=0) {
		load();
	}
	if(document.URL.toLowerCase().indexOf("8329.asp")>=0) {
		showAddress();
	}
	if(document.URL.toLowerCase().indexOf("10172.asp")>=0) {
		showAddress();
	}
}
function jsOnUnload(){
	if(document.URL.toLowerCase().indexOf("10172.asp")>=0 || document.URL.toLowerCase().indexOf("8329.asp")>=0 || document.URL.toLowerCase().indexOf("bdsuche.asp")>=0 || document.URL.toLowerCase().indexOf("admsuchename.asp")>=0){
		GUnload();
	}
}
//document.onmouseup=Mausklick;

// *** Verkaufshilfen ***
// * Aufkleber *
function aufKl_start()
{
var wert = document.form.aufKl_start1.value;
window.location.href="aufKl_start.asp?intKey=" + wert;
}
// * Werbedruckstücke ohne *
function werbostart()
{
var wert = document.form.werbostart1.value;
window.location.href="werbostart.asp?intKey=" + wert;
}
// * Plakate *
function plkte_start()
{
var wert = document.form.plkte_start1.value;
window.location.href="plkte_start.asp?intKey=" + wert;
}

// * Werbeprospekte mit *

function mPros_start()
{
var wert = document.form.mPros_start1.value;
window.location.href="mPros_start.asp?intKey=" + wert;
}

