
/*
 * Setta il messaggio nella statusBar
 */
function showStatus(msgStr)  { 
	status=msgStr; document.MM_returnValue = true;
}



function isValidEmail(str) 
{
   return( (str.indexOf("@") > 2));
}


function checkCampi(){
  var d = document.editform;
  var em = d.emmTxt.value;
  var rs = d.ragSoc.value;
  var ms = d.notTxt.value;

  if(rs == ""){
    alert("Cognome/Ragione Sociale obbligatorio");
    d.ragSoc.focus();
	return true;
  }  


  if(!isValidEmail(em)){
    alert("Indirizzo E-mail non corretto");
    d.emmTxt.focus();
	return true;
  } 
 
  if(ms == ""){
    alert("Testo del messagio abbligatorio");
    d.notTxt.focus();
	return true;
  }  
  d.submit();
  return true;

}



