var addthis_pub='prontohotel';var addthis_loaded=false;var hs=new Object();hs.expand=function(){}
hs.htmlExpand=function(){}
ajax_showOptions=function(){}
var cal_loaded_script=false;var cal_loaded_html=false;var tr=new Object();tr.nextMonth="&laquo;";tr.prevMonth="&raquo;";try{if(document.getElementById){}else{document.getElementById=function(id){try{ret=document.all.id;}catch(ex){ret=document.layers.id;}
return ret;}}}catch(ex){}
var pageTracker;startnow=new Date();track_startdate=startnow.getTime();function track(category,action,label,value){try{if(!category)category='Unknown cat';if(!action)action='Unknown action';if(!label)label='';if(!value)value='';if(value=='seconds'){nownow=new Date();value=Math.round((nownow.getTime()-track_startdate)/1000);}
if(typeof pageTracker=='undefined'){if(location.href.indexOf("prontohotel.info")){}else{setTimeout("track('"+category+"', '"+action+"', '"+label+"', '"+value+"')",500);}
return false;}
pageTracker._trackEvent(category,action,label,value);return true;}catch(e){}}
function delaytrack(category,action,label,value){try{if(typeof pageTracker!='undefined'){return false;}
pageTracker._trackEvent(category,action,label,value);return true;}catch(e){}}
function MM_goToURL(){var i,args=MM_goToURL.arguments;document.MM_returnValue=false;for(i=0;i<(args.length-1);i+=2)eval(args[i]+".location='"+args[i+1]+"'");}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}
stickyHotelRow_once=new Array();function popupHotel(configs){staticbar();cnt=document.getElementById('topbar_content');if(stickyHotelRow_once.length==0)cnt.innerHTML='';if(!stickyHotelRow_once[configs.counter]){stickyHotelRow_once[configs.counter]=true;row='<div class="stickyHotelRow" id="stickyHotelRow_'+configs.counter+'"><span style="float:right"><b>'+configs.price+'</b> '+configs.currency+'</span>';row=row+' <a href="#" onClick="stickyHotelRowRemove('+configs.counter+'); return false" >x</a> ';row=row+'<a href="'+configs.url+'" onclick="return hs.htmlExpand(this, { contentId: \'highslide-html-2\', objectType: \'ajax\', objectHeight:\'300px\'} );">'+configs.name+'</a> '+configs.city+' ('+configs.zone+') ';row=row+'</div>';cnt.innerHTML=cnt.innerHTML+row;}
return hs.htmlExpand(configs.obj,{contentId:'highslide-html-2',objectType:'ajax',objectHeight:'300px'});}
function stickyHotelRowRemove(counter){rowObj=document.getElementById('stickyHotelRow_'+counter+'');if(rowObj)rowObj.style.display='none';}
function showAlert(_arg,opener){if(!_arg)return;if((typeof _arg)=='object'){_title=(_arg.title?_arg.title:'');_msg=(_arg.msg?_arg.msg:'Error');_type=(_arg.type?_arg.type:'alert');_dimming=(_arg.dimming==false?false:true);_url=(_arg.url?_arg.url:false);_ajax=(_arg.iframe?false:true);_group=(_arg.group?_arg.group:'showAlert');_opacity=(_arg.opacity?_arg.opacity:0);}else{_title='Alert';_msg=_arg;_type='alert';_dimming=true;_url=false;_ajax=false;_group='showAlert';}
_opacity=(_opacity?_opacity:(_dimming?'0.85':0.01));if(!opener)opener=document.getElementById('showAlertOpener');if(!document.getElementById('showAlert')){alert(_msg);return;}
if(_url){document.getElementById('showAlertTitle').innerHTML=_title;return $.colorbox({iframe:(_ajax?false:true),href:_url,width:"50%",height:"80%",opacity:_opacity});}else{document.getElementById('showAlertTitle').innerHTML=_title;document.getElementById('showAlertMessage').innerHTML=_msg;return $.colorbox({html:"<h2>"+_title+"</h2>"+_msg,width:"50%",height:"80%",opacity:_opacity});}}
function showHelp(tag,opener){if((typeof tag)=='object'){_url=tag.href;_opener=tag;}else{_opener=opener;_url='/showhelp.php?tag='+tag+'';}
return showAlert({url:_url,title:'Help',msg:'Help Not Found',group:'help'},_opener);}
var actualfontresize;function fontresize(size){var echo="";if(!actualfontresize)actualfontresize=readCookie('fontresize');actual=actualfontresize;var b=document.getElementsByTagName('body')[0];if(!actual||actual=='NaN')actual=0.9;actual=parseFloat(actual);if(size=='more'){actual=actual+0.2;newsize=Math.min(actual,2.6);}else if(size=='less'){actual=actual-0.2;newsize=Math.max(actual,0.4);}else if(size=='normal'){newsize=0.9;}else{newsize=actual;}
newsize=Math.round(newsize*100)/100;createCookie('fontresize',newsize,5);actualfontresize=newsize;b.style.fontSize=''+newsize+'em';}
function selectReplacement(obj){obj.className+=' replaced';var ul=document.createElement('ul');ul.className='selectReplacement';var opts=obj.options;for(var i=0;i<opts.length;i++){var selectedOpt;if(opts[i].selected){selectedOpt=i;break;}else{selectedOpt=0;}}
for(var i=0;i<opts.length;i++){var li=document.createElement('li');var txt=document.createTextNode(opts[i].text);li.appendChild(txt);li.selIndex=opts[i].index;li.selectID=obj.id;li.onclick=function(){selectMe(this);}
if(i==selectedOpt){li.className='selected';li.onclick=function(){this.parentNode.className+=' selectOpen';this.onclick=function(){selectMe(this);}}}
if(window.attachEvent){li.onmouseover=function(){this.className+=' hover';}
li.onmouseout=function(){this.className=this.className.replace(new RegExp(" hover\\b"),'');}}
ul.appendChild(li);}
obj.parentNode.appendChild(ul);}
function selectMe(obj){var lis=obj.parentNode.getElementsByTagName('li');for(var i=0;i<lis.length;i++){if(lis[i]!=obj){lis[i].className='';lis[i].onclick=function(){selectMe(this);}}else{setVal(obj.selectID,obj.selIndex);obj.className='selected';obj.parentNode.className=obj.parentNode.className.replace(new RegExp(" selectOpen\\b"),'');obj.onclick=function(){obj.parentNode.className+=' selectOpen';this.onclick=function(){selectMe(this);}}}}}
function setVal(objID,selIndex){var obj=document.getElementById(objID);obj.selectedIndex=selIndex;}
function setForm(){var s=document.getElementsByTagName('select');for(var i=0;i<s.length;i++){selectReplacement(s[i]);}}
function closeSel(obj){}
var gkktab=Array();function gkktab_init(id,n,def){gkktab[id]=Array();gkktab[id]['tabs']=Array();gkktab[id]['a']=Array();if(!def)def=1;for(i=1;i<=n;i++){if(gkktab[id]['tabs'][i])gkktab[id]['tabs'][i]=document.getElementById(''+id+'_'+i+'');if(gkktab[id]['a'][i])gkktab[id]['a'][i]=document.getElementById(''+id+'_'+i+'_a');if(def!=i&&gkktab[id]['tabs'][i])gkktab[id]['tabs'][i].style.display='none';}
gkktab[id]['tabs'][def].style.display='inherit';gkktab[id]['a'][def].style.textDecoration='underline';gkktab[id]['last']=def;}
function gkktab_click(id,i){if(i==gkktab[id]['last'])return;if(gkktab[id]['tabs'][gkktab[id]['last']])gkktab[id]['tabs'][gkktab[id]['last']].style.display='none';if(gkktab[id]['a'][gkktab[id]['last']])gkktab[id]['a'][gkktab[id]['last']].style.textDecoration='inherit';if(gkktab[id]['a'][gkktab[id]['last']])gkktab[id]['a'][gkktab[id]['last']].className='';if(gkktab[id]['tabs'][i])gkktab[id]['tabs'][i].style.display='inherit';if(gkktab[id]['a'][i])gkktab[id]['a'][i].style.textDecoration='underline';if(gkktab[id]['a'][i])gkktab[id]['a'][i].className='current';gkktab[id]['last']=i;}
function setPgTitle(title){if(!title)return;cnt=document.getElementById('PgTitle');cnt.innerHTML=title;cnt.className='PgTitleActive';}
function Getcurrentpage(){if(!document.getElementsByTagName)return;var anchors=document.getElementsByTagName("a");var thispage=location.href.replace(new RegExp(/\/$/),"");for(var i=0;i<anchors.length;i++){var anch=anchors[i];thisHREF=anch.getAttribute("href");if(!thisHREF)continue;thisHREF=thisHREF.replace(new RegExp(/\/$/),"");if((thisHREF==thispage)||(location.protocol+"//"+location.hostname+thisHREF==thispage)){anch.className=(anch.className?anch.className+' ':'')+"current";}}}
function fixExtSgif(){if(!document.getElementsByTagName)return;try{var tags=document.getElementsByTagName("img");for(var i=0;i<tags.length;i++){var tag=tags[i];attr=tag.getAttribute("src");if(attr=='http://extjs.com/s.gif'){tag.setAttribute("src",'http://media.prontohotel.com/s.gif');}}}catch(err){}}
function pngFix(){var arVersion=navigator.appVersion.split("MSIE")
var version=parseFloat(arVersion[1])
if((version>=5.5)&&(document.body.filters)){for(var i=0;i<document.images.length;i++){var img=document.images[i]
var imgName=img.src.toUpperCase()
if(imgName.substring(imgName.length-3,imgName.length)=="PNG")
{var imgID=(img.id)?"id='"+img.id+"' ":""
var imgClass=(img.className)?"class='"+img.className+"' ":""
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' "
var imgStyle="display:inline-block;"+img.style.cssText
if(img.align=="left")imgStyle="float:left;"+imgStyle
if(img.align=="right")imgStyle="float:right;"+imgStyle
if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle
var strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+img.src+"\', sizingMethod='scale');\"></span>"
img.outerHTML=strNewHTML
i=i-1}}}}
function onLoadFunct(){Getcurrentpage();}
gallery_click_history=new Array();gallery_img=new Array();function gallery_click(hotelid,picid,width){newpic=document.getElementById('imgGall_'+hotelid+'_'+picid+'');if(!gallery_img[hotelid]){gallery_img[hotelid]=document.getElementById('imgGallContainer_'+hotelid);}
if(!gallery_click_history[hotelid]){gallery_click_history[hotelid]=newpic;}
old=gallery_click_history[hotelid];old.className='gallery_inactive';gallery_click_history[hotelid]=newpic;newpic.className='gallery_active';if(width){gallery_img[hotelid].innerHTML='<img src="'+newpic.href+'" width="'+width+'" />';}else{gallery_img[hotelid].innerHTML='<img src="'+newpic.href+'" />';}
return false;}
function randomid(){var rand_no=Math.random();rand_no=rand_no*10000;rand_no='randomid_'+Math.ceil(rand_no)+'';if(document.getElementById(rand_no)){return randomid();}else{return rand_no;}}
var TimeToFadeDefault=1000.0;function fade(element,TimeToFade,destroy){var ty=typeof element;ty=ty.toLowerCase();if(ty=='string'||ty=='numeric'){eid=element;element=document.getElementById(element);}else{if(!element.id)element.id=randomid();eid=element.id;}
if(!TimeToFade)TimeToFade=TimeToFadeDefault;if(element==null)return;if(element.FadeState==null){if(element.style.display!='none'&&(element.style.opacity==null||element.style.opacity==''||element.style.opacity=='1')){element.FadeState=2;if(destroy)setTimeout("hide('"+eid+"')",TimeToFade+33);}else{if(element.style.display=='none'){element.style.opacity=0;element.style.filter='alpha(opacity = 0)';element.style.display='block';}
element.FadeState=-2;}}
if(element.FadeState==1||element.FadeState==-1){element.FadeState=element.FadeState==1?-1:1;element.FadeTimeLeft=TimeToFade-element.FadeTimeLeft;}else{element.FadeState=element.FadeState==2?-1:1;element.FadeTimeLeft=TimeToFade;setTimeout("animateFade("+new Date().getTime()+",'"+eid+"','"+TimeToFade+"')",33);}}
function animateFade(lastTick,eid,TimeToFade)
{var ty=typeof eid;ty=ty.toLowerCase();if(ty=='string'||ty=='numeric'){var element=document.getElementById(eid);}else{element=eid;eid=eid.id;}
if(!element)return;var curTick=new Date().getTime();var elapsedTicks=curTick-lastTick;if(!TimeToFade)TimeToFade=TimeToFadeDefault;if(element.FadeTimeLeft<=elapsedTicks)
{element.style.opacity=element.FadeState==1?'1':'0';element.style.filter='alpha(opacity = '
+(element.FadeState==1?'100':'0')+')';element.FadeState=element.FadeState==1?2:-2;return;}
element.FadeTimeLeft-=elapsedTicks;var newOpVal=element.FadeTimeLeft/TimeToFade;if(element.FadeState==1)
newOpVal=1-newOpVal;element.style.opacity=newOpVal;element.style.filter='alpha(opacity = '+(newOpVal*100)+')';setTimeout("animateFade("+curTick+",'"+eid+"')",33);}
var showhidehistory=new Array();var showhidehistory_vis=new Array();function showhide(id){var e=document.getElementById(id);if(e.style.display=='block')
hide(id);else
show(id);}
function show(id){var e=document.getElementById(id);newvis=(showhidehistory_vis[id]?showhidehistory_vis[id]:'block');e.style.display=newvis;}
function hide(id){var e=document.getElementById(id);showhidehistory_vis[id]=e.style.display;e.style.display='none';}
function resizeIframe(iframeid,size){document.getElementById(iframeid).height=size+30;}
window.onload=function(){onLoadFunct();}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}
function loadScript(url,callback){var script=document.createElement("script")
script.type="text/javascript";if(script.readyState){script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;if(typeof callback!='undefined'){try{callback();}catch(e){}}}};}else{script.onload=function(){if(typeof callback!='undefined'){try{callback();}catch(e){}}};}
script.src=url;h=document.getElementsByTagName("head")[0];if(h)h.appendChild(script);}
function hsgkk_load(){hs.outlineType='rounded-white';hs.showCredits=false;hs.registerOverlay({thumbnailId:null,overlayId:'controlbar',position:'top right',hideOnMouseOut:true});hs.fadeInOut=true;hs.numberOfImagesToPreload=0;hs.padToMinWidth=true;hs.cacheAjax=false;hs.captionEval='this.thumb.title';hs.preloadImages=function(number){return true};}
function cal_load_html(){cal_loaded_html=true;if(cal_loaded_script)cal_load();}
function cal_load_script(){cal_loaded_script=true;if(cal_loaded_html)cal_load();}
function addthisgkk_load(callback){if(addthis_loaded){if(typeof callback!='undefined'){callback();}}else{loadScript('http://s7.addthis.com/js/152/addthis_widget.js',callback);}
addthis_loaded=true;}
function addthisgkk_click(a){addthisgkk_load(function(){addthis_open(a,'','[URL]','[TITLE]');});return false;}
function addthisgkk_dblclick(a){addthisgkk_load(function(){addthis_sendto()});return false;}
function addthisgkk_close(a){try{addthis_close();}catch(e){}}
function urldecode(str){return decodeURIComponent(str.replace(/\+/g,'%20'));}
function urlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+');};var daysInMonth=[31,0,31,30,31,30,31,31,30,31,30,31];var filaMonth;calendar=new Object();var currentDate=new Date();var currentYear=1900+currentDate.getYear();var dailyMS=24*60*60*1000;var arrivalDate=new Date();var departureDate=new Date();arrivalDate.setDate(currentDate.getDate()+1);departureDate.setDate(currentDate.getDate()+2);var arrivalYear;var arrivalMonth;var arrivalDay;var departureYear;var departureMonth;var departureDay;var a;var today=new Date();var month=today.getMonth();var year=today.getFullYear()%100;var fullYear=today.getFullYear();year=new String(year);year=addzero(year);var countMonth=month;var styles='';styles=styles+'.b_popup {background-color: #FFFFFF !important; margin-left:-145px; z-index:100000} ';styles=styles+'div#b_calendarInner {border:#CCC 2px solid;display:none;}';styles=styles+'tr.b_calHeader td { color: transparent !important; }';styles=styles+'tr.b_calDays td { border-top: 1px solid #E8E8E8 !important; border-left: 1px solid #E8E8E8 !important;}';styles=styles+'.b_caltable { border-collapse: collapse !important; border: none; font: normal 10px Verdana;  }';styles=styles+'.b_calPast { padding:5px; color:#999999;}';styles=styles+'.b_caltable a { color: #333333;   }';styles=styles+'.b_calFuture  a,.b_calSelected  a{ padding:5px;display:block; color:#333333;}';styles=styles+'.b_calSelected  a{ background-color:#333333; color:#FFFFFF}';styles=styles+'.b_calClose { text-align: right; } ';styles=styles+'.b_noscript {border:#FF0000 1px dashed;background:#FFFFBF;padding:2px;color:#FF0000; display:none;}';styles=styles+'.b_calendar {vertical-align:bottom;}';if(document.getElementById){styles=styles+".b_blocktoggle {display: none}";var shown=new Array();}
var ss1=document.createElement('style');var def=styles;ss1.setAttribute("type","text/css");if(ss1.styleSheet){ss1.styleSheet.cssText=def;}else{var tt1=document.createTextNode(def);ss1.appendChild(tt1);}
var hh1=document.getElementsByTagName('head')[0];document.write('<style type="text/css">'+def+'</style>');function showCalendar(img,cal,dt,frm,m,y,d){if(document.getElementById){var c=document.getElementById(cal);var i=document.getElementById(img);var f=document.getElementById(frm);calendar.calfrm=frm;calendar.cal=c;calendar.caldt=dt;calendar.calf=f;var my=f[dt+'_month'].value.split("-");y=my[0];m=my[1];d=f[dt+'_day'].value;buildCal(y,m,d);var l=5;var t=0;aTag=i;document.getElementById("b_calendarInner").style.display="block";do{aTag=aTag.offsetParent;l+=aTag.offsetLeft;t+=aTag.offsetTop;}while(aTag.offsetParent&&aTag.tagName!='body');var left=i.offsetLeft+l;var top=i.offsetTop+t+i.offsetHeight+2;c.style.position="absolute";c.style.left=left+'px';c.style.top=top+'px';c.style.display="block";}}
function closeCal(){if(calendar&&calendar.cal)calendar.cal.style.display='none';}
function buildCal(y,m,d){td=new Date();if(!y)y=td.getFullYear();if(!m)m=td.getMonth()+1;if(!d)d=td.getDate;var frm=calendar.calfrm;var dt=calendar.caldt;var mDate=new Date(y,m-1,1);var firstMonthDay=mDate.getDay();daysInMonth[1]=(((mDate.getFullYear()%100!=0)&&(mDate.getFullYear()%4==0))||(mDate.getFullYear()%400==0))?29:28;var today=(y==td.getFullYear()&&m==td.getMonth()+1)?td.getDate():0;var t='<table class="b_caltable" cellspacing="0"><tr class="b_calHeader">';var flm=td.getMonth()+1;var flyr=td.getFullYear();for(p=0;p<=10;p++){if(flm==m){filaMonth=p;}
flm++;if(flm>12){flm=1;flyr++}}
t+='<td colspan="7">';if(filaMonth==0){t+='&nbsp;&lt;&nbsp;';}
else{t+='<a href="javascript:prevMonth('+y+','+m+');" title="'+tr.prevMonth+'">&nbsp;&lt;&nbsp;</a>';}
t+='&nbsp;<select name="ym" onchange="goMonth(this.options[this.selectedIndex].value)">';var mn=td.getMonth()+1;var yr=td.getFullYear();for(n=0;n<=10;n++){t+='<option value="'+mn+'"';if(mn==m){t+=' selected="selected"';}
t+='>'+months[mn-1]+' '+yr+'</option>';mn++;if(mn>12){mn=1;yr++}}
t+=' </select>&nbsp;';if(filaMonth==10){t+='&nbsp;&gt;&nbsp;';}
else{t+='<a href="javascript:nextMonth('+y+','+m+');" title="'+tr.nextMonth+'">&nbsp;&gt;&nbsp;</a>';}
t+='</td></tr>';t+='<tr class="b_calDayNames">';for(dn=0;dn<7;dn++){var cl='';if((dn%7==5)||(dn%7==6))cl+=' b_calWeekend';t+='<th class="'+cl+'">'+days[dn]+'</th>';}
t+='</tr><tr class="b_calDays">';for(i=1;i<=42;i++){var x=i-(firstMonthDay+6)%7;if(x>daysInMonth[m-1]||x<1)x='&nbsp;';var cl='';var href=0;if((i%7==0)||(i%7==6))cl+=' b_calWeekend';if(x>0){var xDay=new Date(y,m-1,x);if((xDay.getFullYear()==y)&&(xDay.getMonth()+1==m)&&(xDay.getDate()==d))
{cl+=' b_calSelected';href=1}
if((xDay.getFullYear()==td.getFullYear())&&(xDay.getMonth()==td.getMonth())&&(xDay.getDate()==td.getDate()))
{cl+=' b_calToday';href=1;}
else{if(xDay>td){cl+=' b_calFuture';href=1;}
else{if(xDay<td){cl+=' b_calPast'}}}};t+='<td class="'+cl+'">';if(href){t+='<a href="javascript:pickDate('+y+','+m+','+x+',\''+dt+'\',\''+frm+'\');">'+x+'</a>';}else{t+=x;}
t+='</td>';if(((i)%7==0)&&(i<36)){t+='</tr><tr class="b_calDays">';}}
t+='</tr><tr class="b_calClose"><td colspan="7"><a href="javascript:closeCal();">'+tr.closeCalendar+'</a></td></tr></table>';document.getElementById("b_calendarInner").innerHTML=t;}
function prevMonth(y,m){if(new Date(y,m-1,1)<td)return;if(m>1){m--}else{m=12;y--};buildCal(y,m);}
function nextMonth(y,m){if(m<12){m++;}else{m=1;y++;}
if(y>td.getFullYear()&&m>=td.getMonth())return;buildCal(y,m);}
function goMonth(m){var y=td.getFullYear();if(m<td.getMonth()+1)y++;buildCal(y,m);}
function pickDate(y,m,d,dt,frm){if(!frm){var f=calendar.calf;}else{var f=document.getElementById(frm);}
if(!dt){var dt=calendar.caldt;}
f[dt+'_month'].value=y+"-"+m;f[dt+'_day'].value=d;if(dt=="b_checkin"){checkDateOrder(calendar.calfrm,'b_checkin_day','b_checkin_month','b_checkout_day','b_checkout_month');}
closeCal();}
function addzero(value)
{while(value.length<2)value=String("0")+value;return value;}
function checkDateOrder(frm,ci_day,ci_month_year,co_day,co_month_year){if(document.getElementById){var frm=document.getElementById(frm);var my=frm[ci_month_year].value.split("-");var ci=new Date(my[0],my[1]-1,frm[ci_day].value,12,0,0,0);my=frm[co_month_year].value.split("-");var co=new Date(my[0],my[1]-1,frm[co_day].value,12,0,0,0);if(ci>=co){co.setTime(ci.getTime()+1000*60*60*24);frm[co_day].value=co.getDate();var com=co.getMonth()+1;frm[co_month_year].value=co.getFullYear()+"-"+com;}}}
function calendarMonthOptions(id){obj=document.getElementById(id);if(!obj)return;var monthoutput;var today=new Date();var month=today.getMonth();var year=today.getFullYear()%100;var fullYear=today.getFullYear();year=new String(year);year=addzero(year);var countMonth=month;for(var i=0;i<12;i++,countMonth++){if(countMonth%12==0&&i>0){countMonth=0;year++;year=new String(year);year=addzero(year);fullYear++;}
obj.options[i]=new Option(monthArray[countMonth]+" "+year,fullYear+"-"+(countMonth+1));}}
function cal_init(){var arrivalYear=1900+arrivalDate.getYear();var arrivalMonth=1+arrivalDate.getMonth();var arrivalDay=arrivalDate.getDate();var departureYear=1900+departureDate.getYear();var departureMonth=1+departureDate.getMonth();var departureDay=departureDate.getDate();a=document.b_frm;var frm=document.getElementById('b_frm');a.fmy.options.length=0
a.fmy.innerHTML=''
a.tmy.options.length=0
a.tmy.innerHTML=''
for(var i=0;i<18;i++,countMonth++){if(countMonth%12==0&&i>0){countMonth=0;year++;year=new String(year);year=addzero(year);fullYear++;}
var tmpoption1=document.createElement("OPTION");var tmpoption2=document.createElement("OPTION");tmpoption1.innerText=months[countMonth]+" '"+year;tmpoption1.text=months[countMonth]+" '"+year;tmpoption1.value=fullYear+"-"+(countMonth+1);tmpoption2.innerText=months[countMonth]+" '"+year;tmpoption2.text=months[countMonth]+" '"+year;tmpoption2.value=fullYear+"-"+(countMonth+1);try{a.fmy.options.add(tmpoption1);a.tmy.options.add(tmpoption2);}
catch(ex){if(!a.fmy.options.add){}
try{a.fmy.options.add(tmpoption1,null);a.tmy.options.add(tmpoption2,null);}catch(ex){var tmpoption1=document.createElement("OPTION");var tmpoption2=document.createElement("OPTION");tmpoption1.text=months[countMonth]+" '"+year;tmpoption1.value=fullYear+"-"+(countMonth+1);tmpoption2.text=months[countMonth]+" '"+year;tmpoption2.value=fullYear+"-"+(countMonth+1);a.fmy.options.add(tmpoption1);a.tmy.options.add(tmpoption2);}}}
if((a.fd.selectedIndex==0)&&(a.td.selectedIndex==0)){a.fd.options[arrivalDay-1].selected=true;a.td.options[departureDay-1].selected=true;a.fmy.options[arrivalDate.getMonth()-currentDate.getMonth()].selected=true;a.tmy.options[departureDate.getMonth()-currentDate.getMonth()].selected=true;}
var my=frm['b_checkin_month'].value.split("-");var ci=new Date(my[0],my[1]-1,frm['b_checkin_day'].value,12,0,0,0);my=frm['b_checkout_month'].value.split("-");var co=new Date(my[0],my[1]-1,frm['b_checkout_day'].value,12,0,0,0);if(ci>=co){co.setTime(ci.getTime()+1000*60*60*24);frm['b_checkout_day'].value=co.getDate();var com=co.getMonth()+1;frm['b_checkout_month'].value=co.getFullYear()+"-"+com;}}
function blocktoggle(i){if(document.getElementById){shown[i]=(shown[i])?false:true;currentdisplay=(shown[i])?'block':'none';document.getElementById('b_blocktoggle'+i).style.display=currentdisplay;}}
function blockdisplay(i){if(document.getElementById){if(document.getElementById("b_blockdisplay"+i)){for(j=1;j<1000;j++){if(document.getElementById('b_blockdisplay'+j)){document.getElementById('b_blockdisplay'+j).style.display='none';}
else{j=1000;}}
if(i){document.getElementById("b_blockdisplay"+i).style.display='block';}}}}
