// JavaScript Documentfunction mycarousel_initCallback(carousel) {    jQuery('.jcarousel-control a').bind('click', function() {        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));        return false;    });     jQuery('.jcarousel-scroll select').bind('change', function() {        carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);        return false;    });     jQuery('#mycarousel-next').bind('click', function() {        carousel.next();        return false;    });     jQuery('#mycarousel-prev').bind('click', function() {        carousel.prev();        return false;    });}; // Ride the carousel...jQuery(document).ready(function() {    jQuery("#mycarousel").jcarousel({        scroll: 1,		auto: 10,		wrap: 'last',        initCallback: mycarousel_initCallback,        // This tells jCarousel NOT to autobuild prev/next buttons        buttonNextHTML: null,        buttonPrevHTML: null    });});function setDate(){	var gg = document.getElementById("id_gg");		var mm = document.getElementById("id_mm");		var aa = document.getElementById("id_aa");		var oggi = new Date();		if(gg && mm && aa)	{		gg.options[(oggi.getDate()-1)].selected = true;		mm.options[(oggi.getMonth())].selected = true;		for(i=0; i<10; i++)		{			if(aa.options[i])			{				if(aa.options[i].value == oggi.getFullYear()) aa.options[i].selected = true;			}		}	}	} function frmcheck(){	frm = document.getElementById("myform");	if (!(frm)) return false;		var oggi = new Date(); 	if (parseInt(frm.aa.value) < oggi.getFullYear())	{		alert ("Attenzione: la data inserita e` nel passato. Riverificare, prego.");		frm.aa.focus();		return false;	}	if (parseInt(frm.aa.value) == oggi.getFullYear())	{		if (parseInt(frm.mm.value) < (parseInt(oggi.getMonth())+1))		{			alert ("Attenzione: la data inserita e` nel passato. Riverificare, prego.");			frm.mm.focus();			return false;		}		if (parseInt(frm.mm.value) == (parseInt(oggi.getMonth())+1))		{			if (parseInt(frm.gg.value) < parseInt(oggi.getDate()))			{				alert ("Attenzione: la data inserita e` nel passato. Riverificare, prego.");				frm.gg.focus();				return false;			}		}	}	tot_adulti_pren = 0;	tot_camere_pren = 0; 	if (parseInt(frm.tot_adulti.value) < 1)	{		alert("E' necessario almeno un adulto per continuare la prenotazione");		frm.tot_adulti.focus();		return false;	}	if ((!(parseInt(frm.notti_1.value) > 0))||(!(parseInt(frm.tot_adulti.value)>0))||(!(parseInt(frm.tot_camere.value)>0)))	{		alert("E' necessario specificare numero di notti, di adulti e di camere per iniziare la ricerca");		frm.notti_1.focus();		return false;	}	tot_adulti_pren = parseInt(frm.tot_adulti.value);	tot_camere_pren = parseInt(frm.tot_camere.value);	tot_bambini_pren = 0;	if(frm.tot_bambini) tot_bambini_pren = parseInt(frm.tot_bambini.value);		tot_occupanti_pren = tot_adulti_pren + tot_bambini_pren;	str = "occ = " + tot_occupanti_pren + " cam = " + tot_camere_pren;	// alert(str);	if (tot_occupanti_pren < tot_camere_pren)	{		alert("E' necessario avere almeno una persona per camera");		frm.tot_adulti.focus();		return false;	}	frm.submit();}
