<!--
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 pop_g(nome,x,y,dove){
	pag= "../uploads/"+dove+"/"+nome;	gall=window.open(pag,"zk_gallery","scrollbars=no,width="+x+",height="+y+",status=no,titlebar=no,toolbar=no,directories=no,menubar=no,resizable=no,location=no");
	gall.focus();
}

function show_hide(id){	
	if(id=="search"){
		document.getElementById(id).style.visibility = "visible";
		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";
		}
	} else if(id=="open_all"){
		tutti_i_div = document.getElementsByTagName('div');
		for(a=0;a<tutti_i_div.length;a++){
			if(tutti_i_div[a].id.substring(0,4) == "mod_"){
				tutti_i_div[a].style.display = "block";
			}			
		}		
	}  else if (id=="close_all") {
		tutti_i_div = document.getElementsByTagName('div');
		for(a=0;a<tutti_i_div.length;a++){
			if(tutti_i_div[a].id.substring(0,4) == "mod_"){
				tutti_i_div[a].style.display = "none";
			}			
		}		
	}
	else {
		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";
}

//-->