function calrows() { temp8=ad+"Month"; monther=document.getElementById(temp8).selectedIndex; var calstart=MDY[monther]; var calend=MD[monther]; var dowstart=DOW[monther]; calbody=''; if (dowstart==1) {calbody=calbody+' <\/td>';} if (dowstart>1) {calbody=calbody+' <\/td>';} for (dloop=1;dloop<=calend;dloop++) {dowstart=dowstart+1; if (dowstart==8) {dowstart=1; calbody=calbody+'';} calbody=calbody+"=dloop)) {csd="bdayarr";}} if (monther==0 && MDY[0]>dloop) {calbody=calbody+' class="bpast">'+dloop+"<\/td>";} else { if ( (document.getElementById("DepartureMonth").selectedIndex==monther && document.getElementById("DepartureDay").selectedIndex==dloop-1) || (document.getElementById("ArrivalMonth").selectedIndex==monther && document.getElementById("ArrivalDay").selectedIndex==dloop-1) ) {calbody=calbody+' class="bstart"';} else if ( (ad=="Departure" && document.getElementById("ArrivalMonth").selectedIndex=dloop ) || (ad=="Departure" && document.getElementById("ArrivalMonth").selectedIndex==document.getElementById("DepartureMonth").selectedIndex && document.getElementById("DepartureDay").selectedIndex>=dloop && document.getElementById("ArrivalDay").selectedIndex=dloop && document.getElementById("ArrivalDay").selectedIndex'; if (csd=="bdayarr" || (document.getElementById("ArrivalMonth").selectedIndex==document.getElementById("DepartureMonth").selectedIndex && document.getElementById("ArrivalDay").selectedIndex==dloop-1 && ad=="Departure") ) {calbody=calbody+dloop;} else {calbody=calbody+''+dloop+"<\/a>";} calbody=calbody+"<\/td>";} if (dowstart==7) { calbody=calbody+"<\/tr>";} } if (dowstart==6) {calbody=calbody+' <\/td><\/tr>';} if (dowstart<6) {calbody=calbody+' <\/td><\/tr>';} } function dayofmonth(tempd) { document.getElementById(ad+"Day").selectedIndex=tempd; temp8=ad+"Month"; temp7=monther; validatedates(); hidecal(); } function validatedates() { if (document.getElementById("DepartureMonth").selectedIndexMD[11]-4) {document.getElementById("ArrivalDay").selectedIndex=MD[11]-4; hidecal(); showcal(); } if (document.getElementById("DepartureMonth").selectedIndex==document.getElementById("ArrivalMonth").selectedIndex && document.getElementById("ArrivalDay").selectedIndex==MD[document.getElementById("DepartureMonth").selectedIndex]-1 ) { document.getElementById("DepartureMonth").selectedIndex=document.getElementById("ArrivalMonth").selectedIndex+1; document.getElementById("DepartureDay").selectedIndex=0; hidecal(); showcal();} if (temp8=="ArrivalMonth" && document.getElementById("DepartureMonth").selectedIndextemp7) {document.getElementById("ArrivalMonth").selectedIndex=temp7;} checkdayofmonth(); if (temp8=="ArrivalMonth" && document.getElementById("DepartureMonth").selectedIndex==temp7 && document.getElementById("DepartureDay").selectedIndex<=document.getElementById("ArrivalDay").selectedIndex) { document.getElementById("DepartureDay").selectedIndex=document.getElementById("ArrivalDay").selectedIndex; if (document.getElementById("DepartureDay").selectedIndex=document.getElementById("DepartureDay").selectedIndex) { document.getElementById("DepartureDay").selectedIndex=document.getElementById("ArrivalDay").selectedIndex+1; showcal(); } checkdayofmonth(); if (document.getElementById("ArrivalMonth").selectedIndex==0 && document.getElementById("ArrivalDay").selectedIndex-1+MD[document.getElementById("ArrivalMonth").selectedIndex]) {document.getElementById("ArrivalDay").selectedIndex=-1+MD[document.getElementById("ArrivalMonth").selectedIndex];} if (document.getElementById("DepartureDay").selectedIndex>-1+MD[document.getElementById("DepartureMonth").selectedIndex]) {document.getElementById("DepartureDay").selectedIndex=-1+MD[document.getElementById("DepartureMonth").selectedIndex];} } function back1(temp2) {temp7=temp2-1; temp8=ad+"Month"; document.getElementById(temp8).selectedIndex=temp7; temp8=ad+"Day"; if (ad=="Arrival") {document.getElementById(temp8).selectedIndex=MDY[temp7]-1;} if (ad=="Departure" && document.getElementById("DepartureMonth").selectedIndex==document.getElementById("ArrivalMonth").selectedIndex) {document.getElementById("DepartureDay").selectedIndex=document.getElementById("ArrivalDay").selectedIndex+1;} if (ad=="Departure" && document.getElementById("DepartureMonth").selectedIndex>document.getElementById("ArrivalMonth").selectedIndex) {document.getElementById("DepartureDay").selectedIndex=0;} validatedates(); showcal(); } function fwd1(temp2) {temp7=temp2+1; temp8=ad+"Month"; document.getElementById(temp8).selectedIndex=temp7; if (ad=="Arrival") {document.getElementById("ArrivalDay").selectedIndex=0;} else {document.getElementById("DepartureDay").selectedIndex=0;} if (document.getElementById("DepartureMonth").selectedIndex0) {temp5=tempmonth-1; tempback='<<\/a>';} if (tempmonth<11) {temp5=tempmonth+1; tempfwd='><\/a>';} temp3='
'+tempback+'<\/td>'+MNM[tempmonth]+'<\/td>'+tempfwd+'<\/td><\/tr><\/table><\/td><\/tr>
Sun<\/td>Mon<\/td>Tue<\/td>Wed<\/td>Thu<\/td>Fri<\/td>Sat<\/td><\/tr>'; return(temp3); } function showcal(){ calheader='
'; calfooter="<\/table><\/td><\/tr><\/table><\/td><\/tr><\/table>"; if (ad=="Arrival") {document.getElementById("arrivalcolor").style.backgroundColor="#FFFF99"; document.getElementById("departurecolor").style.backgroundColor="";} if (ad=="Departure") {document.getElementById("departurecolor").style.backgroundColor="#FFDAB9"; document.getElementById("arrivalcolor").style.backgroundColor="";} calbod(ad); calrows(); document.getElementById("cal").innerHTML = calheader+temp3+calbody+calfooter; temp8=ad+"Month"; temp7=monther; validatedates(); } function hidecal(){ document.getElementById("departurecolor").style.backgroundColor=""; document.getElementById("arrivalcolor").style.backgroundColor=""; var currentElement = document.activeElement; document.getElementById("cal").innerHTML = ""; } function javawaiting() { document.getElementById("cal").style.top="25px"; document.getElementById("cal").style.textAlign="center"; document.getElementById("cal").innerHTML ='


Searching . . . . Please Wait
';} function hidechat(){ document.getElementById("chatwindow").style.display="none"; }