<!--
// Radio Button Validation
// copyright Stephen Chapman, 15th Nov 2004,14th Sep 2005
// you may copy this function but please keep the copyright notice with it
//Controllo campi obbligatori del form
function CheckForm()
{
var temp;
var space;



if ( ( document.forms.form.tipo[0].checked == false )
&& ( document.forms.form.tipo[1].checked == false ) 
&& ( document.forms.form.tipo[2].checked == false ) 
&& ( document.forms.form.tipo[3].checked == false ) 
)
{
	alert ( "Il campo \"Tipo\" è obbligatorio" );
	return (false);
}

//Nome
if (document.forms.form.Nome.value == "")
  {
    alert("Il campo \"Nome\" è obbligatorio");
    document.forms.form.Nome.focus();
    return (false);
  }

//Telefono
if (document.forms.form.country.value == "")
  {
    alert("Il campo \"Nazione\" è obbligatorio");
    document.forms.form.country.focus();
    return (false);
  }

//Email
if (document.forms.form.email.value == "")
  {
    alert("Inserisci il tuo indirizzo email");
    document.forms.form.email.focus();
    return (false);
  }

// check validit› email
txt=document.forms.form.email.value;
if (txt.indexOf("@")<2)
// check presenza @
  {
    alert("Email non valida");
document.forms.form.email.focus();
return (false);
}
if (txt.lastIndexOf(".")<txt.indexOf("@"))
// check presenza .
  {
alert("Email non valida");
document.forms.form.email.focus();
return (false);
  }

if (txt.length<6)
// check lunghezza almeno 6 char
  {
alert("Email non valida");
document.forms.form.email.focus();
return (false);
 }
      
//Messaggio
if (document.forms.form.Richiesta.value == "")
  {
    alert("Si prega di inserire il testo del messaggio");
    document.forms.form.Richiesta.focus();
    return (false);
  }
    return (true);
	
}






function CheckFormEn()
{
var temp;
var space;
//Nome
if (document.forms.form.Nome.value == "")
  {
    alert("Please insert your name");
    document.forms.form.Nome.focus();
    return (false);
  }

//Telefono
if (document.forms.form.country.value == "")
  {
    alert("Please insert your country");
    document.forms.form.country.focus();
    return (false);
  }

//Email
if (document.forms.form.email.value == "")
  {
    alert("Please insert your e-mail address");
    document.forms.form.email.focus();
    return (false);
  }

// check validit› email
txt=document.forms.form.email.value;
if (txt.indexOf("@")<2)
// check presenza @
  {
    alert("Email not valid");
document.forms.form.email.focus();
return (false);
}
if (txt.lastIndexOf(".")<txt.indexOf("@"))
// check presenza .
  {
alert("Email not valid");
document.forms.form.email.focus();
return (false);
  }

if (txt.length<6)
// check lunghezza almeno 6 char
  {
alert("Email not valid");
document.forms.form.email.focus();
return (false);
 }
      
//Messaggio
if (document.forms.form.Richiesta.value == "")
  {
    alert("Please insert your message");
    document.forms.form.Richiesta.focus();
    return (false);
  }
    return (true);
	
}
// -->





function CheckFormDe()
{
var temp;
var space;
//Nome
if (document.forms.form.Nome.value == "")
  {
    alert("Bitte geben Sie Ihren Namen");
    document.forms.form.Nome.focus();
    return (false);
  }

//Telefono
if (document.forms.form.country.value == "")
  {
    alert("Bitte geben Sie Ihr Land");
    document.forms.form.country.focus();
    return (false);
  }

//Email
if (document.forms.form.email.value == "")
  {
    alert("Bitte geben Sie Ihre E-Mail-Adresse");
    document.forms.form.email.focus();
    return (false);
  }

// check validit› email
txt=document.forms.form.email.value;
if (txt.indexOf("@")<2)
// check presenza @
  {
    alert("E-Mail nicht gültig");
document.forms.form.email.focus();
return (false);
}
if (txt.lastIndexOf(".")<txt.indexOf("@"))
// check presenza .
  {
alert("E-Mail nicht gültig");
document.forms.form.email.focus();
return (false);
  }

if (txt.length<6)
// check lunghezza almeno 6 char
  {
alert("E-Mail nicht gültig");
document.forms.form.email.focus();
return (false);
 }
      
//Messaggio
if (document.forms.form.Richiesta.value == "")
  {
    alert("Bitte geben Sie Ihre Nachricht");
    document.forms.form.Richiesta.focus();
    return (false);
  }
    return (true);
	
}
// -->

function CheckLogin()
{
var temp;
var space;
//Nome
if (document.forms.form.username.value == "")
  {
    alert("Il campo \"Username\" è obbligatorio");
    document.forms.form.username.focus();
    return (false);
  }

//Telefono
if (document.forms.form.password.value == "")
  {
    alert("Il campo \"Password\" è obbligatorio");
    document.forms.form.password.focus();
    return (false);
  }
    return (true);
	
}

function CheckLoginEn()
{
var temp;
var space;
//Nome
if (document.forms.form.username.value == "")
  {
    alert("Please insert your username");
    document.forms.form.username.focus();
    return (false);
  }

//Telefono
if (document.forms.form.password.value == "")
  {
    alert("Please insert your password");
    document.forms.form.password.focus();
    return (false);
  }
    return (true);
	
}
