function popup_page(link){
  we = window.open(link,'eee','location=no,status=no,scrollbars=yes,resizable=yes,width=560,height=490')
  we.focus();
}



function sond_action(sonda_id,action)
{
    //alert(sonda_id+' '+action);
    if(action=='undefined' || !action) alert('Zanim zagłosujesz, musisz wybrać odpowiedź');
    else {
			 w = window.open('sonda_act.php?sid='+sonda_id+'&aid='+action,'ss','width=480, height=200,top=40, left=40,scrollbars=no, location=no, status=no, resizable=no');
			 w.focus();
        }
}



function find_radioval(oForm,radioname)
{
    var i;
    
    //alert(oForm+' '+radioname);
    for(i=0;i<oForm.elements.length;i++){
            if(oForm.elements[i].name==radioname && oForm.elements[i].checked) return oForm.elements[i].value;
        }
}


dynoId = 0;

var isIE = document.all?true:false;
var isNS = document.layers?true:false;
function onlydigits(e,decReq) {
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;

 if(key==44)key=46;  

	var dotOK = (key==46 && decReq==1 && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;

  
	window.event.keyCode = (!isNum && !dotOK && isIE) ? 0:key;
	e.which = (!isNum && !dotOK && isNS) ? 0:key;
	return (isNum || dotOK);
}


function choose_ral(pozycja,paleta){

   wn= window.open("ral.php?pozycja="+pozycja+"&paleta="+paleta,"ew","scrollbars=yes,top=100,left=90,width=500,height=350,status=yes,location=no");
   wn.focus();

}