function CookieCheckPage()
{
//	if( window.navigator.cookieEnabled )
//	document.cookie = "jscript=1; path=/;";
//	window.location.replace(registrationform.php);
}

function GroupModifyFormCheck()
{
	if(document.theform.familyname.value=="" || document.theform.familyname.value==" ") {
		window.alert("Cognome non può essere vuoto!");
		document.theform.familyname.focus();
		return false
	}

	if(document.theform.firstname.value=="" || document.theform.firstname.value==" ") {
		window.alert("Nome non può essere vuoto!");
		document.theform.firstname.focus();
		return false
	}

	if(document.theform.address_1.value=="" || document.theform.address_1.value==" ") {
		window.alert("Indirizzo privato non può essere vuoto!");
		document.theform.address_1.focus();
		return false
	}

	if(document.theform.zipcode.value=="" || document.theform.zipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.zipcode.focus();
		return false
	}

	if(document.theform.city.value=="" || document.theform.city.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.city.focus();
		return false
	}

	if(document.theform.country.value=="" || document.theform.country.value==" ") {
		window.alert("Nazione non può essere vuota!");
		document.theform.country.focus();
		return false
	}

	if(document.theform.phone.value=="" || document.theform.phone.value==" ") {
		window.alert("Telefono non può essere vuoto!");
		document.theform.phone.focus();
		return false
	}

	if(document.theform.email.value=="" || document.theform.email.value==" ") {
		window.alert("Email non può essere vuota!");
		document.theform.email.focus();
		return false
	}

	if (document.theform.email.value.indexOf("@") == -1 || document.theform.email.value.indexOf(".") == -1) { 
		window.alert("Email non è valida!");
		document.theform.email.focus();
		return false
	}
	
	if(document.theform.confirmpassword.value!=document.theform.password.value) {
		window.alert("La password non è confermata!");
		document.theform.confirmpassword.focus();
		return false
	}

	if(document.theform.billheading.value=="" || document.theform.billheading.value==" ") {
		window.alert("Intestazione Fattura non può essere vuota!");
		document.theform.billheading.focus();
		return false
	}

	if(document.theform.billaddress.value=="" || document.theform.billaddress.value==" ") {
		window.alert("Indirizzo non può essere vuoto!");
		document.theform.billaddress.focus();
		return false
	}

	if(document.theform.billzipcode.value=="" || document.theform.billzipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.billzipcode.focus();
		return false
	}

	if(document.theform.billcity.value=="" || document.theform.billcity.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.billcity.focus();
		return false
	}

	if(document.theform.billcountry.value=="" || document.theform.billcountry.value==" ") {
		window.alert("Nazione non può essere vuota!");
		document.theform.billcountry.focus();
		return false
	}

	if(document.theform.billvat.value=="" || document.theform.billvat.value==" ") {
		window.alert("P.IVA non può essere vuota!");
		document.theform.billcity.focus();
		return false
	}

	if((document.theform.billcodfisc.value=="" || document.theform.billcodfisc.value==" ") && document.theform.billcountry.value=='ITALIA (IT)') {
		window.alert("COD.Fiscale non può essere vuoto!");
		document.theform.billcity.focus();
		return false
	}

	return true;
}

function RegistrationFormCheck()
{
	if(document.theform.familyname.value=="" || document.theform.familyname.value==" ") {
		window.alert("Cognome non può essere vuoto!");
		document.theform.familyname.focus();
		return false
	}

	if(document.theform.firstname.value=="" || document.theform.firstname.value==" ") {
		window.alert("Nome non può essere vuoto!");
		document.theform.firstname.focus();
		return false
	}

	if(document.theform.profession.value=="" || document.theform.profession.value==" ") {
		window.alert("Professione non può essere vuoto!");
		document.theform.profession.focus();
		return false
	}

	if(document.theform.discipline.value=="" || document.theform.discipline.value==" ") {
		window.alert("Disciplina non può essere vuoto!");
		document.theform.discipline.focus();
		return false
	}

	if(document.theform.address_1.value=="" || document.theform.address_1.value==" ") {
		window.alert("Indirizzo privato non può essere vuoto!");
		document.theform.address_1.focus();
		return false
	}

	if(document.theform.zipcode.value=="" || document.theform.zipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.zipcode.focus();
		return false
	}

	if(document.theform.city.value=="" || document.theform.city.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.city.focus();
		return false
	}

	if(document.theform.country.value=="" || document.theform.country.value==" ") {
		window.alert("Nazione non può essere vuota!");
		document.theform.country.focus();
		return false
	}

	if(document.theform.phone.value=="" || document.theform.phone.value==" ") {
		window.alert("Telefono non può essere vuoto!");
		document.theform.phone.focus();
		return false
	}

	if(document.theform.email.value=="" || document.theform.email.value==" ") {
		window.alert("Email non può essere vuota!");
		document.theform.email.focus();
		return false
	}

	if (document.theform.email.value.indexOf("@") == -1 || document.theform.email.value.indexOf(".") == -1) { 
		window.alert("Email non è valida!");
		document.theform.email.focus();
		return false
	}
	
	if(document.theform.confirmemail.value!=document.theform.email.value) {
		window.alert("Email non è confermata!");
		document.theform.confirmemail.focus();
		return false
	}

	if(!document.theform.privacy[0].checked) {
		window.alert("Le condizioni della Privacy devono essere accettate!");
		document.theform.privacy[0].focus();
		return false
	}

	if(document.theform.billheading.value=="" || document.theform.billheading.value==" ") {
		window.alert("Intestazione Fattura non può essere vuota!");
		document.theform.billheading.focus();
		return false
	}

	if(document.theform.billaddress1.value=="" || document.theform.billaddress1.value==" ") {
		window.alert("Indirizzo non può essere vuoto!");
		document.theform.billaddress1.focus();
		return false
	}

	if(document.theform.billzipcode.value=="" || document.theform.billzipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.billzipcode.focus();
		return false
	}

	if(document.theform.billcity.value=="" || document.theform.billcity.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.billcity.focus();
		return false
	}

	if(document.theform.billcountry.value=="" || document.theform.billcountry.value==" ") {
		window.alert("Nazione non può essere vuota!");
		document.theform.billcountry.focus();
		return false
	}

	if(document.theform.billvat.value=="" || document.theform.billvat.value==" ") {
		window.alert("P.IVA non può essere vuota!");
		document.theform.billvat.focus();
		return false
	}

	if((document.theform.billcodfisc.value=="" || document.theform.billcodfisc.value==" ") && document.theform.billcountry.value=='ITALIA (IT)') {
		window.alert("COD.Fiscale non può essere vuoto!");
		document.theform.billcodfisc.focus();
		return false
	}
	
	
	if((document.theform.codfiscgg.value=="" || document.theform.codfiscgg.value==" ")) {
		window.alert("Il giorno di nascita non può essere vuoto!");
		document.theform.codfiscgg.focus();
		return false
	}
	if((document.theform.codfiscmm.value=="" || document.theform.codfiscmm.value==" ")) {
		window.alert("Il mese di nascita non può essere vuoto!");
		document.theform.codfiscmm.focus();
		return false
	}
	if((document.theform.codfiscaa.value=="" || document.theform.codfiscaa.value==" ")) {
		window.alert("L'anno di nascita non può essere vuoto!");
		document.theform.codfiscaa.focus();
		return false
	}

	if((document.theform.codfiscnatoa.value=="" || document.theform.codfiscnatoa.value==" ") && document.theform.billcountry.value=='ITALIA (IT)') {
		window.alert("Il luogo di nascita non può essere vuoto!");
		document.theform.codfiscnatoa.focus();
		return false
	}
	if((document.theform.codfiscprov.value=="" || document.theform.codfiscprov.value==" ") && document.theform.billcountry.value=='ITALIA (IT)') {
		window.alert("La provincia di nascita non può essere vuota!");
		document.theform.codfiscprov.focus();
		return false
	}

	return true;
}

function GroupRegistrationFormCheck()
{
	if(document.theform.familyname.value=="" || document.theform.familyname.value==" ") {
		window.alert("Cognome non può essere vuoto!");
		document.theform.familyname.focus();
		return false
	}

	if(document.theform.firstname.value=="" || document.theform.firstname.value==" ") {
		window.alert("Nome non può essere vuoto!");
		document.theform.firstname.focus();
		return false
	}

	if(document.theform.company.value=="" || document.theform.company.value==" ") {
		window.alert("Azienda non può essere vuoto!");
		document.theform.company.focus();
		return false
	}

	if(document.theform.address_1.value=="" || document.theform.address_1.value==" ") {
		window.alert("Indirizzo non può essere vuoto!");
		document.theform.address_1.focus();
		return false
	}

	if(document.theform.zipcode.value=="" || document.theform.zipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.zipcode.focus();
		return false
	}

	if(document.theform.city.value=="" || document.theform.city.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.city.focus();
		return false
	}

	if(document.theform.phone.value=="" || document.theform.phone.value==" ") {
		window.alert("Telefono non può essere vuoto!");
		document.theform.phone.focus();
		return false
	}

	if(document.theform.billheading.value=="" || document.theform.billheading.value==" ") {
		window.alert("Intestazione Fattura non può essere vuota!");
		document.theform.billheading.focus();
		return false
	}

	if(document.theform.billaddress1.value=="" || document.theform.billaddress1.value==" ") {
		window.alert("Indirizzo non può essere vuoto!");
		document.theform.billaddress1.focus();
		return false
	}

	if(document.theform.billzipcode.value=="" || document.theform.billzipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.billzipcode.focus();
		return false
	}

	if((document.theform.billcodfisc.value=="" || document.theform.billcodfisc.value==" ") && document.theform.billcountry.value=='ITALIA (IT)') {
		window.alert("COD.Fiscale non può essere vuoto!");
		document.theform.billcodfisc.focus();
		return false
	}
	
	if(document.theform.billcity.value=="" || document.theform.billcity.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.billcity.focus();
		return false
	}

	if(document.theform.billvat.value=="" || document.theform.billvat.value==" ") {
		window.alert("P.IVA non può essere vuota!");
		document.theform.billvat.focus();
		return false
	}

	if(document.theform.email.value=="" || document.theform.email.value==" ") {
		window.alert("Email non può essere vuota!");
		document.theform.email.focus();
		return false
	}

	if (document.theform.email.value.indexOf("@") == -1 || document.theform.email.value.indexOf(".") == -1) { 
		window.alert("Email non è valida!");
		document.theform.email.focus();
		return false
	}
	
	if(document.theform.confirmemail.value!=document.theform.email.value) {
		window.alert("Email non è confermata!");
		document.theform.confirmemail.focus();
		return false
	}

	if(document.theform.password.value=="" || document.theform.password.value==" ") {
		window.alert("Password non può essere vuota!");
		document.theform.password.focus();
		return false
	}

	if(document.theform.confirmpassword.value!=document.theform.password.value) {
		window.alert("Password non è confermata!");
		document.theform.confirmpassword.focus();
		return false
	}

	return true;
}

function HotelFormCheck()
{
	if(document.theform.familyname.value=="" || document.theform.familyname.value==" ") {
		window.alert("Cognome non può essere vuoto!");
		document.theform.familyname.focus();
		return false
	}

	if(document.theform.firstname.value=="" || document.theform.firstname.value==" ") {
		window.alert("Nome non può essere vuoto!");
		document.theform.firstname.focus();
		return false
	}

	if(document.theform.address1.value=="" || document.theform.address1.value==" ") {
		window.alert("Indirizzo non può essere vuoto!");
		document.theform.address1.focus();
		return false
	}

	if(document.theform.zipcode.value=="" || document.theform.zipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.zipcode.focus();
		return false
	}

	if(document.theform.city.value=="" || document.theform.city.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.city.focus();
		return false
	}

	if(document.theform.country.value=="" || document.theform.country.value==" ") {
		window.alert("Nazione non può essere vuota!");
		document.theform.country.focus();
		return false
	}

	if(document.theform.tel.value=="" || document.theform.tel.value==" ") {
		window.alert("Telefono non può essere vuoto!");
		document.theform.tel.focus();
		return false
	}

	if(document.theform.email.value=="" || document.theform.email.value==" ") {
		window.alert("Email non può essere vuota!");
		document.theform.email.focus();
		return false
	}

	if (document.theform.email.value.indexOf("@") == -1 || document.theform.email.value.indexOf(".") == -1) { 
		window.alert("Email non è valida!");
		document.theform.email.focus();
		return false
	}
	
	if(document.theform.confirm_email.value!=document.theform.email.value) {
		window.alert("La password non è confermata!");
		document.theform.confirm_email.focus();
		return false
	}

	if(document.theform.bill_header.value=="" || document.theform.bill_header.value==" ") {
		window.alert("Intestazione Fattura non può essere vuota!");
		document.theform.bill_header.focus();
		return false
	}

	if(document.theform.bill_address1.value=="" || document.theform.bill_address1.value==" ") {
		window.alert("Indirizzo non può essere vuoto!");
		document.theform.bill_address1.focus();
		return false
	}

	if(document.theform.bill_zipcode.value=="" || document.theform.bill_zipcode.value==" ") {
		window.alert("CAP non può essere vuoto!");
		document.theform.bill_zipcode.focus();
		return false
	}

	if(document.theform.bill_city.value=="" || document.theform.bill_city.value==" ") {
		window.alert("Città non può essere vuota!");
		document.theform.bill_city.focus();
		return false
	}

	if(document.theform.bill_country.value=="" || document.theform.bill_country.value==" ") {
		window.alert("Nazione non può essere vuota!");
		document.theform.bill_country.focus();
		return false
	}

	if(document.theform.bill_vat.value=="" || document.theform.bill_vat.value==" ") {
		window.alert("P.IVA non può essere vuota!");
		document.theform.bill_vat.focus();
		return false
	}

	if((document.theform.bill_codfisc.value=="" || document.theform.bill_codfisc.value==" ") && document.theform.bill_country.value=='ITALIA (IT)') {
		window.alert("COD.Fiscale non può essere vuoto!");
		document.theform.bill_codfisc.focus();
		return false
	}

	return true;
}

function CancellationPolicyCheck()
{
	if(!document.theform.cancpolicy.checked) {
		window.alert("Cancellation Policy must be accepted to continue!");
		document.theform.cancpolicy.focus();
		return false
	}
	return true;
}

