var dhtmld = document; 



function peok(url, width, height)
{ 
 var czas  = new Date();
 rok   = czas.getYear();
 mies  = ( ( czas.getMonth() < 10 ) ? "0": "" ) + ( czas.getMonth() + 1 );
 dzien = ( ( czas.getDate()  < 10 ) ? "0": "" ) + ( czas.getDate() );
 godz  = ( ( czas.getHours() < 10 ) ? "0": "" ) + ( czas.getHours() );
 min   = ( ( czas.getMinutes() < 10 ) ? "0": "" ) + ( czas.getMinutes() );
 sek   = ( ( czas.getSeconds() < 10 ) ? "0": "" ) + ( czas.getSeconds() );
 aktdata=dzien+"_"+mies+"_"+rok+"_"+godz+"_"+min+"_"+sek;
 maxszer=window.screen.width;
 maxwys=window.screen.height;
 polx=Math.round( (maxszer-width)/2);
 poly=Math.round( (maxwys-height)/2)-20;
 
 mojas=window.open(url,aktdata,"toolbar=no,scrollbars=auto,directories=no,top="+poly+",left="+polx+",menubar=no,width="+ width +",height="+ height +",resizable=no");
}






function sprawdz_email(email)
{
 if (!/^[a-zA-Z0-9\-_\.]+?@[a-zA-Z0-9\-_\.]+?\.[a-zA-Z]{2,5}$/.test(email)) return false;
 else return true;

}






function newsletter_akcja(form, zm)
{
 var t;
 t='';
 
 if (!sprawdz_email(form.email.value) && form.email.value!='twoj@email.pl') t=jsw_poprem;
 
 if (t!='')
   {
    window.alert(t);
    return false;
   }
 else
   {
    peok('newsletter.php?g='+zm+'&mail='+form.email.value, '287', '243');
   }
}






function nlp_sprawdz(form, zm)
{
 var t;
 t='';
 
 if (!sprawdz_email(form.email.value)) t=jsw_poprem+"\n";
 if (form.pd.checked==false) t=t+jsw_zgnauzem;
 
 if (t!='')
   {
    window.alert(t);
    return false;
   }
 else
   {
    form.g.value=zm;
    return true;
   }
}






function nlp_usun_sprawdz(form, zm)
{
 var t;
 t='';
 
 if (!sprawdz_email(form.email.value)) t=jsw_poprem+"\n";
 if (form.pd.checked==false) t=t+jsw_zgnawykem;
 
 if (t!='')
   {
    window.alert(t);
    return false;
   }
 else
   {
    form.g.value=zm;
    return true;
   }
}







function ofertapodmzdjecia(miejsce, nowe)
{
 miejsce.src=nowe.src;
}






function ResetLMF()
{
 document.flleftmenu.Play();
}






function drukuj()
{
 window.print();
}


