// Declaring valid date character, minimum year and maximum year
var dtCh= "/";
var minYear=1900;
var maxYear=2100;

// Declaring valid time character
var tmCh= ":";

var collWidgetDisabled = new Array();
var n_timeout=0;
var timeout;

var coll = document.getElementsByName("chk");
var temp="";

/* Giancarlo 13 ottobre 2007 - stile per tooltip - BEGIN */
//window.onload=enableTooltips;

function enableTooltips(){
var links=document.getElementsByTagName("a");
for(i=0;i<links.length;i++){
    t=links[i].getAttribute("title");
    if(t!=""){
        links[i].removeAttribute("title");
        links[i].style.position="relative";
        tooltip=document.createElement("em");
        tooltip.className="tooltip";
        tooltip.style.display="none";
        tooltip.appendChild(document.createTextNode(t));
        links[i].appendChild(tooltip);
        links[i].onmouseover=showTooltip;
        links[i].onmouseout=hideTooltip;
        }
    }
}

function showTooltip(event){
    this.style.zIndex="25";
    this.getElementsByTagName("em")[0].style.display="block";
    }

function hideTooltip(event){
    this.style.zIndex="24";
    this.getElementsByTagName("em")[0].style.display="none";
    }
/* Giancarlo 13 ottobre 2007 - stile per tooltip - END */


//ModificaStatoRicSecondoLivelloPage.jsp
function approva_click(me,alertvar,name){

    if(confirm(alertvar)){
    me.disabled=true;
    document.SecondoLivelloForm.action = "/orchideaFE/ModificaStatoRicSecondoLivelloAction.do?method="+name+"&validation=true";
    document.SecondoLivelloForm.submit();
    }
    else{
      return false;
    }
  }

//GestioneRichiestaPrenotazionePage
function accept_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.GestioneRichiestaPrenotazioneForm.action = "/orchideaFE/GestioneRichiestaPrenotazioneAction.do?method="+name+"&validation=true";
		document.GestioneRichiestaPrenotazioneForm.submit();
	}
	else{
		return false;
	}
}

//TVisualizzazioneOffertaServizioPage
//TPreviewOffertaServizioPage
function add_click(me,name){
    document.OffertaServizioForm.action = "/orchideaFE/VisualizzazioneOffertaServizioAction.do?method="+name+"&validation=true";
    document.OffertaServizioForm.submit();
 }
 

function addToBasket(name){
    document.OffertaServizioForm.action = "/orchideaFE/VisualizzazioneOffertaServizioAction.do?method=enter&validation=true"+"&offerta="+name+"&action=addtobasket";
    document.OffertaServizioForm.submit();
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click1(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
		document.SecondoLivelloForm.submit();
	}
	else{
      return false;
    }
}

//GestioneCiDocumentoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
function aggiorna_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
    else{
      return false;
    }
}


//GestioneCiInformativaPage.jsp
function aggiorna_clickGI(me,prezzo,alertvar,name){
	if(validateFieldsPrezzo(prezzo)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiInformativaAction.do?method="+name+"&validation=true";
			document.ContributoInformativoForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//GestioneCiStudioPage.jsp
function aggiorna_clickGS(me,prezzo,annoPubblicazione,isbn,alertvar,name){
	if(validateFieldsGCSP(prezzo,annoPubblicazione,isbn)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiStudioAction.do?method="+name+"&validation=true";
			document.ContributoInformativoForm.submit();
		}
		else{
			return false;
		}
	}
}

//GestioneCiEventoPage.jsp
function aggiorna_clickGE(me,titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,alertvar,name){
	if(validateFieldsGCE(titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
			document.ContributoInformativoEventoForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_alamm(me,telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria,alertvar,name){
	if(validateFields_alamm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_amm(me,telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale,alertvar,name){
	if(validateFields_amm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_locimp(me,telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,alertvar,name){
	if(validateFields_locimp(telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_med(me,codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento,alertvar,name){
	if(validateFields_med(codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_ornores(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,alertvar,name){
	if(validateFields_ornores(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//GestioneOfferteServizioPage.jsp
function aggiorna_click_pern(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,alertvar,name){
	if(validateFields_pern(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
			document.OffertaServizioForm.submit();
		}
		else{
			return false;
		}
		return false;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_potimp(me,codiceFiscale,telefono,cellulare,consenso,numeroDipendenti,alertvar,name){
	if(validateFields_potimp(codiceFiscale,telefono,cellulare,consenso,numeroDipendenti)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_res(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,alertvar,name){
	if(validateFields_res(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_stu(me,codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare,alertvar,name){
	if(validateFields_stu(codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//AggSecondoLivelloDatiRegistrazionePage.jsp
function aggiorna_click_tur(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante,alertvar,name){
	if(validateFields_tur(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/AggSecondoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//GestioneOfferteServizioPage.jsp
function aggiorna_click_vend(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione,alertvar,name){
	if(validateFields_vend(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
			document.OffertaServizioForm.submit();
		}
		else{
			return false;
		}
		return false;
	}
	return false;
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
function aggiornaPrimo_click(me,email,alertvar,name){
	if(validateFieldsEmail(email)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.PrimoLivelloNoPswdForm.action = "/orchideaFE/AggPrimoLivelloDatiRegistrazioneAction.do?method="+name+"&validation=true";
			document.PrimoLivelloNoPswdForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

//GestioneAgendaPrivataPage.jsp
function aggiungiCarrello_click(me,name){
	if(isItemSelected()){
		document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true";
		document.GestioneAgendaPrivataForm.submit();
	}
}

//GestioneRichiestaPrenotazionePage.jsp
function archive_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.GestioneRichiestaPrenotazioneForm.action = "/orchideaFE/GestioneRichiestaPrenotazioneAction.do?method="+name+"&validation=true";
		document.GestioneRichiestaPrenotazioneForm.submit();
	}
	else{
		return false;
	}
}

//GestioneCiCartinaPage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiStudioPage.jsp
function archivia_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}
//GestioneCiEventoPage.jsp
function archivia_click4(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
		document.ContributoInformativoEventoForm.submit();
	}
	else{
		return false;
	}
}

//GestioneMinisitoPage.jsp
function archivia_click10(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
		document.GestioneMinisitoForm.submit();
	}
	else{
		return false;
	}
}

//GestioneOfferteServizioPage.jsp
function archivia_click11(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
		document.OffertaServizioForm.submit();
	}
	else{
		return false;
	}
}

//GestioneAgendaPrivataPage.jsp
//HomePage.jsp
//PPCAgendaPubblicaPage.jsp
//PrenotazioneEventoPage.jsp
//TRicercaOfferteServizioPage.jsp
//TVisualizzazioneCiEventoPage.jsp
//TVisualizzazioneMinisitoPage.jsp
//TVisualizzazioneOffertaServizioPage.jsp
function areOrderedDates1(dtStr1,dtStr2){
	//CONTROLLO PRIMA DATA
	//var dtStr1 = value1.value
	//var dtStr2 = value2.value
	var daysInMonth1 = DaysArray1(12)
	var pos11=dtStr1.indexOf(dtCh)
	var pos21=dtStr1.indexOf(dtCh,pos11+1)
	var strDay1=dtStr1.substring(0,pos11)
	var strMonth1=dtStr1.substring(pos11+1,pos21)
	var strYear1=dtStr1.substring(pos21+1)
	if (strDay1.charAt(0)=="0" && strDay1.length>1) strDay1=strDay1.substring(1)
		if (strMonth1.charAt(0)=="0" && strMonth1.length>1) strMonth1=strMonth1.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear1.charAt(0)=="0" && strYear1.length>1) strYear1=strYear1.substring(1)
			}
	// year completion
	if(strYear1.length==1) strYear1=200+strYear1
	else if(strYear1.length==2) strYear1=20+strYear1
	////else if(strYear1.length==3) strYear1=2+strYear1
		
	month1=parseInt(strMonth1)
	day1=parseInt(strDay1)
	year1=parseInt(strYear1)
	if (pos11==-1 || pos21==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false
	}
	if (strMonth1.length<1 || month1<1 || month1>12){
		alert("Inserire un mese valido per la data di inizio")
		return false
	}
	if (strDay1.length<1 || day1<1 || day1>31 || (month1==2 && day1>daysInFebruary(year1)) || day1 > daysInMonth1[month1]){
		alert("Inserire un giorno valido per la data di inizio")
		return false
	}
	if (strYear1.length != 4 || year1==0 || year1<minYear || year1>maxYear){
		alert("Inserire per l'anno della data di inizio un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false
	}
	if (dtStr1.indexOf(dtCh,pos21+1)!=-1 || isInteger(stripCharsInBag(dtStr1, dtCh))==false){
		alert("Inserire una data di inizio valida")
		return false
	}
	
	//CONTROLLO SECONDA DATA
		
	var daysInMonth2 = DaysArray1(12)
	var pos12=dtStr2.indexOf(dtCh)
	var pos22=dtStr2.indexOf(dtCh,pos12+1)
	var strDay2=dtStr2.substring(0,pos12)
	var strMonth2=dtStr2.substring(pos12+1,pos22)
	var strYear2=dtStr2.substring(pos22+1)
	if (strDay2.charAt(0)=="0" && strDay2.length>1) strDay2=strDay2.substring(1)
		if (strMonth2.charAt(0)=="0" && strMonth2.length>1) strMonth2=strMonth2.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear2.charAt(0)=="0" && strYear2.length>1) strYear2=strYear2.substring(1)
			}
		
	// year completion
	if(strYear2.length==1) strYear2=200+strYear2
	else if(strYear2.length==2) strYear2=20+strYear2
	//else if(strYear2.length==3) strYear2=2+strYear2
		
	month2=parseInt(strMonth2)
	day2=parseInt(strDay2)
	year2=parseInt(strYear2)
	if (pos12==-1 || pos22==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false;
	}
	if (strMonth2.length<1 || month2<1 || month2>12){
		alert("Inserire un mese valido per la data di fine")
		return false;
	}
	if (strDay2.length<1 || day2<1 || day2>31 || (month2==2 && day2>daysInFebruary(year2)) || day2 > daysInMonth2[month2]){
		alert("Inserire un giorno valido per la data di fine")
		return false;
	}
	if (strYear2.length != 4 || year2==0 || year2<minYear || year2>maxYear){
		alert("Inserire per l'anno della data di fine un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false;
	}
	if (dtStr2.indexOf(dtCh,pos22+1)!=-1 || isInteger(stripCharsInBag(dtStr2, dtCh))==false){
		alert("Inserire una data di fine valida")
		return false;
	}
		
	//CONTROLLO SEQUENZIALITà
	
	if(year2<year1){
		alert("Le date inserite non sono consecutive")
		return false;
	}
	else if(year2==year1){
		if(month2<month1){
			alert("Le date inserite non sono consecutive")
			return false;
		}
		else if(month2==month1){
			if(day2<day1){
				alert("Le date inserite non sono consecutive")
				return false
			}
		}
	}
	return true;
}

//GestioneOfferteServizioPage
function areOrderedDatesGOS(value1,value2){
	//CONTROLLO PRIMA DATA
	var dtStr1 = value1.value
	var dtStr2 = value2.value
	var daysInMonth1 = DaysArray1(12)
	var pos11=dtStr1.indexOf(dtCh)
	var pos21=dtStr1.indexOf(dtCh,pos11+1)
	var strDay1=dtStr1.substring(0,pos11)
	var strMonth1=dtStr1.substring(pos11+1,pos21)
	var strYear1=dtStr1.substring(pos21+1)
	if (strDay1.charAt(0)=="0" && strDay1.length>1) strDay1=strDay1.substring(1)
		if (strMonth1.charAt(0)=="0" && strMonth1.length>1) strMonth1=strMonth1.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear1.charAt(0)=="0" && strYear1.length>1) strYear1=strYear1.substring(1)
			}
	// year completion
	if(strYear1.length==1) strYear1=200+strYear1
	else if(strYear1.length==2) strYear1=20+strYear1
	////else if(strYear1.length==3) strYear1=2+strYear1
		
	month1=parseInt(strMonth1)
	day1=parseInt(strDay1)
	year1=parseInt(strYear1)
	if (pos11==-1 || pos21==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false
	}
	if (strMonth1.length<1 || month1<1 || month1>12){
		alert("Inserire un mese valido per la data di inizio")
		return false
	}
	if (strDay1.length<1 || day1<1 || day1>31 || (month1==2 && day1>daysInFebruary(year1)) || day1 > daysInMonth1[month1]){
		alert("Inserire un giorno valido per la data di inizio")
		return false
	}
	if (strYear1.length != 4 || year1==0 || year1<minYear || year1>maxYear){
		alert("Inserire per l'anno della data di inizio un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false
	}
	if (dtStr1.indexOf(dtCh,pos21+1)!=-1 || isInteger(stripCharsInBag(dtStr1, dtCh))==false){
		alert("Inserire una data di inizio valida")
		return false
	}
	
	//CONTROLLO SECONDA DATA
		
	var daysInMonth2 = DaysArray1(12)
	var pos12=dtStr2.indexOf(dtCh)
	var pos22=dtStr2.indexOf(dtCh,pos12+1)
	var strDay2=dtStr2.substring(0,pos12)
	var strMonth2=dtStr2.substring(pos12+1,pos22)
	var strYear2=dtStr2.substring(pos22+1)
	if (strDay2.charAt(0)=="0" && strDay2.length>1) strDay2=strDay2.substring(1)
		if (strMonth2.charAt(0)=="0" && strMonth2.length>1) strMonth2=strMonth2.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear2.charAt(0)=="0" && strYear2.length>1) strYear2=strYear2.substring(1)
			}
		
	// year completion
	if(strYear2.length==1) strYear2=200+strYear2
	else if(strYear2.length==2) strYear2=20+strYear2
	//else if(strYear2.length==3) strYear2=2+strYear2
		
	month2=parseInt(strMonth2)
	day2=parseInt(strDay2)
	year2=parseInt(strYear2)
	if (pos12==-1 || pos22==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false;
	}
	if (strMonth2.length<1 || month2<1 || month2>12){
		alert("Inserire un mese valido per la data di fine")
		return false;
	}
	if (strDay2.length<1 || day2<1 || day2>31 || (month2==2 && day2>daysInFebruary(year2)) || day2 > daysInMonth2[month2]){
		alert("Inserire un giorno valido per la data di fine")
		return false;
	}
	if (strYear2.length != 4 || year2==0 || year2<minYear || year2>maxYear){
		alert("Inserire per l'anno della data di fine un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false;
	}
	if (dtStr2.indexOf(dtCh,pos22+1)!=-1 || isInteger(stripCharsInBag(dtStr2, dtCh))==false){
		alert("Inserire una data di fine valida")
		return false;
	}
		
	//CONTROLLO SEQUENZIALITà
	
	if(year2<year1){
		alert("Le date inserite non sono consecutive")
		return false;
	}
	else if(year2==year1){
		if(month2<month1){
			alert("Le date inserite non sono consecutive")
			return false;
		}
		else if(month2==month1){
			if(day2<day1){
				alert("Le date inserite non sono consecutive")
				return false
			}
		}
	}
	return true;
}



//TGestioneAgendaPubblicaPage.jsp

function areOrderedDates2(dtStr1,dtStr2){
	//CONTROLLO PRIMA DATA
	var daysInMonth1 = DaysArray1(12)
	var pos11=dtStr1.indexOf(dtCh)
	var pos21=dtStr1.indexOf(dtCh,pos11+1)
	var strDay1=dtStr1.substring(0,pos11)
	var strMonth1=dtStr1.substring(pos11+1,pos21)
	var strYear1=dtStr1.substring(pos21+1)
	if (strDay1.charAt(0)=="0" && strDay1.length>1) strDay1=strDay1.substring(1)
		if (strMonth1.charAt(0)=="0" && strMonth1.length>1) strMonth1=strMonth1.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear1.charAt(0)=="0" && strYear1.length>1) strYear1=strYear1.substring(1)
			}
	// year completion
	if(strYear1.length==1) strYear1=200+strYear1
	else if(strYear1.length==2) strYear1=20+strYear1
	////else if(strYear1.length==3) strYear1=2+strYear1
		
	month1=parseInt(strMonth1)
	day1=parseInt(strDay1)
	year1=parseInt(strYear1)
	if (pos11==-1 || pos21==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false
	}
	if (strMonth1.length<1 || month1<1 || month1>12){
		alert("Inserire un mese valido per la data di inizio")
		return false
	}
	if (strDay1.length<1 || day1<1 || day1>31 || (month1==2 && day1>daysInFebruary(year1)) || day1 > daysInMonth1[month1]){
		alert("Inserire un giorno valido per la data di inizio")
		return false
	}
	if (strYear1.length != 4 || year1==0 || year1<minYear || year1>maxYear){
		alert("Inserire per l'anno della data di inizio un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false
	}
	if (dtStr1.indexOf(dtCh,pos21+1)!=-1 || isInteger(stripCharsInBag(dtStr1, dtCh))==false){
		alert("Inserire una data di inizio valida")
		return false
	}
	
	//CONTROLLO SECONDA DATA
		
	var daysInMonth2 = DaysArray1(12)
	var pos12=dtStr2.indexOf(dtCh)
	var pos22=dtStr2.indexOf(dtCh,pos12+1)
	var strDay2=dtStr2.substring(0,pos12)
	var strMonth2=dtStr2.substring(pos12+1,pos22)
	var strYear2=dtStr2.substring(pos22+1)
	if (strDay2.charAt(0)=="0" && strDay2.length>1) strDay2=strDay2.substring(1)
		if (strMonth2.charAt(0)=="0" && strMonth2.length>1) strMonth2=strMonth2.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear2.charAt(0)=="0" && strYear2.length>1) strYear2=strYear2.substring(1)
			}
		
	// year completion
	if(strYear2.length==1) strYear2=200+strYear2
	else if(strYear2.length==2) strYear2=20+strYear2
	//else if(strYear2.length==3) strYear2=2+strYear2
		
	month2=parseInt(strMonth2)
	day2=parseInt(strDay2)
	year2=parseInt(strYear2)
	if (pos12==-1 || pos22==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false;
	}
	if (strMonth2.length<1 || month2<1 || month2>12){
		alert("Inserire un mese valido per la data di fine")
		return false;
	}
	if (strDay2.length<1 || day2<1 || day2>31 || (month2==2 && day2>daysInFebruary(year2)) || day2 > daysInMonth2[month2]){
		alert("Inserire un giorno valido per la data di fine")
		return false;
	}
	if (strYear2.length != 4 || year2==0 || year2<minYear || year2>maxYear){
		alert("Inserire per l'anno della data di fine un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false;
	}
	if (dtStr2.indexOf(dtCh,pos22+1)!=-1 || isInteger(stripCharsInBag(dtStr2, dtCh))==false){
		alert("Inserire una data di fine valida")
		return false;
	}
		
	//CONTROLLO SEQUENZIALITà
	
	if(year2<year1){
		alert("Le date inserite non sono consecutive")
		return false;
	}
	else if(year2==year1){
		if(month2<month1){
			alert("Le date inserite non sono consecutive")
			return false;
		}
		else if(month2==month1){
			if(day2<day1){
				alert("Le date inserite non sono consecutive")
				return false
			}
		}
	}
	return true;
}





//GestioneRichiestaPrenotazionePage.jsp
function areOrderedDates(value1,value2,message){

	//CONTROLLO PRIMA DATA
	var dtStr1 = value1.value
	var dtStr2 = value2.value
	var daysInMonth1 = DaysArray1(12)
	var pos11=dtStr1.indexOf(dtCh)
	var pos21=dtStr1.indexOf(dtCh,pos11+1)
	var strDay1=dtStr1.substring(0,pos11)
	var strMonth1=dtStr1.substring(pos11+1,pos21)
	var strYear1=dtStr1.substring(pos21+1)
	if (strDay1.charAt(0)=="0" && strDay1.length>1) strDay1=strDay1.substring(1)
		if (strMonth1.charAt(0)=="0" && strMonth1.length>1) strMonth1=strMonth1.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear1.charAt(0)=="0" && strYear1.length>1) strYear1=strYear1.substring(1)
			}
		
	// year completion
	if(strYear1.length==1) strYear1=200+strYear1
	else if(strYear1.length==2) strYear1=20+strYear1
	////else if(strYear1.length==3) strYear1=2+strYear1
		
	month1=parseInt(strMonth1)
	day1=parseInt(strDay1)
	year1=parseInt(strYear1)
	if (pos11==-1 || pos21==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		value1.focus();
		return false;
	}
	if (strMonth1.length<1 || month1<1 || month1>12){
		alert("Inserire un mese valido per la data di inizio")
		value1.focus()
		return false;
	}
	if (strDay1.length<1 || day1<1 || day1>31 || (month1==2 && day1>daysInFebruary(year1)) || day1 > daysInMonth1[month1]){
		alert("Inserire un giorno valido per la data di inizio")
		value1.focus()
		return false;
	}
	if (strYear1.length != 4 || year1==0 || year1<minYear || year1>maxYear){
		alert("Inserire per l'anno della data di inizio un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		value1.focus()
		return false;
	}
	if (dtStr1.indexOf(dtCh,pos21+1)!=-1 || isInteger(stripCharsInBag(dtStr1, dtCh))==false){
		alert("Inserire una data di inizio valida")
		value1.focus()
		return false;
	}
		
	//CONTROLLO SECONDA DATA
		
	var daysInMonth2 = DaysArray1(12)
	var pos12=dtStr2.indexOf(dtCh)
	var pos22=dtStr2.indexOf(dtCh,pos12+1)
	var strDay2=dtStr2.substring(0,pos12)
	var strMonth2=dtStr2.substring(pos12+1,pos22)
	var strYear2=dtStr2.substring(pos22+1)
	if (strDay2.charAt(0)=="0" && strDay2.length>1) strDay2=strDay2.substring(1)
		if (strMonth2.charAt(0)=="0" && strMonth2.length>1) strMonth2=strMonth2.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear2.charAt(0)=="0" && strYear2.length>1) strYear2=strYear2.substring(1)
			}
		
	// year completion
	if(strYear2.length==1) strYear2=200+strYear2
	else if(strYear2.length==2) strYear2=20+strYear2
	//else if(strYear2.length==3) strYear2=2+strYear2
		
	month2=parseInt(strMonth2)
	day2=parseInt(strDay2)
	year2=parseInt(strYear2)
	if (pos12==-1 || pos22==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		value2.focus()
		return false;
	}
	if (strMonth2.length<1 || month2<1 || month2>12){
		alert("Inserire un mese valido per la data di fine")
		value2.focus()
		return false;
	}
	if (strDay2.length<1 || day2<1 || day2>31 || (month2==2 && day2>daysInFebruary(year2)) || day2 > daysInMonth2[month2]){
		alert("Inserire un giorno valido per la data di fine")
		value2.focus()
		return false;
	}
	if (strYear2.length != 4 || year2==0 || year2<minYear || year2>maxYear){
		alert("Inserire per l'anno della data di fine un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		value2.focus()
		return false;
	}
	if (dtStr2.indexOf(dtCh,pos22+1)!=-1 || isInteger(stripCharsInBag(dtStr2, dtCh))==false){
		alert("Inserire una data di fine valida")
		value2.focus()
		return false;
	}
		
	//CONTROLLO SEQUENZIALITà
	
	if(year2<year1){
		alert(message)
		value1.focus()
		return false;
	}
	else if(year2==year1){
		if(month2<month1){
			alert(message)
			value1.focus()
			return false;
		}
		else if(month2==month1){
			if(day2<day1){
				alert(message)
				value1.focus()
				return false;
			}
		}
	}
	return true;
}

//GestioneOfferteServizioPage.jsp
function areOrderedDatesNoFocus(data1,data2){
	
	//CONTROLLO PRIMA DATA
	
	var dtStr1 = data1.value
	var dtStr2 = data2.value
	var daysInMonth1 = DaysArray1(12)
	var pos11=dtStr1.indexOf(dtCh)
	var pos21=dtStr1.indexOf(dtCh,pos11+1)
	var strDay1=dtStr1.substring(0,pos11)
	var strMonth1=dtStr1.substring(pos11+1,pos21)
	var strYear1=dtStr1.substring(pos21+1)
	if (strDay1.charAt(0)=="0" && strDay1.length>1) strDay1=strDay1.substring(1)
		if (strMonth1.charAt(0)=="0" && strMonth1.length>1) strMonth1=strMonth1.substring(1)
			for (var i = 1; i <= 3; i++) {
				//	if (strYear1.charAt(0)=="0" && strYear1.length>1) strYear1=strYear1.substring(1)
			}
		
	// year completion
	if(strYear1.length==1) strYear1=200+strYear1
	else if(strYear1.length==2) strYear1=20+strYear1
	////else if(strYear1.length==3) strYear1=2+strYear1
		
	month1=parseInt(strMonth1)
	day1=parseInt(strDay1)
	year1=parseInt(strYear1)
	if (pos11==-1 || pos21==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false;
	}
	if (strMonth1.length<1 || month1<1 || month1>12){
		alert("Inserire un mese valido per la data di inizio")
		return false;
	}
	if (strDay1.length<1 || day1<1 || day1>31 || (month1==2 && day1>daysInFebruary(year1)) || day1 > daysInMonth1[month1]){
		alert("Inserire un giorno valido per la data di inizio")
		return false;
	}
	if (strYear1.length != 4 || year1==0 || year1<minYear || year1>maxYear){
		alert("Inserire per l'anno della data di inizio un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false;
	}
	if (dtStr1.indexOf(dtCh,pos21+1)!=-1 || isInteger(stripCharsInBag(dtStr1, dtCh))==false){
		alert("Inserire una data di inizio valida")
		return false;
	}
		
	//CONTROLLO SECONDA DATA
		
	var daysInMonth2 = DaysArray1(12)
	var pos12=dtStr2.indexOf(dtCh)
	var pos22=dtStr2.indexOf(dtCh,pos12+1)
	var strDay2=dtStr2.substring(0,pos12)
	var strMonth2=dtStr2.substring(pos12+1,pos22)
	var strYear2=dtStr2.substring(pos22+1)
	if (strDay2.charAt(0)=="0" && strDay2.length>1) strDay2=strDay2.substring(1)
		if (strMonth2.charAt(0)=="0" && strMonth2.length>1) strMonth2=strMonth2.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear2.charAt(0)=="0" && strYear2.length>1) strYear2=strYear2.substring(1)
			}
		
	// year completion
	if(strYear2.length==1) strYear2=200+strYear2
	else if(strYear2.length==2) strYear2=20+strYear2
	//else if(strYear2.length==3) strYear2=2+strYear2
		
	month2=parseInt(strMonth2)
	day2=parseInt(strDay2)
	year2=parseInt(strYear2)
	if (pos12==-1 || pos22==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		return false;
	}
	if (strMonth2.length<1 || month2<1 || month2>12){
		alert("Inserire un mese valido per la data di fine")
		return false;
	}
	if (strDay2.length<1 || day2<1 || day2>31 || (month2==2 && day2>daysInFebruary(year2)) || day2 > daysInMonth2[month2]){
		alert("Inserire un giorno valido per la data di fine")
		return false;
	}
	if (strYear2.length != 4 || year2==0 || year2<minYear || year2>maxYear){
		alert("Inserire per l'anno della data di fine un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		return false;
	}
	if (dtStr2.indexOf(dtCh,pos22+1)!=-1 || isInteger(stripCharsInBag(dtStr2, dtCh))==false){
		alert("Inserire una data di fine valida")
		return false;
	}
		
	//CONTROLLO SEQUENZIALITÃ 
	
	if(year2<year1){
		alert("La data di fine validitÃ  deve essere successiva alla data odierna")
		data2.focus();
		return false;
	}
	else if(year2==year1){
		if(month2<month1){
			alert("La data di fine validitÃ  deve essere successiva alla data odierna")
			data2.focus();
			return false;
		}
		else if(month2==month1){
			if(day2<day1){
				alert("La data di fine validitÃ  deve essere successiva alla data odierna")
				data2.focus();
				return false;
			}
		}
	}
	return true;
}

//GestioneRichiestaPrenotazionePage.jsp
function areOrderedDatesToday(value1,value2,message){
	
	//CONTROLLO PRIMA DATA
		
	var dtStr1 = value1.value
	var dtStr2 = value2.value
	var daysInMonth1 = DaysArray1(12)
	var pos11=dtStr1.indexOf(dtCh)
	var pos21=dtStr1.indexOf(dtCh,pos11+1)
	var strDay1=dtStr1.substring(0,pos11)
	var strMonth1=dtStr1.substring(pos11+1,pos21)
	var strYear1=dtStr1.substring(pos21+1)
	if (strDay1.charAt(0)=="0" && strDay1.length>1) strDay1=strDay1.substring(1)
		if (strMonth1.charAt(0)=="0" && strMonth1.length>1) strMonth1=strMonth1.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear1.charAt(0)=="0" && strYear1.length>1) strYear1=strYear1.substring(1)
			}
		
	// year completion
	if(strYear1.length==1) strYear1=200+strYear1
	else if(strYear1.length==2) strYear1=20+strYear1
	////else if(strYear1.length==3) strYear1=2+strYear1
		
	month1=parseInt(strMonth1)
	day1=parseInt(strDay1)
	year1=parseInt(strYear1)
	if (pos11==-1 || pos21==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		value1.focus()
		return false;
	}
	if (strMonth1.length<1 || month1<1 || month1>12){
		alert("Inserire un mese valido per la data di inizio")
		value1.focus()
		return false;
	}
	if (strDay1.length<1 || day1<1 || day1>31 || (month1==2 && day1>daysInFebruary(year1)) || day1 > daysInMonth1[month1]){
		alert("Inserire un giorno valido per la data di inizio")
		value1.focus()
		return false;
	}
	if (strYear1.length != 4 || year1==0 || year1<minYear || year1>maxYear){
		alert("Inserire per l'anno della data di inizio un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		value1.focus()
		return false;
	}
	if (dtStr1.indexOf(dtCh,pos21+1)!=-1 || isInteger(stripCharsInBag(dtStr1, dtCh))==false){
		alert("Inserire una data di inizio valida")
		value1.focus()
		return false;
	}
		
	//CONTROLLO SECONDA DATA
		
	var daysInMonth2 = DaysArray1(12)
	var pos12=dtStr2.indexOf(dtCh)
	var pos22=dtStr2.indexOf(dtCh,pos12+1)
	var strDay2=dtStr2.substring(0,pos12)
	var strMonth2=dtStr2.substring(pos12+1,pos22)
	var strYear2=dtStr2.substring(pos22+1)
	if (strDay2.charAt(0)=="0" && strDay2.length>1) strDay2=strDay2.substring(1)
		if (strMonth2.charAt(0)=="0" && strMonth2.length>1) strMonth2=strMonth2.substring(1)
			for (var i = 1; i <= 3; i++) {
				//if (strYear2.charAt(0)=="0" && strYear2.length>1) strYear2=strYear2.substring(1)
			}
		
	// year completion
	if(strYear2.length==1) strYear2=200+strYear2
	else if(strYear2.length==2) strYear2=20+strYear2
	//else if(strYear2.length==3) strYear2=2+strYear2
		
	month2=parseInt(strMonth2)
	day2=parseInt(strDay2)
	year2=parseInt(strYear2)
	if (pos12==-1 || pos22==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
		value2.focus()
		return false;
	}
	if (strMonth2.length<1 || month2<1 || month2>12){
		alert("Inserire un mese valido per la data di fine")
		value2.focus()
		return false;
	}
	if (strDay2.length<1 || day2<1 || day2>31 || (month2==2 && day2>daysInFebruary(year2)) || day2 > daysInMonth2[month2]){
		alert("Inserire un giorno valido per la data di fine")
		value2.focus()
		return false;
	}
	if (strYear2.length != 4 || year2==0 || year2<minYear || year2>maxYear){
		alert("Inserire per l'anno della data di fine un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
		value2.focus()
		return false;
	}
	if (dtStr2.indexOf(dtCh,pos22+1)!=-1 || isInteger(stripCharsInBag(dtStr2, dtCh))==false){
		alert("Inserire una data di fine valida")
		value2.focus()
		return false;
	}
		
	//CONTROLLO SEQUENZIALITà
		
	if(year2<year1){
		alert(message)
		value2.focus()
		return false;
	}
	else if(year2==year1){
		if(month2<month1){
			alert(message)
			value2.focus()
			return false;
		}
		else if(month2==month1){
			if(day2<day1){
				alert(message)
				value2.focus()
				return false;
			}
		}
	}
	return true;
}

function areOrderedTimes(text1,text2){
	var tmStr1 = text1.value;
	var tmStr2 = text2.value;
	var pos1=tmStr1.indexOf(tmCh);
	var pos2=tmStr2.indexOf(tmCh);
	var strHou1=tmStr1.substring(0,pos1);
	var strMin1=tmStr1.substring(pos1+1);
	var strHou2=tmStr2.substring(0,pos2);
	var strMin2=tmStr2.substring(pos2+1);
	if (strHou1.charAt(0)=="0" && strHou1.length>1)
		strHou1=strHou1.substring(1);
	if (strMin1.charAt(0)=="0" && strMin1.length>1)
		strMin1=strMin1.substring(1);
	if (strHou2.charAt(0)=="0" && strHou2.length>1)
		strHou2=strHou2.substring(1);
	if (strMin2.charAt(0)=="0" && strMin2.length>1)
		strMin2=strMin2.substring(1);
	hour1=parseInt(strHou1);
	min1=parseInt(strMin1);
	hour2=parseInt(strHou2);
	min2=parseInt(strMin2);
	if (hour1>hour2){
		alert("L'orario di fine deve essere successivo all'orario di inizio");
		text2.focus();
		return false;
	} else{
		if ((hour1==hour2)&&(min1>min2)){
			alert("L'orario di fine deve essere successivo all'orario di inizio");
			text2.focus();
			return false;
		}
	}
	return true;
}


//GestioneAgendaPrivataPage.jsp
function avanti_click(me,name){
	document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true&idpadre=795";
	document.GestioneAgendaPrivataForm.submit();
}

//EGISCustomPage.jsp
function back_click(){
	document.EGISForm.action = "/orchideaFE/EGISAction.do?method=enter";
	document.EGISForm.submit();
}

//TPreviewCiEventoPage.jsp
//TVisualizzazioneCiEventoPage.jsp
function book_click1(me,name){
	document.VisContributoInformativoForm.action = "/orchideaFE/VisualizzazioneCiEventoAction.do?method="+name+"&validation=true";
	document.VisContributoInformativoForm.submit();
}

//TPreviewOffertaServizioPage.jsp
//TVisualizzazioneOffertaServizioPage.jsp
function book_click2(me,name){
	document.OffertaServizioForm.action = "/orchideaFE/VisualizzazioneOffertaServizioAction.do?method="+name+"&validation=true";
	document.OffertaServizioForm.submit();
}

//SelezioneAmbitiPage
//SelezioneArgomentiPage
  
function cancel_click(name){
	document.getElementById("close_window_hid").value = '';
	window.close();
}

// SelezioneComuneCiPage
// SelezioneComuneEntePage
// SelezioneComuneUtPage
// SelezioneTipologiaPage
function cancel_click_unified(me,name){
	window.opener.document.forms[0].action = name;
	window.opener.document.forms[0].submit();
	window.close();
}
//RicercaMinisitiRicevutiPage.jsp
function cerca_click1(me,name){
	document.RicercaMinisitiForm.action = "/orchideaFE/RicercaMinisitiRicevutiAction.do?method="+name+"&validation=true&idpadre=679&idterzo=827";
	document.RicercaMinisitiForm.submit();
}

//SelezioneCiPage.jsp
function cerca_click2(me,name){
	document.SelezioneCiForm.action = "/orchideaFE/SelezioneCiAction.do?method="+name+"&validation=true";
	document.SelezioneCiForm.submit();
}

//TRicercaContributiInformativiPage.jsp
function cerca_click3(me,name){
	document.RicercaCiForm.action = "/orchideaFE/RicercaCiAction.do?method="+name+"&validation=true";
	document.RicercaCiForm.submit();
}

//RicercaOfferteImpPage.jsp
//RicercaOfferteSuperPage.jsp
function cerca_click_unified(me,name){
	document.RicercaOfferteForm.action = name;
	document.RicercaOfferteForm.submit();
}

//TRicercaOfferteServizioPage.jsp
function cerca_click4(me,name){
	document.RicercaOfferteForm.action = "/orchideaFE/RicercaOfferteServizioAction.do?method="+name+"&validation=true";
	document.RicercaOfferteForm.submit();
}
//AggPrimoLivelloDatiRegistrazionePage.jsp
//CambiaPasswordPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
//GestioneMinisitoPage.jsp
//GestioneOffertaPernottamentoPage.jsp
//GestioneOffertaVenditaProdottiPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//InserimentoAppuntoPage.jsp
//ModificaStatoRicPrimoLivelloPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloAltroAmministratorePage.jsp
//RegSecondoLivelloAmministratoreComunalePage.jsp
//RegSecondoLivelloImprenditoreLocalePage.jsp
//RegSecondoLivelloMediaPage.jsp
//RegSecondoLivelloOriginarioNonResidentePage.jsp
//RegSecondoLivelloPotenzialeImprenditorePage.jsp
//RegSecondoLivelloResidentePage.jsp
//RegSecondoLivelloStudiosoPage.jsp
//RegSecondoLivelloTuristaPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//TGestioneCarrelloPage.jsp
//UploadPage.jsp
//VisualizzaUtentePrimoLivelloPage.jsp
function check_cap(me){
	var s=String(me.value);
	if(s.length==0)
		return true;
	var i;
	var retStr='';
	for (i=0;i<=s.length;i++){
		var c = s.charAt(i);
		if (c>='0'&&c <='9')
			retStr=retStr+s.charAt(i);
	}
	me.value=retStr;
	return true;
}

//InserimentoAppuntoPage
function check_field(field)
{
	if (field.value=='' || field.value==' ')
	{
		field.value=field.defaultValue;
	}
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//CambiaPasswordPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
//GestioneMinisitoPage.jsp
//GestioneOffertaPernottamentoPage.jsp
//GestioneOffertaVenditaProdottiPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//InserimentoAppuntoPage.jsp
//ModificaStatoRicPrimoLivelloPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloAltroAmministratorePage.jsp
//RegSecondoLivelloAmministratoreComunalePage.jsp
//RegSecondoLivelloImprenditoreLocalePage.jsp
//RegSecondoLivelloMediaPage.jsp
//RegSecondoLivelloOriginarioNonResidentePage.jsp
//RegSecondoLivelloPotenzialeImprenditorePage.jsp
//RegSecondoLivelloResidentePage.jsp
//RegSecondoLivelloStudiosoPage.jsp
//RegSecondoLivelloTuristaPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//TGestioneCarrelloPage.jsp
//UploadPage.jsp
//VisualizzaUtentePrimoLivelloPage.jsp
function check_float(me){
	var s = String(me.value);
	if(s.length==0)
	return true;
	var idx = s.indexOf(',');
	var comma=false;while (idx>-1){
		s=s.replace(',','.');
		comma=true;
		idx = s.indexOf(',');
	}
	var temp=Number(s);
	while(isNaN(temp)){
		s=s.substring(0,s.length-1);
		temp=Number(s);
	}
	if(comma){s=s.replace('.',',');}
	me.value=s;
	return true;
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//CambiaPasswordPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
//GestioneMinisitoPage.jsp
//GestioneOffertaPernottamentoPage.jsp
//GestioneOffertaVenditaProdottiPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//InserimentoAppuntoPage.jsp
//ModificaStatoRicPrimoLivelloPage.jsp
//PrenotazioneEventoPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloAltroAmministratorePage.jsp
//RegSecondoLivelloAmministratoreComunalePage.jsp
//RegSecondoLivelloImprenditoreLocalePage.jsp
//RegSecondoLivelloMediaPage.jsp
//RegSecondoLivelloOriginarioNonResidentePage.jsp
//RegSecondoLivelloPotenzialeImprenditorePage.jsp
//RegSecondoLivelloResidentePage.jsp
//RegSecondoLivelloStudiosoPage.jsp
//RegSecondoLivelloTuristaPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//TGestioneCarrelloPage.jsp
//UploadPage.jsp
//VisualizzaUtentePrimoLivelloPage.jsp
function check_int(me){
	var s=String(me.value);
	if(s.length==0) return true;
	var temp = parseInt(s);
	while(isNaN(temp) && s.length>0){
		s=s.substring(0,s.length-1);
		temp=parseInt(s);
	}
	if(s.length>0)me.value=String(temp);
	else me.value='';
	return true;
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//CambiaPasswordPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
//GestioneMinisitoPage.jsp
//GestioneOffertaPernottamentoPage.jsp
//GestioneOffertaVenditaProdottiPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//InserimentoAppuntoPage.jsp
//ModificaStatoRicPrimoLivelloPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloAltroAmministratorePage.jsp
//RegSecondoLivelloAmministratoreComunalePage.jsp
//RegSecondoLivelloImprenditoreLocalePage.jsp
//RegSecondoLivelloMediaPage.jsp
//RegSecondoLivelloOriginarioNonResidentePage.jsp
//RegSecondoLivelloPotenzialeImprenditorePage.jsp
//RegSecondoLivelloResidentePage.jsp
//RegSecondoLivelloStudiosoPage.jsp
//RegSecondoLivelloTuristaPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//TGestioneCarrelloPage.jsp
//UploadPage.jsp
//VisualizzaUtentePrimoLivelloPage.jsp
function check_length(me,len){
	var l;
	if(len=='cap'){
		l=parseInt(5);
		if(!check_cap(me))
			return false;
	}
	else if(len=='year'){
		l=parseInt(4);
		if(!check_year(me))
			return false;
	}
	else if(len=='hour')
		l=parseInt(5);
	else if(len=='date')
		l=parseInt(10);
	else if(len=='pwd')
		l=parseInt(12);
	else if(len=='p_iva'){
		l=parseInt(11);
		if(!check_p_iva(me))
			return false;
	}
	else if(len=='int'){
		l=parseInt(5);
		if(!check_int(me))
			return false;
	}
	else if(len=='float'){
		l=parseInt(8);
		if(!check_float(me))
			return false;
	}
	else if(len=='l1')
		l=parseInt(100);
	else if(len=='l2')
		l=parseInt(255);
	else if(len=='l3')
		l=parseInt(1000);
	else l=parseInt(len);

	if(me.value!=null && me.value.length > l){
		me.value = me.value.substring(0,l);
		me.setActive();
		me.focus();
		alert('Il testo inserito supera '+l+' caratteri');
		return false;
	}
	return true;
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//CambiaPasswordPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
//GestioneMinisitoPage.jsp
//GestioneOffertaPernottamentoPage.jsp
//GestioneOffertaVenditaProdottiPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//InserimentoAppuntoPage.jsp
//ModificaStatoRicPrimoLivelloPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloAltroAmministratorePage.jsp
//RegSecondoLivelloAmministratoreComunalePage.jsp
//RegSecondoLivelloImprenditoreLocalePage.jsp
//RegSecondoLivelloMediaPage.jsp
//RegSecondoLivelloOriginarioNonResidentePage.jsp
//RegSecondoLivelloPotenzialeImprenditorePage.jsp
//RegSecondoLivelloResidentePage.jsp
//RegSecondoLivelloStudiosoPage.jsp
//RegSecondoLivelloTuristaPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//TGestioneCarrelloPage.jsp
//UploadPage.jsp
//VisualizzaUtentePrimoLivelloPage.jsp
function check_p_iva(me){
	return check_cap(me);
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//CambiaPasswordPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiDocumentoPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiInformazioneEditorialePage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
//GestioneMinisitoPage.jsp
//GestioneOffertaPernottamentoPage.jsp
//GestioneOffertaVenditaProdottiPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//InserimentoAppuntoPage.jsp
//ModificaStatoRicPrimoLivelloPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloAltroAmministratorePage.jsp
//RegSecondoLivelloAmministratoreComunalePage.jsp
//RegSecondoLivelloImprenditoreLocalePage.jsp
//RegSecondoLivelloMediaPage.jsp
//RegSecondoLivelloOriginarioNonResidentePage.jsp
//RegSecondoLivelloPotenzialeImprenditorePage.jsp
//RegSecondoLivelloResidentePage.jsp
//RegSecondoLivelloStudiosoPage.jsp
//RegSecondoLivelloTuristaPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//TGestioneCarrelloPage.jsp
//UploadPage.jsp
//VisualizzaUtentePrimoLivelloPage.jsp
function check_year(me){
	return check_cap(me);
}

//GestioneRichiestaPrenotazionePage.jsp
function checkEtaGruppo(text){
	if(isIntegerNotify(text)){
		var s = parseInt(text.value);
			if(s>=100){
				alert('L\'età media del gruppo deve essere minore di 100');
				return false;
			}
		return true;
	}
	return false;
}

//GestioneCiEventoPage.jsp
//GestioneOfferteServizioPage.jsp
//TGestioneCarrelloPage.jsp
function ChkDecimali(text){
	// Numero cifre dopo la virgola
	var numCifre= '2';
	var separatore = '#|#';
	var tmp = text.value
	var dot=tmp.indexOf('.')
	var comma=tmp.indexOf(',')
	if(comma!=-1){
		var interi = tmp.substring(0,comma)
		var decimali = tmp.substring(comma+1)
		if((isInteger(interi)||interi=='')&&(isInteger(decimali)||decimali=='')){
			if(decimali.length>numCifre){
				alert('Non è consentito inserire più di due cifre decimali in questo campo')
				//text.value = interi+','+decimali.substring(0,numCifre)
				return false
			}
		}
		else{
			alert('Inserire nel campo selezionato un valore numerico valido')
			//text.value = ''
			return false
		}
	}
	if(dot!=-1){
		var interi = tmp.substring(0,dot)
		var decimali = tmp.substring(dot+1)
		if((isInteger(interi)||interi=='')&&(isInteger(decimali)||decimali=='')){
			if(decimali.length>numCifre){
				alert('Non è consentito inserire più di due cifre decimali in questo campo')
				//text.value = interi+'.'+decimali.substring(0,numCifre)
				return false
			}
		}
		else{
			alert('Inserire nel campo selezionato un valore numerico valido')
			//text.value = ''
			return false
		}
	}
	if(dot==-1 && comma==-1){
		if(isInteger(tmp)||tmp==''){
		}
		else{
			alert('Inserire nel campo selezionato un valore numerico valido')
			//text.value = ''
			return false
		}
	}
	return true
}

//TGestioneCarrelloPage.jsp
function chkNumberDecimali(text){
	if(text.value!=''){
		if (ChkDecimali(text)==false){
			text.focus()
			return false
		}
	}
	return true
}

//TGestioneCarrelloPage.jsp
function chkNumberNoDecimali(text){
	if(text.value!=''){
		if (NoDecimali(text)==false){
			text.focus()
			return false
		}
	}
	return true
}

// FUNCTION REPLACEALL(str1, from, to) 
// TGestioneCarrelloPage  
  
 function replaceAllGC( str1, from, to ) {
  var separatore = '#|#';
  str = separatore+str1;
  var idx = str.indexOf(from);
  while ( idx > -1 ) {
      str = str.replace( from, to );
      idx = str.indexOf( from );
  }
  str=str.replace(separatore,'');

  return str;

} 

// FUNCTION REPLACEALL(str, from, to) 
// AggPrimoLivelloDatiRegistrazionePage   
// AggSecondoLivelloDatiRegistrazionePage
// GestioneCiCartinaPage 
// GestioneCiConoscenzaPage 
// GestioneCiEventoPage 
// GestioneCiInfoEmergenzaPage 
// GestioneCiInformativaPage 
// GestioneCiStudioPage 
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PasswordDimenticataPage 
// PrenotazioneEventoPage 
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage 
// RegSecondoLivelloPage 
// RegViaSuperUtentePrimoLivelloPage 
// RegViaSuperUtenteSecondoLivelloPage
// SmsEventAlertingPage 
// SmsEventAlertingSistemaPage 

function replaceAll( str, from, to ) {
	
    var idx = str.indexOf( from );
    while ( idx > -1 ) {
        str = str.replace( from, to ); 
        idx = str.indexOf( from );
    }
    return str;
	}


//TGestioneCarrelloPage.jsp
function chkThreshold(data,threshold){
	var dataStr = eval(data.value);
	var thStr = eval(threshold.value);

	dataStr = replaceAllGC(dataStr, ',', '.');
	thStr = replaceAllGC(thStr, ',', '.');
	
	var dataNum = parseFloat(dataStr);
	var thNum = parseFloat(thStr);
	
	if(thNum>0){
		if(dataNum<=thNum) return true;
		else{
			alert('Il valore indicato eccede il valore massimo consentito');
			data.focus();
			return false;
		}
	}
	return true;
}

//InserimentoAppuntoPage
function clear_field(field)
{
	if (field.value==field.defaultValue)
	{
		field.value='';
	}
}

//VisualizzazioneOfferteServizioPage.jsp
function clickScript(name,index){
	document.VisualizzazioneOfferteServizioForm.action = "/orchideaFE/VisualizzazioneOfferteServizioAction.do?method="+name+"&validation=true"+"&offerta="+index;
	document.VisualizzazioneOfferteServizioForm.submit();
}

//SelezioneAmbitiPage.jsp
//SelezioneArgomentiPage.jsp
function close_window_unified(name){
	unLockParentWindow();
	if(document.getElementById("close_window_hid").value!='NO'){
		window.opener.document.forms[0].action = name;//"/orchideaFE/SelezioneAmbitiAction.do?method="+document.getElementById("cancel_hid").value;
		window.opener.document.forms[0].submit();
	}
}

//SelezioneAmbitiPage.jsp
//SelezioneArgomentiPage.jsp
function close_window_ok(){
	window.opener.document.forms[0].action = "/orchideaFE/SelezioneArgomentiAction.do?method="+document.getElementById('ok_close_window_hid').value;
	window.opener.document.forms[0].submit();
	window.close();
}

//GestioneCiEventoPage.jsp
//GestioneOfferteServizioPage.jsp
function confermaPrenotazione_click(){
	var collCheck=document.getElementsByName('confermaPrenotazione');
	var modInvio=document.getElementById('modalitainvioprenotazioneofferta');
		if(collCheck!=null && modInvio!=null){
			if(collCheck[0].disabled){}
			else if(!collCheck[0].checked){
	   			modInvio.value='0';
	   			modInvio.disabled=true;
			}
			else{
				modInvio.disabled=false;
			}
	} 	 
}


//AggSecondoLivelloDatiRegistrazionePage.jsp
//RegSecondoLivelloPage.jsp
//RegViaSuperUtenteSecondoLivelloPage.jsp
function ConsensoAndCellulare(consenso,cellulare){
	if(consenso.checked==true && IsVoid(cellulare)){
		alert("E' stato selezionato di ricevere SMS per Event Alerting: inserire un numero di cellulare valido")
		return false
	}
	return true
}

//GestioneCiCartinaPage.jsp
function creaCartina_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiCartinaAction.do?method="+name+"&validation=true";
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}

//GestioneCiEventoPage.jsp
function daGeoreferenziare_click2(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
		document.ContributoInformativoEventoForm.submit();
	}
	else{
		return false;
	}
}

//GestioneCiConoscenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
function daGeoreferenziare_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}

//GestioneCiSegnalazionePage.jsp
function daPubblicare_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiSegnalazioneAction.do?method="+name+"&validation=true";
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//AggSecondoLivelloDatiRegistrazionePage.jsp
//GestioneAgendaPrivataPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiStudioPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//HomePage.jsp
//InserimentoAppuntoPage.jsp
//PasswordDimenticataPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//RegViaSuperUtenteSecondoLivelloPage.jsp
//TGestioneAgendaPubblicaPage.jsp
//TRicercaOfferteServizioPage.jsp
//TVisualizzazioneCiEventoPage.jsp
//TVisualizzazioneMinisitoPage.jsp
//TVisualizzazioneOffertaServizioPage.jsp
function DaysArray1(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31;
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30;}
		if (i==2) {this[i] = 29;}
	} 
	return this;
}

//PPCAgendaPubblicaPage.jsp
function DaysArray2(n) {
	var tmp= new Array(n);
	for (var i = 1; i <= n; i++) {
		tmp[i] = 31;
		if (i==4 || i==6 || i==9 || i==11) {tmp[i] = 30;}
		if (i==2) {tmp[i] = 29;}
	} 
	return tmp;
}

//AggPrimoLivelloDatiRegistrazionePage.jsp
//AggSecondoLivelloDatiRegistrazionePage.jsp
//GestioneAgendaPrivataPage.jsp
//GestioneCiCartinaPage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiEventoPage.jsp
//GestioneCiInfoEmergenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiStudioPage.jsp
//GestioneOfferteServizioPage.jsp
//GestioneRichiestaPrenotazionePage.jsp
//HomePage.jsp
//InserimentoAppuntoPage.jsp
//PasswordDimenticataPage.jsp
//PPCAgendaPubblicaPage.jsp
//PrenotazioneEventoPage.jsp
//RegDirettaPrimoLivelloPage.jsp
//RegPrimoLivelloPage.jsp
//RegSecondoLivelloPage.jsp
//RegViaSuperUtentePrimoLivelloPage.jsp
//RegViaSuperUtenteSecondoLivelloPage.jsp
//TGestioneAgendaPubblicaPage.jsp
//TRicercaOfferteServizioPage.jsp
//TVisualizzazioneCiEventoPage.jsp
//TVisualizzazioneMinisitoPage.jsp
//TVisualizzazioneOffertaServizioPage.jsp
function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
	// EXCEPT for centurial years which are not also divisible by 400.
	return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}

//SelezioneAmbitiPage.jsp
//SelezioneArgomentiPage.jsp
function delay(gap){ /* gap is in millisecs */
	var then,now; then=new Date().getTime();
	now=then;
	while((now-then)<gap){now=new Date().getTime();}
}

//GestioneCiCartinaPage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
function disable(){
	document.ContributoInformativoForm.destinatari.value = '';
	document.ContributoInformativoForm.destImpLoc.disabled = true;
	document.ContributoInformativoForm.destAlAmm.disabled = true;
	document.ContributoInformativoForm.destAmmCom.disabled = true;
	document.ContributoInformativoForm.destStu.disabled = true;
}

//GestioneCiCartinaPage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
function disabling(){
	document.ContributoInformativoForm.destinatari.value = '';
	document.ContributoInformativoForm.destImpLoc.disabled = true;
	document.ContributoInformativoForm.destImpLoc.checked = false;
	document.ContributoInformativoForm.destAlAmm.disabled = true;
	document.ContributoInformativoForm.destAlAmm.checked = false;
	document.ContributoInformativoForm.destAmmCom.disabled = true;
	document.ContributoInformativoForm.destAmmCom.checked = false;
	document.ContributoInformativoForm.destStu.disabled = true;
	document.ContributoInformativoForm.destStu.checked = false;
}

//GestioneCiCartinaPage.jsp
//GestioneCiConoscenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
function enabling(){
	document.ContributoInformativoForm.destinatari.value = 'radio.dest4';
	document.ContributoInformativoForm.destImpLoc.disabled = false;
	document.ContributoInformativoForm.destAlAmm.disabled = false;
	document.ContributoInformativoForm.destAmmCom.disabled = false;
	document.ContributoInformativoForm.destStu.disabled = false;
}

//RegSecondoLivelloPage.jsp
function enableButtons1(){
	//document.SecondoLivelloForm.registrati.disabled = false;
}

//RegViaSuperUtenteSecondoLivelloPage.jsp
function enableButtons2(){
	//document.SecondoLivelloForm.registra.disabled = false;
	//document.SecondoLivelloForm.approva.disabled = false;
}

//GestioneCiRichiestaPage.jsp
//GestioneCiSegnalazionePage.jsp
function evadi_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}

//VisualizzazioneUtentiPage.jsp
function filtraUtenti_click(me,name){
	document.RicUtenteForm.action = "/orchideaFE/VisualizzazioneUtentiAction.do?method="+name+"&validation=true";
	document.RicUtenteForm.submit();
}

//GestioneCiEventoPage.jsp
function georeferenzia_click2(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
		document.ContributoInformativoEventoForm.submit();
	}
	else{
		return false;
	}
}

//GestioneCiConoscenzaPage.jsp
//GestioneCiInformativaPage.jsp
//GestioneCiNotiziaPage.jsp
//GestioneCiSegnalazionePage.jsp
//GestioneCiStudioPage.jsp
function georeferenzia_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}






//GestioneCiInfoEmergenzaPage.jsp
function getRigaCorrente(index){
	document.getElementById("x").value = document.getElementById("b1").scrollLeft;
	document.getElementById("y").value = document.getElementById("b1").scrollTop;
	document.getElementById("rigacorrente").value = index;
}

//ListaSelezioneTipologiePage.jsp
//LocalitaOfferteServizioPage.jsp
//SelezioneAmbitiPage.jsp
//SelezioneArgomentiPage.jsp
//SelezioneCartinePage.jsp
//SelezioneCiPage.jsp
//SelezioneTipologiaPage.jsp
//TipiAziendaOfferteServizioPage.jsp
//TreeSelezioneArgomentiPage.jsp
function getScrollPosition(){
	document.getElementById("x").value = document.getElementById("b1").scrollLeft;
	document.getElementById("y").value = document.getElementById("b1").scrollTop;
}
//SelezioneComuneCiPage.jsp
//SelezioneComuneEntePage.jsp
//SelezioneComuneUtPage.jsp
function getScrollPosition1(index){
	document.getElementById("x"+index).value = document.getElementById("b1").scrollLeft;
	document.getElementById("y"+index).value = document.getElementById("b1").scrollTop;
}

//GestioneAgendaPrivataPage.jsp
function indietro_click(me,name){
	document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true&idpadre=795";
	document.GestioneAgendaPrivataForm.submit();
}

//GestioneCiCommentoPage.jsp
//GestioneCiComunicazionePromozionalePage.jsp
function inoltra_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}

//InoltroComunicazioniPromozionaliPage.jsp
function inoltra_click3(me,alertvar,name){
	if(isItemSelected()){
		if(confirm(alertvar)){
			me.disabled=true;
			document.InoltroComunicazioniPromozionaliForm.action = "/orchideaFE/InoltroComunicazioniPromozionaliAction.do?method="+name+"&validation=true";
			document.InoltroComunicazioniPromozionaliForm.submit();
		}
		else{
			return false;
		}
	}
}

//InserimentoAppuntoPage.jsp
function inserisci_click(me,data,ora,alertvar,name){
	if(ValidateDateObbligatoria(data)){
		if(ValidateTime3(ora)){
			//if(isDate(data) && isTime(ora)){
			if(confirm(alertvar)){me.disabled=true;
				document.AppuntoForm.action = "/orchideaFE/InserimentoAppuntoAction.do?method="+name+"&validation=true";
				document.AppuntoForm.submit();
			}
			else return false
			//}
			//else alert("I campi data e ora devono essere valorizzati per poter inserire un Appunto");
		}
		else return false
	}
	else return false
}

//GestioneMinisitoPage.jsp
function inserisciOfferte_click(me,alertvar,name){
	if(confirm(alertvar)){me.disabled=true;
		document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
		document.GestioneMinisitoForm.submit();
	}
	else{
		return false;
	}
}

// GestioneCiCommentoPage.jsp
// GestioneCiComunicazionePromozionalePage.jsp
// GestioneCiInfoEmergenzaPage.jsp
// GestioneCiRichiestaPage.jsp
function invia_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}
	else{
		return false;
	}
}


// GestioneCiSegnalazionePage.jsp
function invia_click5(me,alertvar,name){
	if(validateDistricts()){	
	    if(confirm(alertvar)){
	    	me.disabled=true;
		    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiSegnalazioneAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
	    else{
			return false;
	    }
	    return true;
	}
	return false;
}

// GestioneMinisitoPage.jsp
function invia_click6(me,alertvar,name){
    if(confirm(alertvar)){
    	me.disabled=true;
	    document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
    	document.GestioneMinisitoForm.submit();
    }
    else{
		return false;
    }
}

// SmsEventAlertingPage.jsp
function invia_clickSAP(me,alertvar,name,textarea){
	if(textarea.value.length!=0){
		if(textarea.value.length<=160 || textarea.value.length==0){
			if(confirm(alertvar)){me.disabled=true;
				document.SmsEventAlertingForm.action = "/orchideaFE/SmsEventAlertingAction.do?method="+name+"&validation=true";
			    document.SmsEventAlertingForm.submit();
		    }
		    else{
		    	return false;
		    }
		}
		else alert("Non è possibile inviare messaggi con un numero di caratteri superiore a 160");
	}
	else alert("Non è possibile inviare messaggi con un numero di caratteri pari a 0");
}

// SmsEventAlertingSistemaPage.jsp
function invia_clickSASP(me,alertvar,name,textarea){
	if(textarea.value.length!=0){
		if(textarea.value.length<=160 || textarea.value.length==0){
			if(confirm(alertvar)){
				me.disabled=true;
			    document.SmsEventAlertingForm.action = "/orchideaFE/SmsEventAlertingSistemaAction.do?method="+name+"&validation=true";
			    document.SmsEventAlertingForm.submit();
		    }
		    else{
		    	return false;
		    }
		}
		else alert("Non è possibile inviare messaggi con un numero di caratteri superiore a 160");
	}
	else alert("Non è possibile inviare messaggi con un numero di caratteri pari a 0");
}

// GestioneCiCartinaPage.jsp
function invia_clickGC(me,dataCreazione,dataUltimoAggiornamento,alertvar,name){
	if(validateFieldsGCP(dataCreazione,dataUltimoAggiornamento) &&	validateReceivers()){
		if(confirm(alertvar)){
			me.disabled=true;
		    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiCartinaAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
	    else{
	    	return false;
	    }
	    return true;
	}
	return false;
}

// PasswordDimenticataPage.jsp
function invia_clickPD(me,email,name){
	if(validateFieldsEmail(email)){
		document.PasswordDimenticataForm.action = "/orchideaFE/PasswordDimenticataAction.do?method="+name+"&validation=true";
	    document.PasswordDimenticataForm.submit();
	    return true;
	}
	return false;
}

// CambiaPasswordPage.jsp
function invia_clickPP(me,name){
	document.CambiaPasswordForm.action = "/orchideaFE/CambiaPasswordAction.do?method="+name+"&validation=true";
	document.CambiaPasswordForm.submit();
}

// PrenotazioneEventoPage.jsp
function invia_clickPE(me,numeroPersone,telefono,cellulare,email,alertvar,name){
	if(validateFields(numeroPersone,telefono,cellulare,email)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.PrenotazioneEventoForm.action = "/orchideaFE/PrenotazioneEventoAction.do?method="+name+"&validation=true";
		    document.PrenotazioneEventoForm.submit();
	    }
	    else{
			return false;
		}
	    return true;
	}
	return false;
}

// GestioneCiInformativaPage.jsp
function invia_clickGI(me,prezzo,alertvar,name){
	if(validateFieldsPrezzo(prezzo) && validateReceivers()){
		if(confirm(alertvar)){
			me.disabled=true;
		    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiInformativaAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
    	else{
			return false;
		}
		return true;
	}
	return false;
}

// GestioneCiStudioPage.jsp
function invia_clickGS(me,prezzo,annoPubblicazione,isbn,alertvar,name){
	if(validateFieldsGCSP(prezzo,annoPubblicazione,isbn) &&	validateReceivers()){
		if(confirm(alertvar)){
			me.disabled=true;
		    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiStudioAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
    	else{
			return false;
		}
	}
}

// GestioneCiConoscenzaPage.jsp
function invia_clickCP(me,prezzo,dataIntervista,alertvar,name){
	if(validateFieldsGCCP(prezzo,dataIntervista) && validateReceivers()){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiConoscenzaAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
	    else{
      		return false;
    	}
    	return true;
   	}
   	return false;
}

// GestioneCiEventoPage.jsp
function invia_clickGE(me,titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,alertvar,name){
	//controllo prezzo	
  	var widgColl = document.getElementsByName('tipologiaPagamento');
  	var widgColl1 = document.getElementsByName('prezzo');
	if(widgColl!=null && widgColl1!=null && widgColl[1].checked && (widgColl1[0].value==null || widgColl1[0].value.length==0)){
		alert('Inserire prezzo a persona');
		return false;
	}
	// Controllo modalità prenotazione
	var collCheck=document.getElementsByName('confermaPrenotazione');
	if(collCheck!=null && collCheck[0].checked){
		var modInvio=document.getElementById('modalitainvioprenotazioneevento');
		if(modInvio.value=='0'){
	  		alert('Selezionare modalità invio prenotazione');
	  		return false;
		}
	}		
	if(validateFieldsGCE(titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
			document.ContributoInformativoEventoForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

// GestioneOfferteServizioPage.jsp
function invia_click_pern(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,alertvar,name){
	// Controllo modalità prenotazione
	var collCheck=document.getElementsByName('confermaPrenotazione');
	if(collCheck!=null && collCheck[0].checked){
		var modInvio=document.getElementById('modalitainvioprenotazioneofferta');
		if(modInvio.value=='0'){
			alert('Selezionare modalità invio prenotazione');
			return false;
		}
	}		
  	if(validateFields_pern(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
			document.OffertaServizioForm.submit();
	    }
	    else{
			return false;
	    }
		return false;
	}
	return false;
}

// GestioneOfferteServizioPage.jsp
function invia_click_vend(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione,alertvar,name){
	// Controllo modalità prenotazione
	var collCheck=document.getElementsByName('confermaPrenotazione');
	if(collCheck!=null && collCheck[0].checked){
		var modInvio=document.getElementById('modalitainvioprenotazioneofferta');
		if(modInvio.value=='0'){
			alert('Selezionare modalità invio prenotazione');
			return false;
		}
	}		
	if(validateFields_vend(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione)){
	    if(confirm(alertvar)){
	    	me.disabled=true;
		    document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
		    document.OffertaServizioForm.submit();
	    }
	    else{
			return false;
	    }
		return false
	}
	return false
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp
// GestioneCiConoscenzaPage.jsp - GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp
// GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp
// PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp - RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp
// RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isCf(text){
	var cf = text.value
	if(cf.length==16){
		var letters1 = cf.substring(0,6)
		var letters2 = cf.substring(8,9)
		var letters3 = cf.substring(11,12)
		var letters4 = cf.substring(15,16)
		var numbers1 = cf.substring(6,8)
		var numbers2 = cf.substring(9,11)
		var numbers3 = cf.substring(12,15)
		if(isMadeOfLetters(letters1) && isMadeOfLetters(letters2) && isMadeOfLetters(letters3) && isMadeOfLetters(letters4) && isInteger(numbers1) && isInteger(numbers2) && isInteger(numbers3))
			return true;
		else alert('Codice fiscale non valido');
	}
	else alert('Codice fiscale non valido');
	return false;
}

// RegPrimoLivelloPage.jsp
  function iscriviti_click(me,email,alertvar,name){
	if(validateFieldsEmail(email)){
	    if(confirm(alertvar)){me.disabled=true;
		    document.PrimoLivelloForm.action = "/orchideaFE/RegPrimoLivelloAction.do?method="+name+"&validation=true";
		    document.PrimoLivelloForm.submit();
	    }
	    else{
	      return false;
	    }
	    return true
	  }
	  return false
  }

// GestioneAgendaPrivataPage.jsp - HomePage.jsp - TGestioneAgendaPubblicaPage.jsp - TRicercaOfferteServizioPage.jsp
// TVisualizzazioneCiEventoPage.jsp - TVisualizzazioneMinisitoPage.jsp - TVisualizzazioneOffertaServizioPage.jsp 
// RegDirettaPrimoLivelloPage.jsp - RegPrimoLivelloPage.jsp

function isDate1(value1){
     //Ho tolto DaysArray1
    var dtStr = value1.value;
	var daysInMonth = DaysArray1(12);
	var pos1=dtStr.indexOf(dtCh);
	var pos2=dtStr.indexOf(dtCh,pos1+1);
	var strDay=dtStr.substring(0,pos1);
	var strMonth=dtStr.substring(pos1+1,pos2);
	var strYear=dtStr.substring(pos2+1);
	if (strDay.charAt(0)=="0" && strDay.length>1) 
		strDay=strDay.substring(1);
	if (strMonth.charAt(0)=="0" && strMonth.length>1) 
		strMonth=strMonth.substring(1);
	for (var i = 1; i <= 3; i++) {
		//	if (strYear.charAt(0)=="0" && strYear.length>1) strYear=strYear.substring(1)
	}
	// year completion
	if(strYear.length==1) 
		strYear=200+strYear;
	else 
		if(strYear.length==2) 
			strYear=20+strYear;
		else 
			if(strYear.length==3) 
				strYear=2+strYear;
	month=parseInt(strMonth);
	day=parseInt(strDay);
	year=parseInt(strYear);
	if (pos1==-1 || pos2==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa");
		return false;
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Inserire un mese valido");
		return false;
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Inserire un giorno valido");
		return false;
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Inserire per l'anno un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear);
		return false;
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Inserire una data valida");
		return false;
	}
	return true;
}

// RegDirettaPrimoLivelloPage.jsp 
// RegPrimoLivelloPage.jsp
/*
 function isDate1(text){
	
		var dtStr = text.value
		var daysInMonth = DaysArray1(12)
		var pos1=dtStr.indexOf(dtCh)
		var pos2=dtStr.indexOf(dtCh,pos1+1)
		var strDay=dtStr.substring(0,pos1)
		var strMonth=dtStr.substring(pos1+1,pos2)
		var strYear=dtStr.substring(pos2+1)
		if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
		if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
		for (var i = 1; i <= 3; i++) {
		//	if (strYear.charAt(0)=="0" && strYear.length>1) strYear=strYear.substring(1)
		}
		
		// year completion
		if(strYear.length==1) strYear=200+strYear
		else if(strYear.length==2) strYear=20+strYear
		else if(strYear.length==3) strYear=2+strYear
		
		month=parseInt(strMonth)
		day=parseInt(strDay)
		year=parseInt(strYear)
		if (pos1==-1 || pos2==-1){
			alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
			return false
		}
		if (strMonth.length<1 || month<1 || month>12){
			alert("Mese non valido")
			return false
		}
		if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
			alert("Giorno non valido")
			return false
		}
		if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
			alert("Inserire per l'anno un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
			return false
		}
		if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
			alert("Data non valida")
			return false
		}
	return true
	}     
*/

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp
// GestioneCiConoscenzaPage.jsp - GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - 
// GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp - InserimentoAppuntoPage.jsp
// PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegPrimoLivelloPage.jsp
// RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isDate2(dtStr){
	//var dtStr = text.value;
	var daysInMonth = DaysArray2(12);
	var pos1=dtStr.indexOf(dtCh);
	var pos2=dtStr.indexOf(dtCh,pos1+1);
	var strDay=dtStr.substring(0,pos1);
	var strMonth=dtStr.substring(pos1+1,pos2);
	var strYear=dtStr.substring(pos2+1);
	if (strDay.charAt(0)=="0" && strDay.length>1) 
		strDay=strDay.substring(1);
	if (strMonth.charAt(0)=="0" && strMonth.length>1) 
		strMonth=strMonth.substring(1);
	for (var i = 1; i <= 3; i++) {
		//	if (strYear.charAt(0)=="0" && strYear.length>1) strYear=strYear.substring(1)
	}
	// year completion
	if(strYear.length==1)
		strYear=200+strYear;
	else 
		if(strYear.length==2) 
			strYear=20+strYear;
		else 
			if(strYear.length==3) 
				strYear=2+strYear;
	month=parseInt(strMonth);
	day=parseInt(strDay);
	year=parseInt(strYear);
	if (pos1==-1 || pos2==-1){
		alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa");
		return false;
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Mese non valido");
		return false;
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Giorno non valido");
		return false;
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Inserire per l'anno un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear);
		return false;
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Inserire una data non valida");
		return false;
	}
	return true;
}

//GestioneAgendaPrivataPage
function ValidateDateGAP(text){
		if(text.value!='' && text.value!='gg/mm/aaaa'){
			if (isDateGAP(text.value)==false){
				text.focus()
				return false;
			}
			return true;
		}
	}

function DaysArray3(n) {
		for (var i = 1; i <= n; i++) {
			this[i] = 31
			if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
			if (i==2) {this[i] = 29}
	   } 
	   return this;
	}
function isDateGAP(dtStr){
		var daysInMonth = DaysArray3(12)
		var pos1=dtStr.indexOf(dtCh)
		var pos2=dtStr.indexOf(dtCh,pos1+1)
		var strDay=dtStr.substring(0,pos1)
		var strMonth=dtStr.substring(pos1+1,pos2)
		var strYear=dtStr.substring(pos2+1)
		if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
		if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
		for (var i = 1; i <= 3; i++) {
		//	if (strYear.charAt(0)=="0" && strYear.length>1) strYear=strYear.substring(1)
		}
		
		// year completion
		if(strYear.length==1) strYear=200+strYear
		else if(strYear.length==2) strYear=20+strYear
		else if(strYear.length==3) strYear=2+strYear
		
		month=parseInt(strMonth)
		day=parseInt(strDay)
		year=parseInt(strYear)
		if (pos1==-1 || pos2==-1){
			alert("La data inserita deve rispettare il seguente formato: gg/mm/aaaa")
			return false
		}
		if (strMonth.length<1 || month<1 || month>12){
			alert("Inserire un mese valido")
			return false
		}
		if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
			alert("Inserire un giorno valido")
			return false
		}
		if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
			alert("Inserire per l'anno un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear)
			return false
		}
		if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
			alert("Inserire una data valida")
			return false
		}
	return true
	}
	




// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp
// GestioneCiConoscenzaPage.jsp - GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp
// GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp
// PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp - RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp
// RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isEmail(text){
	var email = text.value;
	if(email.indexOf(' ')==-1){
		var atPos = email.indexOf('@');
		var dotPos = email.lastIndexOf('.');
		if(atPos!=-1 && dotPos!=-1 && atPos<dotPos)
			return true;
		else 
			alert('Indirizzo e-mail non valido');
	}
	else
		alert('Non è consentito inserire spazi in questo campo');
	return false;
}

// GestioneCiEventoPage.jsp - GestioneOfferteServizioPage.jsp
function isEuro(text){
	if(text.value!=''){
		if (ChkDecimali(text)==false){
			text.focus();
			return false;
		}
	}
	return true;
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneAgendaPrivataPage.jsp
// GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp - GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp
// GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp
// HomePage.jsp - InserimentoAppuntoPage.jsp - PasswordDimenticataPage.jsp - PPCAgendaPubblicaPage.jsp - PrenotazioneEventoPage.jsp
// RegDirettaPrimoLivelloPage.jsp - RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp
// RegViaSuperUtenteSecondoLivelloPage.jsp - TGestioneAgendaPubblicaPage.jsp - TGestioneCarrelloPage.jsp - TRicercaOfferteServizioPage.jsp
// TVisualizzazioneCiEventoPage.jsp - TVisualizzazioneMinisitoPage.jsp - TVisualizzazioneOffertaServizioPage.jsp
function isInteger(s){
	var i;
	for (i = 0; i < s.length; i++){   
    	// Check that current character is number.
		var c = s.charAt(i);
		if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

// GestioneOfferteServizioPage.jsp
function isIntegerGreaterThanZero(text){
	if(!isIntegerNotify(text))
		return false;
	var i=parseInt(text.value);
	if(i<=0){
		alert('Inserire un numero maggiore di zero');
		return false;
	}  
	return true;
}

// AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiEventoPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isIntegerNotify(text){
	var s = text.value
	var i;
	for (i = 0; i < s.length; i++){   
		// Check that current character is number.
		var c = s.charAt(i);
		if (((c < "0") || (c > "9"))){
    	  	alert('Inserire un numero senza cifre decimali');
      		text.focus()
	      	return false;
		}
    }
    // All characters are numbers.
    return true;
}

// GestioneRichiestaPrenotazionePage.jsp
function isIntegerNotZeroNotify(text){
	var s = text.value
	var i;
    for (i = 0; i < s.length; i++){   
		// Check that current character is number.
		var c = s.charAt(i);
		if (((c < "0") || (c > "9"))){
			alert('Inserire un numero senza cifre decimali');
			text.focus()
			return false;
		}
	}
    var zeros = true
    for (i = 0; i < s.length; i++){   
		// Check that current character is not 0.
		var c = s.charAt(i);
		if (c != "0"){
			zeros = zeros && false
		}
	}
	if(zeros){
    	alert('Inserire un numero diverso da zero');
    	text.focus()
    	return false;
    }
	return true;
}

// GestioneCiEventoPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - PrenotazioneEventoPage.jsp
function isIsbn(isbn){
	var ISBN = isbn.value;
	var check_digit = 0;
	var checksum;
	if (ISBN.length < 10){
		alert("Il codice ISBN inserito non può essere più breve di 10 caratteri");
		isbn.focus();
		return false;
	}
	else{
		if (ISBN.length > 10){
			alert("Il codice ISBN inserito non può essere più lungo di 10 caratteri");
			isbn.focus();
			return false;
		} 
		else
			checksum = 0;
	}
	for (i = 0; i < 10; i++){
		if (ISBN.charAt(9) == "X"){
			check_digit = 10;
		}
		else{
			check_digit = parseInt(ISBN.charAt(9));
		}
		checksum = checksum + (i+1)*check_digit;
	}
	cksum_mod_11 = checksum%11;
	if (cksum_mod_11 != 0){
		alert("Inserire un codice ISBN valido");
		return false;
	}
	return true;
}

// AreaStampaPage.jsp - ComuneInformaPage.jsp - ConsultaComStampaPage.jsp - ElencoNotiziePercorsoPage.jsp - GestioneAgendaPrivataPage.jsp
// GestioneRicUtentePage.jsp - GuidaElettronicaPage.jsp - InfoCasiEmergenzaPage.jsp - InoltroComunicazioniPromozionaliPage.jsp
// RicercaMinisitiRicevutiPage.jsp - RicercaOfferteImpPage.jsp - RicercaOfferteSuperPage.jsp - RisultatiRicercaContributiInformativiPage.jsp
// VisPropriCiPage.jsp - VisRicPrenotazioneByImpPage.jsp - VisRicPrenotazioniByUserPage.jsp - VisualizzazioneCiPage.jsp
// VisualizzazionePrenotazioniEventoPage.jsp - VisualizzazioneUtentiPage.jsp
function isItemSelected(){
	var j=0;
	var listaEl = document.forms[0].elements;
    var found=false;
    for(var i=0; i<listaEl.length; i++){
		if(typeof listaEl[i].checked!=null){
			j++;
			if(listaEl[i].checked)found=true; 
		} 
	}
	if(j>0 && !found){
		alert('Selezionare un elemento della lista');
		return false;
	}
    else{
		return true;
	}  
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp
// RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isLetter(ch){ 
	return (((ch >= "a") && (ch <= "z")) || ((ch >= "A") && (ch <= "Z")) ) 
} 

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp - RegPrimoLivelloPage.jsp
// RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isMadeOfLetters(s){
	var i;
	for (i = 0; i < s.length; i++){   
		var c = s.charAt(i);
		if(!isLetter(c))
			return false;
    }
    return true;
}

// GestioneOfferteServizioPage.jsp
function isNotVoid(text){
	if(text.value!='')
		return true;
	else {
		alert("Il campo selezionato deve essere valorizzato");
		text.focus();
		return false;
	}
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp
// GestioneCiConoscenzaPage.jsp - GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp
// GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp - InserimentoAppuntoPage.jsp
// PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp - RegPrimoLivelloPage.jsp
// RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp - TGestioneCarrelloPage.jsp
function isNumber(s){
	var dot=s.indexOf('.');
	var comma=s.indexOf(',');
	if(comma!=-1){
		var interi = s.substring(0,comma);
		var decimali = s.substring(comma+1);
		if(!isInteger(interi) || !isInteger(decimali)) 
			return false;
	}
	else
		if(dot!=-1){
			var interi = s.substring(0,dot);
			var decimali = s.substring(dot+1);
			if(!isInteger(interi) || !isInteger(decimali)) 
				return false;
		}
		else 
			if(!isInteger(s)) 
				return false;
	return true;
}

// GestioneOfferteServizioPage.jsp
function isNumberGreaterThanZero(text){
	if(!isNumberNotify(text))
		return false;
	var s=text.value;
	s=s.replace(',','.');
	var f = parseFloat(s);
	if(f<=0){
		alert('Inserire un numero maggiore di zero');
		return false;
	}
	return true;  
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp
// GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp
// Page.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isNumberNotify(text){
	var s = text.value
	var dot=s.indexOf('.')
	var comma=s.indexOf(',')
	if(comma!=-1){
		var interi = s.substring(0,comma)
		var decimali = s.substring(comma+1)
		if(!isInteger(interi) || !isInteger(decimali)){
			alert('Inserire un numero')
			text.focus()
			return false
		}
	}else
		if(dot!=-1){
			var interi = s.substring(0,dot);
			var decimali = s.substring(dot+1);
			if(!isInteger(interi) || !isInteger(decimali)){
				alert('Inserire un numero');
				text.focus();
				return false;
			}
		}else
			if(!isInteger(s)){
				alert('Inserire un numero');
				text.focus();
				return false;
			}	
	return true;
}

// GestioneCiEventoPage.jsp - GestioneOfferteServizioPage.jsp - GestioneRichiestaPrenotazionePage.jsp - PrenotazioneEventoPage.jsp
function isPercentage(text){
	var per = text.value;
	if(per <=100 && per>=0 && isNumber(per))
		return true;
	else{
		alert('Percentuale non valida');
		return false;
	}
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - Page.jsp
// RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function isPhone(text){
	var phone = text.value;
	if(phone.substring(0,1) == '+')
		phone = phone.substring(1,phone.length);
	phone = replaceAll(phone,' ','');
	while(phone.indexOf('/')!=-1){
		pos = phone.indexOf('/');
		if(phone.charAt(pos-1)!='' && phone.charAt(pos+1)!='' && isInteger(phone.charAt(pos-1)) && isInteger(phone.charAt(pos+1))){
			phone = phone.substring(0,phone.indexOf('/'))+phone.substring(phone.indexOf('/')+1,phone.length);
		}else{
			alert('Il separatore \'/\' deve essere preceduto e seguito da una cifra');
			return false;
		}
	}
	phone = replaceAll(phone,'/','');
	if(!isInteger(phone)){
		alert('Numero telefonico non valido');
		return false;
	}
	return true;
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp
// RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp 
function isPiva(text){
	var piva = text.value;
	if(piva.length==11 && isInteger(piva))
		return true;
	else 
		alert('Partita IVA non valida');
	return false;
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - InserimentoAppuntoPage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp
// RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp 
function isTime(text){
	var tmStr = text.value;
	var pos=tmStr.indexOf(tmCh);
	var strHou=tmStr.substring(0,pos);
	var strMin=tmStr.substring(pos+1);
	if (strHou.charAt(0)=="0" && strHou.length>1)
		strHou=strHou.substring(1);
	if (strMin.charAt(0)=="0" && strMin.length>1)
		strMin=strMin.substring(1);
	if(isNumber(strHou)&&isNumber(strMin)){
		hour=parseInt(strHou);
		min=parseInt(strMin);
		if (pos==-1){
			alert("L'ora inserita deve rispettare il seguente formato: hh:mm");
			return false;
		}
		if (strHou.length<1 || hour<0 || hour>24 || tmStr=='hh:mm'){
			alert("Ora non valida");
			return false;
		}
		if(strHou=='24'){
			text.value = '0'+tmCh+strMin;
		}
		if (strMin.length<1 || min<0 || min>59){
			alert("Minuto non valido");
			return false;
		}
	}else{
		alert('Ora non valida');
		return false;
	}
	return true;
}

// AggSecondoLivelloDatiRegistrazionePage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp
function IsVoid(cellulare){
	if(cellulare.value=='')
		return true;
	return false;
}

// AggPrimoLivelloDatiRegistrazionePage.jsp - AggSecondoLivelloDatiRegistrazionePage.jsp - GestioneCiCartinaPage.jsp - GestioneCiConoscenzaPage.jsp
// GestioneCiEventoPage.jsp - GestioneCiInfoEmergenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp - GestioneOfferteServizioPage.jsp
// GestioneRichiestaPrenotazionePage.jsp - PasswordDimenticataPage.jsp - PrenotazioneEventoPage.jsp - RegDirettaPrimoLivelloPage.jsp
// RegPrimoLivelloPage.jsp - RegSecondoLivelloPage.jsp - RegViaSuperUtentePrimoLivelloPage.jsp - RegViaSuperUtenteSecondoLivelloPage.jsp 
function isYear(text){
	var yrStr = text.value;
	if(isInteger(yrStr) && yrStr.length==4 && yrStr>minYear && yrStr<maxYear)
		return true;
	else{
		alert("Inserire per l'anno un'espressione di 4 cifre compresa tra "+minYear+" e "+maxYear);
		return false;
	}
}

// EGISCreaCartinaDiPercorsoPage.jsp - EGISGeoreferenziazionePage.jsp - EGISPseudoGeoreferenziazionePage.jsp - EGISRicercaMappeCartografichePage.jsp
// EGISVisualizzaCartografiaPage.jsp - EGISVisualizzaCartografiaPopupPage.jsp - HomePage.jsp - MenuPage.jsp - PPCAgendaPubblicaPage.jsp - PPCElencoNotiziePage.jsp
// PPCFailurePage.jsp - PPCGuidaElettronicaPage.jsp - PPCHomePage.jsp - PPCMarketingPage.jsp - PPCNothingAvailablePage.jsp - PPCPrenotaOfflinePage.jsp
// PPCRecapitiEmergenzaPage.jsp - PPCVisCartinaPage.jsp - PPCVisEventoPage.jsp - PPCVisMinisitoPage.jsp - PPCVisNotiziaPage.jsp - PPCVisOffertaPage.jsp
// PPCVisOffertePage.jsp - PPCVisRecapitoPage.jsp - PPCWelcomePage.jsp - ProgressPage.jsp - TAccessoPage.jsp - TAgendaPrivataNonDisponibilePage.jsp 
// TAggPrimoLivelloDatiRegistrazionePage.jsp - TAggSecondoLivelloDatiRegistrazionePage.jsp - TAreaStampaPage.jsp - TCambiaPasswordPage.jsp - TComuneInformaPage.jsp
// TConsultaComStampaPage.jsp - TCreditsPage.jsp - TElencoNotiziePercorsoPage.jsp - TFailureNoMenuPage.jsp - TFailurePage.jsp - TFailureSPage.jsp - TGestioneAgendaPrivataPage.jsp
// TGestioneAgendaPubblicaPage.jsp - TGestioneCarrelloPage.jsp - TGestioneCiCartinaPage.jsp - TGestioneCiCommentoPage.jsp - TGestioneCiComunicazionePromozionalePage.jsp 
// TGestioneCiConoscenzaPage.jsp - TGestioneCiDocumentoPage.jsp - TGestioneCiEventoPage.jsp - TGestioneCiInfoEmergenzaPage.jsp - TGestioneCiInformativaPage.jsp
// TGestioneCiInformazioneEditorialePage.jsp - TGestioneCiNotiziaPage.jsp - TGestioneCiRichiestaPage.jsp - TGestioneCiSegnalazionePage.jsp - TGestioneCiStudioPage.jsp 
// TGestioneCiTestPage.jsp - TGestioneMinisitoPage.jsp - TGestioneOfferteServizioPage.jsp - TGestioneRichiestaPrenotazionePage.jsp - TGestioneRicUtentePage.jsp - TGliUtentiPage.jsp
// TGuidaElettronicaPage.jsp - TGuidaPage.jsp - TInfoCasiEmergenzaPage.jsp - TInoltroComunicazioniPromozionaliPage.jsp - TInserimentoAppuntoPage.jsp - TIntroduzioneCiPage.jsp 
// TIntroduzioneSistemaPage.jsp - TInvalidSessionPage.jsp - TLaNaturaPage.jsp - TLaStoriaPage.jsp - TLoginSuccessPage.jsp - TMappaSitoPage.jsp - TModificaStatoRicPrimoLivelloPage.jsp 
// TModificaStatoRicSecondoLivelloPage.jsp - TNoResultPage.jsp - TNothingAvailablePage.jsp - TObiettiviPage.jsp - TPasswordDimenticataPage.jsp - TPotenzialiClientiImpPage.jsp 
// TPotenzialiClientiSistemaPage.jsp - TPrenotazioneEventoPage.jsp - TPrenotazioneOfflinePage.jsp - TPrenotazioneOnlinePage.jsp - TPreviewCiEventoPage.jsp - TPreviewMinisitoPage.jsp 
// TPreviewOffertaServizioPage.jsp - TPromotoriPage.jsp - TRegDirettaPrimoLivelloPage.jsp - TRegPrimoLivelloPage.jsp - TRegSecondoLivelloPage.jsp - TRegViaSuperUtentePrimoLivelloPage.jsp 
// TRegViaSuperUtenteSecondoLivelloPage.jsp - TReportStatisticoPage.jsp - TRequisitiVisualizzazionePage.jsp - TRespingiRicPage.jsp - TRicercaCiLinksPage.jsp - TRicercaContributiInformativiPage.jsp 
// TRicercaMinisitiRicevutiPage.jsp - TRicercaOfferteImpPage.jsp - TRicercaOfferteServizioPage.jsp - TRicercaOfferteSuperPage.jsp - TRisultatiRicercaContributiInformativiPage.jsp 
// TSelezioneAmbitiPage.jsp - TSelezioneArgomentiPage.jsp - TSelezioneCiPage.jsp - TSelezioneComuneCiPage.jsp - TSelezioneComuneEntePage.jsp - TSelezioneComuneUtPage.jsp 
// TSelezioneTipologiaPage.jsp - TSmsEventAlertingPage.jsp - TSmsEventAlertingSistemaPage.jsp - TSospendiOffertaPage.jsp - TSospensioneMinisitoPage.jsp - TSuccessButLoginPage.jsp 
// TSuccessNoMenuPage.jsp - TSuccessPage.jsp - TVisCalendRicPrenotazionePage.jsp - TVisDestinatariSmsPage.jsp - TVisDestinatariSmsSistemaPage.jsp - TVisNumSmsPage.jsp - TVisPropriCiPage.jsp 
// TVisRicPrenotazioneByImpPage.jsp - TVisRicPrenotazioniByUserPage.jsp - TVisSmsEventAlertingPage.jsp - TVisualizzaUtentePrimoLivelloPage.jsp - TVisualizzaUtenteSecondoLivelloPage.jsp 
// TVisualizzazioneAppuntoPage.jsp - TVisualizzazioneCiCartinaPage.jsp - TVisualizzazioneCiConoscenzaPage.jsp - TVisualizzazioneCiDocumentoPage.jsp - TVisualizzazioneCiEventoPage.jsp 
// TVisualizzazioneCiInfoEmergenzaPage.jsp - TVisualizzazioneCiInformativaPage.jsp - TVisualizzazioneCiInformazioneEditorialePage.jsp - TVisualizzazioneCiNotiziaPage.jsp - TVisualizzazioneCiPage.jsp 
// TVisualizzazioneCiRichiestaPage.jsp - TVisualizzazioneCiSegnalazionePage.jsp - TVisualizzazioneCiStudioPage.jsp - TVisualizzazioneMinisitoPage.jsp - TVisualizzazioneOffertaServizioPage.jsp 
// TVisualizzazioneOfferteServizioPage.jsp - TVisualizzazionePrenotazioneEventoPage.jsp - TVisualizzazionePrenotazioniEventoPage.jsp - TVisualizzazioneUtentiPage.jsp 
// TVivereBiologicoPage.jsp - TWelcomePage.jsp 
function jumpTo(URL_List){
   var URL = URL_List.options[URL_List.selectedIndex].value;
   window.location.href = URL;
}

// SelezioneAmbitiPage.jsp
 function lockParentWindow1(){
	if(n_timeout==0)
		timeout=setTimeout("lockParentWindow1()",500);
	n_timeout++;
	if(n_timeout>2) 	
		clearTimeout(timeout); 
	if(window.opener!=null && window.opener.document!=null && window.opener.document.forms[0]!=null){
		var collWidget = window.opener.document.forms[0].elements;
		if(collWidget!=null){
			var j=0;
			for(var i=0; i<collWidget.length; i++){
				if(collWidget[i].name=='selezione_ambiti' && collWidget[i].disabled!=null && !collWidget[i].disabled){
					collWidget[i].disabled=true;
					collWidgetDisabled[j++]=collWidget[i];
				}
			}
		}
	}
}

// SelezioneArgomentiPage.jsp

function lockParentWindowSAP(){
     if(n_timeout==0)timeout=setTimeout("lockParentWindowSAP()",500);
     n_timeout++;
     if(n_timeout>2)clearTimeout(timeout);
     if(window.opener!=null && window.opener.document!=null && window.opener.document.forms[0]!=null){
       var collWidget = window.opener.document.forms[0].elements;
       if(collWidget!=null){
         var j=0;
         for(var i=0; i<collWidget.length; i++){
           if(collWidget[i].name=='selezioneArgomenti' && collWidget[i].disabled!=null && !collWidget[i].disabled){
             collWidget[i].disabled=true;
             collWidgetDisabled[j++]=collWidget[i];
           }
         }
       }
     }
  }

  
// SelezioneComuneCiPage.jsp - SelezioneComuneUtPage.jsp
function lockParentWindow3(){
	if(n_timeout==0)
		timeout=setTimeout("lockParentWindow3()", 500);
	n_timeout++;
	if(n_timeout>2)
		clearTimeout(timeout); 
	if(window.opener!=null && window.opener.document!=null && window.opener.document.forms[0]!=null){
		var collWidget = window.opener.document.forms[0].elements;
		if(collWidget!=null){
			var j=0;
			for(var i=0; i<collWidget.length; i++){
				if(collWidget[i].name=='selezioneComune' && collWidget[i].disabled!=null && !collWidget[i].disabled){
					collWidget[i].disabled=true;
					collWidgetDisabled[j++]=collWidget[i];
				}
			}
		}
	}
}

// SelezioneComuneEntePage.jsp
  function lockParentWindow4(){
     if(n_timeout==0)timeout=setTimeout("lockParentWindow4()", 500);
     n_timeout++;
     if(n_timeout>2)clearTimeout(timeout); 
     if(window.opener!=null && window.opener.document!=null && window.opener.document.forms[0]!=null){
       var collWidget = window.opener.document.forms[0].elements;
       if(collWidget!=null){
         var j=0;
         for(var i=0; i<collWidget.length; i++){
           if(collWidget[i].name=='selezioneComuneEnte' && collWidget[i].disabled!=null && !collWidget[i].disabled){
             collWidget[i].disabled=true;
             collWidgetDisabled[j++]=collWidget[i];
           }
         }
       }
     }
  }

// AccessoPage.jsp 
function login_click1(me,name){
	document.AccessoForm.action = "/orchideaFE/AccessoAction.do?method="+name+"&validation=true";
	document.AccessoForm.submit();
}

// HomePage.jsp 
function login_click2(me,name){
	document.HomeForm.action = "/orchideaFE/HomeAction.do?method="+name+"&validation=true&idpadre=671";
	document.HomeForm.submit();
}

// PPCHomePage.jsp
function login_click3(me,name){
	document.PPCHomeForm.action = "/orchideaFE/PPCHomeAction.do?method="+name+"&validation=true";
	document.PPCHomeForm.submit();
}

// HomePage.jsp
function loginFailure(){
	alert("Username o password incorretti");
}


//GestioneCiConoscenzaPage.jsp - GestioneCiInformativaPage.jsp - GestioneCiStudioPage.jsp
function managePayment1(){
	var widgColl = document.getElementsByName('tipologiaPagamento');
	var widgColl1 = document.getElementsByName('prezzo');
	if(widgColl!=null && widgColl[0]!=null && widgColl[0].disabled){
	}
	else 
		if(widgColl!=null && widgColl[0]!=null){
			widgColl[0].checked=true;
			if(widgColl1!=null && widgColl1[0]!=null)
				widgColl1[0].disabled=true;
		}
}

// GestioneCiEventoPage.jsp
function managePayment2(){
	var widgColl = document.getElementsByName('tipologiaPagamento');
	var widgColl1 = document.getElementsByName('prezzo');
	if(widgColl!=null && widgColl[0]!=null && widgColl[0].disabled){
	}
	else
		if(widgColl!=null && widgColl[0]!=null && (widgColl1[0].value==null || widgColl1[0].value.length==0)){
			widgColl[0].checked=true;
			if(widgColl1!=null && widgColl1[0]!=null)
				widgColl1[0].disabled=true;
		}
}

// RegSecondoLivelloPage.jsp
function manageRadio(){
	var widgColl = document.getElementsByName('numeroFamiliariViaggiatoriRadio');
	var widgColl1 = document.getElementsByName('numeroFamiliariViaggiatori');
	if(widgColl!=null && widgColl[0]!=null && widgColl[0].disabled){
	}
	else 
		if(widgColl!=null && widgColl[0]!=null){
			widgColl[0].checked=true;
			if(widgColl1!=null && widgColl1[0]!=null)
				widgColl1[0].disabled=true;
		}
 }
 
// EGISCreaCartinaDiPercorsoPage.jsp - EGISGeoreferenziazionePage.jsp - EGISPseudoGeoreferenziazionePage.jsp - EGISRicercaMappeCartografichePage.jsp
// EGISVisualizzaCartografiaPage.jsp - EGISVisualizzaCartografiaPopupPage.jsp - HomePage.jsp - MenuPage.jsp - ProgressPage.jsp - TAccessoPage.jsp
// TAgendaPrivataNonDisponibilePage.jsp - TAggPrimoLivelloDatiRegistrazionePage.jsp - TAggSecondoLivelloDatiRegistrazionePage.jsp - TAreaStampaPage.jsp 
// TCambiaPasswordPage.jsp - TComuneInformaPage.jsp - TConsultaComStampaPage.jsp - TCreditsPage.jsp - TElencoNotiziePercorsoPage.jsp 
// TFailureNoMenuPage.jsp - TFailurePage.jsp - TFailureSPage.jsp - TGestioneAgendaPrivataPage.jsp - TGestioneAgendaPubblicaPage.jsp - TGestioneCarrelloPage.jsp 
// TGestioneCiCartinaPage.jsp - TGestioneCiCommentoPage.jsp - TGestioneCiComunicazionePromozionalePage.jsp - TGestioneCiConoscenzaPage.jsp 
// TGestioneCiDocumentoPage.jsp - TGestioneCiEventoPage.jsp - TGestioneCiInfoEmergenzaPage.jsp - TGestioneCiInformativaPage.jsp - TGestioneCiInformazioneEditorialePage.jsp 
// TGestioneCiNotiziaPage.jsp - TGestioneCiRichiestaPage.jsp - TGestioneCiSegnalazionePage.jsp - TGestioneCiStudioPage.jsp - TGestioneCiTestPage.jsp 
// TGestioneMinisitoPage.jsp - TGestioneOfferteServizioPage.jsp - TGestioneRichiestaPrenotazionePage.jsp - TGestioneRicUtentePage.jsp - TGliUtentiPage.jsp 
// TGuidaElettronicaPage.jsp - TGuidaPage.jsp - TInfoCasiEmergenzaPage.jsp - TInoltroComunicazioniPromozionaliPage.jsp - TInserimentoAppuntoPage.jsp 
// TIntroduzioneCiPage.jsp - TIntroduzioneSistemaPage.jsp - TInvalidSessionPage.jsp - TLaNaturaPage.jsp - TLaStoriaPage.jsp - TLoginSuccessPage.jsp 
// TMappaSitoPage.jsp - TModificaStatoRicPrimoLivelloPage.jsp - TModificaStatoRicSecondoLivelloPage.jsp - TNoResultPage.jsp - TNothingAvailablePage.jsp 
// TObiettiviPage.jsp - TPasswordDimenticataPage.jsp - TPotenzialiClientiImpPage.jsp - TPotenzialiClientiSistemaPage.jsp - TPrenotazioneEventoPage.jsp 
// TPrenotazioneOfflinePage.jsp - TPrenotazioneOnlinePage.jsp - TPreviewCiEventoPage.jsp - TPreviewMinisitoPage.jsp - TPreviewOffertaServizioPage.jsp
// TPromotoriPage.jsp - TRegDirettaPrimoLivelloPage.jsp - TRegPrimoLivelloPage.jsp - TRegSecondoLivelloPage.jsp - TRegViaSuperUtentePrimoLivelloPage.jsp 
// TRegViaSuperUtenteSecondoLivelloPage.jsp - TReportStatisticoPage.jsp - TRequisitiVisualizzazionePage.jsp - TRespingiRicPage.jsp - TRicercaCiLinksPage.jsp
// TRicercaContributiInformativiPage.jsp - TRicercaMinisitiRicevutiPage.jsp - TRicercaOfferteImpPage.jsp - TRicercaOfferteServizioPage.jsp - TRicercaOfferteSuperPage.jsp 
// TRisultatiRicercaContributiInformativiPage.jsp - TSelezioneAmbitiPage.jsp - TSelezioneArgomentiPage.jsp - TSelezioneCiPage.jsp - TSelezioneComuneCiPage.jsp 
// TSelezioneComuneEntePage.jsp - TSelezioneComuneUtPage.jsp - TSelezioneTipologiaPage.jsp - TSmsEventAlertingPage.jsp - TSmsEventAlertingSistemaPage.jsp 
// TSospendiOffertaPage.jsp - TSospensioneMinisitoPage.jsp - TSuccessButLoginPage.jsp - TSuccessNoMenuPage.jsp - TSuccessPage.jsp - TVisCalendRicPrenotazionePage.jsp 
// TVisDestinatariSmsPage.jsp - TVisDestinatariSmsSistemaPage.jsp - TVisNumSmsPage.jsp - TVisPropriCiPage.jsp - TVisRicPrenotazioneByImpPage.jsp - TVisRicPrenotazioniByUserPage.jsp 
// TVisSmsEventAlertingPage.jsp - TVisualizzaUtentePrimoLivelloPage.jsp - TVisualizzaUtenteSecondoLivelloPage.jsp - TVisualizzazioneAppuntoPage.jsp - TVisualizzazioneCiCartinaPage.jsp 
// TVisualizzazioneCiConoscenzaPage.jsp - TVisualizzazioneCiDocumentoPage.jsp - TVisualizzazioneCiEventoPage.jsp - TVisualizzazioneCiInfoEmergenzaPage.jsp - TVisualizzazioneCiInformativaPage.jsp 
// TVisualizzazioneCiInformazioneEditorialePage.jsp - TVisualizzazioneCiNotiziaPage.jsp - TVisualizzazioneCiPage.jsp - TVisualizzazioneCiRichiestaPage.jsp - TVisualizzazioneCiSegnalazionePage.jsp 
// TVisualizzazioneCiStudioPage.jsp - TVisualizzazioneMinisitoPage.jsp - TVisualizzazioneOffertaServizioPage.jsp - TVisualizzazioneOfferteServizioPage.jsp - TVisualizzazionePrenotazioneEventoPage.jsp 
// TVisualizzazionePrenotazioniEventoPage.jsp - TVisualizzazioneUtentiPage.jsp - TVivereBiologicoPage.jsp - TWelcomePage.jsp 
function MM_findObj(n, d) { //v4.01
	var p,i,x;
	if(!d)
		d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length){
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all)
		x=d.all[n];
	for(i=0;!x&&i<d.forms.length;i++)
		x=d.forms[i][n];
  	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
  		x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById)
		x=d.getElementById(n);
	return x;
}

// HomePage.jsp - MenuPage.jsp - TAggPrimoLivelloDatiRegistrazionePage.jsp - TAggSecondoLivelloDatiRegistrazionePage.jsp - TAreaStampaPage.jsp
// TCambiaPasswordPage.jsp - TComuneInformaPage.jsp - TConsultaComStampaPage.jsp - TFailurePage.jsp - TGestioneAgendaPrivataPage.jsp 
// TGestioneAgendaPubblicaPage.jsp - TGestioneCiCartinaPage.jsp - TGestioneCiCommentoPage.jsp - TGestioneCiComunicazionePromozionalePage.jsp 
// TGestioneCiConoscenzaPage.jsp - TGestioneCiDocumentoPage.jsp - TGestioneCiEventoPage.jsp - TGestioneCiInfoEmergenzaPage.jsp 
// TGestioneCiInformativaPage.jsp - TGestioneCiInformazioneEditorialePage.jsp - TGestioneCiNotiziaPage.jsp - TGestioneCiRichiestaPage.jsp 
// TGestioneCiSegnalazionePage.jsp - TGestioneCiStudioPage.jsp - TGestioneCiTestPage.jsp - TGestioneMinisitoPage.jsp - TGestioneOfferteServizioPage.jsp 
// TGestioneRicUtentePage.jsp - TGliUtentiPage.jsp - TGuidaPage.jsp - TInfoCasiEmergenzaPage.jsp - TInoltroComunicazioniPromozionaliPage.jsp 
// TInserimentoAppuntoPage.jsp - TIntroduzioneCiPage.jsp - TIntroduzioneSistemaPage.jsp - TLaNaturaPage.jsp - TLaStoriaPage.jsp - TLoginSuccessPage.jsp
// TModificaStatoRicPrimoLivelloPage.jsp - TModificaStatoRicSecondoLivelloPage.jsp - TNoResultPage.jsp - TNothingAvailablePage.jsp - TObiettiviPage.jsp 
// TPotenzialiClientiImpPage.jsp - TPotenzialiClientiSistemaPage.jsp - TPreviewCiEventoPage.jsp - TPreviewMinisitoPage.jsp - TPreviewOffertaServizioPage.jsp
// TPromotoriPage.jsp - TRegDirettaPrimoLivelloPage.jsp - TRegPrimoLivelloPage.jsp - TRegSecondoLivelloPage.jsp - TRegViaSuperUtentePrimoLivelloPage.jsp 
// TRegViaSuperUtenteSecondoLivelloPage.jsp - TReportStatisticoPage.jsp - TRespingiRicPage.jsp - TRicercaMinisitiRicevutiPage.jsp - TRicercaOfferteImpPage.jsp 
// TRicercaOfferteServizioPage.jsp - TRicercaOfferteSuperPage.jsp - TSelezioneCiPage.jsp - TSmsEventAlertingPage.jsp - TSmsEventAlertingSistemaPage.jsp 
// TSospendiOffertaPage.jsp - TSospensioneMinisitoPage.jsp - TSuccessButLoginPage.jsp - TSuccessPage.jsp - TVisCalendRicPrenotazionePage.jsp 
// TVisDestinatariSmsPage.jsp - TVisDestinatariSmsSistemaPage.jsp - TVisNumSmsPage.jsp - TVisPropriCiPage.jsp - TVisRicPrenotazioneByImpPage.jsp 
// TVisSmsEventAlertingPage.jsp - TVisualizzaUtentePrimoLivelloPage.jsp - TVisualizzaUtenteSecondoLivelloPage.jsp - TVisualizzazioneCiDocumentoPage.jsp 
// TVisualizzazioneCiEventoPage.jsp - TVisualizzazioneCiInfoEmergenzaPage.jsp - TVisualizzazioneCiInformazioneEditorialePage.jsp - TVisualizzazioneCiPage.jsp 
// TVisualizzazioneMinisitoPage.jsp - TVisualizzazioneOffertaServizioPage.jsp - TVisualizzazionePrenotazioneEventoPage.jsp - TVisualizzazionePrenotazioniEventoPage.jsp - TVisualizzazioneUtentiPage.jsp
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

// EGISCreaCartinaDiPercorsoPage.jsp - EGISGeoreferenziazionePage.jsp - EGISPseudoGeoreferenziazionePage.jsp - EGISRicercaMappeCartografichePage.jsp 
// EGISVisualizzaCartografiaPage.jsp - EGISVisualizzaCartografiaPopupPage.jsp - HomePage.jsp - MenuPage.jsp - ProgressPage.jsp - TAccessoPage.jsp 
// TAgendaPrivataNonDisponibilePage.jsp - TAggPrimoLivelloDatiRegistrazionePage.jsp - TAggSecondoLivelloDatiRegistrazionePage.jsp - TAreaStampaPage.jsp - TCambiaPasswordPage.jsp 
// TComuneInformaPage.jsp - TConsultaComStampaPage.jsp - TCreditsPage.jsp - TElencoNotiziePercorsoPage.jsp - TFailureNoMenuPage.jsp - TFailurePage.jsp 
// TFailureSPage.jsp - TGestioneAgendaPrivataPage.jsp - TGestioneAgendaPubblicaPage.jsp - TGestioneCarrelloPage.jsp - TGestioneCiCartinaPage.jsp - TGestioneCiCommentoPage.jsp 
// TGestioneCiComunicazionePromozionalePage.jsp - TGestioneCiConoscenzaPage.jsp - TGestioneCiDocumentoPage.jsp - TGestioneCiEventoPage.jsp - TGestioneCiInfoEmergenzaPage.jsp
// TGestioneCiInformativaPage.jsp - TGestioneCiInformazioneEditorialePage.jsp - TGestioneCiNotiziaPage.jsp - TGestioneCiRichiestaPage.jsp - TGestioneCiSegnalazionePage.jsp 
// TGestioneCiStudioPage.jsp - TGestioneCiTestPage.jsp - TGestioneMinisitoPage.jsp - TGestioneOfferteServizioPage.jsp - TGestioneRichiestaPrenotazionePage.jsp
// TGestioneRicUtentePage.jsp - TGliUtentiPage.jsp - TGuidaElettronicaPage.jsp - TGuidaPage.jsp - TInfoCasiEmergenzaPage.jsp - TInoltroComunicazioniPromozionaliPage.jsp
// TInserimentoAppuntoPage.jsp - TIntroduzioneCiPage.jsp - TIntroduzioneSistemaPage.jsp - TInvalidSessionPage.jsp - TLaNaturaPage.jsp - TLaStoriaPage.jsp - TLoginSuccessPage.jsp
// TMappaSitoPage.jsp - TModificaStatoRicPrimoLivelloPage.jsp - TModificaStatoRicSecondoLivelloPage.jsp - TNoResultPage.jsp - TNothingAvailablePage.jsp - TObiettiviPage.jsp
// TPasswordDimenticataPage.jsp - TPotenzialiClientiImpPage.jsp - TPotenzialiClientiSistemaPage.jsp - TPrenotazioneEventoPage.jsp - TPrenotazioneOfflinePage.jsp - TPrenotazioneOnlinePage.jsp 
// TPreviewCiEventoPage.jsp - TPreviewMinisitoPage.jsp - TPreviewOffertaServizioPage.jsp - TPromotoriPage.jsp - TRegDirettaPrimoLivelloPage.jsp - TRegPrimoLivelloPage.jsp 
// TRegSecondoLivelloPage.jsp - TRegViaSuperUtentePrimoLivelloPage.jsp - TRegViaSuperUtenteSecondoLivelloPage.jsp - TReportStatisticoPage.jsp - TRequisitiVisualizzazionePage.jsp
// TRespingiRicPage.jsp - TRicercaCiLinksPage.jsp - TRicercaContributiInformativiPage.jsp - TRicercaMinisitiRicevutiPage.jsp - TRicercaOfferteImpPage.jsp - TRicercaOfferteServizioPage.jsp
// TRicercaOfferteSuperPage.jsp - TRisultatiRicercaContributiInformativiPage.jsp - TSelezioneAmbitiPage.jsp - TSelezioneArgomentiPage.jsp - TSelezioneCiPage.jsp - TSelezioneComuneCiPage.jsp
// TSelezioneComuneEntePage.jsp - TSelezioneComuneUtPage.jsp - TSelezioneTipologiaPage.jsp - TSmsEventAlertingPage.jsp - TSmsEventAlertingSistemaPage.jsp - TSospendiOffertaPage.jsp
// TSospensioneMinisitoPage.jsp - TSuccessButLoginPage.jsp - TSuccessNoMenuPage.jsp - TSuccessPage.jsp - TVisCalendRicPrenotazionePage.jsp - TVisDestinatariSmsPage.jsp - TVisDestinatariSmsSistemaPage.jsp
// TVisNumSmsPage.jsp - TVisPropriCiPage.jsp - TVisRicPrenotazioneByImpPage.jsp - TVisRicPrenotazioniByUserPage.jsp - TVisSmsEventAlertingPage.jsp - TVisualizzaUtentePrimoLivelloPage.jsp 
// TVisualizzaUtenteSecondoLivelloPage.jsp - TVisualizzazioneAppuntoPage.jsp - TVisualizzazioneCiCartinaPage.jsp - TVisualizzazioneCiConoscenzaPage.jsp - TVisualizzazioneCiDocumentoPage.jsp 
// TVisualizzazioneCiEventoPage.jsp - TVisualizzazioneCiInfoEmergenzaPage.jsp - TVisualizzazioneCiInformativaPage.jsp - TVisualizzazioneCiInformazioneEditorialePage.jsp - TVisualizzazioneCiNotiziaPage.jsp
// TVisualizzazioneCiPage.jsp - TVisualizzazioneCiRichiestaPage.jsp - TVisualizzazioneCiSegnalazionePage.jsp - TVisualizzazioneCiStudioPage.jsp - TVisualizzazioneMinisitoPage.jsp 
// TVisualizzazioneOffertaServizioPage.jsp - TVisualizzazioneOfferteServizioPage.jsp - TVisualizzazionePrenotazioneEventoPage.jsp - TVisualizzazionePrenotazioniEventoPage.jsp 
// TVisualizzazioneUtentiPage.jsp - TVivereBiologicoPage.jsp - TWelcomePage.jsp
function MM_preloadImages() { //v3.0
	var d=document;
	if(d.images){
		if(!d.MM_p)
			d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
		for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
			}
	}
}

// EGISCreaCartinaDiPercorsoPage.jsp - EGISGeoreferenziazionePage.jsp - EGISPseudoGeoreferenziazionePage.jsp - EGISRicercaMappeCartografichePage.jsp - EGISVisualizzaCartografiaPage.jsp
// EGISVisualizzaCartografiaPopupPage.jsp - HomePage.jsp - MenuPage.jsp - ProgressPage.jsp - TAccessoPage.jsp - TAgendaPrivataNonDisponibilePage.jsp - TAggPrimoLivelloDatiRegistrazionePage.jsp
// TAggSecondoLivelloDatiRegistrazionePage.jsp - TAreaStampaPage.jsp - TCambiaPasswordPage.jsp - TComuneInformaPage.jsp - TConsultaComStampaPage.jsp - TCreditsPage.jsp - TElencoNotiziePercorsoPage.jsp
// TFailureNoMenuPage.jsp - TFailurePage.jsp - TFailureSPage.jsp - TGestioneAgendaPrivataPage.jsp - TGestioneAgendaPubblicaPage.jsp - TGestioneCarrelloPage.jsp - TGestioneCiCartinaPage.jsp
// TGestioneCiCommentoPage.jsp - TGestioneCiComunicazionePromozionalePage.jsp - TGestioneCiConoscenzaPage.jsp - TGestioneCiDocumentoPage.jsp - TGestioneCiEventoPage.jsp - TGestioneCiInfoEmergenzaPage.jsp
// TGestioneCiInformativaPage.jsp - TGestioneCiInformazioneEditorialePage.jsp - TGestioneCiNotiziaPage.jsp - TGestioneCiRichiestaPage.jsp - TGestioneCiSegnalazionePage.jsp - TGestioneCiStudioPage.jsp
// TGestioneCiTestPage.jsp - TGestioneMinisitoPage.jsp - TGestioneOfferteServizioPage.jsp - TGestioneRichiestaPrenotazionePage.jsp - TGestioneRicUtentePage.jsp - TGliUtentiPage.jsp - TGuidaElettronicaPage.jsp
// TGuidaPage.jsp - TInfoCasiEmergenzaPage.jsp - TInoltroComunicazioniPromozionaliPage.jsp - TInserimentoAppuntoPage.jsp - TIntroduzioneCiPage.jsp - TIntroduzioneSistemaPage.jsp - TInvalidSessionPage.jsp
// TLaNaturaPage.jsp - TLaStoriaPage.jsp - TLoginSuccessPage.jsp - TMappaSitoPage.jsp - TModificaStatoRicPrimoLivelloPage.jsp - TModificaStatoRicSecondoLivelloPage.jsp - TNoResultPage.jsp - TNothingAvailablePage.jsp
// TObiettiviPage.jsp - TPasswordDimenticataPage.jsp - TPotenzialiClientiImpPage.jsp - TPotenzialiClientiSistemaPage.jsp - TPrenotazioneEventoPage.jsp - TPrenotazioneOfflinePage.jsp - TPrenotazioneOnlinePage.jsp
// TPreviewCiEventoPage.jsp - TPreviewMinisitoPage.jsp - TPreviewOffertaServizioPage.jsp - TPromotoriPage.jsp - TRegDirettaPrimoLivelloPage.jsp - TRegPrimoLivelloPage.jsp - TRegSecondoLivelloPage.jsp 
// TRegViaSuperUtentePrimoLivelloPage.jsp - TRegViaSuperUtenteSecondoLivelloPage.jsp - TReportStatisticoPage.jsp - TRequisitiVisualizzazionePage.jsp - TRespingiRicPage.jsp - TRicercaCiLinksPage.jsp
// TRicercaContributiInformativiPage.jsp - TRicercaMinisitiRicevutiPage.jsp - TRicercaOfferteImpPage.jsp - TRicercaOfferteServizioPage.jsp - TRicercaOfferteSuperPage.jsp - TRisultatiRicercaContributiInformativiPage.jsp
// TSelezioneAmbitiPage.jsp - TSelezioneArgomentiPage.jsp - TSelezioneCiPage.jsp - TSelezioneComuneCiPage.jsp - TSelezioneComuneEntePage.jsp - TSelezioneComuneUtPage.jsp - TSelezioneTipologiaPage.jsp
// TSmsEventAlertingPage.jsp - TSmsEventAlertingSistemaPage.jsp - TSospendiOffertaPage.jsp - TSospensioneMinisitoPage.jsp - TSuccessButLoginPage.jsp - TSuccessNoMenuPage.jsp - TSuccessPage.jsp
// TVisCalendRicPrenotazionePage.jsp - TVisDestinatariSmsPage.jsp - TVisDestinatariSmsSistemaPage.jsp - TVisNumSmsPage.jsp - TVisPropriCiPage.jsp - TVisRicPrenotazioneByImpPage.jsp - TVisRicPrenotazioniByUserPage.jsp
// TVisSmsEventAlertingPage.jsp - TVisualizzaUtentePrimoLivelloPage.jsp - TVisualizzaUtenteSecondoLivelloPage.jsp - TVisualizzazioneAppuntoPage.jsp - TVisualizzazioneCiCartinaPage.jsp - TVisualizzazioneCiConoscenzaPage.jsp
// TVisualizzazioneCiDocumentoPage.jsp - TVisualizzazioneCiEventoPage.jsp - TVisualizzazioneCiInfoEmergenzaPage.jsp - TVisualizzazioneCiInformativaPage.jsp - TVisualizzazioneCiInformazioneEditorialePage.jsp 
// TVisualizzazioneCiNotiziaPage.jsp - TVisualizzazioneCiPage.jsp - TVisualizzazioneCiRichiestaPage.jsp - TVisualizzazioneCiSegnalazionePage.jsp - TVisualizzazioneCiStudioPage.jsp - TVisualizzazioneMinisitoPage.jsp
// TVisualizzazioneOffertaServizioPage.jsp - TVisualizzazioneOfferteServizioPage.jsp - TVisualizzazionePrenotazioneEventoPage.jsp - TVisualizzazionePrenotazioniEventoPage.jsp - TVisualizzazioneUtentiPage.jsp
// TVivereBiologicoPage.jsp - TWelcomePage.jsp
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments;
	document.MM_sr=new Array;
	for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null){
			document.MM_sr[j++]=x;
			if(!x.oSrc)
				x.oSrc=x.src;
			x.src=a[i+2];
		}
}

// EGISCreaCartinaDiPercorsoPage.jsp - EGISGeoreferenziazionePage.jsp - EGISPseudoGeoreferenziazionePage.jsp - EGISRicercaMappeCartografichePage.jsp - EGISVisualizzaCartografiaPage.jsp
// EGISVisualizzaCartografiaPopupPage.jsp - HomePage.jsp - MenuPage.jsp - ProgressPage.jsp - TAccessoPage.jsp - TAgendaPrivataNonDisponibilePage.jsp - TAggPrimoLivelloDatiRegistrazionePage.jsp
// TAggSecondoLivelloDatiRegistrazionePage.jsp - TAreaStampaPage.jsp - TCambiaPasswordPage.jsp - TComuneInformaPage.jsp - TConsultaComStampaPage.jsp - TCreditsPage.jsp - TElencoNotiziePercorsoPage.jsp
// TFailureNoMenuPage.jsp - TFailurePage.jsp - TFailureSPage.jsp - TGestioneAgendaPrivataPage.jsp - TGestioneAgendaPubblicaPage.jsp - TGestioneCarrelloPage.jsp - TGestioneCiCartinaPage.jsp
// TGestioneCiCommentoPage.jsp - TGestioneCiComunicazionePromozionalePage.jsp - TGestioneCiConoscenzaPage.jsp - TGestioneCiDocumentoPage.jsp - TGestioneCiEventoPage.jsp - TGestioneCiInfoEmergenzaPage.jsp
// TGestioneCiInformativaPage.jsp - TGestioneCiInformazioneEditorialePage.jsp - TGestioneCiNotiziaPage.jsp - TGestioneCiRichiestaPage.jsp - TGestioneCiSegnalazionePage.jsp - TGestioneCiStudioPage.jsp 
// TGestioneCiTestPage.jsp - TGestioneMinisitoPage.jsp - TGestioneOfferteServizioPage.jsp - TGestioneRichiestaPrenotazionePage.jsp - TGestioneRicUtentePage.jsp - TGliUtentiPage.jsp - TGuidaElettronicaPage.jsp
// TGuidaPage.jsp - TInfoCasiEmergenzaPage.jsp - TInoltroComunicazioniPromozionaliPage.jsp - TInserimentoAppuntoPage.jsp - TIntroduzioneCiPage.jsp - TIntroduzioneSistemaPage.jsp - TInvalidSessionPage.jsp
// TLaNaturaPage.jsp - TLaStoriaPage.jsp - TLoginSuccessPage.jsp - TMappaSitoPage.jsp - TModificaStatoRicPrimoLivelloPage.jsp - TModificaStatoRicSecondoLivelloPage.jsp - TNoResultPage.jsp - TNothingAvailablePage.jsp
// TObiettiviPage.jsp - TPasswordDimenticataPage.jsp - TPotenzialiClientiImpPage.jsp - TPotenzialiClientiSistemaPage.jsp - TPrenotazioneEventoPage.jsp - TPrenotazioneOfflinePage.jsp - TPrenotazioneOnlinePage.jsp
// TPreviewCiEventoPage.jsp - TPreviewMinisitoPage.jsp - TPreviewOffertaServizioPage.jsp - TPromotoriPage.jsp - TRegPrimoLivelloPage.jsp - TRegSecondoLivelloPage.jsp 
// TRegViaSuperUtentePrimoLivelloPage.jsp - TRegViaSuperUtenteSecondoLivelloPage.jsp - TReportStatisticoPage.jsp - TRequisitiVisualizzazionePage.jsp - TRespingiRicPage.jsp - TRicercaCiLinksPage.jsp
// TRicercaContributiInformativiPage.jsp - TRicercaMinisitiRicevutiPage.jsp - TRicercaOfferteImpPage.jsp - TRicercaOfferteServizioPage.jsp - TRicercaOfferteSuperPage.jsp - TRisultatiRicercaContributiInformativiPage.jsp
// TSelezioneAmbitiPage.jsp - TSelezioneArgomentiPage.jsp - TSelezioneCiPage.jsp - TSelezioneComuneCiPage.jsp - TSelezioneComuneEntePage.jsp - TSelezioneComuneUtPage.jsp - TSelezioneTipologiaPage.jsp - TSmsEventAlertingPage.jsp 
// TSmsEventAlertingSistemaPage.jsp - TSospendiOffertaPage.jsp - TSospensioneMinisitoPage.jsp - TSuccessButLoginPage.jsp - TSuccessNoMenuPage.jsp - TSuccessPage.jsp - TVisCalendRicPrenotazionePage.jsp - TVisDestinatariSmsPage.jsp
// TVisDestinatariSmsSistemaPage.jsp - TVisNumSmsPage.jsp - TVisPropriCiPage.jsp - TVisRicPrenotazioneByImpPage.jsp - TVisRicPrenotazioniByUserPage.jsp - TVisSmsEventAlertingPage.jsp - TVisualizzaUtentePrimoLivelloPage.jsp 
// TVisualizzaUtenteSecondoLivelloPage.jsp - TVisualizzazioneAppuntoPage.jsp - TVisualizzazioneCiCartinaPage.jsp - TVisualizzazioneCiConoscenzaPage.jsp - TVisualizzazioneCiDocumentoPage.jsp - TVisualizzazioneCiEventoPage.jsp 
// TVisualizzazioneCiInfoEmergenzaPage.jsp - TVisualizzazioneCiInformativaPage.jsp - TVisualizzazioneCiInformazioneEditorialePage.jsp - TVisualizzazioneCiNotiziaPage.jsp - TVisualizzazioneCiPage.jsp - TVisualizzazioneCiRichiestaPage.jsp 
// TVisualizzazioneCiSegnalazionePage.jsp - TVisualizzazioneCiStudioPage.jsp - TVisualizzazioneMinisitoPage.jsp - TVisualizzazioneOffertaServizioPage.jsp - TVisualizzazioneOfferteServizioPage.jsp - TVisualizzazionePrenotazioneEventoPage.jsp 
// TVisualizzazionePrenotazioniEventoPage.jsp - TVisualizzazioneUtentiPage.jsp - TVivereBiologicoPage.jsp - TWelcomePage.jsp
function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr;
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
		x.src=x.oSrc;
}

// GestioneRichiestaPrenotazionePage.jsp
function modifica_click1(me,dataOdierna,inizioPrenotazione,finePrenotazione,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo,alertvar,name){
	if(validateFieldsGRPP(dataOdierna,inizioPrenotazione,finePrenotazione,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.GestioneRichiestaPrenotazioneForm.action = "/orchideaFE/GestioneRichiestaPrenotazioneAction.do?method="+name+"&validation=true";
			document.GestioneRichiestaPrenotazioneForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

// VisPropriCiPage.jsp
function modifica_click(me,name){
	if(isItemSelected()){
		document.CiForm.action = "/orchideaFE/VisPropriCiAction.do?method="+name+"";
		document.CiForm.submit();
	}  
}

//TPreviewOffertaServizioPage.jsp - TVisualizzazioneOffertaServizioPage.jsp
function move_click(me,name){
	document.OffertaServizioForm.action = "/orchideaFE/VisualizzazioneOffertaServizioAction.do?method="+name+"&validation=true";
	document.OffertaServizioForm.submit();
}

// TGestioneCarrelloPage.jsp
function NoDecimali(text){
	var tmp = text.value;
	var dot=tmp.indexOf('.');
	var comma=tmp.indexOf(',');
	if(comma!=-1){
		var interi = tmp.substring(0,comma);
		var decimali = tmp.substring(comma+1);
		if(isInteger(interi)||interi==''){
			alert('Non è consentito inserire decimali in questo campo');
			//text.value = interi;
			return false;
		}else{
			alert('Inserire nel campo selezionato un valore numerico valido');
			//text.value = '';
			return false;
		}
	}
	if(dot!=-1){
		var interi = tmp.substring(0,dot);
		var decimali = tmp.substring(dot+1);
		if(isInteger(interi)||interi==''){
			alert('Non è consentito inserire decimali in questo campo');
			//text.value = interi;
			return false;
		}else{
			alert('Inserire nel campo selezionato un valore numerico valido');
			//text.value = '';
			return false;
		}
	}
	if(dot==-1 && comma==-1){
		if(isInteger(tmp)||tmp==''){
		}else{
			alert('Inserire nel campo selezionato un valore numerico valido');
			//text.value = '';
			return false;
		}
	}
	return true;
}

// VisPropriCiPage.jsp
function noEventSelected(){
	alert("Il contributo selezionato non è un evento");
}

// RespingiRicPage.jsp
function ok_click1(me,name){
	document.RespingiRicForm.action = "/orchideaFE/RespingiRicAction.do?method="+name+"&validation=true";
	document.RespingiRicForm.submit();
}

// SelezioneAmbitiPage.jsp
function ok_click2(me,name){
	me.disabled=true;
	treeSubmit1('');
	unLockParentWindow();
	window.close();
}

// SelezioneArgomentiPage.jsp
function ok_click3(me,name) {
    me.disabled=true;
    treeSubmitSAP('','close');
    unLockParentWindow();
  }


// SelezioneComuneCiPage.jsp
function ok_click4(me,name){
	me.disabled=true;
	var ids = document.SelezioneComuneCiForm.selezione.value;
	window.opener.document.forms[0].action = "/orchideaFE/SelezioneComuneCiAction.do?method="+name+"&ids="+ids;
	window.opener.document.forms[0].submit();
	window.close();
}
  
// SelezioneComuneEntePage.jsp
function ok_click5(me,name){
	me.disabled=true;
	var ids = document.SelezioneComuneEnteForm.selezione.value;
	window.opener.document.forms[0].action = "/orchideaFE/SelezioneComuneEnteAction.do?method="+name+"&ids="+ids;
	window.opener.document.forms[0].submit();
	window.close();
}
  
// SelezioneComuneUtPage.jsp
function ok_click6(me,name){
	me.disabled=true;
	var ids = document.SelezioneComuneUtForm.selezione.value;
	window.opener.document.forms[0].action = "/orchideaFE/SelezioneComuneUtAction.do?method="+name+"&ids="+ids;
	window.opener.document.forms[0].submit();
	window.close();
}
  
// SelezioneTipologiaPage.jsp
function ok_click7(me,name){
	var ids = document.SelezioneTipologiaForm.selezione.value;
	window.opener.document.forms[0].action = "/orchideaFE/SelezioneTipologiaAction.do?method="+name+"&ids="+ids;
	window.opener.document.forms[0].submit();
	window.close();
}
  
// SospendiOffertaPage.jsp
function ok_click8(me,name){
	document.SospendiOffertaForm.action = "/orchideaFE/SospendiOffertaAction.do?method="+name+"&validation=true";
	document.SospendiOffertaForm.submit();
}
  
// SospensioneMinisitoPage.jsp
function ok_click9(me,name){
	document.SospensioneMinisitoForm.action = "/orchideaFE/SospensioneMinisitoAction.do?method="+name+"&validation=true";
	document.SospensioneMinisitoForm.submit();
}

// GestioneCiCommentoPage.jsp
// GestioneCiComunicazionePromozionalePage.jsp
// GestioneCiInfoEmergenzaPage.jsp
function prendiInCarico_click_unified1(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}else{
		return false;
	}
}



// GestioneCiCartinaPage.jsp
// GestioneCiConoscenzaPage.jsp
// GestioneCiInformativaPage.jsp
// GestioneCiRichiestaPage.jsp
// GestioneCiSegnalazionePage.jsp
function prendiInCarico_click_unified(me,alertvar,name){
	if(validateReceivers()){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoForm.action = name;
			document.ContributoInformativoForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// GestioneCiEventoPage.jsp
function prendiInCarico_click5(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
		document.ContributoInformativoEventoForm.submit();
	}else{
		return false;
	}
}
  

  
// GestioneCiStudioPage.jsp
function prendiInCarico_click10(me,alertvar,name){
	if(validateReceivers()){
		if(confirm(alertvar)){
			me.disabled=true;
			document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiStudioAction.do?method="+name+"&validation=true";
			document.ContributoInformativoForm.submit();
		}else{
			return false;
		}
	}
}

// GestioneAgendaPrivataPage.jsp
function prenotaOffline_click(me,name){
	if(isItemSelected()){
		document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true";
		document.GestioneAgendaPrivataForm.submit();
	}  
}

// VisPropriCiPage.jsp
function prenotazioni_click(me,name){
	if(isItemSelected()){
		document.CiForm.action = "/orchideaFE/VisPropriCiAction.do?method="+name+"";
		document.CiForm.submit();
	}  
}

// GestioneMinisitoPage.jsp
function preview_click1(me,myaction,name){
	document.GestioneMinisitoForm.action = "/orchideaFE/"+myaction+".do?method="+name+"&validation=false&saveForm=true";
	document.GestioneMinisitoForm.submit();
	window.open("/orchideaFE/PreviewMinisitoAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}
  
// GestioneOfferteServizioPage.jsp
function preview_click2(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,myaction,name){
	if(validateFields_pern(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
		document.OffertaServizioForm.action = "/orchideaFE/"+myaction+".do?method="+name+"&validation=false&saveForm=true";
		document.OffertaServizioForm.submit();
		window.open("/orchideaFE/PreviewOffertaServizioAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=700,width=780");
	}else return false;
}
  
// GestioneCiEventoPage.jsp
function preview_click(me,titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,myaction,name){
	//controllo prezzo
	var widgColl = document.getElementsByName('tipologiaPagamento');
	var widgColl1 = document.getElementsByName('prezzo');
	if(widgColl!=null && widgColl1!=null && widgColl[1].checked && (widgColl1[0].value==null || widgColl1[0].value.length==0)){
		alert('Inserire prezzo a persona');
		return false;
	}
	if(validateFieldsGCE(titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
		document.ContributoInformativoEventoForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
		document.ContributoInformativoEventoForm.submit();
		window.open("/orchideaFE/PreviewCiEventoAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
		return true;
	}
	return false;
}
  
// ModificaStatoRicPrimoLivelloPage.jsp
// VisualizzaUtentePrimoLivelloPage.jsp
function prosegui_click_unified(me,name){
	document.PrimoLivelloNoPswdForm.action = name;
	document.PrimoLivelloNoPswdForm.submit();
}



// RegDirettaPrimoLivelloPage.jsp
// RegViaSuperUtentePrimoLivelloPage.jsp
function prosegui_click_unified2(me,email,alertvar,name){
	if(validateFieldsEmail(email)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.PrimoLivelloForm.action = name;
			document.PrimoLivelloForm.submit();
		}else{
			return false;
		}
	}
}

// AggPrimoLivelloDatiRegistrazionePage.jsp
function prosegui_clickAPL(me,email,name){
	if(validateFieldsEmail(email)){
		document.PrimoLivelloNoPswdForm.action = "/orchideaFE/AggPrimoLivelloDatiRegistrazioneAction.do?method="+name+"";
		document.PrimoLivelloNoPswdForm.submit();
		return true;
	}
	return false;
}

// GestioneCiInformativaPage.jsp
// GestioneCiSegnalazionePage.jsp
function pseudoGeofererenzia_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}else{
		return false;
	}
}


// GestioneCiEventoPage.jsp
function pubblica_click4(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
		document.ContributoInformativoEventoForm.submit();
	}else{
		return false;
	}
}
  
// GestioneCiCartinaPage.jsp
// GestioneCiConoscenzaPage.jsp
// GestioneCiDocumentoPage.jsp
// GestioneCiInfoEmergenzaPage.jsp
// GestioneCiInformativaPage.jsp
// GestioneCiInformazioneEditorialePage.jsp
// GestioneCiNotiziaPage.jsp
// GestioneCiRichiestaPage.jsp
// GestioneCiSegnalazionePage.jsp
// GestioneCiStudioPage.jsp
function pubblica_click_unified(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.ContributoInformativoForm.action = name;
		document.ContributoInformativoForm.submit();
	}else{
		return false;
	}
}


// GestioneMinisitoPage.jsp
function pubblica_click12(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
		document.GestioneMinisitoForm.submit();
	}else{
		return false;
	}
}
  
// GestioneOfferteServizioPage.jsp
function pubblica_click13(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
		document.OffertaServizioForm.submit();
	}else{
		return false;
	}
}

// ListaSelezioneTipologiePage.jsp
function refresh1(id){
	document.ListaSelezioneTipologieForm.action = "/orchideaFE/ListaSelezioneTipologieAction.do?method=enter&selection="+id+"";
	document.ListaSelezioneTipologieForm.submit();
}
	
// LocalitaOfferteServizioPage.jsp
function refresh2(id){
	document.LocalitaOfferteServizioForm.action = "/orchideaFE/LocalitaOfferteServizioAction.do?method=enter&selection="+id+"";
	document.LocalitaOfferteServizioForm.submit();
}
	
// SelezioneCartinePage.jsp
function refresh3(id){
	document.SelezioneCartineForm.action = "/orchideaFE/SelezioneCartineAction.do?method=enter&selection="+id+"";
	document.SelezioneCartineForm.submit();
}
	
// TipiAziendaOfferteServizioPage.jsp
function refresh4(id){
	document.TipiAziendaOffServForm.action = "/orchideaFE/TipiAziendaOffServAction.do?method=enter&selection="+id+"";
	document.TipiAziendaOffServForm.submit();
}

// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
		document.SecondoLivelloForm.submit();
	}else{
		return false;
	}
}
  
// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_alamm(me,telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria,alertvar,name){
	if(validateFields_alamm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_amm(me,telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale,alertvar,name){
	if(validateFields_amm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_locimp(me,telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,alertvar,name){
	if(validateFields_locimp(telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_med(me,codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento,alertvar,name){
	if(validateFields_med(codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_ornores(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,alertvar,name){
	if(validateFields_ornores(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_potimp(me,codiceFiscale,telefono,cellulare,consenso,numeroDipendenti,alertvar,name){
	if(validateFields_potimp(codiceFiscale,telefono,cellulare,consenso,numeroDipendenti)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_res(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,alertvar,name){
	if(validateFields_res(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_stu(me,codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare,alertvar,name){
	if(validateFields_stu(codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegViaSuperUtenteSecondoLivelloPage.jsp
function registra_click_tur(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante,alertvar,name){
	if(validateFields_tur(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegSecondoLivelloPage.jsp
function registrati_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
		document.SecondoLivelloForm.submit();
    }else{
		return false;
	}
}
  
// RegSecondoLivelloPage.jsp
function registrati_click_alamm(me,telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria,alertvar,name){
	if(validateFields_alamm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegSecondoLivelloPage.jsp
function registrati_click_amm(me,telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale,alertvar,name){
	if(validateFields_amm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegSecondoLivelloPage.jsp
function registrati_click_locimp(me,telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,alertvar,name){
	if(validateFields_locimp(telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegSecondoLivelloPage.jsp
function registrati_click_med(me,codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento,alertvar,name){
	if(validateFields_med(codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegSecondoLivelloPage.jsp
function registrati_click_ornores(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,alertvar,name){
	if(validateFields_ornores(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori)){
	    if(confirm(alertvar)){
	    	me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegSecondoLivelloPage.jsp
function registrati_click_potimp(me,codiceFiscale,telefono,cellulare,consenso,numeroDipendenti,alertvar,name){
	if(validateFields_potimp(codiceFiscale,telefono,cellulare,consenso,numeroDipendenti)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegSecondoLivelloPage.jsp
function registrati_click_res(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,alertvar,name){
	if(validateFields_res(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// RegSecondoLivelloPage.jsp
function registrati_click_stu(me,codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare,alertvar,name){
	if(validateFields_stu(codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}
  
// RegSecondoLivelloPage.jsp
function registrati_click_tur(me,codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante,alertvar,name){
	if(validateFields_tur(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante)){
		if(confirm(alertvar)){
			me.disabled=true;
			document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method="+name+"&validation=true";
			document.SecondoLivelloForm.submit();
		}else{
			return false;
		}
		return true;
	}
	return false;
}

// GestioneRichiestaPrenotazionePage.jsp
function reject_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.GestioneRichiestaPrenotazioneForm.action = "/orchideaFE/GestioneRichiestaPrenotazioneAction.do?method="+name+"&validation=true";
		document.GestioneRichiestaPrenotazioneForm.submit();
	}else{
		return false;
	}
}

// FUNCTION RELOAD() 
// GestioneOfferteServizioPage
 function reload1(){

    document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method=enter";
    document.OffertaServizioForm.submit();
  }

// RegSecondoLivelloPage
 function reload2(){

    document.SecondoLivelloForm.action = "/orchideaFE/RegSecondoLivelloAction.do?method=enter";
    document.SecondoLivelloForm.submit();
  }
  
// RegViaSuperUtenteSecondoLivelloPage 
 function reload3(){

    document.SecondoLivelloForm.action = "/orchideaFE/RegViaSuperUtenteSecondoLivelloAction.do?method=enter";
    document.SecondoLivelloForm.submit();
  }
  
// ReportStatisticoPage 
 function reload4(){

    document.ReportForm.action = "/orchideaFE/ReportStatisticoAction.do?method=enter&fromPageReload=true";
    document.ReportForm.submit();
  }
  
// FUNCTION REMOVECLICK() 
  
// UploadPage 
 function remove_click(me,name){

    document.UploadForm.action = "/orchideaFE/UploadAction.do?method="+name+"&validation=true";
    document.UploadForm.submit();
  }
  
 
// FUNCTION requirearchive_click(me,alertvar,name) 
// GestioneRichiestaPrenotazionePage  
function requirearchive_click(me,alertvar,name){
	if(confirm(alertvar)){
		me.disabled=true;
		document.GestioneRichiestaPrenotazioneForm.action = "/orchideaFE/GestioneRichiestaPrenotazioneAction.do?method="+name+"&validation=true";
		document.GestioneRichiestaPrenotazioneForm.submit();
	}else{
		return false;
	}	
}    


// GestioneCiCommentoPage.jsp 
// GestioneCiComunicazionePromozionalePage 
// GestioneCiConoscenzaPage 
// GestioneCiInfoEmergenzaPage 
// GestioneCiInformativaPage 
// GestioneCiRichiestaPage
// GestioneCiSegnalazionePage 
// GestioneCiStudioPage 

function respingi_click_unified(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.ContributoInformativoForm.action = name;
    document.ContributoInformativoForm.submit();
    }
    else{
      return false;
    }
  }
// GestioneCiEventoPage  

 function respingi_click4(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
	    document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
	    document.ContributoInformativoEventoForm.submit();
    }
    else{
      return false;
    }
  }

 

// GestioneCiInformativaPage 

 function respingi_click6(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiInformativaAction.do?method="+name+"&validation=true";
    document.ContributoInformativoForm.submit();
    }
    else{
      return false;
    }
  }
// GestioneCiRichiestaPage  

function respingi_click7(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiRichiestaAction.do?method="+name+"&validation=true";
    document.ContributoInformativoForm.submit();
    }
    else{
      return false;
    }
  }
// GestioneCiSegnalazionePage 

function respingi_click8(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiSegnalazioneAction.do?method="+name+"&validation=true";
    document.ContributoInformativoForm.submit();
    }
    else{
      return false;
    }
  }
// GestioneCiStudioPage 

function respingi_click9(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiStudioAction.do?method="+name+"&validation=true";
    document.ContributoInformativoForm.submit();
    }
    else{
      return false;
    }
  }

//ModificaStatoRicSecondoLivelloPage.jsp
function respingi_click10(me,name){

    document.SecondoLivelloForm.action = "/orchideaFE/ModificaStatoRicSecondoLivelloAction.do?method="+name+"&validation=true";
    document.SecondoLivelloForm.submit();
  }

// FUNCTION richiediArchiviazione_click(me,alertvar,name) 
// GestioneCiEventoPage 
function richiediArchiviazione_click1(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
	    document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
	    document.ContributoInformativoEventoForm.submit();
    }
    else{
      return false;
    }
  }

// GestioneOfferteServizioPage 

function richiediArchiviazione_click2(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
    document.OffertaServizioForm.submit();
    }
    else{
      return false;
    }
  }
  
// FUNCTION rimuoviSingolo_click(me,alertvar,name) 
// GestioneAgendaPrivataPage
 
 function rimuoviSingolo_click(me,alertvar,name){
    if(isItemSelected()){
      if(confirm(alertvar)){me.disabled=true;
      document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true";
      document.GestioneAgendaPrivataForm.submit();
      }
      else{
        return false;
      }
    }  
  }
  
  
// FUNCTION salva_click(me,alertvar,name) 
// GestioneCiNotiziaPage 
 
 function salva_clickGCNP(me,alertvar,name){
  
	    if(confirm(alertvar)){me.disabled=true;
		    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiNotiziaAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
	    else{
      	return false;
    	}
  }
  
// FUNCTION salva_click(me,dataCreazione,dataUltimoAggiornamento,alertvar,name) 
// GestioneCiCartinaPage 
  
   function salva_clickGCCP(me,dataCreazione,dataUltimoAggiornamento,alertvar,name){
		if(validateFieldsGCP(dataCreazione,dataUltimoAggiornamento)){
	    if(confirm(alertvar)){me.disabled=true;
		    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiCartinaAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoForm.submit();
	    }
	    else{
	      return false;
	    }
	    return true;
	  }
	  return false;
  }
  
// FUNCTION salva_click(me,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,sconto1,sconto2,alertvar,name) 
// GestioneCiEventoPage 
  
  function salva_clickGCE(me,titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,alertvar,name){

		if(validateFieldsGCE(titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
	    if(confirm(alertvar)){me.disabled=true;
		    document.ContributoInformativoEventoForm.action = "/orchideaFE/GestioneCiEventoAction.do?method="+name+"&validation=true";
		    document.ContributoInformativoEventoForm.submit();
	    }
	    else{
	      return false;
	    }
	    return true;
	  }
	  return false;
  }
  
// FUNCTION salva_click_pern(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,sconto1,sconto2,alertvar,name) 
// GestioneOfferteServizioPage 
  
  function salva_click_pern(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,alertvar,name){
		if(validateFields_pern(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2)){
	    if(confirm(alertvar)){me.disabled=true;
		    document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
		    document.OffertaServizioForm.submit();
	    }
	    else{
	      return false;
	    }
	    return false;
	  }
	  return false;
  }
  
// FUNCTION salva_click_vend(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,sconto1,sconto2,anticipoPrenotazione,alertvar,name) 
// GestioneOfferteServizioPage

 
  function salva_click_vend(me,telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione,alertvar,name){
		if(validateFields_vend(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione)){
	    if(confirm(alertvar)){me.disabled=true;
		    document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
		    document.OffertaServizioForm.submit();
	    }
	    else{
	      return false;
	    }
	    return false;
	  }
	  return false;
  }
  
// FUNCTION salvaModifiche_click(me,alertvar,name) 
// GestioneMinisitoPage
  
  function salvaModifiche_click(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
    document.GestioneMinisitoForm.submit();
    }
    else{
      return false;
    }
  }
  
// FUNCTION selezione_ambiti_click(me,myaction,name) 
// RegDirettaPrimoLivelloPage 
// RegPrimoLivelloPage 
// RegViaSuperUtentePrimoLivelloPage 
 
  function selezione_ambiti_click1(me,myaction,name){
    document.PrimoLivelloForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.PrimoLivelloForm.submit();
    window.open("/orchideaFE/SelezioneAmbitiAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
  }
  
  
// AggPrimoLivelloDatiRegistrazionePage
// ModificaStatoRicPrimoLivelloPage   
// VisualizzaUtentePrimoLivelloPage
  
function selezione_ambiti_click2(me,myaction,name){
	document.PrimoLivelloNoPswdForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.PrimoLivelloNoPswdForm.submit();
    window.open("/orchideaFE/SelezioneAmbitiAction.do?method=enter", (new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}	
  
// FUNCTION selezioneArgomenti_click(me,myaction,name) 
// GestioneCiCartinaPage 
// GestioneCiCommentoPage 
// GestioneCiComunicazionePromozionalePage 
// GestioneCiConoscenzaPage 
// GestioneCiDocumentoPage 
// GestioneCiInfoEmergenzaPage 
// GestioneCiInformativaPage 
// GestioneCiInformazioneEditorialePage
// GestioneCiNotiziaPage 
// GestioneCiRichiestaPage
// GestioneCiSegnalazionePage
// GestioneCiStudioPage 
 
 function selezioneArgomenti_click(me,myaction,name){

    document.ContributoInformativoForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.ContributoInformativoForm.submit();
    window.open("/orchideaFE/SelezioneArgomentiAction.do?method=enter",
                (new Date()).getTime(),
                "toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
  }
  

// RegDirettaPrimoLivelloPage 
// RegPrimoLivelloPage 
// RegViaSuperUtentePrimoLivelloPage

function selezioneComune_click1(me,myaction,name){
	document.PrimoLivelloForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
	document.PrimoLivelloForm.submit();
	window.open("/orchideaFE/SelezioneComuneUtAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}


// GestioneCiEventoPage 

function selezioneComune_click2(me,myaction,name){

    document.ContributoInformativoEventoForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.ContributoInformativoEventoForm.submit();
    window.open("/orchideaFE/SelezioneComuneCiAction.do?method=enter",
                (new Date()).getTime(), "toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}


// AggPrimoLivelloDatiRegistrazionePage

function selezioneComune_click3(me,myaction,name){
	document.PrimoLivelloNoPswdForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
	document.PrimoLivelloNoPswdForm.submit();
	window.open("/orchideaFE/SelezioneComuneUtAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}


// RegSecondoLivelloResidentePage
// RegSecondoLivelloOriginarioNonResidentePage 

function selezioneComune_click4(me,myaction,name){

    document.SecondoLivelloForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.SecondoLivelloForm.submit();
    window.open("/orchideaFE/SelezioneComuneUtAction.do?method=enter",
                (new Date()).getTime(),
                "toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}
  
// FUNCTION selezioneComuneEnte_click(me,myaction,name) 
// RegSecondoLivelloAltroAmministratorePage 
// RegSecondoLivelloAmministratoreComunalePage 
// RegSecondoLivelloStudiosoPage 
// RegSecondoLivelloTuristaPage 

function selezioneComuneEnte_click(me,myaction,name){

    document.SecondoLivelloForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.SecondoLivelloForm.submit();
    window.open("/orchideaFE/SelezioneComuneEnteAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
  }


// FUNCTION selezioneInteressi_click(me,myaction,name) 
// VisualizzaUtentePrimoLivelloPage 

function selezioneInteressi_click(me,myaction,name){

    document.PrimoLivelloNoPswdForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.PrimoLivelloNoPswdForm.submit();
    window.open("/orchideaFE/SelezioneAmbitiAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
  }
  
// FUNCTION selezioneTipologia_click(me,myaction,name)
// GestioneCiRichiestaPage 
  
  function selezioneTipologia_click(me,myaction,name){
    document.ContributoInformativoForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
    document.ContributoInformativoForm.submit();
    window.open("/orchideaFE/SelezioneTipologiaAction.do?method=enter",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
  }
  
// FUNCTION send_click(me,dataOdierna,inizioPrenotazione,finePrenotazione,inizioOfferta,fineOfferta,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo,alertvar,name) 
// GestioneRichiestaPrenotazionePage 
  
  function send_click(me,dataOdierna,inizioPrenotazione,finePrenotazione,inizioOfferta,fineOfferta,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo,alertvar,name){
		if(validateFields_send(dataOdierna,inizioPrenotazione,finePrenotazione,inizioOfferta,fineOfferta,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo)){
		if(confirm(alertvar)){me.disabled=true;
			document.GestioneRichiestaPrenotazioneForm.action = "/orchideaFE/GestioneRichiestaPrenotazioneAction.do?method="+name+"&validation=true";
			document.GestioneRichiestaPrenotazioneForm.submit();
		}
		else{
			return false;
		}
		return true;
	}
	return false;
}

// FUNCTION sospendi_click(me,alertvar,name) 
// GestioneMinisitoPage 

function sospendi_click1(me,alertvar,name){
    if(confirm(alertvar)){me.disabled=true;
    document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
    document.GestioneMinisitoForm.submit();
    }
    else{
      return false;
    }
  }
  
//GestioneOfferteServizioPage 

function sospendi_click2(me,alertvar,name){
    if(confirm(alertvar)){me.disabled=true;
    document.OffertaServizioForm.action = "/orchideaFE/GestioneOfferteServizioAction.do?method="+name+"&validation=true";
    document.OffertaServizioForm.submit();
    }
    else{
      return false;
    }
  }
  

//ModificaStatoRicSecondoLivelloPage
function sospendi_click3(me,name){

    document.SecondoLivelloForm.action = "/orchideaFE/ModificaStatoRicSecondoLivelloAction.do?method="+name+"&validation=true";
    document.SecondoLivelloForm.submit();
  }  
  
// FUNCTION stripCharsInBag(s, bag) 
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage 
// GestioneAgendaPrivataPage 
// GestioneCiCartinaPage 
// GestioneCiConoscenzaPage
// GestioneCiEventoPage 
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage 
// GestioneCiStudioPage 
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// HomePage 
// InserimentoAppuntoPage
// PasswordDimenticataPage
// PPCAgendaPubblicaPage 
// PrenotazioneEventoPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage 
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage 
// RegViaSuperUtenteSecondoLivelloPage 
// TGestioneAgendaPubblicaPage 
// TRicercaOfferteServizioPage 
// TVisualizzazioneCiEventoPage 
// TVisualizzazioneMinisitoPage 
// TVisualizzazioneOffertaServizioPage
  
  function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

// FUNCTION svuotaAgenda_click() 
// TGestioneAgendaPrivataPage 

function svuotaAgenda_click(){
    if(confirm('Confermi l\'azione?')){
    	location.href = "/orchideaFE/GestioneAgendaPrivataAction.do?method=Svuota";
    }
    else{
      return false;
    }
  }
  
// FUNCTION syncList(check)
// SmsEventAlertingPage 
// SmsEventAlertingSistemaPage 
 
 function syncList(check){
   	var sel = document.SmsEventAlertingForm.selezione.value
  	var id = '|'+check.value+'|'
  	if(sel.indexOf(id)!=-1){
  		sel = replaceAll(sel,id,'')
  		document.SmsEventAlertingForm.selezione.value = sel
  	}
  	else
  		document.SmsEventAlertingForm.selezione.value = sel + id
  }
  
// FUNCTION syncListaMultipla(formField, lista, count) 
// AreaStampaPage 
// ComuneInformaPage
// ConsultaComStampaPage
// ElencoNotiziePercorsoPage
// GestioneAgendaPrivataPage
// GestioneRicUtentePage 
// GuidaElettronicaPage 
// InfoCasiEmergenzaPage 
// InoltroComunicazioniPromozionaliPage 
// PotenzialiClientiImpPage 
// PotenzialiClientiSistemaPage
// ReportStatisticoPage2 
// RicercaMinisitiRicevutiPage 
// RicercaOfferteImpPage 
// RicercaOfferteSuperPage
// RisultatiRicercaContributiInformativiPage
// SelezioneComuneCiPage 
// SelezioneComuneEntePage
// SelezioneComuneUtPage 
// SelezioneTipologiaPage
// SmsEventAlertingPage 
// VisCalendRicPrenotazionePage
// VisDestinatariPage 
// VisPropriCiPage 
// VisRicPrenotazioneByImpPage 
// VisRicPrenotazioniByUserPage
// VisSmsEventAlertingPage 
// VisualizzazioneCiPage 
// VisualizzazionePrenotazioniEventoPage
// VisualizzazioneUtentiPage 

function syncListaMultipla(formField, lista, count){
    document.getElementById(lista).value = "";
    for (i = 0; i < count.value; i++){
      if(document.getElementById(lista+"_"+i)!=null){
        if(document.getElementById(lista+"_"+i).checked)document.getElementById(lista).value=document.getElementById(lista).value + "|" + document.getElementById(lista+"id_" + i).value + "|";
      }
    }
    formField.value = document.getElementById(lista).value;
  }
  
  
// FUNCTION syncListaSingola(formField, lista, count, index) 
// AreaStampaPage 
// ComuneInformaPage 
// ConsultaComStampaPage 
// ElencoNotiziePercorsoPage 
// GestioneAgendaPrivataPage 
// GestioneRicUtentePage 
// GuidaElettronicaPage 
// InfoCasiEmergenzaPage 
// InoltroComunicazioniPromozionaliPage 
// PotenzialiClientiImpPage 
// PotenzialiClientiSistemaPage 
// ReportStatisticoPage2 
// RicercaMinisitiRicevutiPage 
// RicercaOfferteImpPage  
// RicercaOfferteSuperPage 
// RisultatiRicercaContributiInformativiPage 
// SelezioneComuneCiPage 
// SelezioneComuneEntePage 
// SelezioneComuneUtPage 
// SelezioneTipologiaPage 
// SmsEventAlertingPage 
// VisCalendRicPrenotazionePage 
// VisDestinatariPage 
// VisPropriCiPage 
// VisRicPrenotazioneByImpPage 
// VisRicPrenotazioniByUserPage 
// VisSmsEventAlertingPage 
// VisualizzazioneCiPage 
// VisualizzazionePrenotazioniEventoPage 
// VisualizzazioneUtentiPage 
 
   function syncListaSingola(formField, lista, count, index){

    document.getElementById(lista).value = "";
    for (i = 0; i < count.value; i++){
      if(document.getElementById(lista+"_"+i)!=null){
        if(i==index && document.getElementById(lista+"_"+i).checked)document.getElementById(lista).value=document.getElementById(lista).value + "|" + document.getElementById(lista+"id_" + i).value + "|";
        else document.getElementById(lista+"_"+i).checked=false;
      }
    }
    formField.value = document.getElementById(lista).value;
	}
	
	
// FUNCTION syncTree(index) 
// SelezioneAmbitiPage 
// SelezioneArgomentiPage 
// SelezioneCiPage 

function syncTree1(index){
    var selez = document.getElementById("myselezione").value;
    if(document.getElementById(index).checked){
      if(selez.indexOf(index)==-1)selez=selez+index;
    }
    else{
      while(selez.indexOf(index)!=-1)selez=selez.substring(0,selez.indexOf(index))+selez.substring(selez.indexOf(index)+index.length);
    }
    var coll = document.getElementsByName("chk");
    var temp="";
    if (coll!=null){
      for (i=0; i<coll.length; i++) {
        if(coll.item(i).id!=null){
          temp = coll.item(i).id;
          if(document.getElementById(index).checked && (selez.indexOf(temp)!=-1 || index.indexOf(temp)!=-1 || temp.indexOf(index)!=-1)){
            coll.item(i).checked=true;
            if(selez.indexOf(temp)==-1)selez=selez+temp;
          }
          else if(!document.getElementById(index).checked && temp.indexOf(index)!=-1){
            coll.item(i).checked=false;
            if(selez.indexOf(temp)!=-1)selez=selez.substring(0,selez.indexOf(temp))+selez.substring(selez.indexOf(temp)+temp.length);
          }
          else if(!document.getElementById(index).checked && index.indexOf(temp)!=-1 && selez.indexOf(temp)==-1){
            coll.item(i).checked=false;
            if(selez.indexOf(temp)!=-1)selez=selez.substring(0,selez.indexOf(temp))+selez.substring(selez.indexOf(temp)+temp.length);
          }
        }
      }
    }
    document.getElementById("myselezione").value=selez;
    //treeSubmit("");
  }
  
    
  
  
// TreeSelezioneArgomentiPage.jsp  
function syncTree2(index){
	var selez = document.getElementById("myselezione").value;
	if(document.getElementById(index).checked){
		if(selez.indexOf(index)==-1)selez=selez+index;
	}else{
		if(selez.indexOf(index)!=-1)
			selez=selez.substring(0,selez.indexOf(index))+selez.substring(selez.indexOf(index)+index.length);
    }
	var coll = document.getElementsByName("chk");
	var temp="";
    if (coll!=null){
      for (i=0; i<coll.length; i++) {
        if(coll.item(i).id!=null){
          temp = coll.item(i).id;
          if(document.getElementById(index).checked && (selez.indexOf(temp)!=-1 || index.indexOf(temp)!=-1 || temp.indexOf(index)!=-1)){
            coll.item(i).checked=true;
            if(selez.indexOf(temp)==-1)selez=selez+temp;
          }
          else if(!document.getElementById(index).checked && temp.indexOf(index)!=-1){
            coll.item(i).checked=false;
            if(selez.indexOf(temp)!=-1)selez=selez.substring(0,selez.indexOf(temp))+selez.substring(selez.indexOf(temp)+temp.length);
          }
          else if(!document.getElementById(index).checked && index.indexOf(temp)!=-1 && selez.indexOf(temp)==-1){
            coll.item(i).checked=false;
            if(selez.indexOf(temp)!=-1)selez=selez.substring(0,selez.indexOf(temp))+selez.substring(selez.indexOf(temp)+temp.length);
          }
        }
      }
    }
	document.getElementById("myselezione").value=selez;
	treeSubmit3("");
}
  
  
  function syncTree3(index){
    var selez = document.getElementById("myselezione").value;
    if(document.getElementById(index).checked){
      if(selez.indexOf(index)==-1)selez=selez+index;
    }
    else{
      if(selez.indexOf(index)!=-1)selez=selez.substring(0,selez.indexOf(index))+selez.substring(selez.indexOf(index)+index.length);
    }
    var coll = document.getElementsByName("chk");
    var temp="";
    if (coll!=null){
      for (i=0; i<coll.length; i++) {
        if(coll.item(i).id!=null){
          temp = coll.item(i).id;
          if(document.getElementById(index).checked && (selez.indexOf(temp)!=-1 || index.indexOf(temp)!=-1 || temp.indexOf(index)!=-1)){
            coll.item(i).checked=true;
            if(selez.indexOf(temp)==-1)selez=selez+temp;
          }
          else if(!document.getElementById(index).checked && temp.indexOf(index)!=-1){
            coll.item(i).checked=false;
            if(selez.indexOf(temp)!=-1)selez=selez.substring(0,selez.indexOf(temp))+selez.substring(selez.indexOf(temp)+temp.length);
          }
          else if(!document.getElementById(index).checked && index.indexOf(temp)!=-1 && selez.indexOf(temp)==-1){
            coll.item(i).checked=false;
            if(selez.indexOf(temp)!=-1)selez=selez.substring(0,selez.indexOf(temp))+selez.substring(selez.indexOf(temp)+temp.length);
          }
        }
      }
    }
    document.getElementById("myselezione").value=selez;
    treeSubmit2("");
  }
  
  
  
  // FUNCTION tabok_click(me,telefonoOrganizzazione,emailOrganizzazione,name) 
  // GestioneCiInfoEmergenzaPage 
  
  function tabok_click(me,telefonoOrganizzazione,emailOrganizzazione,name){
		
		if(validateFieldsGCEP(telefonoOrganizzazione,emailOrganizzazione)){
	    document.ContributoInformativoForm.action = "/orchideaFE/GestioneCiInfoEmergenzaAction.do?method="+name+"&validation=false";
	    document.ContributoInformativoForm.submit();
	    return true;
	  }
	  return false;
	}
	
	// FUNCTION torna_click(me,name) 
// VisualizzaUtentePrimoLivelloPage 

function torna_click1(me,name){

    document.PrimoLivelloNoPswdForm.action = "/orchideaFE/VisualizzaUtentePrimoLivelloAction.do?method="+name+"";
    document.PrimoLivelloNoPswdForm.submit();
  }

// VisualizzaUtenteSecondoLivelloPage 

function torna_click2(me,name){

    document.SecondoLivelloForm.action = "/orchideaFE/VisualizzaUtenteSecondoLivelloAction.do?method="+name+"&validation=true";
    document.SecondoLivelloForm.submit();
  }	
  
  // FUNCTION tornaRicerca_click(me,name) 
  // VisualizzazioneCiPage 
  
  function tornaRicerca_click(me,name){

    document.CiForm.action = "/orchideaFE/VisualizzazioneCiAction.do?method="+name+"&validation=true&idpadre=797";
    document.CiForm.submit();
  }
  
  // FUNCTION treeSubmit(index) 
// SelezioneAmbitiPage 

function treeSubmit1(index){
    document.getElementById("close_window_hid").value = 'NO';
    getScrollPosition();
    document.getElementById("nodo").value = index;
    document.forms[0].action = "/orchideaFE/SelezioneAmbitiAction.do?method=enter";
    document.forms[0].submit();
  }
  
// SelezioneCiPage 
  
  function treeSubmit2(index){
    getScrollPosition();
    document.getElementById("nodo").value = index;
    document.forms[0].action = "/orchideaFE/SelezioneCiAction.do?method=enter";
    document.forms[0].submit();
  }
  
// TreeSelezioneArgomentiPage 

  function treeSubmit3(index){
    getScrollPosition();
    document.getElementById("nodo").value = index;
    document.forms[0].action = "/orchideaFE/TreeSelezioneArgomentiAction.do?method=enter";
    document.forms[0].submit();
  }
  
// FUNCTION treeSubmit(index,close) 
// SelezioneArgomentiPage 
  
  function treeSubmitSAP(index,close){
    document.getElementById("close_window_hid").value = 'NO';
    getScrollPosition();
    document.getElementById("nodo").value = index;
    if(close!=null)
    	document.forms[0].action = "/orchideaFE/SelezioneArgomentiAction.do?method=enter&close=true";
    else
    	document.forms[0].action = "/orchideaFE/SelezioneArgomentiAction.do?method=enter";
    document.forms[0].submit();
  }
  
  // FUNCTION unLockParentWindow() 
// SelezioneAmbitiPage 
// SelezioneArgomentiPage 
// SelezioneComuneCiPage 
// SelezioneComuneEntePage 
// SelezioneComuneUtPage 

 function unLockParentWindow(){
     if(collWidgetDisabled!=null){
       for(var i=0; i<collWidgetDisabled.length; i++){
         if(collWidgetDisabled[i].disabled!=null){
           collWidgetDisabled[i].disabled=false;
         }
       }
     }
  }
  
     
  // FUNCTION unmodifiable() 
  // VisPropriCiPage 
  
  function unmodifiable(){
    alert("Il contributo selezionato non è modificabile");
  }


// FUNCTION upload_click(me,name) 
// UploadPage 

function upload_click(me,name){

    document.UploadForm.action = "/orchideaFE/UploadAction.do?method="+name+"&validation=true";
    document.UploadForm.submit();
  }
  
  // FUNCTION vai_click(me,data1,data2,name) 
// HomePage 


function vai_clickHOME(me,data1,data2,name){
		if(ValidateSeq1(data1,data2)){
		//alert(name+" sei qui");
	    document.HomeForm.action = "/orchideaFE/HomeAction.do?method="+name+"&validation=true";
	    document.HomeForm.submit();
    }
	}
	
// TGestioneAgendaPubblicaPage 

function vai_clickAP(me,data1,data2,name){
	if(ValidateSeq1(data1,data2)){
	    //document.GestioneAgendaPubblicaForm.action = "/orchideaFE/GestioneAgendaPubblicaAction.do?method="+name+"&validation=true";
	    document.AreaInfoPubblicaForm.action = "/orchideaFE/AreaEventiAction.do?method=enter&validation=true&fromDate="+data1+"&toDate="+data2+"&idpadre=677";
	    document.AreaInfoPubblicaForm.submit();
	}else{
		document.AreaInfoPubblicaForm.action = "/orchideaFE/AreaEventiAction.do?method=enter&validation=true&&idpadre=677";
	    document.AreaInfoPubblicaForm.submit();
	}
}
// TRicercaOfferteServizioPage 

function vai_clickOS(me,data1,data2,name){
		if(ValidateSeq1(data1,data2)){
	    document.RicercaOfferteForm.action = "/orchideaFE/GestioneAgendaPubblicaAction.do?method="+name+"&validation=true";
	    document.RicercaOfferteForm.submit();
	  }
	}
// TVisualizzazioneCiEventoPage 

function vai_click4(me,data1,data2,name){
		if(ValidateSeq1(data1,data2)){
	    document.VisContributoInformativoForm.action = "/orchideaFE/VisualizzazioneCiEventoAction.do?method="+name+"&validation=true";
	    document.VisContributoInformativoForm.submit();
	  }
	}
// TVisualizzazioneMinisitoPage 

function vai_click5(me,data1,data2,name){
		if(ValidateSeq1(data1,data2)){
	    document.GestioneMinisitoForm.action = "/orchideaFE/VisualizzazioneMinisitoAction.do?method="+name+"&validation=true";
	    document.GestioneMinisitoForm.submit();
	  }
	}
// TVisualizzazioneOffertaServizioPage 

function vai_click6(me,data1,data2,name){
		if(ValidateSeq1(data1,data2)){
	    document.OffertaServizioForm.action = "/orchideaFE/VisualizzazioneOffertaServizioAction.do?method="+name+"&validation=true";
	    document.OffertaServizioForm.submit();
	  }
	}
	
	// FUNCTION vai_click(me,name) 
//PPCMarketingPage
function vai_click1(me,name){

    document.PPCMarketingForm.action = "/orchideaFE/PPCMarketingAction.do?method="+name+"&validation=true";
    document.PPCMarketingForm.submit();
  }
  
// TPreviewCiEventoPage
function vai_click2(me,name){

    document.VisContributoInformativoForm.action = "/orchideaFE/VisualizzazioneCiEventoAction.do?method="+name+"&validation=true";
    document.VisContributoInformativoForm.submit();
	}

// TPreviewMinisitoPage
function vai_click3(me,name){

    document.GestioneMinisitoForm.action = "/orchideaFE/VisualizzazioneMinisitoAction.do?method="+name+"&validation=true";
    document.GestioneMinisitoForm.submit();
	}
// TPreviewOffertaServizioPage
function vai_clickPOS(me,name){

    document.OffertaServizioForm.action = "/orchideaFE/VisualizzazioneOffertaServizioAction.do?method="+name+"&validation=true";
    document.OffertaServizioForm.submit();
	}
	
// FUNCTION vai_click(me,text,name)

// 	GestioneAgendaPrivataPage

function vai_clickGAP(me,text,name){
		if(ValidateDateGAP(text)){
		  document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true&idpadre=795";
		  document.GestioneAgendaPrivataForm.submit();
		}
  }
  
  
// FUNCTION ValidateCf(text)
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiEventoPage
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage
// GestioneCiStudioPage
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PasswordDimenticataPage
// PrenotazioneEventoPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function ValidateCf(text){
	if(text.value!=''){
		if (isCf(text)==false){
			text.focus()
			return false;
		}
	}
	return true;
}

//FUNCTION validateData(concordato,qta,qtaMax,tipoofferta,numeroGiorni,numeroGiorniMax)
// TGestioneCarrelloPage

function validateData(concordato,qta,qtaMax,tipoofferta,numeroGiorni,numeroGiorniMax){

	var chkOnQta
	var chkOnNumeroGiorni
		
    if(qta.value == ''){
	    alert('Inserire nel campo selezionato un valore numerico valido')
			qta.focus()
      return false;
    }
    if(concordato.value == ''){
	    alert('Inserire nel campo selezionato un valore numerico valido')
			concordato.focus()
      return false;
    }
    if(numeroGiorni.value == ''){
	    alert('Inserire nel campo selezionato un valore numerico valido')
			numeroGiorni.focus()
      return false;
    }

	if(tipoofferta.value == 'Vendita prodotti'){
		if(isNumber(qta.value)){
			chkOnQta = true && chkThreshold(qta,qtaMax)
		}
		else{
			chkOnQta = false
			alert('Inserire nel campo selezionato un valore numerico valido')
			qta.focus()
		}
		chkOnNumeroGiorni = true
		numeroGiorni.value = 'N.A.'
	}
	else{
		chkOnQta = chkNumberNoDecimali(qta) && chkThreshold(qta,qtaMax)
		if(chkOnQta) chkOnNumeroGiorni = chkNumberNoDecimali(numeroGiorni) && chkThreshold(numeroGiorni,numeroGiorniMax)
	}

	if(chkOnQta){
		if(chkOnNumeroGiorni){
			if(chkNumberDecimali(concordato)){
				return true;
			}
			else return false;
		}
		else return false;
	}
	else return false;
}

// FUNCTION ValidateDate(value)
// HomePage
// TGestioneAgendaPubblicaPage
// TRicercaOfferteServizioPage
// TVisualizzazioneCiEventoPage
// TVisualizzazioneMinisitoPage
// TVisualizzazioneOffertaServizioPage

function ValidateDate(text){
		if(text.value!='' && text.value!='gg/mm/aaaa'){
			if (isDate1(text)==false){
				text.focus()
				return false;
			}
			return true;
		}
		return true;
	}

// FUNCTION ValidateDate(text)
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage
// InserimentoAppuntoPage
// PasswordDimenticataPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

/*
function ValidateDate1(text){
	if(text.value!=''){
		if (isDate1(text)==false){
			text.focus()
			return false;
		}
	}
	return true;
}
*/

// GestioneAgendaPrivataPage
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiEventoPage
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage
// GestioneCiStudioPage
// GestioneRichiestaPrenotazionePage
// PrenotazioneEventoPage

function ValidateDate2(text){
		if(text.value!='' && text.value!='gg/mm/aaaa'){
			if (isDate2(text.value)==false){
				text.focus()
				return false;
			}
			return true;
		}
		return true;
	}

// GestioneOfferteServizioPage	
	
function ValidateDateObbligatoria(text){
		if(text.value!='' && text.value!='gg/mm/aaaa'){
			if (isDate2(text.value)==false){
				text.focus()
				return false;
			}
			return true;
		}
		alert("Inserire una data valida");
		text.focus()
		return false;
	}
	
// FUNCTION validateDistricts()
// GestioneCiSegnalazionePage

function validateDistricts(){
  	if(document.ContributoInformativoForm.comunePertinenza1 !=null &&
  			document.ContributoInformativoForm.comunePertinenza1.checked ||
  			document.ContributoInformativoForm.comunePertinenza2.checked ||
  			document.ContributoInformativoForm.comunePertinenza3.checked)
  		return true
  	else alert('Selezionare almeno un comune di pertinenza')
  	return false
  }
  
// FUNCTION ValidateEmail(text)
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiEventoPage
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage
// GestioneCiStudioPage
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PasswordDimenticataPage
// PrenotazioneEventoPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function ValidateEmail(text){
		if(text.value!=''){
			if (isEmail(text)==false){
				text.focus()
				return false;
			}
		}
		return true;
	}
  
// FUNCTION validateFields(dataCreazione,dataUltimoAggiornamento)
// GestioneCiCartinaPage

function validateFieldsGCP(dataCreazione,dataUltimoAggiornamento){
		if(ValidateDate(dataCreazione))
			if(ValidateDate(dataUltimoAggiornamento))
				if(ValidateSeq2(dataCreazione,dataUltimoAggiornamento))
					return true;
		return false;
	}
	
// FUNCTION validateFields(dataOdierna,inizioPrenotazione,finePrenotazione,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo)
// GestioneRichiestaPrenotazionePage

function validateFieldsGRPP(dataOdierna,inizioPrenotazione,finePrenotazione,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo){

		if(inizioPrenotazione.value!='' && inizioPrenotazione.value!='gg/mm/aaaa'){
			if(finePrenotazione.value!='' && finePrenotazione.value!='gg/mm/aaaa'){
				if(ValidateSeqToday(dataOdierna,inizioPrenotazione))
				if(ValidateSeq2(inizioPrenotazione,finePrenotazione))
				if(isIntegerNotify(numeroPersone))
				if(ValidatePhone(telefono))
				if(ValidatePhone(cellulare))
 			  if(ValidateEmail(email))
				if(ValidateCf(codiceFiscale))
				if(ValidatePiva(partitaIvaAgenzia))
				if(ValidatePhone(telefonoAgenzia))
			  if(ValidatePhone(cellulareAgenzia))
				if(ValidateEmail(emailTitolare))
				if(ValidatePhone(telefonoCapogruppo))
				if(ValidatePhone(cellulareCapogruppo))
				if(checkEtaGruppo(etaGruppo))
				return true;
			}
			else{
				finePrenotazione.focus()
				alert('Il campo deve essere valorizzato per poter effettuare la prenotazione')
			}
		}
		  else{
			  inizioPrenotazione.focus()
			  alert('Il campo deve essere valorizzato per poter effettuare la prenotazione')
		}
		    return false
	}

// AggPrimoLivelloDatiRegistrazionePage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// PasswordDimenticataPage.jsp
function validateFieldsEmail(email){
	if(ValidateEmail(email))
		return true;

	  return false;
}


// FUNCTION validateFields(prezzo)
// GestioneCiInformativaPage

function validateFieldsPrezzo(prezzo){
		if(isNumberNotify(prezzo))
			return true;
		  return false;
	}
	
// FUNCTION validateFields(prezzo,annoPubblicazione,isbn)
// GestioneCiStudioPage

function validateFieldsGCSP(prezzo,annoPubblicazione,isbn){
		if(isNumberNotify(prezzo))
			if(ValidateYear(annoPubblicazione))
				if(ValidateIsbn(isbn))
					return true;
		      return false;
	}
	
// FUNCTION validateFields(prezzo,dataIntervista)
// GestioneCiConoscenzaPage

function validateFieldsGCCP(prezzo,dataIntervista){
		if(isNumberNotify(prezzo))
			if(ValidateDate(dataIntervista))
				return true;
		    return false;
	}
	
// FUNCTION validateFields(telefonoOrganizzazione,emailOrganizzazione)
// GestioneCiInfoEmergenzaPage

function validateFieldsGCEP(telefonoOrganizzazione,emailOrganizzazione){
		if(ValidatePhone(telefonoOrganizzazione))
			if(ValidateEmail(emailOrganizzazione))
				return true;
		    return false;
	}
	
// FUNCTION validateFields(telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,sconto1,sconto2)
// GestioneCiEventoPage

function validateFieldsGCE(titolo,telefonoOrganizzatore,faxOrganizzatore,giornoEvento1,giornoEvento2,giornoEvento3,giornoEvento4,oraInizioEvento1,oraInizioEvento2,oraInizioEvento3,oraInizioEvento4,oraFineEvento1,oraFineEvento2,oraFineEvento3,oraFineEvento4,numeroPostiPrenotabili1,numeroPostiPrenotabili2,numeroPostiPrenotabili3,numeroPostiPrenotabili4,prezzo,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2){

		if(isNotVoid(titolo))
		if(ValidatePhone(telefonoOrganizzatore))
		if(ValidatePhone(faxOrganizzatore))
		if(ValidateDateObbligatoria(giornoEvento1))
		if(ValidateDate(giornoEvento2))
		if(ValidateDate(giornoEvento3))
		if(ValidateDate(giornoEvento4))
		if(ValidateTimeObbligatorio(oraInizioEvento1))
		if(ValidateTime1(oraInizioEvento2))
		if(ValidateTime1(oraInizioEvento3))
		if(ValidateTime1(oraInizioEvento4))
		if(ValidateTimeObbligatorio(oraFineEvento1))
		if(ValidateTime1(oraFineEvento2))
		if(ValidateTime1(oraFineEvento3))
		if(ValidateTime1(oraFineEvento4))
		if(areOrderedTimes(oraInizioEvento1,oraFineEvento1))
		if(isNotVoid(numeroPostiPrenotabili1))
		if(isIntegerNotify(numeroPostiPrenotabili1))
		if(isIntegerNotify(numeroPostiPrenotabili2))
		if(isIntegerNotify(numeroPostiPrenotabili3))
		if(isIntegerNotify(numeroPostiPrenotabili4))
		if(ValidatePercentage2(sconto1,tipologiaSconto1))
		if(ValidatePercentage2(sconto2,tipologiaSconto2))
		if(isEuro(prezzo))
		return true;
    return false;
	}
	
// FUNCTION validateFields_alamm
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_alamm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoTitolare,emailTitolare,telefonoSegreteria,emailSegreteria,faxSegreteria){
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ValidatePhone(telefonoUfficio))
		if(ValidateEmail(emailUfficio))
		if(ValidatePhone(telefonoTitolare))
		if(ValidateEmail(emailTitolare))
		if(ValidatePhone(telefonoSegreteria))
		if(ValidateEmail(emailSegreteria))
		if(ValidatePhone(faxSegreteria))
		return true;
		return false;
	}
	
// FUNCTION validateFields_amm
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_amm(telefono,cellulare,telefonoUfficio,emailUfficio,telefonoSindaco,emailSindaco,telefonoSegreteria,emailSegreteria,faxSegreteria,telefonoUfficioTecnico,emailUfficioTecnico,telefonoPoliziaLocale,emailPoliziaLocale){
			if(ValidatePhone(telefono))
			if(ValidatePhone(cellulare))
			if(ValidatePhone(telefonoUfficio))
			if(ValidateEmail(emailUfficio))
			if(ValidatePhone(telefonoSindaco))
			if(ValidateEmail(emailSindaco))
			if(ValidatePhone(telefonoSegreteria))
			if(ValidateEmail(emailSegreteria))
			if(ValidatePhone(faxSegreteria))
			if(ValidatePhone(telefonoUfficioTecnico))
			if(ValidateEmail(emailUfficioTecnico))
			if(ValidatePhone(telefonoPoliziaLocale))
			if(ValidateEmail(emailPoliziaLocale))
			return true;
		  return false;
	}
	
// FUNCTION validateFields_locimp
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_locimp(telefono,cellulare,consenso,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare){
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ConsensoAndCellulare(consenso,cellulare))
		if(ValidatePiva(partitaIVAEnte))
		if(ValidateCf(codiceFiscaleEnte))
		if(ValidatePhone(telefonoEnte))
		if(ValidatePhone(cellulareEnte))
		if(ValidateEmail(emailTitolare))
		return true;
		return false;
	}
	
//FUNCTION validateFields_med
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_med(codiceFiscale,telefono,cellulare,consenso,telefonoRiferimento,emailRiferimento){
		if(ValidateCf(codiceFiscale))
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ConsensoAndCellulare(consenso,cellulare))
		if(ValidatePhone(telefonoRiferimento))
		if(ValidateEmail(emailRiferimento))
		return true;
		return false;
	}
	
// FUNCTION validateFields_ornores
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_ornores(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori){
		if(ValidateCf(codiceFiscale))
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ConsensoAndCellulare(consenso,cellulare))
		if(isIntegerNotify(numeroFamiliari))
		if(isIntegerNotify(numeroFamiliariViaggiatori))
		return true;
		return false;
	}

// FUNCTION validateFields_pern
// GestioneOfferteServizioPage

function validateFields_pern(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,disponibilitaCamere,prezzoNotte,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2){
		
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ValidatePhone(fax))
		if(ValidateEmail(email))
		if(isNotVoid(localita))
		if(ValidateDateObbligatoria(validaDal))
		if(ValidateDateObbligatoria(validaAl))
		if(ValidateDateObbligatoria(dataUltimoAggiornamento))
		if(ValidateSeqNoFocus(dataOdierna,validaAl))
		if(ValidateSeqGOS(validaDal,validaAl))
		if(isNotVoid(disponibilitaCamere))
		if(isIntegerGreaterThanZero(disponibilitaCamere))
		if(isNotVoid(prezzoNotte))
		if(isEuro(prezzoNotte))
		if(ValidatePercentage2(sconto1,tipologiaSconto1))
		if(ValidatePercentage2(sconto2,tipologiaSconto2))
		return true;
		return false;
	}

// FUNCTION validateFields_potimp
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_potimp(codiceFiscale,telefono,cellulare,consenso,numeroDipendenti){
		if(ValidateCf(codiceFiscale))
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ConsensoAndCellulare(consenso,cellulare))
		if(isIntegerNotify(numeroDipendenti))
		return true;
		return false;
	}
	
// FUNCTION validateFields_res
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage
	
function validateFields_res(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari){
		if(ValidateCf(codiceFiscale))
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ConsensoAndCellulare(consenso,cellulare))
		if(isIntegerNotify(numeroFamiliari))
		return true;
		return false;
	}
	
// FUNCTION validateFields_send
// GestioneRichiestaPrenotazionePage

function validateFields_send(dataOdierna,inizioPrenotazione,finePrenotazione,inizioOfferta,fineOfferta,numeroPersone,telefono,cellulare,email,codiceFiscale,partitaIvaAgenzia,telefonoAgenzia,cellulareAgenzia,emailTitolare,telefonoCapogruppo,cellulareCapogruppo,etaGruppo){

		if(inizioPrenotazione.value!='' && inizioPrenotazione.value!='gg/mm/aaaa'){
			if(finePrenotazione.value!='' && finePrenotazione.value!='gg/mm/aaaa'){
				if(ValidateSeqToday(dataOdierna,inizioPrenotazione))
				if(ValidateSeq2(inizioPrenotazione,finePrenotazione))
				if(ValidateSeq_range(inizioOfferta,inizioPrenotazione))
				if(ValidateSeq_range(finePrenotazione,fineOfferta))
				if(isIntegerNotZeroNotify(numeroPersone))
				if(ValidatePhone(telefono))
				if(ValidatePhone(cellulare))
				if(ValidateEmail(email))
				if(ValidateCf(codiceFiscale))
				if(ValidatePiva(partitaIvaAgenzia))
				if(ValidatePhone(telefonoAgenzia))
				if(ValidatePhone(cellulareAgenzia))
				if(ValidateEmail(emailTitolare))
				if(ValidatePhone(telefonoCapogruppo))
				if(ValidatePhone(cellulareCapogruppo))
				if(checkEtaGruppo(etaGruppo))
				return true;
			}
			else{
				finePrenotazione.focus()
				alert('Il campo deve essere valorizzato per poter effettuare la prenotazione');
			}
		}
		else{
			inizioPrenotazione.focus()
			alert('Il campo deve essere valorizzato per poter effettuare la prenotazione');
		}
		return false;
	}
	
// FUNCTION validateFields_stu
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_stu(codiceFiscale,telefono,cellulare,telefonoEnte,emailTitolare){
		if(ValidateCf(codiceFiscale))
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ValidatePhone(telefonoEnte))
		if(ValidateEmail(emailTitolare))
		return true;
		return false;
	}
	
// FUNCTION validateFields_tur
// AggSecondoLivelloDatiRegistrazionePage
// RegSecondoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function validateFields_tur(codiceFiscale,telefono,cellulare,consenso,numeroFamiliari,numeroFamiliariViaggiatori,etaGruppo,numeroViaggiatori,partitaIVAEnte,codiceFiscaleEnte,telefonoEnte,cellulareEnte,emailTitolare,telefonoRegistrante,emailRegistrante){
		if(ValidateCf(codiceFiscale))
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ConsensoAndCellulare(consenso,cellulare))
		if(isIntegerNotify(numeroFamiliari))
		if(isIntegerNotify(numeroFamiliariViaggiatori))
		if(isIntegerNotify(etaGruppo))
		if(isIntegerNotify(numeroViaggiatori))
		if(ValidatePiva(partitaIVAEnte))
		if(ValidateCf(codiceFiscaleEnte))
		if(ValidatePhone(telefonoEnte))
		if(ValidatePhone(cellulareEnte))
		if(ValidateEmail(emailTitolare))
		if(ValidatePhone(telefonoRegistrante))
		if(ValidateEmail(emailRegistrante))
		return true;
		return false;
	}
	
// FUNCTION validateFields_vend
// GestioneOfferteServizioPage

function validateFields_vend(telefono,cellulare,fax,email,dataOdierna,validaDal,validaAl,dataUltimoAggiornamento,quantitaDisponibile,prezzoUnitario,localita,tipologiaSconto1,sconto1,tipologiaSconto2,sconto2,anticipoPrenotazione){
		
		if(ValidatePhone(telefono))
		if(ValidatePhone(cellulare))
		if(ValidatePhone(fax))
		if(ValidateEmail(email))
	    if(isNotVoid(localita))
		if(ValidateSeqNoFocus(dataOdierna,validaAl))
		if(ValidateSeqGOS(validaDal,validaAl))
		if(ValidateDateObbligatoria(validaDal))
		if(ValidateDateObbligatoria(validaAl))
		if(ValidateDateObbligatoria(dataUltimoAggiornamento))
		if(isNotVoid(quantitaDisponibile))
		if(isNumberGreaterThanZero(quantitaDisponibile))
		if(isNotVoid(prezzoUnitario))
		if(isEuro(prezzoUnitario))
		if(ValidatePercentage2(sconto1,tipologiaSconto1))
		if(ValidatePercentage2(sconto2,tipologiaSconto2))
		if(ValidatePercentage(anticipoPrenotazione))
		return true;
		return false;
	}
	
// FUNCTION ValidateIsbn(text)
// GestioneCiEventoPage
// GestioneCiStudioPage
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PrenotazioneEventoPage

function ValidateIsbn(text){
		if(text.value!=''){
			if (isIsbn(text)==false){
				  text.focus()
				  return false;
			}
		}
		return true;	
	}
	
// FUNCTION ValidatePercentage(text)
// GestioneRichiestaPrenotazionePage
// PrenotazioneEventoPage

function ValidatePercentage(text){
		if(text.value!=''){
			if (isPercentage(text)==false){
				text.focus()
				return false;
			}
		}
		return true	;
	}
	
// GestioneCiEventoPage
// GestioneOfferteServizioPage
function ValidatePercentage2(sconto,tipologia){
		if(sconto.value!=''){
			if (isPercentage(sconto)==false){
				text.focus()
				return false;
			}
			if(isNotVoid(tipologia)==false){
				return false;
			}
		}else{
			if(tipologia.value!=''){
				alert("Il campo selezionato deve essere valorizzato");
				sconto.focus();
				return false;
			}
		}
		return true	;
	}
	

// FUNCTION ValidatePhone(text)
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiEventoPage
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage
// GestioneCiStudioPage
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PasswordDimenticataPage
// PrenotazioneEventoPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function ValidatePhone(text){
	if(text.value!=''){
		if (isPhone(text)==false){
			text.focus()
			return false;
		}
	}
	return true;
}

// FUNCTION ValidatePiva(text)
// AggPrimoLivelloDatiRegistrazionePage.jsp - orchideaFE/WebContent
// AggSecondoLivelloDatiRegistrazionePage.jsp - orchideaFE/WebContent
// GestioneCiCartinaPage.jsp - orchideaFE/WebContent
// GestioneCiConoscenzaPage.jsp - orchideaFE/WebContent
// GestioneCiEventoPage.jsp - orchideaFE/WebContent
// GestioneCiInfoEmergenzaPage.jsp - orchideaFE/WebContent
// GestioneCiInformativaPage.jsp - orchideaFE/WebContent
// GestioneCiStudioPage.jsp - orchideaFE/WebContent
// GestioneOfferteServizioPage.jsp - orchideaFE/WebContent
// GestioneRichiestaPrenotazionePage.jsp - orchideaFE/WebContent
// PasswordDimenticataPage.jsp - orchideaFE/WebContent
// PrenotazioneEventoPage.jsp - orchideaFE/WebContent
// RegDirettaPrimoLivelloPage.jsp - orchideaFE/WebContent
// RegPrimoLivelloPage.jsp - orchideaFE/WebContent
// RegSecondoLivelloPage.jsp - orchideaFE/WebContent
// RegViaSuperUtentePrimoLivelloPage.jsp - orchideaFE/WebContent
// RegViaSuperUtenteSecondoLivelloPage.jsp - orchideaFE/WebContent

function ValidatePiva(text){
		if(text.value!=''){
			if (isPiva(text)==false){
				text.focus()
				return false;
			}
		}
		return true;
	}
	
// FUNCTION validateReceivers()
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiInformativaPage
// GestioneCiRichiestaPage
// GestioneCiSegnalazionePage
// GestioneCiStudioPage

function validateReceivers(){
  	if(document.ContributoInformativoForm.destinatari.value == 'radio.dest4'){
  		if(document.ContributoInformativoForm.destAlAmm.checked || document.ContributoInformativoForm.destAmmCom.checked ||
  			 document.ContributoInformativoForm.destImpLoc.checked || document.ContributoInformativoForm.destStu.checked)
  			return true
  		else{
  			alert('Selezionare almeno una categoria di destinatari')
  			return false
  		}
  	}
  	return true
  }
  
 // FUNCTION ValidateSeq(data1, data2)
 // GestioneOfferteServizioPage
/* 
function ValidateSeq(data1, data2){
		var value1 = data1.value
		var value2 = data2.value
		if(value1!='' && value2!='' && value1!='gg/mm/aaaa' && value2!='gg/mm/aaaa'){
			if (areOrderedDates(data1,data2)==false){
				return false;
			}
		}
		return true;
	}
*/	
// FUNCTION ValidateSeq(value1, value2)
// GestioneAgendaPrivataPage
// GestioneOfferteServizioPage
// HomePage
// PrenotazioneEventoPage
// TGestioneAgendaPubblicaPage
// TRicercaOfferteServizioPage
// TVisualizzazioneCiEventoPage
// TVisualizzazioneMinisitoPage
// TVisualizzazioneOffertaServizioPage

function ValidateSeq1(value1, value2){
		if(value1!='' && value2!='' && value1!='gg/mm/aaaa' && value2!='gg/mm/aaaa'){
			if (areOrderedDates1(value1,value2)==false){
				return false;
			}
			return true;
		}
		return true;
	}
	
//GestioneOfferteServizioPage
function ValidateSeqGOS(value1, value2){
		if(value1!='' && value2!='' && value1!='gg/mm/aaaa' && value2!='gg/mm/aaaa'){
			if (areOrderedDatesGOS(value1,value2)==false){
				return false;
			}
			return true;
		}
		return true;
	}	
	
// GestioneRichiestaPrenotazionePage

function ValidateSeq2(value1, value2){
		if(value1.value!='' && value2.value!='' && value1.value!='gg/mm/aaaa' && value2.value!='gg/mm/aaaa'){
			if (areOrderedDates(value1,value2,"Le date inserite non sono consecutive")==false){
				return false;
			}
		}
		return true;
	}	
	
// FUNCTION ValidateSeq_range(value1, value2)
// GestioneRichiestaPrenotazionePage

function ValidateSeq_range(value1, value2){
		if(value1.value!='' && value2.value!='' && value1.value!='gg/mm/aaaa' && value2.value!='gg/mm/aaaa'){
			if (areOrderedDates(value1,value2,"Le date inserite devono essere comprese nell'intervallo di validità dell'Offerta")==false){
				return false;
			}
		}
		return true;
	}
	
// FUNCTION ValidateSeqNoFocus(data1, data2)
// GestioneOfferteServizioPage

function ValidateSeqNoFocus(data1, data2){
	
		var value1 = data1.value
		var value2 = data2.value
		
		if(value1!='' && value2!='' && value1!='gg/mm/aaaa' && value2!='gg/mm/aaaa'){
			if (areOrderedDatesNoFocus(data1,data2)==false){
				return false;
			}
		}
		return true;
	}	
	
// FUNCTION ValidateSeqToday(value1, value2)
// GestioneRichiestaPrenotazionePage

function ValidateSeqToday(value1, value2){
		if(value1.value!='' && value2.value!='' && value1.value!='gg/mm/aaaa' && value2.value!='gg/mm/aaaa'){
			if (areOrderedDatesToday(value1,value2,"La data inserita è antecedente alla data odierna")==false){
				return false;
			}
		}
		return true;
	}
	
// function ValidateTime(text)
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage
// GestioneCiStudioPage
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PasswordDimenticataPage
// PrenotazioneEventoPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function ValidateTime1(text){
	if(text.value!=''){
		if (isTime(text)==false){
			text.focus()
			return false
		}
	}
	return true
}

// GestioneCiEventoPage

function ValidateTime2(text){
		if(text.value!='' && text.value!='hh:mm'){
			if (isTime(text)==false){
				text.focus()
				return false;
			}
		}
		return true;
	}


// InserimentoAppuntoPage

function ValidateTime3(text){
		//if(text.value!=''){
			if (isTime(text)==false){
				text.focus()
				return false;
			}
		//}
		return true;
	}

function ValidateTimeObbligatorio(text){
		if(text.value!='' && text.value!='hh:mm'){
			if (isTime(text)==false){
				text.focus()
				return false;
			}
			return true;
		}
		alert("Inserire un orario valido")
		text.focus()
		return false;
	}
	
// function ValidateYear(text)
// AggPrimoLivelloDatiRegistrazionePage
// AggSecondoLivelloDatiRegistrazionePage
// GestioneCiCartinaPage
// GestioneCiConoscenzaPage
// GestioneCiEventoPage
// GestioneCiInfoEmergenzaPage
// GestioneCiInformativaPage
// GestioneCiStudioPage
// GestioneOfferteServizioPage
// GestioneRichiestaPrenotazionePage
// PasswordDimenticataPage
// PrenotazioneEventoPage
// RegDirettaPrimoLivelloPage
// RegPrimoLivelloPage
// RegSecondoLivelloPage
// RegViaSuperUtentePrimoLivelloPage
// RegViaSuperUtenteSecondoLivelloPage

function ValidateYear(text){
	if(text.value!=''){
		if (isYear(text)==false){
			text.focus()
			return false;
		}
	}
	return true;
}

// FUNCTION vis_details(name,index)
// TGestioneAgendaPubblicaPage

function vis_details1(name,index){

    document.GestioneAgendaPubblicaForm.action = "/orchideaFE/GestioneAgendaPubblicaAction.do?method="+name+"&validation=true"+"&evento="+index;
    document.GestioneAgendaPubblicaForm.submit();
	}

// TRicercaOfferteServizioPage

function vis_details2(name,index){

    document.RicercaOfferteForm.action = "/orchideaFE/RicercaOfferteServizioAction.do?method="+name+"&validation=true"+"&minisito="+index;
    document.RicercaOfferteForm.submit();
	}

// TVisualizzazioneCiEventoPage

function vis_details3(name,index){

    document.VisContributoInformativoForm.action = "/orchideaFE/VisualizzazioneCiEventoAction.do?method="+name+"&validation=true"+"&evento="+index;
    document.VisContributoInformativoForm.submit();
	}

// FUNCTION visoffers_click(me,name)
// TPreviewMinisitoPage
// TVisualizzazioneMinisitoPage

function visoffers_click(me,name){
    document.GestioneMinisitoForm.action = "/orchideaFE/VisualizzazioneMinisitoAction.do?method="+name+"&validation=true";
    document.GestioneMinisitoForm.submit();
	}
	
// FUNCTION visualizza_click(me,alertvar,name)
// VisCalendRicPrenotazionePage



function visualizza_click1(me,alertvar,name){

    document.VisRicPrenotazioneForm.action = "/orchideaFE/VisCalendRicPrenotazioneAction.do?method="+name+"&validation=true";
    document.VisRicPrenotazioneForm.submit();
  }
  
// VisRicPrenotazioneByImpPage
  
  function visualizza_click2(me,alertvar,name){
    if(isItemSelected()){
      document.VisRicPrenotazioneForm.action = "/orchideaFE/VisRicPrenotazioneByImpAction.do?method="+name+"&validation=true";
      document.VisRicPrenotazioneForm.submit();
    }  
  }
  
// VisRicPrenotazioniByUserPage
  
  function visualizza_clickVPU(me,alertvar,name){
    if(isItemSelected()){
      document.VisRicPrenotazioneForm.action = "/orchideaFE/VisRicPrenotazioniByUserAction.do?method=enter&command="+name+"&validation=true";
      //document.VisRicPrenotazioneForm.action = "/orchideaFE/VisRicPrenotazioniByUserAction.do?method="+name+"&validation=true";
      document.VisRicPrenotazioneForm.submit();
    }  
  }
  
  
// FUNCTION visualizza_click(me,name)
// ElencoNotiziePercorsoPage
// GuidaElettronicaPage
function visualizza_click_unified(me,name){
    if(isItemSelected()){
      document.GuidaElettronicaForm.action = name;
      document.GuidaElettronicaForm.submit();
    }  
  }


// RicercaMinisitiRicevutiPage
function visualizza_clickMR(me,name){
    if(isItemSelected()){
      document.RicercaMinisitiForm.action = "/orchideaFE/RicercaMinisitiRicevutiAction.do?method="+name+"&validation=true";
      document.RicercaMinisitiForm.submit();
    }  
  }
// VisSmsEventAlertingPage
function visualizza_clickVSE(me,name){

    document.SmsEventAlertingForm.action = "/orchideaFE/VisSmsEventAlertingAction.do?method="+name+"&validation=true";
    document.SmsEventAlertingForm.submit();
  }

// FUNCTION visualizza_click(name)
// RicercaOfferteImpPage
// RicercaOfferteSuperPage
function visualizza_click_unified1(name){
    if(isItemSelected()){
      document.RicercaOfferteForm.action = name;
      document.RicercaOfferteForm.submit();
    }  
  }



  
// FUNCTION visualizzaCal_click(name)
// RicercaOfferteImpPage
function visualizzaCal_click(name){
	if(isItemSelected()){
		document.RicercaOfferteForm.action = "/orchideaFE/RicercaOfferteImpAction.do?method="+name+"&validation=true";
		document.RicercaOfferteForm.submit();
	}
}
  
// FUNCTION visualizzaDett_click(me,name)
// GestioneAgendaPrivataPage
function visualizzaDett_click(me,name){
	if(isItemSelected()){
		document.GestioneAgendaPrivataForm.action = "/orchideaFE/GestioneAgendaPrivataAction.do?method="+name+"&validation=true";
		document.GestioneAgendaPrivataForm.submit();
	}  
}
  
// FUNCTION visualizzaDettaglio_click(me,name)
// AreaStampaPage
// ComuneInformaPage
// ConsultaComStampaPage
// InfoCasiEmergenzaPage
function visualizzaDettaglio_click_unified1(me,name){
	if(isItemSelected()){
		document.AreaInfoPubblicaForm.action = name;
		document.AreaInfoPubblicaForm.submit();
	}  
}

 
// GestioneRicUtentePage
// VisualizzazioneUtentiPage
function visualizzaDettaglio_click_unified2(me,name){
	if(isItemSelected()){
		document.RicUtenteForm.action = name;
		document.RicUtenteForm.submit();
	}  
}  
  
// VisPropriCiPage
// VisualizzazioneCiPage
function visualizzaDettaglio_click_unified3(me,name){
	if(isItemSelected()){
		document.CiForm.action = name;
		document.CiForm.submit();
	}  
}  
  

// InfoCasiEmergenzaPage
function visualizzaDettaglio_click5(me,name){
    if(isItemSelected()){
      document.AreaInfoPubblicaForm.action = "/orchideaFE/InfoCasiEmergenzaAction.do?method="+name+"";
      document.AreaInfoPubblicaForm.submit();
    }  
}
  
// RisultatiRicercaContributiInformativiPage
function visualizzaDettaglio_click6(me,name){
	if(isItemSelected()){
		document.RicercaContributiInformativiForm.action = "/orchideaFE/RisultatiRicercaContributiInformativiAction.do?method="+name+"&validation=true";
		document.RicercaContributiInformativiForm.submit();
	}  
}

function visualizzaDettaglio_click_unified1_(me,name,formField, lista, count, index){
	eval('document.AreaInfoPubblicaForm.'+me+'.checked=true');
	document.getElementById(lista).value = "";
	for (i = 0; i < count.value; i++){
		if(document.getElementById(lista+"_"+i)!=null){
			if(i==index && document.getElementById(lista+"_"+i).checked)
				document.getElementById(lista).value=document.getElementById(lista).value + "|" + document.getElementById(lista+"id_" + i).value + "|";
			else document.getElementById(lista+"_"+i).checked=false;
		}
	}
    formField.value = document.getElementById(lista).value;
	document.AreaInfoPubblicaForm.action = name;
	document.AreaInfoPubblicaForm.submit();
}

function visualizzaDettaglio_click6_(me,name,formField, lista, count, index){
	eval('document.RicercaContributiInformativiForm.'+me+'.checked=true');
	document.getElementById(lista).value = "";
	for (i = 0; i < count.value; i++){
		if(document.getElementById(lista+"_"+i)!=null){
			if(i==index && document.getElementById(lista+"_"+i).checked)
				document.getElementById(lista).value=document.getElementById(lista).value + "|" + document.getElementById(lista+"id_" + i).value + "|";
			else document.getElementById(lista+"_"+i).checked=false;
		}
	}
    formField.value = document.getElementById(lista).value;
	document.RicercaContributiInformativiForm.action = "/orchideaFE/RisultatiRicercaContributiInformativiAction.do?method="+name+"&validation=true";
	document.RicercaContributiInformativiForm.submit();
}

// VisualizzazionePrenotazioniEventoPage
function visualizzaDettaglio_click9(me,name){
	if(isItemSelected()){ 
		document.VisualizzazionePrenotazioniEventoForm.action = "/orchideaFE/VisualizzazionePrenotazioniEventoAction.do?method="+name+"";
		document.VisualizzazionePrenotazioniEventoForm.submit();
	}  
}

// FUNCTION visualizzaMappa_click(me,myaction,name)
// GestioneCiConoscenzaPage
// GestioneCiEventoPage
// GestioneCiInformativaPage
// GestioneCiNotiziaPage
// GestioneCiSegnalazionePage
// GestioneCiStudioPage


function visualizzaMappa_click1(me,myaction,name){
	document.ContributoInformativoForm.action = "/orchideaFE/"+myaction+".do?method=enter&validation=false&saveForm=true";
	document.ContributoInformativoForm.submit();
	window.open("/orchideaFE/EGISVisualizzaCartografiaAction.do?method=enter&popup=true",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}
 
 

// VisualizzazioneCiInformativaPage
// VisualizzazioneCiNotiziaPage
// VisualizzazioneCiSegnalazionePage
// VisualizzazioneCiStudioPage
function visualizzaMappa_click2(me,myaction,name){
	window.open("/orchideaFE/EGISVisualizzaCartografiaAction.do?method=enter&popup=true",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,height=600,width=780");
}
  
  
// FUNCTION visualizzaNotizie_click(me,name)
// GuidaElettronicaPage

function visualizzaNotizie_click(me,name){
	if(isItemSelected()){
		document.GuidaElettronicaForm.action = "/orchideaFE/GuidaElettronicaAction.do?method="+name+"&validation=true";
		document.GuidaElettronicaForm.submit();
	}  
}
  
// FUNCTION visualizzaRic_click(name)
// RicercaOfferteImpPage

function visualizzaRic_click(name){
	if(isItemSelected()){
		document.RicercaOfferteForm.action = "/orchideaFE/RicercaOfferteImpAction.do?method="+name+"&validation=true";
		document.RicercaOfferteForm.submit();
	}  
}
  
// FUNCTION visualizzaSuMappa_click(me,name)
// RisultatiRicercaContributiInformativiPage

function visualizzaSuMappa_click(me,name){
	if(isItemSelected()){
		document.RicercaContributiInformativiForm.action = "/orchideaFE/RisultatiRicercaContributiInformativiAction.do?method=enter&validation=false&saveForm=true&keepgeorefpresente=true";
		document.RicercaContributiInformativiForm.submit();
		window.open("/orchideaFE/EGISVisualizzaCartografiaAction.do?method=enter&popup=true",(new Date()).getTime(),"toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,height=600,width=780");
	}
}


//GestioneMinisitoPage.jsp

function salvaLavorazione_click(me,alertvar,name){

    if(confirm(alertvar)){me.disabled=true;
    document.GestioneMinisitoForm.action = "/orchideaFE/GestioneMinisitoAction.do?method="+name+"&validation=true";
    document.GestioneMinisitoForm.submit();
    }
    else{
      return false;
    }
  }
  
  
 //GestioneCiEventoPage.jsp 
    function managePayment(){
  	var widgColl = document.getElementsByName('tipologiaPagamento');
  	var widgColl1 = document.getElementsByName('prezzo');
  	
  	if(widgColl!=null && widgColl[0]!=null && widgColl[0].disabled){
	}
	else if(widgColl!=null && widgColl[0]!=null && (widgColl1[0].value==null || widgColl1[0].value.length==0)){
		widgColl[0].checked=true;
		if(widgColl1!=null && widgColl1[0]!=null)widgColl1[0].disabled=true;
	}
  }
