
function caricaFlash(nome,width,height)
{
	document.write('<object type="application/x-shockwave-flash" data="../english/jsf/'+nome+'" width="'+width+'" height="'+height+'" >\n');
	document.write('<param name="movie" value="../english/jsf/'+nome+'" />\n');
	document.write('</object>\n');
}

//-------------------------------------------------------------------------------------------------------------------------

function customMyDayString(oneDate)
{
         dayNumbers = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"];
         return dayNumbers[oneDate.getDate() - 1];
}

function customMyMonthString(oneDate)
{
         monthNumbers = ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"];
         return monthNumbers[oneDate.getMonth()];
}

function customMyFullYearString(oneDate)
{
         
         return oneDate.getFullYear();
}

//-------------------------------------------------------------------------------------------------------------------------

function setSelectsFullDate(){
         
		var curDate = new Date();
		
		dayNumbers = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"];
		
		monthNumbers = ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"];
		
		var curDay = dayNumbers[curDate.getDate() - 1];
		var curMonth = monthNumbers[curDate.getMonth()];
		var curYear = curDate.getFullYear();
		
        var isPreNN6 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) <= 4);
		
		document.forms[0].giornoA.value = curDay;
		document.forms[0].giornoP.value = curDay;
		document.forms[0].meseA.value = curMonth;
		document.forms[0].meseP.value = curMonth;
		
		var selectAnnoA = document.forms[0].annoA;
		var selectAnnoP = document.forms[0].annoP;		
			selectAnnoA.length = 0;
			selectAnnoP.length = 0;
			
			for (var i = 0; i < 4; i++) {
				
               selectAnnoA.options[i] = new Option(parseInt(curYear) + i,parseInt(curYear) + i);
			   selectAnnoP.options[i] = new Option(parseInt(curYear) + i,parseInt(curYear) + i);
      
      		}
				
			
			selectAnnoA.options[0].selected = true;
			selectAnnoP.options[0].selected = true;
			
			if (isPreNN6) {
				history.go(0);
			}

}

function detectScreenResolution(){

	if (screen.width<1280)
	{
 		alert('Your resolution is too much low');
		window.location="bedandbreakfasttreviso.php";
	}
	else
	{
  		window.location="bedandbreakfasttreviso.php";
	}
}

