<!--

//----------------------------------------------------------------------

/*
img1		= new Image(93,26); img1.src		= "images/b_home1.jpg";
img1_r 		= new Image(93,26); img1_r.src		= "images/b_home2.jpg";
*/

function imgOn(imgX){
	document.images [imgX].src = eval(imgX + "_r.src");
}

function imgOff(imgX){
	document.images [imgX].src = eval(imgX + ".src");
}

function showLink(tabName) {
	if (tabName) {
		if(document.getElementById) {
			document.getElementById(tabName).style.display = "block";
		}
		else if(document.all) {
			document.all[tabName].style.display = "block";
		}
	}
}

function hiddenLink(tabName) {
	if (tabName) {
		if(document.getElementById) {
			document.getElementById(tabName).style.display = "none";
		}
		else if(document.all) {
			document.all[tabName].style.display = "none";
		}
	}
}

function vediFoto(foto,w,h) {
	if (w=="") {w=600;}
	if (h=="") {h=600;}
	hrefloc = location
	winCat=window.open ("", "Foto_Grande", "toolbar=no,directories=no,menubar=no,scrollbars=yes,width="+ w +",height="+ h );
	winCat.document.write ("<html><head><base href=" + hrefloc + "><title></title>");
	winCat.document.write ("<body onLoad='self.focus()' bgcolor='#FFFFFF'>");
	winCat.document.write ("<p align='center'><img src='" + foto + "' border='0'></p>");
	winCat.document.write ("<form><p align='center'><input type='button' value='chiudi' onClick='window.close()' style='font-family: verdana, arial; font-size: 10px;'></p>");
	winCat.document.write ("</form></body></html>");
	winCat.document.close ();
}

// per aprire un link, anche di file, in un pop-up
function apri(url,popWidth,popHeight) {
	if (popWidth=="") {popWidth=400;}
	if (popHeight=="") {popHeight=400;}
	newin = window.open(url,'page','scrollbars=yes,resizable=yes, width='+ popWidth +',height='+ popHeight +',status=no,location=no,toolbar=no');
}


// funzione di pulitura di campo text. funzionamento: pulisciCampo(this)
function pulisciCampo(obj) {
	obj.value = "";
}

function ColoraSfondo(obj,colore) {
  obj.style.backgroundColor = '#'+ colore;
}


function pageBottone() {
	if ((pageBottID=='bott2')||(pageBottID=='bott3')||(pageBottID=='bott4')) {
		document.getElementById(pageBottID).className = 'tabBottoni2ON';
	}
	else {
		document.getElementById(pageBottID).className = 'tabBottoniON';
	}
}

function gestBottone(tipo,id) {
	if ((tipo=='on')&&(pageBottID!=id)) {
		document.getElementById(id).className = 'tabBottoniON';
	}
	if ((tipo=='off')&&(pageBottID!=id)) {
		document.getElementById(id).className = 'tabBottoni';
	}
	if ((tipo=='on2')&&(pageBottID!=id)) {
		document.getElementById(id).className = 'tabBottoni2ON';
	}
	if ((tipo=='off2')&&(pageBottID!=id)) {
		document.getElementById(id).className = 'tabBottoni2';
	}
}


function checkModulo() {
	var errore = '';
/*
	if (!(document.form.associazione.value)) {
		errore = '\n - il nome della Vs Società / Ente';
	}
*/
	if (errore) {
		alert('ATTENZIONE !!!\nti sei dimenticato di compilare i seguenti dati:' + errore);
		return false;
	}
	else {
		return checkPrivacy();
	}
}


function checkModulo2() {
	var errore = '';
	if (errore) {
		alert('ATTENZIONE !!!\nti sei dimenticato di compilare i seguenti dati:' + errore);
		return false;
	}
	else {
		return checkPrivacy();
	}
}


function checkPrivacy() {
	if (!(document.modulo.privacy[0].checked)) {
		alert('ATTENZIONE !!!\nse non si consente al trattamento dei dati personali secondo la legge 196/03, non è possibile proseguire.');
		return false;
	}
}


//-->
