// JavaScript Document
function Obbligatori(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Societ&agrave; *';
		document.getElementById("p_attivita").innerHTML = 'Attivita *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Societ&agrave;';
		document.getElementById("p_attivita").innerHTML = 'Attivita';
	}
}

function Obbligatori_en(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Company *';
		document.getElementById("p_attivita").innerHTML = 'Company\'s field of activities *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Company';
		document.getElementById("p_attivita").innerHTML = 'Activities';
	}
}

function Obbligatori_fr(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Societe *';
		document.getElementById("p_attivita").innerHTML = 'Fonction de la Societe *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Societe';
		document.getElementById("p_attivita").innerHTML = 'Activit&eacute; de la Societe';
	}
}


function Obbligatori_de(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Firma *';
		document.getElementById("p_attivita").innerHTML = 'Sektor *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Firma';
		document.getElementById("p_attivita").innerHTML = 'Sektor';
	}
}



function Obbligatori_esp(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Sociedad *';
		document.getElementById("p_attivita").innerHTML = 'Actividad de La sociedad *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Sociedad';
		document.getElementById("p_attivita").innerHTML = 'Función en la empresa';
	}
}

function Obbligatori_ru(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Company *';
		document.getElementById("p_attivita").innerHTML = 'Company\'s field of activities *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Company';
		document.getElementById("p_attivita").innerHTML = 'Activities';
	}
}


function Obbligatori_tk(n) {
	if (n == 1) {
		document.getElementById("p_societa").innerHTML = 'Company *';
		document.getElementById("p_attivita").innerHTML = 'Company\'s field of activities *';
	} else {
		document.getElementById("p_societa").innerHTML = 'Company';
		document.getElementById("p_attivita").innerHTML = 'Activities';
	}
}



function Convalida(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Il campo \"Societa\" non puo essere vuoto");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Il campo \"Attivita\" non puo essere vuoto");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Il campo \"Nome\" non puo essere vuoto");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Il campo \"Cognome\" non puo essere vuoto");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Il campo \"Indirizzo\" non puo essere vuoto");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Il campo \"Cap\" non puo essere vuoto");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Il campo \"Citta\" non puo essere vuoto");
		document.forms[0].citta.focus();
		return false;
	}
	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Il campo \"Nazione\" non puo essere vuoto");
			document.forms[0].nazione.focus();
			return false;
		}
	}

	
	if (document.forms[0]._nazione.value  == ""){
		alert("Il campo \"Nazione\" non puo essere vuoto");
		document.forms[0]._nazione.focus();
		return false;
	}


	if (document.forms[0].telefono.value  == ""){
		alert("Il campo \"Telefono\" non puo essere vuoto");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Il campo \"E-mail\" non puo oessere vuoto");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("L\'indirizzo e-mail inserito non  in un formato corretto");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
			
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )
		{
		// If there were less then selections made display an alert box
		alert("E\' necessario selezionare almeno una casella del campo \"Prodotti di interesse\"")
		return (false);
		}
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("E\' necessario selezionare almeno una casella del campo \"Ho conosciuto Ditec\"")
			return (false);
		}
	}
	if (!document.forms[0].check_privacy[0].checked) {
		alert("E\' necessario accettare la clausola sulla privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}


function Convalida_en(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Field \"Company\" cannot be empty");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Field \"Activities\" cannot be empty");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Field \"First name\" cannot be empty");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Field \"Surname\" cannot be empty");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Field \"Address\" cannot be empty");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Field \"Zip Code\" cannot be empty");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Field \"Town\" cannot be empty");
		document.forms[0].citta.focus();
		return false;
	}
	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Field \"Country\" cannot be empty");
			document.forms[0].nazione.focus();
			return false;
		}
	}
	

	if (document.forms[0]._nazione.value  == ""){
		alert("Field \"Country\" cannot be empty");
		document.forms[0]._nazione.focus();
		return false;
	}



	if (document.forms[0].telefono.value  == ""){
		alert("Field \"Telephone\" cannot be empty");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Field \"E-mail\" cannot be empty");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("E-mail is not in a right format");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"Products of interest\"")
			return (false);
		}
	}

	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"I learned about Ditec\"")
			return (false);
		}
	}
	if (!document.forms[0].check_privacy[0].checked) {
		alert("It is necessary to accept the informative about the privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}


function Convalida_fr(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Field \"Societe\" cannot be empty");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Field \"Activities\" cannot be empty");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Field \"Pr&eacute;nom\" cannot be empty");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Field \"Nom\" cannot be empty");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Field \"Adresse\" cannot be empty");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Field \"Code postal\" cannot be empty");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Field \"Ville\" cannot be empty");
		document.forms[0].citta.focus();
		return false;
	}
	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Field \"Nation\" cannot be empty");
			document.forms[0].nazione.focus();
			return false;
		}
	}

	if (document.forms[0]._nazione.value  == ""){
		alert("Field \"Nation\" cannot be empty");
		document.forms[0]._nazione.focus();
		return false;
	}	

	if (document.forms[0].telefono.value  == ""){
		alert("Field \"T&eacute;l&eacute;phone\" cannot be empty");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Field \"E-mail\" cannot be empty");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("E-mail is not in a right format");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"Products of interest\"")
			return (false);
		}
	}

	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"I learned about Ditec\"")
			return (false);
		}
	}
		
	if (!document.forms[0].check_privacy[0].checked) {
		alert("It is necessary to accept the informative about the privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}





function Convalida_de(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Field \"Firma\" cannot be empty");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Field \"Sektor\" cannot be empty");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Field \"First name\" cannot be empty");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Field \"Surname\" cannot be empty");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Field \"Address\" cannot be empty");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Field \"Zip Code\" cannot be empty");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Field \"Town\" cannot be empty");
		document.forms[0].citta.focus();
		return false;
	}
	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Field \"Country\" cannot be empty");
			document.forms[0].nazione.focus();
			return false;
		}
	}

	
	if (document.forms[0]._nazione.value  == ""){
		alert("Field \"Country\" cannot be empty");
		document.forms[0]._nazione.focus();
		return false;
	}

	if (document.forms[0].telefono.value  == ""){
		alert("Field \"Telephone\" cannot be empty");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Field \"E-mail\" cannot be empty");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("E-mail is not in a right format");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"Products of interest\"")
			return (false);
		}
	}

	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"I learned about Ditec\"")
			return (false);
		}
	}
		
	if (!document.forms[0].check_privacy[0].checked) {
		alert("It is necessary to accept the informative about the privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}




function Convalida_esp(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Field \"Sociedad\" cannot be empty");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Field \"Activities\" cannot be empty");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Field \"Nombre\" cannot be empty");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Field \"Apellido\" cannot be empty");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Field \"Dirección\" cannot be empty");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Field \"CP/ZIP\" cannot be empty");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Field \"Población\" cannot be empty");
		document.forms[0].citta.focus();
		return false;
	}



	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Field \"Country\" cannot be empty");
			document.forms[0].nazione.focus();
			return false;
		}
	}
	

	if (document.forms[0]._nazione.value  == ""){
		alert("Field \"Country\" cannot be empty");
		document.forms[0]._nazione.focus();
		return false;
	}


	if (document.forms[0].telefono.value  == ""){
		alert("Field \"Tel&eacute;fono\" cannot be empty");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Field \"E-mail\" cannot be empty");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("E-mail is not in a right format");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"Products of interest\"")
			return (false);
		}
	}

	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"I learned about Ditec\"")
			return (false);
		}
	}
		
	if (!document.forms[0].check_privacy[0].checked) {
		alert("It is necessary to accept the informative about the privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}


function Convalida_ru(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Field \"Company\" cannot be empty");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Field \"Activities\" cannot be empty");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Field \"First name\" cannot be empty");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Field \"Surname\" cannot be empty");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Field \"Address\" cannot be empty");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Field \"Zip Code\" cannot be empty");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Field \"Town\" cannot be empty");
		document.forms[0].citta.focus();
		return false;
	}
	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Field \"Country\" cannot be empty");
			document.forms[0].nazione.focus();
			return false;
		}
	}

	if (document.forms[0]._nazione.value  == ""){
		alert("Field \"Country\" cannot be empty");
		document.forms[0]._nazione.focus();
		return false;
	}	

	if (document.forms[0].telefono.value  == ""){
		alert("Field \"Telephone\" cannot be empty");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Field \"E-mail\" cannot be empty");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("E-mail is not in a right format");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"Products of interest\"")
			return (false);
		}
	}

	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"I learned about Ditec\"")
			return (false);
		}
	}
		
	if (!document.forms[0].check_privacy[0].checked) {
		alert("It is necessary to accept the informative about the privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}


function Convalida_tk(type) {
	
	if (document.forms[0].tipo_richiesta[0].checked) {
		if (document.forms[0].societa.value  == ""){
			alert("Field \"Company\" cannot be empty");
			document.forms[0].societa.focus();
			return false;
		}
		
		if (document.forms[0].attivita.value  == ""){
			alert("Field \"Activities\" cannot be empty");
			document.forms[0].attivita.focus();
			return false;
		}
		
	}
	
	if (document.forms[0].nome.value  == ""){
		alert("Field \"First name\" cannot be empty");
		document.forms[0].nome.focus();
		return false;
	}
	
	if (document.forms[0].cognome.value  == ""){
		alert("Field \"Surname\" cannot be empty");
		document.forms[0].cognome.focus();
		return false;
	}
	
	if (document.forms[0].indirizzo.value  == ""){
		alert("Field \"Address\" cannot be empty");
		document.forms[0].indirizzo.focus();
		return false;
	}
	
	if (document.forms[0].cap.value  == ""){
		alert("Field \"Zip Code\" cannot be empty");
		document.forms[0].cap.focus();
		return false;
	}
	
	if (document.forms[0].citta.value  == ""){
		alert("Field \"Town\" cannot be empty");
		document.forms[0].citta.focus();
		return false;
	}
	
	if (type != "care") {
		if (document.forms[0].nazione.value  == ""){
			alert("Field \"Country\" cannot be empty");
			document.forms[0].nazione.focus();
			return false;
		}
	}

	if (document.forms[0]._nazione.value  == ""){
		alert("Field \"Country\" cannot be empty");
		document.forms[0]._nazione.focus();
		return false;
	}
	
	if (document.forms[0].telefono.value  == ""){
		alert("Field \"Telephone\" cannot be empty");
		document.forms[0].telefono.focus();
		return false;
	}
	
	if (document.forms[0].email.value  == ""){
		alert("Field \"E-mail\" cannot be empty");
		document.forms[0].email.focus();
		return false;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].email.value)){
		alert("E-mail is not in a right format");
		document.forms[0].email.focus();
		return false;
	}
	
	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].prodotti_interesse.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].prodotti_interesse[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"Products of interest\"")
			return (false);
		}
	}

	if (type != "care") {
		// set var checkbox_choices to zero
		
		var checkbox_choices = 0;
		
		// Loop from zero to the one minus the number of checkbox button selections
		for (counter = 0; counter < document.forms[0].conosciuto_ditecteam.length; counter++) {
		
			// If a checkbox has been selected it will return true
			// (If not it will return false)
			if (document.forms[0].conosciuto_ditecteam[counter].checked) {
					checkbox_choices = checkbox_choices + 1;
			};	
		}
		
		if (checkbox_choices == 0 )	{
			// If there were less then selections made display an alert box
			alert("It is necessary to select at least value in the field \"I learned about Ditec\"")
			return (false);
		}
	}
		
	if (!document.forms[0].check_privacy[0].checked) {
		alert("It is necessary to accept the informative about the privacy");
		document.forms[0].check_privacy[0].focus();
		return false;
	}
	
}
