
// JavaScript Document

var pomocnicza=1;

function scrol(x){

if (x==1) pomocnicza=1;
if (x==2) pomocnicza=2;

var obj=document.getElementById("div1");
var wysokosc=parseInt(obj.style.height);

if (pomocnicza==1) {
if (wysokosc>90 ){obj.style.height=(wysokosc-2)+"px";setTimeout("scrol(0)",1);}

           } else {
obj.style.display="";  
var wysokosc=parseInt(obj.style.height);
 if (wysokosc<310 ){obj.style.height=(wysokosc+2)+"px";setTimeout("scrol(0)",1);}
         
                   }
                  
                }
                
function dodaj_u() {
  tytul_ulubione = 'Programista PHP';
  var url = 'http://www.programista.php.konin.pl';
  if (window.sidebar) { window.sidebar.addPanel(tytul_ulubione, url, ""); } // FF 
  else if (window.external) { window.external.AddFavorite(url, tytul_ulubione); } // IE
 else if (window.opera && window.print) {
 document.getElementById("ulubione").title=tytul_ulubione;
 document.getElementById("ulubione").href=url;
     var a = document.createElement('a');
     a.setAttribute('href', url);
     a.setAttribute('title', tytul_ulubione);
     a.setAttribute('rel','sidebar');
     a.click();
     
  }
 }
 
function kontakt(form){

tr=form.tresc.value;
e=form.email.value;

if (e.replace(/\s/g,"")=="") {
alert("Pole email jest polem obowiazkowym !!!");
form.email.focus();
return false;
}
if (!e.match(/^[0-9a-z_.-]+@([0-9a-z-]+\.)+[a-z]{2,6}$/)) {
    alert("Podaj poprawny adres e-mail!");
    form.email.focus();
    return false;
  }
if (tr.replace(/\s/g,"")=="") {
alert("Pole treść jest polem obowiazkowym !!!");
form.tresc.focus();
return false;
}
form.send.value="0";
form.action="kontakt";
return true;

               } 