function nivo1 (cz3,cz2,cz1,cz4) {
document.write('<a  class="mma" hre' + 'f=\"mai' + 'lto:' + cz1 + cz2 + '@' +
cz3 + cz4 + '\">' + cz1 + cz2 + '@' + cz3 + cz4 + '</a>');
} 

function nivo2 (ni3,ni2,ni1,ni4) {
document.write('<a  class="mmb" hre' + 'f=\"mai' + 'lto:' + ni1 + ni2 + '@' +
ni3 + ni4 + '\">' + ni1 + ni2 + '@' + ni3 + ni4 + '</a>');
} 

function SR(k) { 
  if (k.vid_ema.value=='') { 
    alert('Podaj adres email.'); 
    return false; 
    }
  if (k.vid_imi.value=='') { 
    alert('Wpisz swoje imię.'); 
    return false; 
    }  
  if (k.vid_rem.value!='biały') { 
    alert('Nie podałeś/aś właściwego koloru śniegu.'); 
    return false; 
    }               
  else { return true; } 
    } 
    
function SL(a) { 
  if (a.vid_ema.value=='') { 
    alert('Podaj swój login.'); 
    return false; 
    }
  if (a.vid_pas.value=='') { 
    alert('Wpisz swoje hasło.'); 
    return false; 
    }  
  else { return true; } 
    } 

function SF(f) { 
  if (f.email.value=='') { 
    alert('Nie podałeś/aś adresu e-mail.'); 
    return false; 
    } 
  if ( ((f.email.value.indexOf('@',1))==-1)||(f.email.value.indexOf('.',1))==-1 ) { 
    alert('Podałeś/aś błędny adres e-mail'); 
    return false; 
    } 
  if (f.imie.value=='') { 
    alert('Nie podałeś/aś swojego imienia'); 
    return false; 
    }
  if (f.nazwisko.value=='') { 
    alert('Nie podałeś/aś swojego nazwiska'); 
    return false; 
    } 
  if (f.nip.value=='') { 
    alert('Nie podałeś/aś numeru NIP'); 
    return false; 
    } 
  if (f.miasto.value=='') { 
    alert('Nie podałeś/aś miasta'); 
    return false; 
    } 
  if (f.kod.value=='') { 
    alert('Nie podałeś/aś kodu pocztowego'); 
    return false; 
    }
  if (f.pp.checked == false ) { 
    alert('Musisz zgodzić się z Polityką Prywatności.'); 
    return false; 
    } 
  if (f.anty.value!='żółty' || f.anty.value=='') { 
    alert('Nie podałeś/aś właściwego koloru słońca.'); 
    return false; 
    }
  if (f.chc1.value=='' || f.chc1.value=='') { 
    alert('Nie podałeś/aś swojego hasła'); 
    return false; 
    } 
  if ((f.chc1.value!='' && f.chc1.value!=f.chc2.value) || (f.chc2.value!='' && f.chc1.value!=f.chc2.value)) { 
    alert('Podane hasła są różne'); 
    return false; 
    } 
  else { return true; } 
    }
    
function SprawdzPunkty(g) { 
  if (g.pr24_pkt.value=='') { 
    alert('Podaj liczbę punktów które chcesz zakupić.'); 
    return false; 
    }     
  else { return true; } 
    }  
    
function SprawdzKurs(d) { 
  if (d.vor_naz.value=='') { 
    alert('Podaj nazwę kursu.'); 
    return false; 
    }
  if (d.vor_ile.value=='') { 
    alert('Podaj ilość godzin lekcyjnych.'); 
    return false; 
    }  
  if (d.vor_cen.value=='') { 
    alert('Podaj cenę kursu.'); 
    return false; 
    }               
  else { return true; } 
    } 
    
function SprawdzGrupe(e) { 
  if (e.vor_ila.value=='') { 
    alert('Podaj maksymalną ilość osób.'); 
    return false; 
    }
  if (e.vor_ila.value<=e.vor_ilb.value) { 
    alert('Podana ilość osób jest za niska.'); 
    return false; 
    }              
  else { return true; } 
    }   
    
function SprawdzBibl(f) { 
  if (f.vor_opi.value=='') { 
    alert('Podaj opis wprowadzanego dokumentu.'); 
    return false; 
    }
  if (f.vor_pli.value=='') { 
    alert('Dodaj plik do zapisania w systemie.'); 
    return false; 
    }              
  else { return true; } 
    }   
    
function showe(e) {
	frm = document.getElementById('oc1');

	if (frm.value == '1') {
      document.getElementById('et1').style.display="";
      document.getElementById('et2').style.display="none";
      document.getElementById('et3').style.display="none";
      document.getElementById('et4').style.display="none";			
  }
	if (frm.value == '2') {
      document.getElementById('et1').style.display="none";
      document.getElementById('et2').style.display="";
      document.getElementById('et3').style.display="none";
      document.getElementById('et4').style.display="none";
  }    
	if (frm.value == '3') {
      document.getElementById('et1').style.display="none";
      document.getElementById('et2').style.display="none";
      document.getElementById('et3').style.display="";
      document.getElementById('et4').style.display="none";
  }
	if (frm.value == '4') {
      document.getElementById('et1').style.display="none";
      document.getElementById('et2').style.display="none";
      document.getElementById('et3').style.display="none";
      document.getElementById('et4').style.display="";
  }
}    

function Calendar(E,T){
 if(!document.getElementById||!document.body.appendChild)return
 var i,j,tBody,Row,od,Do,d,dt
 function cEl(t,p,h,w){
  p.appendChild(t=document.createElement(t))
  if(h)t.innerHTML=h;if(w)t.style.width='27px'
  return t}
 function cB(x){with(cld_BlaTek){
  B=0;x==0?R--:x==1?R++:x==2?(!M?(M=11,R--):M--):(M==11?(M=0,R++):M++)}
 }
 with(cld_BlaTek){
  od=Date.UTC(R,M,1);Do=Date.UTC(R,M+1,1)}
 E=document.getElementById(E)
 while(E.childNodes.length)E.removeChild(E.firstChild)
 tBody=cEl('tbody',cEl('table',E))
 tBody.onmouseup=function(){T.focus()}
 tBody.onmousemove=function(){
  if(window.getSelection)window.getSelection().removeAllRanges()}
 Row=cEl('tr',tBody)
 cEl('td',Row,'<<',1).onmousedown=function(){cB(0)}
 cEl('th',Row,cld_BlaTek.R)
 cEl('td',Row,'>>',1).onmousedown=function(){cB(1)}
 Row=cEl('tr',tBody)
 cEl('td',Row,'<<',1).onmousedown=function(){cB(2)}
 cEl('th',Row,cld_BlaTek.month[cld_BlaTek.M])
 cEl('td',Row,'>>',1).onmousedown=function(){cB(3)}

 tBody=cEl('tbody',cEl('table',E))
 Row=cEl('tr',tBody)
 for(i=0;i<7;i++)
  with(cEl('th',Row,cld_BlaTek.day[i]))
   if(i==6)style.backgroundColor='#f88'

 for(i=od;i<Do;i+=86400000){
  with(new Date(i)){d=getUTCDate();dt=getUTCDay()}
  if(dt==1||i==od)Row=cEl('tr',tBody)
  if(dt!=1&&d==1)for(j=1;j<(dt?dt:7);j++)cEl('th',Row)
  dt=cEl('td',Row,d);dt.onmousedown=function(x){
   x=+this.innerHTML
   with(cld_BlaTek)
    T.value=(x<10?'0'+x:x)+'.'+((x=M+1)<10?'0'+x:x)+'.'+R
  }
  with(cld_BlaTek)
  if(d==D.getDate()&&M==D.getMonth()&&R==D.getFullYear())
   dt.style.backgroundColor='#fff'
 }
 T.onblur=function(){if(cld_BlaTek.B)E.style.display='none'}
 cld_BlaTek.B=1;E.style.display='block'
}


//global object (You can translate month&day names)
cld_BlaTek={
 day:['pn','wt','śr','cz','pt','so','n'],
 month:['styczeń','luty','marzec','kwiecień','maj','czerwiec',
 'lipiec','sierpień','wrzesień','październik','listopad','grudzień'],
 D:new Date(),M:new Date().getMonth(),R:new Date().getFullYear()
}

