// JavaScript Document

//CODED by Vincenzo Trapani for Grafill s.r.l.

function rollOverImage(who,src,type)
{
	if(type=="OVER")
	{
		document.getElementById(who).src=src;
	}
	else if(type=="OUT")
	{
		document.getElementById(who).src=src;
	}
}
function open_popup(path)
{
		 window.open (path,"Finestra","resizable=1,width=600,height=600");
}
function open_pop_up_comunicato(path)
{
		 window.open (path,"Finestra","width=640,height=200,scrollbars=1");
}
function open_popup_home_scroll(path)
{
		 window.open (path,"Finestra","width=640,height=480,scrollbars=1");
}
function open_popup_censimento(path)
{
		 window.open (path,"Finestra","menubar=1,resizable=1,width=600,height=750");
}
function open_popup_big(path)
{
		 window.open (path,"Finestra","resizable=1,scrollbars=yes,width=600,height=600");
}
function open_popup_table(path)
{
		 window.open (path,"Finestra","resizable=1,scrollbars=yes,width=900,height=600");
}
function open_popup_bookshop(path)
{
		 window.open (path,"Finestra","resizable=1,scrollbars=yes,width=900,height=800");
}
function change_js(chi)
{ 
	if(document.getElementById(chi).style.display=='none')
	{
		document.getElementById(chi).style.display='block';
		document.getElementById("img_"+chi).src="gif/minus_black.gif";
	}
	else
	{
		document.getElementById(chi).style.display='none';
		document.getElementById("img_"+chi).src="gif/plus_black.gif";
	}
}

function check_form_albo(form)
{
	cognome=form.cognome.value;
	anno_iscrizione=form.anno_iscrizione.value;
	citta_di_residenza=form.citta_di_residenza.value;
	professione=form.professione.value;
	if(cognome=="" && anno_iscrizione=="" && citta_di_residenza=="" && professione=="--")
	{
		alert("Devi compialre almeno uno dei campi di ricerca");
		return false;
	}
	else
	{
		return true;
	}
}