
var details='';

function newloc(loc) {
	if (loc) {
		if (loc.charAt(0)=='/'||loc.substring(0,7)=='http://') {
			document.location.href=loc
		} else {
			document.location.href=document.nl.xb.value+loc;
		}
	}
}

function showHideLayers() {
  var i, visStr, args, theObj;
  args = showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) {
    visStr=args[i+2];
    if (document.layers) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) {
      if (visStr == 'show') visStr = 'visible';
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function urlDecode(str) {
	str=str.replace(/_/g," ");
	str=str.replace(/\$2F/g,"/");
	return str;
}

function Meteodata() {
	meteowin=open("http://web02.city-map.de/wetter/meteodata.html","meteowin","width=500,height=400,scrollbars=yes");
}

function aufbau() {
	if (confirm("Die gewählte Region ist noch nicht in city-map verfügbar.\nKlicken Sie auf OK, um Infos über das Franchise-Konzept von city-map zu erhalten.")) {
		mywin=open("http://www.zukunft.city-map.de","mywin","width=800,height=460,toolbar=yes,menu=yes");
	}
}

function scrollLayer(y) {
	var varY=0;
	if (document.layers) {
		varY=pageYOffset+20;
		if (varY<y) varY=y;
		document.scrollayer.top=varY;
	} else {
		varY=document.body.scrollTop+20;
		if (varY<y) varY=y;
		document.all.scrollayer.style.top=varY;
	}
}

function kontakt(kundennummer,tlg,lg) {
	if (!tlg) {
		tlg='de';
	}
	if (!lg) {
		lg=0;
	}
	var mydetails=details;
	if (mydetails!='') {
		mydetails='&details='+escape(details);
		mydetails=mydetails.replace(/%u20AC/,"EUR");
	}
	kontaktwin=open('http://www.city-map.de/city/kontakt?tlg='+tlg+'&lg='+lg+'&kundennummer='+kundennummer+mydetails,'contactwindow','width=580,height=540,scrollbars=yes');
}

function gutschein(kundennummer,lg,ort,dom,id) {
	var url='';
	if (dom) {
		url='http://'+dom;
	}
	url+='/home/gutschein/'+kundennummer+lg+'.html?ort='+ort;
	if (id) {
		url+='&id='+id;
	}
	gtwin=open(url, 'gutscheinwin', 'width=680,height=480,toolbar=yes,scrollbars=yes');
}

function openingHours(kundennummer,lg) {
	var url='';
	url+='/home/openinghours/'+kundennummer+lg+'.html';
	ohwin=open(url, 'openinghourswin', 'width=680,height=480,toolbar=yes,scrollbars=yes');
}


function lunch(kundennummer,lg) {
	var url='';
	url+='/home/lunch/'+kundennummer+lg+'.html';
	lunchwin=open(url, 'winlunch', 'width=680,height=480,toolbar=yes,scrollbars=yes');
}

	
var testlg='06';

function check(obj) {
	var args,leave;
	if (!obj) obj=document.fr;
	args=check.arguments;
	leave=0;

	for (var i=1; i<args.length; i++) {
		if (args[i]=='datenschutz'&&obj [args[i]].checked!=true) {
			alert('Prosimy o akceptację informacji o ochronie danych!');
			leave=1;
			break;
		} else if (obj [args[i]].value==''||(args[i]=='email'&&obj [args[i]].value.indexOf('\@')==-1)||(args[i]=='email'&&obj [args[i]].value.indexOf('.')==-1)||(args[i]=='homepage'&&obj [args[i]].value.indexOf('http://')==-1)) {
			alert('Wypełnij poprawnie pole: "'+args[i]+'"');
			obj [args[i]].select();
			obj [args[i]].focus();
			leave=1;
			break;
		}
	}
	if (leave==0) {
		obj.submit();
	}
}

function finden(l) {
	var Obj=document.fr;
	if (l) {
		if (document.layers) Obj=document.scrollayer.document.fr
		else Obj=document.all.scrollayer.document.fr;
	}
	if (Obj.query.value.length>=3) Obj.submit()
	 else alert('Wpisz przynajmniej 3 znaki do wyszukania!');
}

function addstr(str,blah,noemail) {
	if (document.fr.datenschutz.checked) {
		if (document.fr.name.value.length<3) {
			alert('Wypełnij poprawnie pole: nazwa');
			document.fr.name.select();
			document.fr.name.focus();
		} else if (document.fr.anschrift.value.length<5&&document.fr.telefon.value.length<5&&(noemail||document.fr.email.value.length<5)) {
			alert('Proszę podać przynamniej swój adres, adres e-mail lub numer telefonu.');
		} else {
			if (document.fr.buchung.value=='1') {
				document.fr.text.value=document.fr ['6'].options[document.fr ['6'].selectedIndex].text+' \n\n'+document.fr.text.value;
				for (var i=5; i>=1; i--) {
					if (i>=4||document.fr [i].checked)
					document.fr.text.value=document.fr [i].value+' \n'+document.fr.text.value;
					if (i==4) document.fr.text.value='Anreisetag: '+document.fr.text.value;
					if (i==5) document.fr.text.value='Abreisetag: '+document.fr.text.value;
				}
			}
			document.fr.submit();
		}
	} else {
		alert('Wskazówka:\\n\\nProszę potwierdzić zapoznanie się z regułami ochrony danych osobowych poprzez zaznaczenie odpowiedniego pola a następnie przesłanie wiadomości.');
	}
}

function weiterempfehlen(seitenr) {
	if (seitenr.indexOf('http://')<0) {
		seitenr='http://'+document.domain+'/city/db/'+seitenr;
	}
	seitenr=escape(seitenr);
	document.location.href='mailto:?subject=godne polecenia&body=Witam! %0D%0A%0D%0APodczas surfowania po city-map znalazłem świetną stronę. %0D%0A%0D%0ASurf doch mal rein unter: %0D%0A%0D%0A'+seitenr+' %0D%0A%0D%0A&priority=high';
}

function anfahrt(strasse,plz,ort,country,name,kundennummer) {
	routewin=open('','routewindow','width=740,height=450,toolbar=yes,scrollbars=yes,status=yes,resizable=yes');
	routewin.document.open();
	routewin.document.writeln('<html><head><title>city-map empfiehlt www.viamichelin.de für den Anfahrtsplan...</title></head><body text="#000066" bgcolor="#ffffff"><font face="Arial">');
	routewin.document.writeln('<h2>city-map empfiehlt www.viamichelin.de für den Anfahrtsplan...</h2>');
	routewin.document.writeln('<h3>Połączenie do planera trasy z www.viamichelin.pl jest realizowane...</h3>');
	routewin.document.writeln('<br><br>');
	routewin.document.writeln('</font></body></html>');
	if (routewin.confirm('Utworzyć połączenie do www.viamichelin.pl?')) {
		var idstring='tostrasse='+escape(strasse)+'&to='+plz+'&toort='+escape(ort)+'&tocountry='+escape(country)+'&toname='+escape(name)+'&kundennummer='+kundennummer+'&tlg=de';
		routewin.document.location.replace('http://www.city-map.de/city/anfahrt.pl?'+idstring);
		routewin.document.close();
	} else {
		routewin.close();
	}
}


function hc(name, landid, country) {
	if (name) {
		document.getElementById('map').src = 'http://web02.city-map.de/pic/reg/map/'+country+'/'+landid + ".png";
	} else {
		document.getElementById('map').src = 'http://web02.city-map.de/pic/reg/map/'+country+'/'+country+'.png';
	}
	var message=document.createTextNode(name);
	var knoten=document.getElementById('title_showmapname').firstChild;
	if (knoten) {
		document.getElementById('title_showmapname').removeChild(knoten);
	}
	document.getElementById('title_showmapname').appendChild(message);
}

function hl(name, regionid, land, country) {
	if (name) {
		document.getElementById('map').src = 'http://web02.city-map.de/pic/reg/map/'+country+'/'+land+'/'+regionid + ".png";
	} else {
		document.getElementById('map').src = 'http://web02.city-map.de/pic/reg/map/'+country+'/'+land+'/'+land+'.png';
	}
	var message=document.createTextNode(name);
	var knoten=document.getElementById('title_showmapname').firstChild;
	if (knoten) {
		document.getElementById('title_showmapname').removeChild(knoten);
	}
	document.getElementById('title_showmapname').appendChild(message);
}


var cm_Preview_Texts={title:'Podgląd strony %1$s:',screenshotTitle:'Przejdź do strony internetowej %1$s',loading:'Ładowanie zdjęcia',unavailable:'Obecnie brak podglądu strony internetowej.',footerTitle:'strona internetowa'};