function myLayer (x){
//individuo l’oggetto
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.frmCaptcha.captchaHidden.value = numero;
}

//function fnCaptchaCheck(f){
//if ((f.captcha.value == "") || (f.captcha.value == f.captchaHidden.value)){
//alert("Numeri corrispondenti");
//}else{
//alert("Numeri diversi");
//}
//return false();
//}
window.onload=function(){fnCaptcha();}
