var _hotelsArray=new Array();_hotelsArray.push(new hotelDescriptor("Tutti gli hotel","Tutti gli hotel","All"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL CLASS","ITATAClassresid"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL CONTESSA JOLANDA","ITATACJolanda"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL DE ANGELI","ITATADAngelires"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL EXECUTIVE","ITATAExecutive"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL EXPO FIERA","ITATAEFiera"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL LINEA UNO","ITATALineauno"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL QUARK","ITATAQuark"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL QUARK DUE RESIDENCE","ITATAQuarkdue"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL RIPAMONTI","ITATAMRRipamonti"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL THE BIG","ITATAThebigresi"));_hotelsArray.push(new hotelDescriptor("Milano","ATAHOTEL THE ONE","ITATATOne"));_hotelsArray.push(new hotelDescriptor("Milano","FORMULA ROULETTE MILANO","ITATAPMilano"));_hotelsArray.push(new hotelDescriptor("Varese","ATAHOTEL VARESE","ITATAVBusiness"));_hotelsArray.push(new hotelDescriptor("Torino","ATAHOTEL CONCORD","ITATAConcord"));_hotelsArray.push(new hotelDescriptor("Torino","PRINCIPI DI PIEMONTE","ITATAPDPiemonte"));_hotelsArray.push(new hotelDescriptor("La Thuile","ATAHOTEL PLANIBEL","ITATAPlanibel"));_hotelsArray.push(new hotelDescriptor("Madonna di Campiglio (TN)","GOLF HOTEL CAMPIGLIO","ITATAGMCampiglio"));_hotelsArray.push(new hotelDescriptor("Petriolo (GR)","PETRIOLO SPA RESORT","ITATASRPetriolo"));_hotelsArray.push(new hotelDescriptor("Firenze","PLATINHOME - APPARTAMENTI DI LUSSO A FIRENZE","ITFIRHTLPlatinhome"));_hotelsArray.push(new hotelDescriptor("Roma","ATAHOTEL VILLA PAMPHILI","ITATAVillapamph"));_hotelsArray.push(new hotelDescriptor("Taormina","ATAHOTEL CAPOTAORMINA","ITATACapotaormi"));_hotelsArray.push(new hotelDescriptor("Giardini Naxos","ATAHOTEL NAXOS BEACH","ITATANaxosbeach"));_hotelsArray.push(new hotelDescriptor("Villasimius","TANKA VILLAGE","ITATATankavilla"));var headerSelectHotel="<select id='select_hotels' name='select_hotels' class='maximized' >";var closeSelect="</select>";function hotelDescriptor(city,hdescription,iata)
{var _city;var _hdescription;var _iata;this._city=city;this._hdescription=hdescription;this._iata=iata;}
function fillHotelSelect()
{var _hotelSelect=document.getElementById("select_hotels");var _citySelect=document.getElementById("select_city");var _divSelectHotel=document.getElementById("select_hotels_div");var _hotelCount=0;var _innerHtmlHotels="";_divSelectHotel.innerHTML="";_innerHtmlHotels=headerSelectHotel+optionTag(_hotelsArray[0],false);for(j=0;j<_hotelsArray.length;j++)
{if(_hotelsArray[j]._city==_citySelect.value)
{_hotelCount++;}}
if(_hotelCount!=1)
{_hotelCount=0;}
var _tmpCount=1;for(i=0;i<_hotelsArray.length;i++)
{if(_hotelsArray[i]._city==_citySelect.value)
{if(_tmpCount==_hotelCount&&_hotelCount!=0){_innerHtmlHotels=_innerHtmlHotels+optionTag(_hotelsArray[i],true);}
else
{_innerHtmlHotels=_innerHtmlHotels+optionTag(_hotelsArray[i],false);}
_tmpCount++;}
if(_citySelect.value=="*"&&i!=0)
{_innerHtmlHotels=_innerHtmlHotels+optionTag(_hotelsArray[i],false);}}
_divSelectHotel.innerHTML=_innerHtmlHotels+closeSelect;}
function fillDestinationsSelect()
{}
function optionTag(_itemHotel,_isSelected)
{var _item="";if(_isSelected)
{_item="<option value='"+_itemHotel._iata+"' selected>"+_itemHotel._hdescription+"</option>";}
else
{_item="<option value='"+_itemHotel._iata+"'>"+_itemHotel._hdescription+"</option>";}
return _item;}
function calpopup(lnk){var winalpha=(screen.width-280)/3;var winbeta=(screen.height-160)/4;winname=window.open(lnk,"winup","Left="+winalpha+",Top="+winbeta+",height=160,width=280,scrollbars=no")
if(parseInt(navigator.appVersion)>=4){winname.window.focus();}}
function ctrlRoom(){if($('roomNumber').value>1){$('slideSearch').fade();$('roomSearch').appear();}
else{$('roomSearch').fade();$('slideSearch').appear();}}
function y2k(number){return(number<1000)?number+1900:number;}
function daysElapsed(from,to){var difference=Date.UTC(y2k(from.getYear()),from.getMonth(),from.getDate(),0,0,0)
-Date.UTC(y2k(to.getYear()),to.getMonth(),to.getDate(),0,0,0);return difference/1000/60/60/24;}
function nightsElasped(from,to)
{var nights=daysElapsed(from,to);if(nights<0)nights=-nights;return nights;}
function createDate(value)
{try
{var dateSplit=value.split('/');var date=new Date(dateSplit[2],dateSplit[1]-1,dateSplit[0]);return date;}
catch(e)
{alert(e);}}
function searchATA(language)
{var city=document.getElementById("city");var city_value='';var hotelName='';var hotelCode;var time=new Date();var sec=time.getSeconds();f=Math.floor(Math.random()*1000000000)+'';var sess=''+sec+f;var _hotelSelect=document.getElementById("select_hotels");if(_hotelSelect!=null)
{hotelName=_hotelSelect.value;document.getElementById('Hotelnames').value=hotelName;}
else
{hotelName=document.getElementById('Hotelnames').value;}
var form=document.getElementById('search_ata');if(city!=null)
{city.value=document.getElementById('select_city').value;if(city.value=='*')
{city.value='';}}
else
{var city=[];city.value='';}
var from=document.getElementById('fromDate').value;var to=document.getElementById('toDate').value;var fromDate=createDate(from);var toDate=createDate(to);var today=new Date();today.setHours(0,0,0,0);if(fromDate<today)
{fromDate=today;}
if(toDate<fromDate)
{toDate=fromDate;}
if(fromDate>toDate)
{fromDate=toDate;}
try
{document.getElementById('fromday').value=fromDate.getDate();document.getElementById('frommonth').value=fromDate.getMonth()+1;document.getElementById('fromyear').value=fromDate.getFullYear();document.getElementById('today').value=toDate.getDate();document.getElementById('tomonth').value=toDate.getMonth()+1;document.getElementById('toyear').value=toDate.getFullYear();document.getElementById('nbdays').value=nightsElasped(fromDate,toDate);document.getElementById('langue').value=language;document.getElementById('search_ata').action='http://www.fastbookings.biz/DIRECTORY/dispoprice.phtml';document.getElementById('adulteresa').value=document.getElementById('select_adults').value;document.getElementById('enfantresa').value=document.getElementById('select_enfants').value;if(hotelName=='ITFIRHTLPlatinhome')
{document.getElementById('Clusternames').value='ITFIRHTLPlatinhome';document.getElementById('Hotelnames').value='ITFIRHTLPlatinhome';document.getElementById('showPromotions').value='1';}
else{document.getElementById('showPromotions').value='3';document.getElementById('Clusternames').value='itatahotelsall';}
document.getElementById('search_ata').action='http://www.fastbookings.biz/DIRECTORY/dispoprice.phtml';document.getElementById('profil').value=escape("SESSION="+sess+"&CODE=GoogleAnalytics");var waction="http://www.fastbookings.biz/DIRECTORY/ga.phtml?clusterName=itatahotelsall&id="+sess;_gaq.push(function(){var tracker=_gaq._getAsyncTracker();new Image().src=tracker._getLinkerUrl(waction);});_gaq.push(['_trackPageview','/FastBooking/ClicBook']);document.getElementById('search_ata').submit();}
catch(e)
{alert("Errore generico! "+e);}}
function searchATABottom(language)
{var city=document.getElementById("cityBottom");var city_value='';var hotelName='';var hotelCode;var time=new Date();var sec=time.getSeconds();f=Math.floor(Math.random()*1000000000)+'';var sess=''+sec+f;var _hotelSelect=document.getElementById("select_hotelsBottom");if(_hotelSelect!=null)
{hotelName=_hotelSelect.value;document.getElementById('HotelnamesBottom').value=hotelName;}
else
{hotelName=document.getElementById('HotelnamesBottom').value;}
var form=document.getElementById('search_ataBottom');if(city!=null)
{city.value=document.getElementById('select_cityBottom').value;if(city.value=='*')
{city.value='';}}
else
{var city=[];city.value='';}
var from=document.getElementById('fromDateBottom').value;var to=document.getElementById('toDateBottom').value;var fromDate=createDate(from);var toDate=createDate(to);var today=new Date();today.setHours(0,0,0,0);if(fromDate<today)
{fromDate=today;}
if(toDate<fromDate)
{toDate=fromDate;}
if(fromDate>toDate)
{fromDate=toDate;}
try
{document.getElementById('fromdayBottom').value=fromDate.getDate();document.getElementById('frommonthBottom').value=fromDate.getMonth()+1;document.getElementById('fromyearBottom').value=fromDate.getFullYear();document.getElementById('todayBottom').value=toDate.getDate();document.getElementById('tomonthBottom').value=toDate.getMonth()+1;document.getElementById('toyearBottom').value=toDate.getFullYear();document.getElementById('nbdaysBottom').value=nightsElasped(fromDate,toDate);document.getElementById('langueBottom').value=language;document.getElementById('search_ataBottom').action='http://www.fastbookings.biz/DIRECTORY/dispoprice.phtml';document.getElementById('adulteresaBottom').value=document.getElementById('select_adultsBottom').value;document.getElementById('enfantresaBottom').value=document.getElementById('select_enfantsBottom').value;if(hotelName=='ITFIRHTLPlatinhome')
{document.getElementById('ClusternamesBottom').value='ITFIRHTLPlatinhome';document.getElementById('HotelnamesBottom').value='ITFIRHTLPlatinhome';document.getElementById('showPromotionsBottom').value='1';}
else{document.getElementById('showPromotionsBottom').value='3';document.getElementById('ClusternamesBottom').value='itatahotelsall';}
document.getElementById('search_ataBottom').action='http://www.fastbookings.biz/DIRECTORY/dispoprice.phtml';document.getElementById('profilBottom').value=escape("SESSION="+sess+"&CODE=GoogleAnalytics");var waction="http://www.fastbookings.biz/DIRECTORY/ga.phtml?clusterName=itatahotelsall&id="+sess;_gaq.push(function(){var tracker=_gaq._getAsyncTracker();new Image().src=tracker._getLinkerUrl(waction);});_gaq.push(['_trackPageview','/FastBooking/ClicBook']);document.getElementById('search_ataBottom').submit();}
catch(e)
{alert("Errore generico! "+e);}}
function loadDate()
{var dateFrom=new Date();var dateTo=new Date();dateFrom.setDate(dateFrom.getDate()+2);dateTo.setDate(dateTo.getDate()+3);document.getElementById('fromDate').value=dateFrom.getDate()+'/'+(dateFrom.getMonth()+1)+'/'+dateFrom.getFullYear();document.getElementById('toDate').value=dateTo.getDate()+'/'+(dateTo.getMonth()+1)+'/'+dateTo.getFullYear();}
function changePage(city)
{if(city=='Firenze')
{document.location.href='http://www.platinhome.it/';}}
function isNotValidEmail(elem){var str=elem.value;var re=/\b[a-z0-9._%-]+@[a-z0-9._%-]+\.[a-z0-9._%-]{2,4}\b/;if(!str.match(re))
return false;else
return true;}
function checkNL(theForm)
{if($('privacyNL').checked==false)
{alert('� necessario accettare le condizioni di privacy');return(false);}
if(theForm.emailNL.value=="")
{alert('la mail � obbligaria');$('emailNL').focus();return(false);}
if(!isNotValidEmail(document.forms['suscribeNL'].elements['emailNL']))
{alert("il formato dell'email non � corretto");$('emailNL').focus();return false;}
return(true);}
function streamingRismi(str){searchWin=window.open(str,"live","scrollbars=no,resizable=no,width=500,height=230,status=no,location=no,toolbar=no");}
function searchBoxManage(){stLayer=$('toggle_appear').style.display;if(stLayer=='')
{$('searchBox').show();return false;}
else{$('searchBox').hide();return false;}}
refname=crefname=document.referrer;dname=document.location.hostname;cdname=document.location.href;motif0=/.*:\/\//;motif1=/\/.*$/;motif2=/ /;motif4=/^[^?]+./;t1=dname.replace(motif0," ");t2=t1.replace(motif1,'');t3=t2.replace(motif2,'');dname=t3.toLowerCase();t1=refname.replace(motif0," ");t2=t1.replace(motif1,'');t3=t2.replace(motif2,'');refname=t3.toLowerCase();t1=crefname.replace(motif4," ");t2=t1.replace(motif0,'');t3=t2.replace(motif1,'');crefname=t3.replace(motif2,'');t1=cdname.replace(motif4," ");t2=t1.replace(motif0,'');t3=t2.replace(motif1,'');cdname=t3.replace(motif2,'');if(dname!=refname&&refname.length>0&&dname.length>0){refname=escape(refname);dname=escape(dname);crefname=escape(crefname);cdname=escape(cdname);strg="<IMG SRC='http://tracking.fastbooking.net/fullorigin.phtml?origin="+refname+"&dname="+dname+"&crefname="+crefname+"&cdname="+cdname+"' height='1' width='1' style='display:none;'>";document.write(strg);}
if(dname!=refname&&dname.length>0){document.write("<IMG SRC='http://tracking.fastbooking.net/visit.phtml?dname="+dname+"' height='1' width='1' border='0' style='display:none;'>");}
var FBRESA="http://www.fastbookings.biz/DIRECTORY/";if(typeof(FB_useGoogleAnalytics)=="undefined")
var FB_useGoogleAnalytics=false;var FB_book_image=new Image();FB_book_image.src=FBRESA+"trans.gif";var FB_code_interface="";var FB_profil="";function hhotelProfil(code_interface,profil)
{FB_code_interface=code_interface;FB_profil=profil;}
function start(){var nbm=[31,28,31,30,31,30,31,31,30,31,30,31];thisform=document.idForm;build_year_select(thisform);MD=new Date();nday=MD.getDate();aday=MD.getDay();amois=MD.getMonth();ayear=takeYear(MD);cur_year=ayear;nday+=FB_nb_day_delay;if(nday>nbm[amois])
{nday-=nbm[amois];amois++;if(amois>11){ayear++;amois=0;}}
indexDay=nday-1;indexMois=amois;indexYear=ayear-cur_year;if(indexDay<0||indexDay>30)
indexDay=0;if(indexMois<0||indexMois>11)
indexMois=0;if(indexYear<0||indexYear>1)
indexDay=0;thisform.fromday.selectedIndex=indexDay;thisform.frommonth.selectedIndex=indexMois;thisform.fromyear.selectedIndex=indexYear;update_departure();}
function generateSession()
{var time=new Date();var sec=time.getSeconds();f=Math.floor(Math.random()*1000000000)+'';var sess=''+sec+f;return sess;}
function transferGAdata(sessId,cname)
{var waction=FBRESA+"ga.phtml?clusterName="+cname+"&id="+sessId;_gaq.push(function(){var tracker=_gaq._getAsyncTracker();new Image().src=tracker._getLinkerUrl(waction);});_gaq.push(['_trackPageview','/FastBooking/ClicBook']);}
function fbOpenWindow(cname,waction,title,width,height)
{if(FB_useGoogleAnalytics)
{sessId=generateSession();hhotelProfil("GoogleAnalytics",escape("SESSION="+sessId));}
if(FB_profil!="")
{waction+="&code="+FB_code_interface;waction+="&profil="+FB_profil;}
window.open(waction,title,"toolbar=no,width="+width+",height="+height+",menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");if(FB_useGoogleAnalytics)
transferGAdata(sessId,cname);}
function hhotelPTC(cname,lg,codeprice,codetrack,cluster)
{hhotelResa(cname,lg,codeprice,"","",codetrack,cluster,"","");}
function hhotelPromo(cname,lg,theme)
{hhotelResa(cname,lg,"DYNPROMO","","","","",theme,"");}
function hhotelOnePromo(cname,lg,codeprice,codetrack,cluster)
{hhotelResa(cname,lg,codeprice,"","",codetrack,cluster,"","style=DIRECTPROMO");}
function hhotelNegociated(cname,lg,codeprice,codetrack,cluster)
{hhotelResa(cname,lg,codeprice,"","",codetrack,cluster,"","negociated=1");}
function hhotelResaDirect(cname,lg,codeprice,firstroom,codetrack,firstdate)
{hhotelResa(cname,lg,codeprice,firstroom,firstdate,codetrack,"","","style=DIRECT");}
function hhotelSearchGroup(cluster,lg,price,nights,title)
{hhotelSearch(cluster,lg,price,nights,title,"","");}
function hhotelSearchPartner(cluster,lg,price,codetrack,title)
{if(codetrack!="")args="&from="+codetrack;else args="";hhotelSearch(cluster,lg,price,"",title,"",args);}
function hhotelSearchPriceDate(cluster,price,nights,title,firstdate)
{var args="";if(firstdate!="")args="FirstDate="+firstdate;hhotelSearch(cluster,"",price,nights,title,"",args);}
function hhotelSearchPriceDateTrack(cluster,lg,price,codetrack,nights,title,firstdate)
{var args="";if(codetrack!="")args="from="+codetrack;if(firstdate!="")args+="&FirstDate="+firstdate;hhotelSearch(cluster,lg,price,nights,title,"",args);}
function hhotelSearchPromo(cluster,lg,theme)
{hhotelSearch(cluster,lg,"","","",theme,"");}
function hhotelSearchExtra(cluster,lg,price,codetrack,extratitle,extraval,extrashow)
{var args="Extrafield="+escape(extratitle)+";"+extraval+";"+extrashow;if(codetrack!="")args+="&from="+codetrack;hhotelSearch(cluster,lg,price,"","","",args);}
function hhotelcancel(cname,lg)
{var waction=FBRESA+"cancel.phtml?state=77&Hotelnames="+cname;if(lg!="")waction+="&langue="+lg;fbOpenWindow(cname,waction,"reservation",400,350);}
function hhotelExtract(cname,lg)
{var waction=FBRESA+"getresa.phtml?Hotelnames="+cname+"&langue="+lg;fbOpenWindow(cname,waction,"getresa",700,300);return false;}
function hhotelcheckrates(cname,lg)
{var waction=FBRESA+"crs.phtml?clusterName="+cname;if(lg!="")waction+="&langue="+lg;waction+="&checkPromo=1";fbOpenWindow(cname,waction,"search",800,550);}
function hhotelResaMSP(cname,lg,codeprice,firstroom,firstdate,codetrack,cluster,theme,args,mastercluster,cartID)
{if(mastercluster!="")args+="&mastercluster="+mastercluster;if(cartID!="")args+="&cartID="+cartID;hhotelResa(cname,lg,codeprice,firstroom,firstdate,codetrack,cluster,theme,args);}
function hhotelSearchMSP(cluster,lg,price,nights,title,theme,args,mastercluster,cartID)
{if(mastercluster!="")args+="&mastercluster="+mastercluster;if(cartID!="")args+="&cartID="+cartID;hhotelSearch(cluster,lg,price,nights,title,theme,args);}
function hhotelResa(cname,lg,codeprice,firstroom,firstdate,codetrack,cluster,theme,args)
{var waction=FBRESA+"preresa.phtml?Hotelnames="+cname;if(lg!="")waction+="&langue="+lg;if(firstroom!=""){waction+="&FirstRoomName="+firstroom;if(codeprice=="")
codeprice="DIRECT";}
if(firstdate!=""){waction+="&FirstDate="+firstdate;if(codeprice=="")
codeprice="DIRECT";}
if(codeprice!="")waction+="&FSTBKNGCode="+codeprice;if(codetrack!="")waction+="&FSTBKNGTrackLink="+codetrack;if(cluster!="")waction+="&clustername="+cluster;if(theme!="")waction+="&theme="+theme;if(args!=""&&(args.indexOf("=")!=-1))waction+="&"+args;waction+="&HTTP_REFERER="+escape(document.location.href);fbOpenWindow(cname,waction,"reservation",400,350);}
function hhotelSearch(cluster,lg,price,nights,title,theme,args)
{var waction=FBRESA+"crs.phtml?clusterName="+cluster;if(lg!="")waction+="&langue="+lg;if(price!="")waction+="&FSTBKNGCode="+price;if(nights!="")waction+="&nights="+nights;if(title!="")waction+="&title="+escape(title);if(theme!="")waction+="&theme="+theme;if(args!=""&&(args.indexOf("=")!=-1))waction+="&"+args;fbOpenWindow(cluster,waction,"search",800,550);}
function hhotelSearchMultCode(cluster,lg,clecode,title,codetrack)
{var waction=FBRESA+"crs.phtml?clusterName="+cluster;if(lg!="")waction+="&langue="+lg;if(clecode!="")waction+="&AccessCode="+clecode;if(title!="")waction+="&title="+escape(title);if(codetrack!="")waction+="&FSTBKNGTrackLink="+codetrack;waction+="&crossSelling=NO";fbOpenWindow(cluster,waction,"search",800,550);}
function hhotelSearchCrossSell(cluster,lg,codetrack,crossSelling)
{var waction=FBRESA+"crs.phtml?clusterName="+cluster;if(lg!="")waction+="&langue="+lg;if(codetrack!="")waction+="&FSTBKNGTrackLink="+codetrack;if(crossSelling!="")waction+="&crossSelling="+crossSelling;fbOpenWindow(cluster,waction,"search",800,550);}
function hhotelDispopriceFHP(cname,lg,codetrack,year,month,day,nights,currency)
{var waction=FBRESA+"dispoprice.phtml?clusterName="+cname+"&Hotelnames="+cname;if(lg!="")waction+="&langue="+lg;if(codetrack!="")waction+="&FSTBKNGTrackLink="+codetrack;if(year!="")waction+="&fromyear="+year;if(month!="")waction+="&frommonth="+month;if(day!="")waction+="&fromday="+day;if(nights!="")waction+="&nbdays="+nights;if(currency!="")waction+="&CurrencyLabel="+currency;waction+="&showPromotions=3";fbOpenWindow(cname,waction,"reservation",750,600);}
function hhotelDispoprice(myForm)
{hhotelFormValidation(myForm,0);}
function hhotelFormValidation(myForm,mandatoryCode){if(mandatoryCode==1&&myForm.AccessCode.value==""){alert("You must type in your code ID");return(false);}
myForm.action=FBRESA+"dispoprice.phtml";if(FB_useGoogleAnalytics){sessId=generateSession();profilValue=escape("SESSION="+sessId+"&CODE=GoogleAnalytics");if((typeof myForm.profil)=="undefined"){var newInput=document.createElement("input");newInput.setAttribute("type","hidden");newInput.setAttribute("name","profil");newInput.setAttribute("value",profilValue);myForm.appendChild(newInput);}else{myForm.profil.value=profilValue;}}
window.open('','dispoprice','toolbar=no,width=800,height=550,menubar=no,scrollbars=yes,resizable=yes');myForm.submit();if(FB_useGoogleAnalytics){var cname="";if((typeof myForm.AccountName)!="undefined"&&myForm.AccountName.value!="")
cname=myForm.AccountName.value;else
cname=myForm.Clusternames.value;transferGAdata(sessId,cname);}
return(true);}
function hhotelFormUpdateHotelnames(myForm)
{menuNum=myForm.HotelList.selectedIndex;if(menuNum==null)
return;myForm.Hotelnames.value=myForm.HotelList.options[menuNum].value;}
function hhotelFormCancel(myForm){var CName=myForm.Hotelnames.value;var languetype=typeof myForm.langue;var langue;if(languetype=="undefined")
langue="";else
langue=myForm.langue.value;if(CName==null||CName=='All'||CName==''){alert('Please select a hotel first');return(false);}
return hhotelcancel(CName,langue);}
function hhotelFormExtract(myForm)
{var CName=myForm.Hotelnames.value;var languetype=typeof myForm.langue;var langue;if(languetype=="undefined")
langue="";else
langue=myForm.langue.value;if(CName==null||CName=='All'||CName==''){alert('Please select a hotel first');return(false);}
return hhotelExtract(CName,langue);}
function hhotelShowLang(lang)
{hhotelShowLang__(this.document,lang);}
function hhotelShowLangOpener(lang)
{hhotelShowLang__(window.opener.document,lang);window.close();}
function hhotelShowLang__(mydoc,lang)
{mydoc.idForm.langue.value=lang;var imgLang=hhotelLang2Img(lang);if(imgLang!=""){var formFlag=mydoc.selLgFlag;if(formFlag!=null)
mydoc.selLgFlag.src="fastbooking/flags/"+imgLang+".gif";var formFlag=mydoc.selLgTxt;if(formFlag!=null)
mydoc.selLgTxt.src="fastbooking/flags/"+imgLang+"lg.gif";}}
var FBLangCode=new Array("uk","france","germany","spain","portuguese","italy","nether","russian","dansk","svensk","islensk","norsk","turk","hungria","greek","arab","china","coreen","japan","croate","czech","poland");var FBLangImg=new Array("grandbret","france","germany","spain","portuguese","italy","nether","russia","denmark","sweeden","iceland","norway","turkey","hungary","greek","arab","china","coreen","japan","croate","czech","poland");function hhotelLang2Img(lang)
{for(i=0;i<FBLangCode.length;i++){if(FBLangCode[i]==lang)
break;}
return FBLangImg[i];}
function hhotelLangSelector()
{window.open('fastbooking/flags/langSelector.html','','width=330,height=180');}
var langcodes=new Array("en","uk","fr","france","de","germany","es","spain ","pt","portuguese","it","italy","nl","nether","ja","japan ","ko","coreen","zh","china","ar","arab","ru","russian","tr","turk","el","greek","hu","hungria","da","dansk","sv","svensk","is","islensk","no","norsk","hr","croate","cs","czech","pl","poland","iw","hebrew");function selectLang()
{if(navigator.appName=="Microsoft Internet Explorer")UL=navigator.userLanguage.substring(0,2);else if(navigator.appName=="Netscape")UL=navigator.language;else return;for(i=0;i<langcodes.length;i+=2)
if(UL==langcodes[i])
break;lang=(i<langcodes.length)?langcodes[i+1]:"uk";hhotelShowLang(lang);}
function build_year_select(thisform){var cur_date=new Date();var cur_year=takeYear(cur_date);cur_y=new Option(cur_year,cur_year,true,true);thisform.fromyear.options[0]=cur_y;if(thisform.toyear!=null){cur_yb=new Option(cur_year,cur_year,true,true);thisform.toyear.options[0]=cur_yb;}
next_y=new Option(cur_year+1,cur_year+1,false,false);thisform.fromyear.options[1]=next_y;next_yb=new Option(cur_year+1,cur_year+1,false,false);if(thisform.toyear!=null){thisform.toyear.options[1]=next_yb;}}
function check_departure(){thisform=document.idForm;if(thisform.today==null)
return;var nbm=[31,28,31,30,31,30,31,31,30,31,30,31];var ar_day=parseInt(thisform.fromday.value)+1;var ar_month=parseInt(thisform.frommonth.value);var ar_year=parseInt(thisform.fromyear.value);if(ar_day>nbm[ar_month-1]){ar_day=1;ar_month+=1;if(ar_month>12){ar_month=1;ar_year+=1;}}
var cur_date=new Date();var cur_year=takeYear(cur_date);thisform.today.selectedIndex=ar_day-1;thisform.tomonth.selectedIndex=ar_month-1;thisform.toyear.selectedIndex=ar_year-cur_year;}
function update_departure(){thisform=document.idForm;if(thisform.today==null)
return;var ar_day=parseInt(thisform.fromday.value)+1;var ar_month=parseInt(thisform.frommonth.value);var ar_year=parseInt(thisform.fromyear.value);var de_day=parseInt(thisform.today.value)+1;var de_month=parseInt(thisform.tomonth.value);var de_year=parseInt(thisform.toyear.value);if(de_year<ar_year){check_departure();}else{if(de_year==ar_year){if(de_month<ar_month){check_departure();}else{if(de_month==ar_month){if(de_day<=ar_day){check_departure();}}}}}}
function takeYear(theDate)
{x=theDate.getYear();var y=x%100;y+=(y<38)?2000:1900;return y;}
function popup(url)
{fbOpenWindow("",url,"",800,550);}
function ageschildren()
{var age='';var obj1='';var n=document.idForm.enfantresa.options[document.idForm.enfantresa.selectedIndex].value;for(i=1;i<=n;i++)
{obj1=document.getElementById("agechild"+i);age+=obj1.options[obj1.selectedIndex].value;age+=';';}
document.idForm.agesval.value=age;}
var FBRESA="http://www.fastbookings.biz/DIRECTORY/";var FB_nb_day_delay=7;var FB_useGoogleAnalytics=true;
