<!--
function apri(form,car,nome)
   {
   if (!nome)
      nome = 'aa' + (new Date().getTime());
   form.target = nome;
   open ('', nome, car);
}

var win = null; 
function pop(theURL,myname,w,h){ 
settings = 'scrollbars=yes,resizable=no,width='+w+',height='+h+',status=no,location=no,toolbar=no' 
win = window.open(theURL,myname,settings) 
if(win.window.focus){win.window.focus();} 
}

function pop2(theURL,myname,w,h){ 
settings = 'scrollbars=yes,resizable=yes,width='+w+',height='+h+',status=no,location=no,toolbar=no' 
win = window.open(theURL,myname,settings) 
if(win.window.focus){win.window.focus();} 
}

function popImg(immagine) {
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=yes,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>Immagini e Foto</TITLE></HEAD>");
	w.document.write("<SCR"+"IPT language=javascript>function checksize()  { if (document.images[0].complete) { var larghezzaPop=document.images[0].width+40; var altezzaPop=document.images[0].height+60; if (altezzaPop>550){altezzaPop=550} window.resizeTo(larghezzaPop,altezzaPop); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY bgcolor='#ffffff' onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><div align='center' style='margin:0; padding:0;'>");
	w.document.write("<a href='#' onclick='window.close()'><IMG src="+immagine+" border=0></a>");
	w.document.write("</div></BODY></HTML>");
	w.document.close();
}

function pop3(theURL,myname,w,h){
	var ie=document.all?true:false;xPos=0,yPos=0;
	if (ie){
		xPos=window.event.screenX;
		yPos=window.event.screenY;
	}
	else{
		xPos=mosso.screenX;
		yPos=mosso.screenY;
	}
	settings = 'left='+xPos+',top='+yPos+',scrollbars=no,resizable=no,width='+w+',height='+h+',status=no,location=no,toolbar=no' 
	win = window.open(theURL,myname,settings)
	if(win.window.focus){win.window.focus();} 
}

function mostraNascDiv(node) {
	var target = document.getElementById(node);
	if (target.style.display == "none") {
		target.style.display = "block";
	} else {
		target.style.display = "none";
	}
}

function reindirizza(url) { 
window.opener.location.href= url
top.window.close(); 
}

function aggiorna() { 
window.opener.location.reload();
top.window.close(); 
}

function confElimina(){
	msg = "________________________________\n\n";
	msg += "Sei sicuro di voler eliminare i campi selezionati?\n";
	msg += "________________________________\n\n";
	msg += "Clicca OK per confermare o Annulla per uscire!\n";
	if (confirm(msg) )
	return true;
	else
	return false;
}

function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}

function disabTasto(f,testoTasto) {
	for(i=0;i<f.length;i++)
		if(f.elements[i].type == "submit"){
			f.elements[i].disabled = true;
			f.elements[i].value = testoTasto;
		}
	return true;
}

function ConFormRicDisp(nomeMod)
	{
	var nomeMod;
	if (nomeMod.cercaDal.value == "" ) 
		{
		alert("Non hai selezionato una data di arrivo");
		nomeMod.cercaDal.focus();
		return false;
		}
	if (nomeMod.cercaAl.value == "" ) 
		{
		alert("Non hai selezionato una data di partenza");
		nomeMod.cercaAl.focus();
		return false;
		}
	disabTasto(nomeMod,'...');
	return true;
}

function ControllaForm1(nomeMod)
	{
	var nomeMod;
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
	if (nomeMod.nominativo.value == "" ) 
		{
		alert("Non hai inserito il tuo Nome e Cognome");
		nomeMod.nominativo.focus();
		return false;
		}
	if (nomeMod.telefono.value == "" ) 
		{
		alert("Non hai inserito il tuo Telefono");
		nomeMod.telefono.focus();
		return false;
		}
	if ((nomeMod.email.value == "" ) || (!email_reg_exp.test(nomeMod.email.value)))
		{
		alert("Non hai inserito il tuo Indirizzo E-mail");
		nomeMod.email.select();
		return false;
		}
	if (nomeMod.messaggio.value == "" )
		{
		alert("Non hai inserito un messaggio");
		nomeMod.messaggio.select();
		return false;
		}
	if (nomeMod.privacy.checked == false )
		{
		alert("Non hai dato il consenso per il trattamento dei dati");
		nomeMod.privacy.select();
		return false;
		}
	disabTasto(nomeMod,'Invio Messaggio in Corso ...');
	return true;
}

function ControllaForm2(nomeMod)
	{
	var nomeMod;
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
	if (nomeMod.nominativo.value == "" ) 
		{
		alert("Non hai inserito il tuo Nome e Cognome");
		nomeMod.nominativo.focus();
		return false;
		}
	if (nomeMod.telefono.value == "" ) 
		{
		alert("Non hai inserito il tuo Telefono");
		nomeMod.telefono.focus();
		return false;
		}
	if ((nomeMod.email.value == "" ) || (!email_reg_exp.test(nomeMod.email.value)))
		{
		alert("Non hai inserito il tuo Indirizzo E-mail");
		nomeMod.email.select();
		return false;
		}
	if (nomeMod.arrivo.value == "" ) 
		{
		alert("Non hai inserito la Data di Arrivo");
		nomeMod.arrivo.focus();
		return false;
		}
	if (nomeMod.partenza.value == "" ) 
		{
		alert("Non hai inserito la Data di Partenza");
		nomeMod.partenza.focus();
		return false;
		}
	if (nomeMod.messaggio.value == "" )
		{
		alert("Non hai inserito un messaggio");
		nomeMod.messaggio.select();
		return false;
		}
	if (nomeMod.privacy.checked == false )
		{
		alert("Non hai dato il consenso per il trattamento dei dati");
		nomeMod.privacy.select();
		return false;
		}
	disabTasto(nomeMod,'Invio Richiesta in Corso ...');
	return true;
}

var list; 
var tickerObj; 
var hex = 255;
function fadeText(divId) {
  if(tickerObj)
  {
    if(hex>0) {
      hex-=5; // increase color darkness
      tickerObj.style.color="rgb("+hex+","+hex+","+hex+")";
      setTimeout("fadeText('" + divId + "')", fadeSpeed); 
    } else
      hex=255; //reset hex value
  }
}
function initialiseList(divId) {
  tickerObj = document.getElementById(divId);
  if(!tickerObj)
    reportError("Si è verificato un errore \"" + divId + "\"");
  list = tickerObj.childNodes;
  if(list.length <= 0)
    reportError("Si è verificato un errore");
  for (var i=0; i<list.length; i++) {
    var node = list[i];
    if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) 
              tickerObj.removeChild(node);
  }
  run(divId, 0);
}
function run(divId, count) {
  fadeText(divId);
  list[count].style.display = "block";
  if(count > 0)
    list[count-1].style.display = "none";
  else
    list[list.length-1].style.display = "none";
  count++;
  if(count == list.length)
    count = 0;
  window.setTimeout("run('" + divId + "', " + count+ ")", interval*1000);
}
function reportError(error) {
  alert("Si è verificato un errore");
  return false;
}
var interval = 5; // interval in seconds
var fadeSpeed = 40;









var list2; 
var tickerObj2; 
var hex2 = 255;
function fadeText2(divId2) {
  if(tickerObj2)
  {
    if(hex2>0) {
      hex2-=5; // increase color darkness
      tickerObj2.style.color="rgb("+hex2+","+hex2+","+hex2+")";
      setTimeout("fadeText2('" + divId2 + "')", fadeSpeed2); 
    } else
      hex2=255; //reset hex value
  }
}
function initialiseList2(divId2) {
  tickerObj2 = document.getElementById(divId2);
  if(!tickerObj2)
    reportError("Si è verificato un errore \"" + divId2 + "\"");
  list2 = tickerObj2.childNodes;
  if(list2.length <= 0)
    reportError("Si è verificato un errore");
  for (var i=0; i<list2.length; i++) {
    var node = list2[i];
    if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) 
              tickerObj2.removeChild(node);
  }
  run2(divId2, 0);
}
function run2(divId2, count) {
  fadeText2(divId2);
  list2[count].style.display = "block";
  if(count > 0)
    list2[count-1].style.display = "none";
  else
    list2[list2.length-1].style.display = "none";
  count++;
  if(count == list2.length)
    count = 0;
  window.setTimeout("run2('" + divId2 + "', " + count+ ")", interval2*1000);
}
function reportError(error) {
  alert("Si è verificato un errore");
  return false;
}
var interval2 = 5; // interval in seconds
var fadeSpeed2 = 40;
//-->