
// skok do adresu
function selecturl(s) { 
   var gourl = s.options[s.selectedIndex].value;  window.top.location.href = gourl; 
} 




// walidacja adresu email
function SprawdzEmail(AdresEmail) {
var TestEmail =/^[^@]+@([a-z0-9\-]+\.)+[a-z]{2,4}$/i;
var Wynik = AdresEmail.match(TestEmail);
if (Wynik == null) {
	alert("Diese E-Mail-Adresse ist schlecht");
	return false;
}
return true;
}



// otwieranie okna poupu
function windowopen(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=auto,menubar=no' );
}


// przeliczanie wartosci w google maps
function deg2dms(liczba,latlng) {
if(latlng!='lat' && latlng!='lng') return;
if(liczba>0)
	var znak=0;
else
	var znak=1;
liczba = Math.abs(liczba);
var d = Math.floor(liczba);
var s = ((liczba - Math.floor(liczba))*3600);
var m = Math.floor(s/60);
s = (s - m*60).toFixed(0);
if(s<10)
	s='0'+s;
if(m<10)
	m='0'+m;
if(latlng=='lat')
	var sufix=['N','S'];
else
	var sufix=['E','W'];
return sufix[znak]+' '+d+'&deg; '+m+'&rsquo; '+s+'&quot;';
} 



// przekierowuje szukanie na mapie
function szukaj_na_mapie (szukaj) {
var str = szukaj;
window.location.href='./karte-'+ str.replace(/ /i, "-") +'.html';
return false;
}



// czyszczenie pola komenta¿a
function CzyscPole() {
	document.getElementById('wyp').style.backgroundColor = '#5e91d3';
	document.getElementById('wyp').style.height = '120px';
	document.getElementById('opinia').style.height = '145px';
	if (document.getElementById('wyp').value == 'FÃ¼gen Sie Ihre eigenen Beitrag oder Kommentar.') 
	{ 
	document.getElementById('wyp').value = '';
	return false;
	}
return true;
}


// ustawienie pola komentaza
function UstawPole() {
	document.getElementById('wyp').style.backgroundColor = '#529CDD';
	document.getElementById('wyp').style.height = '45px';
	document.getElementById('opinia').style.height = '70px';
return true;
}
