if (document.layers) document.captureEvents(Event.KEYDOWN); document.onkeydown = function (evt) { var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode; if (keyCode == 13) //13 = the code for pressing ENTER { if(document.form1.textfield.value==''){}else{sendQuerynew(document.form1.textfield.value,document.form1.textfield,'','QS_SEO');} } } function dates_1(startday, end_day) { var count; var str=""; for(count=startday;count<=end_day;count++){ str = str+""; } return str; } function getadultchild(){ var NOROOMS = document.form1.sel_no_of_rooms.options[document.form1.sel_no_of_rooms.selectedIndex].value; RN_writedata="
"; k=1 while(k<=(Number(NOROOMS))){ RN_writedata=RN_writedata+"
"+ "
Room "+k+" : Adult(s)
"+ "
Children
"+ "
"+ "
"+ "
"+ "
"+ "
"+ "
"+ "
"; k=k+1; } RN_writedata = RN_writedata+"
"; if (document.getElementById && !document.all) { document.getElementById('addroomstable').innerHTML=RN_writedata; } if (document.all) { addroomstable.innerHTML=RN_writedata; } } function getLastDay(){ var mDate = document.form1.sel_check_in_date.options[document.form1.sel_check_in_date.selectedIndex].value var mMonth = document.form1.sel_check_in_month.options[document.form1.sel_check_in_month.selectedIndex].value var mYear = document.form1.sel_check_in_year.options[document.form1.sel_check_in_year.selectedIndex].value if(mMonth == 04 || mMonth == 06 || mMonth == 09 ||mMonth == 11 ){ if( mDate > 30 ){ document.form1.sel_check_in_date.value = 30 } }else if( mMonth == 02 ){ var mRemainder = (mYear%4); if ( mRemainder > 0 ){ if( mDate > 28 ){ document.form1.sel_check_in_date.value = 28 } }else{ if( mDate > 29 ){ document.form1.sel_check_in_date.value = 29 } } } } function getdepartureNew1(){ var checkinDate = new Date(document.form1.sel_check_in_year.options[document.form1.sel_check_in_year.selectedIndex].value,(document.form1.sel_check_in_month.options[document.form1.sel_check_in_month.selectedIndex].value)-1,document.form1.sel_check_in_date.options[document.form1.sel_check_in_date.selectedIndex].value); var duration = document.form1.sel_no_of_nights.options[document.form1.sel_no_of_nights.selectedIndex].value; checkinDate.setDate(checkinDate.getDate()+Number(duration)); document.form1.sel_check_out_date.selectedIndex = (checkinDate.getDate()-1); document.form1.sel_check_out_month.selectedIndex = checkinDate.getMonth(); document.form1.sel_check_out_year.value = checkinDate.getFullYear(); } function getLastDay2(){ var mDate = document.form1.sel_check_out_date.options[document.form1.sel_check_out_date.selectedIndex].value var mMonth = document.form1.sel_check_out_month.options[document.form1.sel_check_out_month.selectedIndex].value var mYear = document.form1.sel_check_out_year.options[document.form1.sel_check_out_year.selectedIndex].value if(mMonth == 04 || mMonth == 06 || mMonth == 09 ||mMonth == 11 ){ if( mDate > 30 ){ document.form1.sel_check_out_date.value = 30 } }else if( mMonth == 02 ){ var mRemainder = (mYear%4); if ( mRemainder > 0 ){ if( mDate > 28 ){ document.form1.sel_check_out_date.value = 28 } }else{ if( mDate > 29 ){ document.form1.sel_check_out_date.value = 29 } } } } function setNightsNew(){ selDay = new Date(document.form1.sel_check_in_year.options[document.form1.sel_check_in_year.selectedIndex].value,(document.form1.sel_check_in_month.options[document.form1.sel_check_in_month.selectedIndex].value-1),(document.form1.sel_check_in_date.options[document.form1.sel_check_in_date.selectedIndex].value)); depDay = new Date(document.form1.sel_check_out_year.options[document.form1.sel_check_out_year.selectedIndex].value,(document.form1.sel_check_out_month.options[document.form1.sel_check_out_month.selectedIndex].value-1),(document.form1.sel_check_out_date.options[document.form1.sel_check_out_date.selectedIndex].value)); var duration=((depDay-selDay)/86400000)-1; if(Number(duration)>=31){ document.form1.sel_no_of_nights.selectedIndex=0; }else{ if(Number(duration)<0){ document.form1.sel_no_of_nights.selectedIndex=0; }else{ document.form1.sel_no_of_nights.selectedIndex=duration; } } } function setResolution() { if(navigator.appVersion.indexOf("MSIE")!=-1 ){ if(screen.width==800) document.getElementById('Layer1').style.left=((screen.availWidth) -(300)); else document.getElementById('Layer1').style.top=95; document.getElementById('Layer1').style.left=150; }else{ if(screen.width==800) document.getElementById('Layer1').style.left=((screen.availWidth) -(300)); else document.getElementById('Layer1').style.top=40; document.getElementById('Layer1').style.left=150; } } function popup_windows(theURL,winName,features) { window.open(theURL,winName,features); } function roll_over(img_name, img_src) { document[img_name].src = img_src; }