function em(lng, emn) { 
//	document.write("mail: <a href='mai"+"lto:e-rent"+"@"+"e-rent."+lng+"'>e-rent"+"@"+"e-rent."+lng+"</a>");
	document.write("mail: <a href='mai"+"lto:"+emn+"@"+"e-rent."+lng+"'>"+emn+"@"+"e-rent."+lng+"</a>");
};

function leer(qqq) { 
	for(var i = 1; i <= qqq; i++) document.write('&nbsp;');		
};

function doCheckOnSend()
{
	if (document.topga.Frue.value!="")
		{
			if (document.topga.Frue.value.slice(2,3)!="." || document.topga.Frue.value.slice(5,6)!=".")
				{
					window.alert(pnkt());
					document.topga.Frue.focus();
					document.topga.Frue.select();
					return false;
				}
			d1 = document.topga.Frue.value.slice(0,2);
			m1 = document.topga.Frue.value.slice(3,5);
			y1 = document.topga.Frue.value.slice(6,8);
			if (isNaN(d1) || isNaN(m1) || isNaN(y1) || parseInt(d1)>31 || parseInt(m1)>12)
				{
					window.alert(dateFRM());
					document.topga.Frue.focus();
					document.topga.Frue.select();
					return false;
				}
		}

	if (document.topga.Spaet)
		{
		if (document.topga.Spaet.value!="")
			{
				if (document.topga.Spaet.value.slice(2,3)!="." || document.topga.Spaet.value.slice(5,6)!=".")
					{
						window.alert(pnkt());
						document.topga.Spaet.focus();
						document.topga.Spaet.select();
						return false;
					}
				d1 = document.topga.Spaet.value.slice(0,2);
				m1 = document.topga.Spaet.value.slice(3,5);
				y1 = document.topga.Spaet.value.slice(6,8);
				if (isNaN(d1) || isNaN(m1) || isNaN(y1) || parseInt(d1)>31 || parseInt(m1)>12)
					{
						window.alert(dateFRM());
						document.topga.Spaet.focus();
						document.topga.Spaet.select();
						return false;
					}
			}
		}


	if (isNaN(document.topga.BeginPrice.value))
		{
			window.alert(nichtZul());
			document.topga.BeginPrice.focus();
			document.topga.BeginPrice.select();
			return false;
		}

	if (isNaN(document.topga.EndPrice.value))
		{
			window.alert(nichtZul());
			document.topga.EndPrice.focus();
			document.topga.EndPrice.select();
			return false;
		}

	if (document.topga.ANummer) {
	if (isNaN(document.topga.ANummer.value))
		{
			window.alert(nichtZul());
			document.topga.ANummer.focus();
			document.topga.ANummer.select();
			return false;
		}
	}

	if (document.topga.Gr) {
	if (isNaN(document.topga.Gr.value))
		{
			window.alert(nichtZul());
			document.topga.Gr.focus();
			document.topga.Gr.select();
			return false;
		}
	}

	return true;
};


function doClear()
{
	document.topga.GO.checked=true;
	document.topga.c12Zi.checked=true;
	document.topga.c23Zi.checked=true;
	document.topga.c34Zi.checked=true;
	document.topga.c4Zi.checked=true;
	document.topga.Haus.checked=true;

	document.topga.Frue.value="";
	if (document.topga.Spaet) document.topga.Spaet.value="";
	document.topga.BeginPrice.value="";
	document.topga.EndPrice.value="";
	
	if (document.topga.Gr) document.topga.Gr.value="";
	if (document.topga.Tour360) document.topga.Tour360.checked=false;
	if (document.topga.Kurzzeit) document.topga.Kurzzeit.checked=false;
	if (document.topga.TopKategorie) document.topga.TopKategorie.checked=false;
	if (document.topga.ANummer) document.topga.ANummer.value="";
	if (document.topga.MPo) document.topga.MPo.checked=false;

	for(var i = 0; i < document.karmapa.auswahl.length; i++) document.karmapa.auswahl[i].checked = false;
};

function chk(nr) {
	existCHECKED=true;
	winHND.omo(winHND.document.getElementById(winHND.NtoM("N"+nr)));
};



function doGOTOprint() {
	document.karmapa.method="post";
//	document.karmapa.action="http://www.e-rent.de/druck.asp"+window.location.search;
	document.karmapa.action="http://www.e-rent.de/GEFSdruck.asp?Language="+document.topga.Language.value+"&Stadt="+document.topga.Stadt.value;
	document.karmapa.submit();
};

function doGOTOfirme() {
	j=0
	for(var i = 0; i < document.karmapa.auswahl.length; i++) if (document.karmapa.auswahl[i].checked == true) j++
	if (j>5) {alert(verm5()); return};
	document.karmapa.method="get";
	switch (document.topga.Language.value) {
		case "En": fva="biz/inquiry-company.htm"; break;
		case "Fr": fva="fr/sollicitation-entreprises.htm"; break;
		case "Es": fva="com.es/solicitud-particulares.htm"; break;
		default: fva="de/vermittlungfirmen.htm"; break;
	}
	document.karmapa.action="https://www.e-rent."+fva;
	document.karmapa.submit();
};

function doGOTOprivat() {
	j=0
	for(var i = 0; i < document.karmapa.auswahl.length; i++) if (document.karmapa.auswahl[i].checked == true) j++
	if (j>5) {alert(verm5()); return};
	document.karmapa.method="get";
	switch (document.topga.Language.value) {
		case "En": fva="biz/inquiry-private.htm"; break;
		case "Fr": fva="fr/sollicitation-particuliers.htm"; break;
		case "Es": fva="com.es/solicitud-particulares.htm"; break;
		default: fva="de/vermittlungprivat.htm"; break;
	}
	document.karmapa.action="https://www.e-rent."+fva;
	document.karmapa.submit();
};


function bilderGETIN(){
if (document.getElementById("tf")) document.getElementById("tf").style.height = "269px";
document.getElementById("bilderEIN").style.display = "none";
document.getElementById("bilderAUS").style.display = "block";
document.getElementById("BILDER").style.display = "block";
};

function bilderGETOUT(){
if (document.getElementById("tf")) document.getElementById("tf").style.height = "358px";
document.getElementById("bilderEIN").style.display = "block";
document.getElementById("bilderAUS").style.display = "none";
document.getElementById("BILDER").style.display = "none";
};

function suchfunkGETIN(){
if (document.getElementById("tf")) document.getElementById("tf").style.height = "269px";
document.getElementById("suchfunkEIN").style.display = "none";
document.getElementById("suchfunkAUS").style.display = "block";
document.getElementById("SUCHFUNK").style.display = "block";
};

function suchfunkGETOUT(){
if (document.getElementById("tf")) document.getElementById("tf").style.height = "358px";
document.getElementById("suchfunkEIN").style.display = "block";
document.getElementById("suchfunkAUS").style.display = "none";
document.getElementById("SUCHFUNK").style.display = "none";
};


function fR(fn,s_popup,d_popup,neu,makestr) {
	S=fn;
	if (makestr)
	{
		S+="?";
		for(var i = 0; i < document.topga.length; i++)
			{
				elm=document.topga.elements[i];
				if (elm.checked || (elm.value!="" && elm.value!=1 && elm.type!="button")) S+=elm.name+"="+elm.value+"&";
			};
	};


	openSelf=!(d_popup || s_popup || neu);

	window.open(S,(openSelf)?"_self":"_blank",(d_popup)?"width="+(screen.availWidth-10)+",height="+(screen.availHeight-100)+","+((screen.availHeight<950)?"scrollbars=yes,":"")+"top=0,left=0,menubar=yes":"");
	if (neu==false && openSelf==false) {window.opener=null; window.close();}
};

function fA(fn,s_popup,d_popup,neu,makestr) {fR('http://'+fn,s_popup,d_popup,neu,makestr);}

function fE(fn,s_popup,d_popup,neu,makestr)
{
//alert(typeof(document.topga)=undefined);
	if (document.topga)
	{
		switch (document.topga.Language.value) {case "En": dne="www.e-rent.biz"; break; case "Fr": dne="www.e-rent.fr"; break; case "Es": dne="www.e-rent.com.es"; break; case "Es": dne="www.e-rent.de"; break;};
	}
	else
	{
		dne=window.location.host;
		if (dne.indexOf("e-rent.de")!=-1) dne="www.e-rent.de"
	};

	//fR('http://'+window.location.host+'/'+fn,s_popup,d_popup,neu,makestr);
	fR('http://'+dne+'/'+fn,s_popup,d_popup,neu,makestr);
}

function fE_new(fn,s_popup,d_popup,neu,makestr)
{

	dne="www.e-rent.de"

	

	//fR('http://'+window.location.host+'/'+fn,s_popup,d_popup,neu,makestr);
	fR('http://'+dne+'/'+fn,s_popup,d_popup,neu,makestr);
}



function wtx(jss,nm,gf)
{
document.write("<a href="+String.fromCharCode(34)+"javascript:fE("+jss+")"+String.fromCharCode(34)+"><strong>"+nm+"</strong><br><img src='pics/dot.gif' width='10' height='6' border='0'><br><IMG SRC='pics/"+gf+"' width='145' heigth='105' border='0'></a>")
};

function wtxa(jss,nm,gf)
{
document.write("<a href="+String.fromCharCode(34)+"javascript:fE("+jss+")"+String.fromCharCode(34)+"><center><strong><font size='2'>"+nm+"</font></center></strong><IMG SRC='../pics/"+gf+"' width='115' heigth='82' border='0' VSPACE='5' ></a>")
};
function wtxb(jss,nm,gf)
{
document.write("<a href="+String.fromCharCode(34)+"javascript:fE("+jss+")"+String.fromCharCode(34)+"><center><strong><font size='2'>"+nm+"</font></center></strong><IMG SRC='../../pics/"+gf+"' width='115' heigth='82' border='0' VSPACE='5'></a>")
};
function wtxc(jss,nm,gf,alt)
{
document.write("<a href="+String.fromCharCode(34)+"javascript:fE("+jss+")"+String.fromCharCode(34)+"><center><strong><font size='2'>"+nm+"</font></center></strong><IMG SRC='../pics/"+gf+"' width='115' heigth='82' border='0' VSPACE='5' alt='"+alt+"' ></a>")
};

function wtxd(jss,nm,gf)
{
document.write("<a href="+String.fromCharCode(34)+"javascript:fE_new("+jss+")"+String.fromCharCode(34)+"><center><strong><font size='2'>"+nm+"</font></center></strong><IMG SRC='../pics/"+gf+"' width='115' heigth='82' border='0' VSPACE='5' ></a>")
};



function wtl(jss,nm)
{
document.write("<a href="+String.fromCharCode(34)+"javascript:fE("+jss+")"+String.fromCharCode(34)+">"+nm+"</a>")
};




//*******************************************************************
//neue Functionen aus GEFStamplate

function whatCSS()
{
		if (screen.width > 800) 
		{
			if(navigator.appName.indexOf("Explorer") >= 0)
			{	
				document.writeln ("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS1024_ie.css'>");     
			}
			else if (navigator.appName.indexOf("Netscape") >= 0)
			{
			 	document.writeln ("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS1024_netscape.css'>");     	
			}
			else if (navigator.userAgent.indexOf("Opera") > -1)
			{	
				document.writeln ("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS1024_netscape.css'>");     	
			}
			if((navigator.appName.indexOf("Explorer") >= 0)&&(navigator.userAgent.indexOf("Opera") > -1) )
			{
				document.writeln ("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS1024_netscape.css'>");     
			}
			
		}
		
		else
		{
			if(navigator.appName.indexOf("Explorer") >= 0)
			{
				document.writeln("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS800_ie.css'>");     
			}
			else if (navigator.appName.indexOf("Netscape") >= 0)
			{
			 	document.writeln("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS800_netscape.css'>");     
			}
			else if (navigator.userAgent.indexOf("Opera") > -1)
			{
				document.writeln("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS800_netscape.css'>");     
			}
			if((navigator.appName.indexOf("Explorer") >= 0)&&(navigator.userAgent.indexOf("Opera") > -1) )
			{
				document.writeln("<link rel=stylesheet type='text/css' href='http://www.e-rent.de/SCRP/GEFS800_netscape.css'>");     
			}
			
		}

};

function ScrollPriceHeader() {
//	if (document.body.scrollTop>((document.topga.Map.value==1)?985:505))
	if (document.body.scrollTop>620)
		{
			document.getElementById("Header").style.visibility = "visible";
			document.getElementById("Header").style.top = document.body.scrollTop;
		}
	else
		{
			document.getElementById("Header").style.visibility = "hidden";
			document.getElementById("Header").style.top = 0;
		};
};


//neu Menu Funktion 05.05.05 Vlad
function startList() 
{
	if (document.all && document.getElementById) 
	{
		navRoot = document.getElementById("dmenu");
		for (i=0; i < navRoot.childNodes.length; i++) 
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") 
			{
				node.onmouseover=function() 
				{
					this.className+=" over";
				}
				node.onmouseout=function() 
				{
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
};
window.onload=startList;