

function chk(ob,ltid){
	val=ob.value
	wyr_reg=/(\D*)/g
	strnew=val.replace(wyr_reg,"")
	
	ob.value=strnew
	document.getElementById('zamow').href="?sid=-1&itid="+ltid+"&action=add&lp="+strnew

  
	
}

function chko(ob){
	val=ob.value
	wyr_reg=/(\D*)/g
	strnew=val.replace(wyr_reg,"")
	
	ob.value=strnew
}


function oblicz(){
	zstr="";
	for(i=0;i<((document.zamowienietb.elements.length)-2);i++)
	{
	zstr+=document.zamowienietb.elements[i].value+"	";
	}
	document.zamowienietb.zamowieniest.value=zstr
	document.zamowienietb.submit()
	
	
}


/*	echo("<script> */

function blocktonone(obid){
	//alert(obid);
var t=document.getElementById(obid).style.display;

if(t=='none')
{
	
	userAg = navigator.userAgent; 
bName = navigator.appName; 
bVer = parseInt(navigator.appVersion); 
if (bVer >= 4) 
{ if (bName.substring(0,9) == "Microsoft") 
document.getElementById(obid).style.display='block'
else 
document.getElementById(obid).style.display='table-row'
}  
	
	
	
	
	
	
}
else{document.getElementById(obid).style.display='none'}
}

function blocktonones(obid){
	//alert(obid);
var t=document.getElementById(obid).style.display;

if(t=='none')
{
document.getElementById(obid).style.display='block'
}

else{document.getElementById(obid).style.display='none'}

}




/*</script>"); */


imgprefix="b";
imgext=".gif";
imgpath="_img/button/";




buttongif=new Array("l","m","r","h");

function makebutton(txt,adres){

if(adres!=""){
	ooc=" o"
}
else {ooc=""}

td="<table class=buttontb cellspacing=0 cellpadding=0><tr>";
for(i=0;i<buttongif.length-1;i++){
if(i==1){
td+="<td class=bu"+i+" style='background-image: url("+imgpath+imgprefix+buttongif[i]+imgext+")' onmouseover=this.style.backgroundImage='url("+imgpath+""+imgprefix+""+buttongif[3]+""+imgext+")'  onmouseout=this.style.backgroundImage='url("+imgpath+""+imgprefix+""+buttongif[1]+""+imgext+")' "+ooc+"nClick=location.href='"+adres+"'>"+txt+"</td>"; }
else
td+="<td class=bu"+i+" style='background-image: url("+imgpath+imgprefix+buttongif[i]+imgext+")'></td>";
}
td+="</tr></table>";
//buttonhtml="<table align=left class=buttontb cellspacing=0 cellpadding=0><tr>"+td+"</tr></table>"

document.write(td);
}


var zm=0


function menusc(ob){
	document.getElementById(ob).style.paddingTop=document.body.scrollTop+200;
	
	//document.getElementById(ob).style.zoom='50%'

}
function sub(){
		with(document.subs){if(semail.value==''){alert('Prosimy wpisać e-mail')
		}
		else {  
			em=semail.value
			e=em.split('@')
			if(e.length==2){
			e3=e[1].split('.')
			if((e3.length>1)&&(e3[0].length>0)&&(e3[1].length>0)){
			alert('Dziękujemy')
			submit() } else { alert('Prosimy wpisać e-mail') }}else { alert('Prosimy wpisać e-mail')}}}		
		}




navigator.flaga=1 
onunload=function exitpop(){ 
 try 
 {navigator.flaga} 
 catch(e){
 	
 	
 	window.open("ankieta.php","popup","height=307,width=270,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,top=10,left=122");
 	
 	 	
 
 	} 

} 

function ismail(e){return /^[\w\.-]{2,}@[\w\.-]+\.[a-z]{2,5}$/i.test(e)} 
function niepuste(x){return x>''}
function validate(f){
 var v,i,e
 for(i=0;e=f[i++];)
  if(v=window[e.getAttribute('valid')])
   if(!v(e.value))
    {alert(e.getAttribute('alert'));e.focus();return 1}
}	

