// JavaScript Document
<!--
function validazione()
{
	str_alert = "ATTENZIONE !!\n";
	str_alert = str_alert + "-------------------------------------------\n\n";
	int_alert = 0;
	
	// inizio controllo autorizzazione
	if (document.cli_registrazione.cli_consenso.checked == false)
		{
		int_alert ++;
		str_alert += int_alert + ".  Check PRIVACY POLICY\n";
		}
	else if (document.cli_registrazione.cli_consenso.checked == true)

		{
			
		// inizio controllo nome
		if (document.cli_registrazione.cli_nome.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ".  Nome (campo obbligatorio)\n";
			}
		
		
		// inizio controllo email
		if (document.cli_registrazione.cli_email.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ". E-mail (campo obbligatorio)\n";
			}
		else
			{
			var regMail=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"); 
			if (!regMail.test(document.cli_registrazione.cli_email.value))
				{
				int_alert ++;
				str_alert += int_alert + ". Formato Email : xxxxx@xxxx.xx\n";
				}
			}
			
		}	

	if (int_alert > 0)
		{
		alert(str_alert);
		return false
		
		}
	else
		{
		return true
		
		}
}



function validazione_cuccioli()
{
	str_alert = "ATTENZIONE !!\n";
	str_alert = str_alert + "-------------------------------------------\n\n";
	int_alert = 0;
	
	// inizio controllo autorizzazione
	if (document.cli_registrazione.cli_consenso.checked == false)
		{
		int_alert ++;
		str_alert += int_alert + ".  Check PRIVACY POLICY\n";
		}
	else if (document.cli_registrazione.cli_consenso.checked == true)

		{
			
		// inizio controllo nome
		if (document.cli_registrazione.cli_nome.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ".  Nome e Cognome(campo obbligatorio)\n";
			}
		if (document.cli_registrazione.cli_indirizzo.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ".  Indirizzo(campo obbligatorio)\n";
			}
		if (document.cli_registrazione.cli_telefono.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ".  Telefono(campo obbligatorio)\n";
			}
		// inizio controllo email
		if (document.cli_registrazione.cli_email.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ".  E-mail (campo obbligatorio)\n";
			}
		else
			{
			var regMail=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"); 
			if (!regMail.test(document.cli_registrazione.cli_email.value))
				{
				int_alert ++;
				str_alert += int_alert + ". Formato Email : xxxxx@xxxx.xx\n";
				}
			}
		

		if (document.cli_registrazione.richiesta.value == "")
			{
			int_alert ++;
			str_alert += int_alert + ".  testo richiesta (campo obbligatorio)\n";
			}
	
		}	

	if (int_alert > 0)
		{
		alert(str_alert);
		return false
		
		}
	else
		{
		return true
		
		}
}

//-->

