
function ImpostaLogin(user,pwd,theAction){
	valori = "";
 	for(i=0;i<document.ricerca.length;i++){
 		valori += document.ricerca.elements[i].name+"="+document.ricerca.elements[i].value+"&"
 	}
 	 
 	return true
 	 
 	
}


function valida(theform,testOk,numOk){
	if(ImpostaLogin(theform.elements['USER'].value,theform.elements['PASSWORD'].value) && theform.elements['USER'].value!='' && theform.elements['PASSWORD'].value!=''){
	  
	 if(testOk!=numOk){
	 alert('Attenzione!\nverifica la xDams checklist: per poter accedere al sistema è necessario\nche non presenti voci d\'errore.\nNumero errori presenti:'+(numOk-testOk))
	 return false;
	 }
	 return true;
	 }
	else
	 return false;
  }

function accessoAnonimo(){
	document.ricerca.elements['USER'].value = 'guest'
	document.ricerca.elements['PASSWORD'].value = 'guest'
	if(valida())
		document.ricerca.submit()
	return true
}
function modificaPass(){
	window.open('modPass.jsp','cambiaPass','width=350,height=250');
	return false;
}