
function ticket_validation()
{
	var elem;
	var errs=0;
	// execute all element validations in reverse order, so focus gets
	// set to the first one in error.

    if (!validatePresent(document.forms.tickets.codicecliente,  'codicecliente_msg',true)){ errs += 1;}
    if (!validatePresent(document.forms.tickets.textarea,  'textarea_msg')){ errs += 1;}
	
    if (errs>1){alert('Perfavore correggi tutti i campi richiesti');}
    if (errs==1){ alert('Perfavore correggi il campo richiesto');}
    
    return (errs==0);
}


function project_form_validation()
{
	var elem;
	var errs=0;
	// execute all element validations in reverse order, so focus gets
	// set to the first one in error.

    if (!validateEmail(document.forms.registration.email_address,  'email_address_msg',true)){ errs += 1;}
	if (!validatePresent(document.forms.registration.zip_code,  'zip_code_msg')){ errs += 1;}
	if (!validatePresent(document.forms.registration.phone,  'phone_msg')){ errs += 1;}
	if (!validatePresent(document.forms.registration.last_name,  'last_name_msg')){ errs += 1;}
	if (!validatePresent(document.forms.registration.first_name,  'first_name_msg')){ errs += 1;}

    if (errs>1){  alert('Perfavore correggi tutti i campi richiesti');}
    if (errs==1){ alert('Perfavore correggi il campo richiesto');}

	return (errs==0);
}
