// JavaScript Document

window.addEvent('load', function(){						 
	var scroll = new Fx.Scroll('newsWrapper', {
		wait: false,
		duration: 1500,
		offset: {'x': -53},
		transition: Fx.Transitions.Quad.easeInOut
	});
	
	$('goIndietro').addEvent('click', function(event) {								   
		event = new Event(event).stop();
		scroll.toLeft();
	});
	
	$('goAvanti').addEvent('click', function(event) {
		event = new Event(event).stop();
		scroll.toRight();
	});
});


function link_size(url,x,y) {
	window.open(url,'zoom','width=' + x + ', height=' + y + ' ,toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes');
}


function mail_no_spam(user,dominio) { 
    document.location.href = "mailto:" + user + "@" + dominio; 
}

function verificaForm()
	{
	var esito = true;

	document.getElementById('liNome').className = "";
	if(document.getElementById('campoNome').value == "")
		{
		esito = false;
		document.getElementById('liNome').className = "errore";
		}

	document.getElementById('liCognome').className = "";
	if(document.getElementById('campoCognome').value == "")
		{
		esito = false;
		document.getElementById('liCognome').className = "errore";
		}

	document.getElementById('liEmail').className = "";
	if(document.getElementById('campoEmail').value == "")
		{
		esito = false;
		document.getElementById('liEmail').className = "errore";
		}

	document.getElementById('pPrivacy').className = "";
	if(document.getElementById('privacySi').checked == false)
		{
		esito = false;
		document.getElementById('pPrivacy').className = "errore";
		}

	return esito;
	}
