function avverti(messaggio)
{
			alert(messaggio)
}			

function ErrFocus(obj)
{			
			try
			{
				obj.style.backgroundColor="#FAA2A2"	
				obj.style.borderColor = "#FAA2A2"
				obj.style.borderColorDark = "#FAA2A2"
				
			}
			catch (ex)
			{
				alert("Errore:" + ex.Message)
			}
			
			obj.focus()
}

function CheckTextField(form,nome)
{
	try
	{
		
		if (form[nome].value=="")
		{
			//alert(arguments.length)
			if (arguments.length > 2)
			{
				sNome = arguments[2]
			} else {
				sNome = nome
			}
			avverti("Il Campo \""+ sNome +"\" è Obbligatorio")
			ErrFocus(form[nome])
			return false; 
		} else {
			return true;
		}
	

	}
	catch (EX)
	{
		alert("Errore:\n" + nome  + " "+ EX.message )
	}
	
}