function inviautente()
	{		
	this.document.form_datiutente.registra.value = "1";
	this.document.form_datiutente.submit();
	}

function insertanimale(cCodicePadrone)
	{		
	// alert("APRO IL FORM DI INSERIMENTO NUOVO ANIMALE PER IL PADRONE PRINCIPALE CON ID: " + idCliente);
	document.location = "popupformanimale1.php?modo_passato=INSERT&&codice_pardone_passato=" + 	cCodicePadrone;
	}

function insertanimale1(idCliente)
	{		
	alert("APRO IL FORM PER ASSOCIARE UN ANIMALE GIA ESISTENTE AD UN ALTRO PADRONE CHE NON E QUELLO PRINCIPALE CON ID: " + idCliente);
	// document.location = "formanimale.php?idcliente=" + idCliente;
	}
	
function azzerautente()
	{		
	alert("AZZERO!");
	}

	function aggiornastatoscelto()
		{

		// RICAVA LA OPTION SELEZIONATA		
		var nIndex = document.form_datiutente.utentezona.options.selectedIndex;
		var cValue = document.form_datiutente.utentezona.options[document.form_datiutente.utentezona.selectedIndex].value;
		var cText  = document.form_datiutente.utentezona.options[document.form_datiutente.utentezona.selectedIndex].text;

		// VISUALIZZA IL *** TESTO *** DELLA OPTION SELEZIONATA
		document.form_datiutente.testostato.value = cText;

		}

	function cercazona()
		{
		with (document.form_datiutente)
			{
			ThisFind=-1;
			StringToSearch=testostato.value;
			StringToSearchLength=StringToSearch.length;
			if (StringToSearchLength>0)
				{		
				for (i=0;i<utentezona.options.length;i++)
					{
					ThisFind==-1&&utentezona.options[i].text.toLowerCase().substring(0,StringToSearchLength)==StringToSearch?ThisFind=i:null;
					}
				}
			else
				{		
				ThisFind=0;
				}
			utentezona.selectedIndex=ThisFind;
      			}
	   	}
