<!--

//----------------------------------------------------------------------


continua1		= new Image(152,23); continua1.src		= "images/continua.jpg";
continua1_r 	= new Image(152,23); continua1_r.src	= "images/continua_up.jpg";
continua2		= new Image(152,23); continua2.src		= "images/continua.jpg";
continua2_r 	= new Image(152,23); continua2_r.src	= "images/continua_up.jpg";
continua3		= new Image(152,23); continua3.src		= "images/continua.jpg";
continua3_r 	= new Image(152,23); continua3_r.src	= "images/continua_up.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='#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 ();
}

// 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');
}

// apertura di un link
//function apriLink(link,target) {
//}


// funzione di pulitura di campo text. funzionamento: pulisciCampo(this)
function pulisciCampo(obj) {
	obj.value = "";
}

// vien da se
function ColoraSfondo(obj,colore) {
  obj.style.backgroundColor = '#'+ colore;
}



// controllo invio form di richiesta della carta
function checkRichiestaCarta() {
	var errore = '';
	if (!(document.formCarta.ente.value)) {
		errore = errore + '\n - Nome Ente';
	}
	if (!(document.formCarta.tel.value)) {
		errore = errore + '\n - Telefono';
	}
	if (!(document.formCarta.mail.value)) {
		errore = errore + '\n - Email';
	}
	if ((!document.formCarta.richiedi_carta.checked)&&(!document.formCarta.richiedi_illustrata.checked)&&(!document.formCarta.richiedi_vignette.checked)) {
		errore = errore + '\n - non è stata scelta una tipologia di richiesta';
	}
	if (errore) {
		alert('ATTENZIONE !!!\nti sei dimenticato di compilare i seguenti dati:\n' + errore);
		return false;
	}
	else {
		return checkPrivacy('formCarta');
	}
}


// controllo invio form di richiesta della carta
function checkRichiestaAdesione() {
	var errore = '';
	if (!(document.formAderenti.ente.value)) {
		errore = errore + '\n - Nome Ente';
	}
	if (!(document.formAderenti.tel.value)) {
		errore = errore + '\n - Telefono';
	}
	if (!(document.formAderenti.mail.value)) {
		errore = errore + '\n - Email';
	}
	if (!(document.formAderenti.dichiarazione.checked)) {
		errore = errore + '\n - per proseguire è necessario dichiarare di aver letto il documento di adesione-adozione';
	}
	if (errore) {
		alert('ATTENZIONE !!!\nti sei dimenticato di compilare i seguenti dati:\n' + errore);
		return false;
	}
	else {
		return checkPrivacy('formAderenti');
	}
}


// controllo invio form di richiesta del kit della carta
function checkRichiestaKIT() {
	var errore = '';
	if (!(document.formKit.ente.value)) {
		errore += '\n - Nome Ente';
	}
	if (!(document.formKit.tel.value)) {
		errore += '\n - Telefono';
	}
	if (!(document.formKit.mail.value)) {
		errore += '\n - Email';
	}
	if (errore) {
		alert('ATTENZIONE !!!\nti sei dimenticato di compilare i seguenti dati:\n' + errore);
		return false;
	}
	else {
		return checkPrivacy('formKit');
	}
}



function checkPrivacy(nomeForm) {
	if (!(document.forms[nomeForm].privacy[0].checked)) {
		alert('ATTENZIONE !!!\nse non si consente al trattamento dei dati personali secondo la legge 196/03, non è possibile proseguire.');
		return false;
	}
}

//-->