function checkrequired(which)
{
	if (document.images){
    	for (i=0;i<which.length;i++){
        	 var tempobj=which.elements[i]
         	 if (tempobj.name.substring(0,8)=="required"){
                 if (((tempobj.type=="text"||tempobj.type=="textarea" ||tempobj.type=="radio" ||tempobj=="select")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1))
                 {
				   which.elements[i].focus();
					 
                   pass=false
                   break
                 }
             }
        }
     }
	 
     if (!pass){
       alert("Alcuni campi richiesti non sono stati compilati! \nCompilare tutti i campi contrassegnati dal simbolo (*)")
       return false
     }

}
