// Correct fb_xd_fragment Bug
document.getElementsByTagName('html')[0].style.display='block';


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


// pokaz sjaldow
function runSlideShow(zdjecie) {
if (zdjecie) {
document.write("<div><img src='" + zdjecie + "' name='SlideShow' width='230'></div>");
}
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter= "blendTrans(duration=3)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play()
}
pos = j
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', 3000)
preLoadPic(j)
}


// uruchamianie pokazu slajdu
function preLoadPic(index) {
 if (Pic[index] != ''){
	window.status='Loading : '+Pic[index]
	preLoad[index] = new Image()
	preLoad[index].src = Pic[index]
	Pic[index] = ''
	window.status=''
	}
}


// 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("Niepoprawnie wpisany adres e-mail.");
return false;
}
return true;
}


// 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;';
} 


