function validateContact()
{
document.all.item('img1').style.display = 'none';
document.all.item('img2').style.display = 'none';
document.all.item('img3').style.display = 'none';
document.all.item('img4').style.display = 'none';
document.all.item('img5').style.display = 'none';
document.all.item('img6').style.display = 'none';
var Validate = true;
var Elemento = '';
var MsgErr = '!! CAUTION !!<br>Error! Check your field data, please!<br>';
var ImgName = '';

if (document.Form1.Nome.value == '')
	{
	Validate = false;
	if (Elemento == '') {Elemento = 'Nome'};
	//MsgErr += 'Inserire il nome!<br>';
	ImgName += 'img1,'
	}	

if (document.Form1.Cognome.value == '')
	{
	Validate = false;
	if (Elemento == '') {Elemento = 'Cognome'};
	//MsgErr += 'Inserire il cognome<br>';
	ImgName += 'img2,'
	}		

if (document.Form1.Email.value == '')
	{
	Validate = false;
	Elemento = 'Email';
	//MsgErr += 'Inserire l\'indirizzo di posta elettronica!<br>';
	ImgName += 'img3,'
	}
else
	{	
	if (document.Form1.Email.value.indexOf('@') == -1 && document.Form1.Email.value.indexOf('.') == -1)
		{
		Validate = false;
		Elemento = 'Email';
		MsgErr += 'Email not valid<br>';
		ImgName += 'img3,'
		}
	}	

if (document.Form1.Telefono.value == '')
	{
	Validate = false;
	if (Elemento == '') {Elemento = 'Telefono'};
	//MsgErr += 'Inserire un recapito telefonico!<br>';
	ImgName += 'img4,'
	}			
	
if (document.Form1.Oggetto.value == '')
	{
	Validate = false;
	if (Elemento == '') {Elemento = 'Oggetto'};
	//MsgErr += 'Inserire l\'oggetto del messaggio<br>';
	ImgName += 'img5,'
	}		


if (document.Form1.Messaggio.value == '')
	{
	Validate = false;
	if (Elemento == '') {Elemento = 'Messaggio'};
	//MsgErr += 'Non è stato inserito il testo del messaggio<br>';
	ImgName += 'img6,'
	}
if (Validate)
	{document.Form1.submit()}
else
	{
	ARimg = ImgName.split(',')
	for (i=0; i<ARimg.length; i++)
		{
		if (ARimg[i] != '') {document.all.item(ARimg[i]).style.display = ''}
		}
	errShape.innerHTML = MsgErr;
	errShape.style.display = '';
	document.Form1.elements(Elemento).focus()
	}
			
}

