function sendPrevFnc(){
strNome = document.form1.txtNome.value;
strAzienda = document.form1.txtAzienda.value;
strTelefono = document.form1.txtTelefono.value;
strMail = document.form1.txtMail.value;
strMail.test = /\w/;
strText = document.form1.AreaEmailText.value;
strText.test = /\w/;
if (strNome != '') {
if (strAzienda != '') {
if (strTelefono != '') {
if (strMail != false){
if (checkMail('txtMail') == true){
if (strText != ''){
document.form1.BodyFnc.value = 1;
document.form1.submit();
}
else{
document.form1.txtNome.focus();
}
}
else{
document.form1.txtAzienda.focus();
}
}
else{
document.form1.txtTelefono.focus();
}
}
else{
document.form1.AreaEmailText.focus();
}
}
else{
document.form1.txtMail.focus();
}
}
else{
document.form1.txtMail.focus();
}
}





function checkMail(InputData){
Mail = document.form1[InputData].value;
var mailRet = false;
	Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
  	if (Filtro.test(Mail)){
	mailRet = true;}
return mailRet;}

function checkPwd(InputData,InputDataR){
var pwdRet = false;
password = document.form1[InputData].value;
passwordR = document.form1[InputDataR].value;
password.test=/\w/;
if (password == passwordR && password != false){
	if (password.length >= 6 && password.length <= 10 ){
	pwdRet = true;}
}
return pwdRet;}







function logon(){
one_check = 0;

if (checkMail("txt_logemail") == false && one_check == 0){
first_check = "txt_logemail";
one_check = 1;
}

if (document.form1.txt_logpassword.value == "" && one_check == 0){
first_check = "txt_logpassword";
one_check = 1;
}

if (one_check == 0){
document.form1.BodyFnc.value = 9;
document.form1.submit();
}
else{
document.form1[first_check].focus();
}
}



function logout(){
document.form1.BodyFnc.value = 8;
document.form1.submit();
}