

function invia_richiesta(ilForm) {

//=================================================================
// verifica che siano stati inseriti i dati nei campi obbligatori
// DECOMMENTARE LE RIGHE RELATIVE AI VALORI OBBLIGATORI!!!!!!!!!!!!
//=================================================================
	
	three=/^(.+)/;
	format_email=/^(.+)@(.+)\.(.+)/;

	threedata=/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/;
	
	var msg = '';
	
	//if (threedata.test(ilForm.Data_scadenza.value.replace(/^\s*/, '').replace(/\s*$/, ''))) {
	//	d = ilForm.Data_scadenza.value.replace(/^\s*/, '').replace(/\s*$/, '');
	//	if (controlla_giorno_mese(d, "") != "") msg+= controlla_giorno_mese(d, "Data scadenza");
	//	else tlcdata = 'on';
	//}
	//else {
	//	msg+="Il campo Data scadenza non e' valido.\n";
	//}	
	
	if (three.test(ilForm.cognome.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcogn='on';
	else msg+="The field surname is not valid.\n";
		
	if (three.test(ilForm.nome.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcnom='on';
	else msg+="The field forename is not valid.\n";

	if(three.test(ilForm.azienda.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcaz='on';
	else msg+="The field company name is not valid.\n";
	
	if(three.test(ilForm.ruoloa.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcruo='on';
	else msg+="No company Function selected.\n";
	
	if(three.test(ilForm.settore.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcsett='on';
	else msg+="No Sector selected.\n";
	
	if(format_email.test(ilForm.email_azienda.value)) tlcemail='on';
	else msg+="The field business email is not valid.\n";
	
	if(three.test(ilForm.tel_azienda.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlctelefono='on';
	else msg+="The field business phone is not valid.\n";
	
	if(three.test(ilForm.citta.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlccit='on';
	else msg+="The field town is not valid.\n";
	
	if(three.test(ilForm.provincia.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcprov='on';
	else msg+="The field county/districy is not valid.\n";
	
	if(three.test(ilForm.verCodice.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcvcod='on';
	else msg+="The field code is not valid.\n";
	
	if (!ilForm.privacy.checked) msg+="It's necessairy to authorize the use of the private datas.\n";
	
	
	if (msg!='') {
		alert(msg);
		return false;
	}
	else {
		if (confirm("Do you confirm the inserted datas?")) {
			//ilForm.submit();
			return true;
		}
		else {
			return false;
		}
	}
}


function invia_contatti(ilForm) {

//=================================================================
// verifica che siano stati inseriti i dati nei campi obbligatori
// DECOMMENTARE LE RIGHE RELATIVE AI VALORI OBBLIGATORI!!!!!!!!!!!!
//=================================================================

	three=/^(.+)/;
	format_email=/^(.+)@(.+)\.(.+)/;
	
	var msg = '';
	
	//if (threedata.test(ilForm.Data_scadenza.value.replace(/^\s*/, '').replace(/\s*$/, ''))) {
	//	d = ilForm.Data_scadenza.value.replace(/^\s*/, '').replace(/\s*$/, '');
	//	if (controlla_giorno_mese(d, "") != "") msg+= controlla_giorno_mese(d, "Data scadenza");
	//	else tlcdata = 'on';
	//}
	//else {
	//	msg+="Il campo Data scadenza non e' valido.\n";
	//}	
	
	if (three.test(ilForm.cognome.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcogn='on';
	else msg+="The field surname is not valid.\n";
		
	if (three.test(ilForm.nome.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcnom='on';
	else msg+="The field forename is not valid.\n";

	if(three.test(ilForm.azienda.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcaz='on';
	else msg+="The field company name is not valid.\n";
	
	if(three.test(ilForm.ruoloa.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcruo='on';
	else msg+="No position in company selected.\n";
	
	if(three.test(ilForm.settore.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcsett='on';
	else msg+="No sector selected.\n";
	
	if(format_email.test(ilForm.email_azienda.value)) tlcemail='on';
	else msg+="The field business email is not valid.\n";
	
	if(three.test(ilForm.tel_azienda.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlctelefono='on';
	else msg+="The field business phone is not valid.\n";
	
	if(three.test(ilForm.citta.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlccit='on';
	else msg+="The field town is not valid.\n";
	
	if(three.test(ilForm.provincia.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcprov='on';
	else msg+="The field county/district is not valid.\n";
	
	if(three.test(ilForm.verCodice.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcvcod='on';
	else msg+="The field code is not valid.\n";
	
	if (!ilForm.privacy.checked) msg+="It's necessairy to authorize the use of the private datas.\n";
	
	
	if (msg!='') {
		alert(msg);
		return false;
	}
	else {
		if (confirm("Do you confirm the inserted datas?")) {
			//ilForm.submit();
			return true;
		}
		else {
			return false;
		}
	}
}

function invia_job(ilForm) {

//=================================================================
// verifica che siano stati inseriti i dati nei campi obbligatori
// DECOMMENTARE LE RIGHE RELATIVE AI VALORI OBBLIGATORI!!!!!!!!!!!!
//=================================================================

	three=/^(.+)/;
	format_email=/^(.+)@(.+)\.(.+)/;	
	
	var msg = '';
	
	if (three.test(ilForm.cognome.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcogn='on';
	else msg+="The field surname is not valid.\n";
		
	if (three.test(ilForm.nome.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcnom='on';
	else msg+="The field forename is not valid.\n";
	
	if(format_email.test(ilForm.email.value)) tlcemail='on';
	else msg+="The field e-mail is not valid.\n";
	
	if (three.test(ilForm.curriculum.value.replace(/^\s*/, '').replace(/\s*$/, '')) || three.test(ilForm.allegato.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlccurr='on';
	else msg+="No CV attached.\n";
	
	if(three.test(ilForm.verCodice.value.replace(/^\s*/, '').replace(/\s*$/, ''))) tlcvcod='on';
	else msg+="The field code is not valid.\n";
	
	if (!ilForm.privacy.checked) msg+="It's necessairy to authorize the use of the private datas.\n";
	
	if (msg!='') {
		alert(msg);
		return false;
	}
	else {
		if (confirm("Do you confirm the inserted file?")) {
			//ilForm.submit();
			return true;
		}
		else {
			return false;
		}
	}
}

