
function myLayer (x){
//object finding
if(document.layers){ // browser="NN4";
lay=document.layers[x];
}
if(document.all){ // browser="IE";
lay=eval("document.all." + x);
}
if(!document.all && document.getElementById){ // browser="NN6+ or IE5+ if you’re willing to dump the !document.all stuff";
lay=document.getElementById(x);
}
return lay;
}
function fnCaptcha(){
var numero=Math.random()*7*666;
var numero=Math.floor(numero);

myLayer("captchaNumber").innerHTML = numero;

document.form.captchaHidden.value = numero;
}
function fnCaptchaCheck(f){

if ((f.captcha.value == "") || (f.captcha.value != f.captchaHidden.value)){
alert("Codice errato ");

return false

}else{
alert("Codice corretto ");
}
return false();
}
window.onload=function(){fnCaptcha();}
