<!--
function isEmail(what){
   var i=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
   if(!i.test(what)){return false}   
   return true;
}

function controlla_mail(){
	if(isEmail(document.getElementById("modulo_newsletter").email.value) == false){
		alert("Inserire un indirizzo email valido");
		document.getElementById("modulo_newsletter").email.focus();
		return false
	}
	return true
}

function openWindow (url,name,widgets) {
	popupWin = window.open (url,name,widgets);
	popupWin.focus();
}

function show_hide(id){	

	tutti_i_div = document.getElementsByTagName('div');
	if(document.getElementById(id).id.substring(0,4) == "xdv_"){
		for(a=0;a<tutti_i_div.length;a++){
			if(tutti_i_div[a].id.substring(0,4) == "xdv_"){
				if(tutti_i_div[a].style.display == "block") tutti_i_div[a].style.display = "none";
			}			
		}	
	}


	if(document.getElementById(id).style.display == "block") {
		document.getElementById(id).style.display = "none";
	} else if(document.getElementById(id).style.display == "" || document.getElementById(id).style.display == "none") {
		document.getElementById(id).style.display = "block";
	}
}


function getScrollY() {
	this.scrollY = 0;
	if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop)
		this.scrollY = document.documentElement.scrollTop;
	else if (document.body && document.body.scrollTop)
		this.scrollY = document.body.scrollTop;
	else if (window.scrollY) this.scrollY = window.scrollY;

	return this.scrollY;
}

function show_img(id){
	//dove far vedere l'immagine della thumb aperta
	//document.getElementById(id).style.top = findPosY(document.getElementById(thumb));
	//document.getElementById(id).style.left = 206;
	
	document.getElementById(id).style.top = 1+parseInt(getScrollY())+"pt";
	
	//alert(document.getElementById(id).style.top);
	//document.getElementById(id).style.left = 1000-parseInt(document.getElementById(id).style.width);
	
	document.getElementById(id).style.display = "block";
}
function hide_img(id){	
	document.getElementById(id).style.display = "none";
}

//-->