<!--

img1		= new Image(128,26); img1.src		= "images/b_dest1.jpg";
img1_r 		= new Image(128,26); img1_r.src		= "images/b_dest2.jpg";
img2		= new Image(70,26); img2.src		= "images/b_guid1.jpg";
img2_r 		= new Image(70,26); img2_r.src		= "images/b_guid2.jpg";
img3		= new Image(116,26); img3.src		= "images/b_sumi1.jpg";
img3_r 		= new Image(116,26); img3_r.src		= "images/b_sumi2.jpg";
img4		= new Image(88,26); img4.src		= "images/b_artc1.jpg";
img4_r 		= new Image(88,26); img4_r.src		= "images/b_artc2.jpg";
img5		= new Image(93,26); img5.src		= "images/b_meet1.jpg";
img5_r 		= new Image(93,26); img5_r.src		= "images/b_meet2.jpg";
img6		= new Image(98,26); img6.src		= "images/b_base1.jpg";
img6_r 		= new Image(98,26); img6_r.src		= "images/b_base2.jpg";
img7		= new Image(66,26); img7.src		= "images/b_link1.jpg";
img7_r 		= new Image(66,26); img7_r.src		= "images/b_link2.jpg";
img8		= new Image(88,26); img8.src		= "images/b_cont1.jpg";
img8_r 		= new Image(88,26); img8_r.src		= "images/b_cont2.jpg";
img9		= new Image(72,26); img9.src		= "images/b_forum1.jpg";
img9_r 		= new Image(72,26); img9_r.src		= "images/b_forum2.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) {
		document.all[tabName].style.display = "block";
	}
}

function hiddenLink(tabName) {
	if (tabName) {
		document.all[tabName].style.display = "none";
	}
}


// funzione che cambia la visione di un oggetto, showObj e hiddenObj fusi insieme
// necessita di: style="display: none;" nel codice, altrimenti il settaggio nel css non viene subito visto
function changeViewObj(tabName) {
	if (tabName) {
		if(document.getElementById) {
			if (document.getElementById(tabName).style.display == "none") {
				document.getElementById(tabName).style.display = "block";
			}
			else {
				document.getElementById(tabName).style.display = "none";
			}
		}
		else if(document.all) {
			if (document.all[tabName].style.display == "none") {
				document.all[tabName].style.display = "block";
			}
			else {
				document.all[tabName].style.display = "none";
			}
		}
	}
}


function vediFoto(foto,w,h) {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='#000000'>");
	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 ();
}


function checkContatti() {
	var errore = '';
	if (!(document.modulo.nome.value)) {
		errore = '\n - il nome';
	}
	if (!(document.modulo.tel.value)) {
		errore = errore + '\n - il numero di telefono';
	}
	if (!(document.modulo.mail.value)) {
		errore = errore + '\n - l\'indirizzo e-mail';
	}
	if (errore) {
		alert('ATTENZIONE !!!\nnon sono compilati i seguenti dati obbligatori:\n' + 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;
	}
}


// funzione di pulitura di campo text. funzionamento: pulisciCampo(this)
function pulisciCampo(obj) {
	obj.value = "";
}


// per aprire un link, anche di file, in un pop-up
function apri(url,popWidth,popHeight) {
	if (popWidth=="") {popWidth=400;}
	if (popHeight=="") {popHeight=400;}
	window.open(url,'page','scrollbars=yes,resizable=yes, width='+ popWidth +',height='+ popHeight +',status=no,location=no,toolbar=no');
}


// funzione di limite sul testo, per il momento flag non fà nulla...
function MaxChrTextarea(obj, max, flag) {
	if (obj.value.length>max) {
		obj.value = obj.value.substr(0,max);
	}
}


// funzione di controllo del form di salvataggio post
function ckForumSalva() {
	if (!(document.newpost.foto.value)) {
		return confirm('ATTENZIONE !!!\nNon è stata inserita l\'immagine.\nVuoi salvare comunque?');
	}
	else {
		return true;
	}
}

//-->
