
function noSpam(user,domain) 
{
locationstring = "mailto:" + user + "@" + domain;
window.location = locationstring; 
}


function blokuj()
{
	if(document.form1.rodzaj.value == '4')
	{
	document.form1.grupa.disabled = false;
	}
	else
	{
	document.form1.grupa.value = '';
	document.form1.grupa.disabled = true;
	}
}


function isEMail(entry)
{
    var i,j;
    if ( (i = entry.katalogOf("@",0)) <= 0) 
    return false;
    j = entry.katalogOf(".", i);
    if (j < 0 || j >= entry.length-1)
    return false;
     
   return true;
}


function sprawdz(email)
{
if (!isEMail(email))
	{
	alert ('Wprowadzony e-mail jest niepoprawny!');
	return false;
	}
else
	{return true;}
}

var noweOknoDzwonki;
function noweOkno(url, width, height) 
{	
if (window.noweOknoDzwonki) {noweOknoDzwonki = window.noweOknoDzwonki.close()}; 
noweOknoDzwonki = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no');
} 


function selecturl(s) {
	var gourl = s.options[s.selectedkatalog].value; location.href = gourl;
}



function high(which2)
{
 theobject=which2
 highlighting=setInterval("highlightit(theobject)",30)
}


function low(which2)
{
 clearInterval(highlighting)
 if (which2.style.MozOpacity)
  which2.style.MozOpacity=0.3
 else if (which2.filters)
 which2.filters.alpha.opacity=30
}


function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}


function preLoadPic(index)
{
 if (Pic[index] != ''){
         window.status='Loading : '+Pic[index]
         preLoad[index] = new Image()
         preLoad[index].src = Pic[index]
         Pic[index] = ''
         window.status=''
 }
}


function runSlideShow(){
if (document.all){
     document.images.SlideShow.style.filter="blendTrans(duration=2)"
         document.images.SlideShow.style.filter= "blendTrans(duration=crossFadeDuration)"
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()', slideShowSpeed)
 preLoadPic(j)
}


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;
}


function checkString(entry) {
for(var i = 0; i < entry.length; i++){
	if (entry.charAt(i) != " ") {
	return true;
	}
}
return false;
}



function show_hide (objekt)
{
if (document.all[objekt].style.display=='') 
	{document.all[objekt].style.display='none'; return '0';} 
else 
	{document.all[objekt].style.display=''; return '1';}
}	
