//Funzione di convalida form contatti
function ConvalidaContatti(primo_campo, secondo_campo, terzo_campo, quarto_campo, quinto_campo, sesto_campo, settimo_campo, ottavo_campo, nono_campo)
{

    if (document.getElementById('data'))
    {
        if(!(ValidateForm())) return false;
    }
    
    if (document.getElementById('email'))
    {
        if(!(ConvalidaEmail('email'))) return false;
    }

    if (primo_campo != '')
    {
        if (document.getElementById(primo_campo).value == '')
        {
            alert('Compilare il campo '+primo_campo);
            document.getElementById(primo_campo).focus();
            return false;
        }
    }
    if (secondo_campo != '')
    {
        if (document.getElementById(secondo_campo).value == '')
        {
            alert('Compilare il campo '+secondo_campo);
            document.getElementById(secondo_campo).focus();
            return false;
        }
    }
    if (terzo_campo != '')
    {
        if (document.getElementById(terzo_campo).value == '')
        {
            alert('Compilare il campo '+terzo_campo);
            document.getElementById(terzo_campo).focus();
            return false;
        }
    }
    if (quarto_campo != '')
    {
        if (document.getElementById(quarto_campo).value == '')
        {
            alert('Compilare il campo '+quarto_campo);
            document.getElementById(quarto_campo).focus();
            return false;
        }
    }
    if (quinto_campo != '')
    {
        if (document.getElementById(quinto_campo).value == '')
        {
            alert('Compilare il campo '+quinto_campo);
            document.getElementById(quinto_campo).focus();
            return false;
        }
    }
    if (sesto_campo != '')
    {
        if (document.getElementById(sesto_campo).value == '')
        {
            alert('Compilare il campo '+sesto_campo);
            document.getElementById(sesto_campo).focus();
            return false;
        }
    }
    if (settimo_campo != '')
    {
        if (document.getElementById(settimo_campo).value == '')
        {
            alert('Compilare il campo '+settimo_campo);
            document.getElementById(settimo_campo).focus();
            return false;
        }
    }
    if (ottavo_campo != '')
    {
        if (document.getElementById(ottavo_campo).value == '')
        {
            alert('Compilare il campo '+ottavo_campo);
            document.getElementById(ottavo_campo).focus();
            return false;
        }
    }
    if (nono_campo != '')
    {
        if (document.getElementById(nono_campo).value == '')
        {
            alert('Compilare il campo '+nono_campo);
            document.getElementById(nono_campo).focus();
            return false;
        }
    }
return true;
}

