function Validate() 
{
	var verify = true;
	with (document.frmFeedback) 
	{
		if ((email.value == "") || (messaggio.value == "")) 
		{
			verify = false;
			alert("Dati non validi");
		}
	}
	return verify
}

function CheckPrivacy() 
{
	with (document.frmFeedback) 
	{
		if (privacy.checked) 
		{
			submit.disabled = false;
		} 
		else 
		{
			submit.disabled = true;
		}
	}
}

function setBackground() 
{
	var larghezza = window.screen.width;
	var altezza = window.screen.height;
	var path1024x768 = "pictures/sfondo_pagina1024x768.jpg"
	var path1280x1024 = "pictures/sfondo_pagina1280x1024.jpg"
	with (document) 
	{
		if ((larghezza == 1024) && (altezza == 768)) 
		{
			body.style.backgroundImage = "url(" + path1024x768 + ")";
		} 
		else if ((larghezza == 1280) && (altezza == 1024)) 
		{
			body.style.backgroundImage = "url(" + path1280x1024 + ")";
		}
	}
}

function CheckMail(mail) 
{
	var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(mail.value)) 
	{
		alert('Inserire un indirizzo e-mail valido!');
		mail.focus
		return false;
	}
}