var maxchildren=6;var globalTakeFocus=null;var hotelfindersubmitcount=0;var airavailsubmitcount=0;function setFocus(ref){globalTakeFocus=ref;setTimeout("globalTakeFocus.focus();globalTakeFocus.select()",100);}
function nval(c){var v=sval(c);if(0==v.length)return 0;return(parseFloat(v));}
function sval(c){if(c.type=="text"||c.type=="textarea"||c.type=="hidden")return c.value;if(c.type=="select-one"){var v=c.options[c.selectedIndex].value;if(v=='')v=c.options[c.selectedIndex].text;return v;}
return null;}
function abort(c,m){window.alert(m);if(c)c.focus();return false;}
function abort2(c,m){window.alert(m);if(c)setFocus(c);return false;}
function date_is_valid(yyyy,mm,dd){yyyy=parseInt(yyyy,10);mm=parseInt(mm,10);dd=parseInt(dd,10);if(yyyy==NaN||yyyy<1753||9999<yyyy)return false;if(mm==NaN||mm<1||12<mm)return false;if(dd==NaN||dd<1||31<dd)return false;if(dd<29)return true;if(mm==1||mm==3||mm==5||mm==7||mm==8||mm==10||mm==12)return true;if(mm==2){if(dd==29&&(yyyy%4?0:(yyyy%400?(yyyy%100?1:0):1)))
return true;}else if(dd<31)return true;return false;}
function days_in_future(yyyy,mm,dd){yyyy=parseInt(yyyy,10);mm=parseInt(mm,10);dd=parseInt(dd,10);if(!date_is_valid(yyyy,mm,dd))return false;var then=new Date(yyyy,mm-1,dd,0,0,0,0);var d=new Date();var today=new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0);var msdiff=then.getTime()-today.getTime();var daydiff=Math.floor(msdiff/86400000+0.5);return daydiff;}
function bf()
{if((top.location!=location)&&(location.hostname!="vacations-in-hawaii.com")&&(location.hostname!="secure-travel.com")&&(location.hostname!="thawaii.com")){top.location.href=document.location.href;}}
function CheckDate(c){v=sval(c);return String2Date(v);}
function String2Date(s){var m,d,y;var pat,result;pat=/^(\d\d?)\/(\d\d?)\/(\d\d\d\d)$/;result=v.match(pat);if(result){m=result[1];d=result[2];y=result[3];}else{pat=/^(\d\d\d\d)\/(\d\d?)\/(\d\d?)$/;result=v.match(pat);if(result){y=result[1];m=result[2];d=result[3];}else{return false;}}
if(date_is_valid(y,m,d))
return new Date(y,m-1,d);else
return false;}
function GetChildCount(fob){var n=0;if(fob&&fob.Num_Children){n=parseInt(fob.Num_Children.value,10);n=isNaN(n)?0:Math.round(n);if(maxchildren&&maxchildren<n)n=maxchildren;if(n<0)n=0;}
return n;}
function HandleChildren(scope){var i;if(scope&&scope.form)
SetChildAgeVisibility(scope.form);else if(document.forms&&0<document.forms.length){for(i=0;i<document.forms.length;++i)
SetChildAgeVisibility(document.forms[i]);}else{;}}
function VerifyChildren(fob){var nchildren;var idx;var c;if(fob){nchildren=GetChildCount(fob);for(idx=1;idx<=nchildren;++idx)
if((c=fob["ChildAge"+idx])&&c.value.match(/\D/))
return abort(c,"You must select an age for child number "+idx+".");}
return true;}
function SetChildAgeVisibility(fob){var nchildren;var idx;var c;if(fob&&fob.Num_Children){nchildren=GetChildCount(fob);idx=1;while(c=fob["ChildAge"+idx]){if(idx<=nchildren){if(c.disabled!=null)c.disabled="";if(c.style&&(c.style.visibility!=null))
c.style.visibility="";}else{if(c.disabled!=null)c.disabled="disabled";if(c.style&&(c.style.visibility!=null))
c.style.visibility="hidden";}
++idx;}}}
function CarOptionVisibility(fob){var f=fob;f.Car_Option.visibility="hidden";}
function FieldExists(fname){var retval=0;var i,curform;if(document.forms&&0<document.forms.length){for(i=0;i<document.forms.length;++i){curform=document.forms[i];if(curform[fname]){retval=1;break;}}}
return retval;}
function GetStateSelector(f,myfield){var index;var country;var state;if(myfield=="Country"){index=f.Country.selectedIndex;country=f.Country.options[index].value;state=f.State;}else if(myfield=="CC_Country"){index=f.CC_Country.selectedIndex;country=f.CC_Country.options[index].value;state=f.CC_Billing_State;}
if(country=="USA"){state.length=52;state.options[0].text="STATE"
state.options[0].value="XX";state.options[1].text="Alabama AL"
state.options[1].value="AL";state.options[2].text="Alaska AK"
state.options[2].value="AK"
state.options[3].text="Arizona AZ"
state.options[3].value="AZ"
state.options[4].text="Arkansas AR"
state.options[4].value="AR"
state.options[5].text="Armed Forces Americas"
state.options[5].value="AA"
state.options[6].text="Armed Forces Europe"
state.options[6].value="AE"
state.options[7].text="Armed Forces Pacific"
state.options[7].value="AP"
state.options[8].text="California CA"
state.options[8].value="CA"
state.options[9].text="Colorado CO"
state.options[9].value="CO"
state.options[10].text="Connecticut CT"
state.options[10].value="CT"
state.options[11].text="Delaware DE"
state.options[11].value="DE"
state.options[12].text="Dist of Columbia DC"
state.options[12].value="DC"
state.options[13].text="Florida FL"
state.options[13].value="FL"
state.options[14].text="Georgia GA"
state.options[14].value="GA"
state.options[15].text="Hawaii HI"
state.options[15].value="HI"
state.options[16].text="Idaho ID"
state.options[16].value="ID"
state.options[17].text="Illinois IL"
state.options[17].value="IL"
state.options[18].text="Indiana IN"
state.options[18].value="IN"
state.options[19].text="Iowa IA"
state.options[19].value="IA"
state.options[20].text="Kansas KS"
state.options[20].value="KS"
state.options[21].text="Kentucky KY"
state.options[21].value="KY"
state.options[22].text="Louisiana LA"
state.options[22].value="LA"
state.options[23].text="Maine ME"
state.options[23].value="ME"
state.options[24].text="Maryland MD"
state.options[24].value="MD"
state.options[25].text="Massachusetts MA"
state.options[25].value="MA"
state.options[26].text="Michigan MI"
state.options[26].value="MI"
state.options[27].text="Minnesota MN"
state.options[27].value="MN"
state.options[28].text="Mississippi MS"
state.options[28].value="MS"
state.options[29].text="Missouri MO"
state.options[29].value="MO"
state.options[30].text="Montana MT"
state.options[30].value="MT"
state.options[31].text="Nebraska NE"
state.options[31].value="NE"
state.options[32].text="Nevada NV"
state.options[32].value="NV"
state.options[33].text="New Hampshire NH"
state.options[33].value="NH"
state.options[34].text="New Jersey NJ"
state.options[34].value="NJ"
state.options[35].text="New Mexico NM"
state.options[35].value="NM"
state.options[36].text="New York NY"
state.options[36].value="NY"
state.options[37].text="North Carolina NC"
state.options[37].value="NC"
state.options[38].text="North Dakota ND"
state.options[38].value="ND"
state.options[39].text="Ohio OH"
state.options[39].value="OH"
state.options[40].text="Oklahoma OK"
state.options[40].value="OK"
state.options[41].text="Oregon OR"
state.options[41].value="OR"
state.options[42].text="Pennsylvania PA"
state.options[42].value="PA"
state.options[43].text="Rhode Island RI"
state.options[43].value="RI"
state.options[44].text="South Carolina SC"
state.options[44].value="SC"
state.options[45].text="South Dakota SD"
state.options[45].value="SD"
state.options[46].text="Tennessee TN"
state.options[46].value="TN"
state.options[47].text="Texas TX"
state.options[47].value="TX"
state.options[48].text="Utah UT"
state.options[48].value="UT"
state.options[49].text="Virginia VA"
state.options[49].value="VA"
state.options[50].text="Vermont VT"
state.options[50].value="VT"
state.options[51].text="Washington WA"
state.options[51].value="WA"
state.options[52].text="West Virginia WV"
state.options[52].value="WV"
state.options[53].text="Wisconsin WI"
state.options[53].value="WI"
state.options[54].text="Wyoming WY"
state.options[54].value="WY"}
else if(country=="Canada"){state.length=14;state.options[0].text="PROVINCE"
state.options[0].value="XX";state.options[1].text="Alberta AB"
state.options[1].value="AB"
state.options[2].text="British Columbia BC"
state.options[2].value="BC"
state.options[3].text="Labrador LB"
state.options[3].value="LB"
state.options[4].text="Manitoba MB"
state.options[4].value="MB"
state.options[5].text="New Brunswick NB"
state.options[5].value="NB"
state.options[6].text="Newfoundland NF"
state.options[6].value="NF"
state.options[7].text="Northwest Territories NT"
state.options[7].value="NT"
state.options[8].text="Nova Scotia NS"
state.options[8].value="NS"
state.options[9].text="Ontario ON"
state.options[9].value="ON"
state.options[10].text="Prince Edward Island PE"
state.options[10].value="PE"
state.options[11].text="Quebec QC"
state.options[11].value="QC"
state.options[12].text="Saskatchewan SK"
state.options[12].value="SK"
state.options[13].text="Yukon Territory YT"
state.options[13].value="YT"}
else if(country=="Japan"){state.length=48;state.options[0].text="PREFECTURE"
state.options[0].value="XX";state.options[1].text="Hokkaido (Hokkaido)"
state.options[1].value="Hokkaido"
state.options[2].text="Aomori (Aomori)"
state.options[2].value="Aomori"
state.options[3].text="Iwate (Iwate)"
state.options[3].value="Iwate"
state.options[4].text="Miyagi (Miyagi)"
state.options[4].value="Miyagi"
state.options[5].text="Akita (Akita)"
state.options[5].value="Akita"
state.options[6].text="Yamagata (Yamagata)"
state.options[6].value="Yamagata"
state.options[7].text="Fukushima (Fukushima)"
state.options[7].value="Fukushima"
state.options[8].text="Ibaraki (Ibaraki)"
state.options[8].value="Ibaraki"
state.options[9].text="Tochigi (Tochigi)"
state.options[9].value="Tochigi"
state.options[10].text="Gumma (Gumma)"
state.options[10].value="Gumma"
state.options[11].text="Saitama (Saitama)"
state.options[11].value="Saitama"
state.options[12].text="Chiba (Chiba)"
state.options[12].value="Chiba"
state.options[13].text="Tokyo (Tokyo)"
state.options[13].value="Tokyo"
state.options[14].text="Kanagawa (Kanagawa)"
state.options[14].value="Kanagawa"
state.options[15].text="Niigata (Niigata)"
state.options[15].value="Niigata"
state.options[16].text="Toyama (Toyama)"
state.options[16].value="Toyama"
state.options[17].text="Ishikawa (Ishikawa)"
state.options[17].value="Ishikawa"
state.options[18].text="Fukui (Fukui)"
state.options[18].value="Fukui"
state.options[19].text="Yamanashi (Yamanashi)"
state.options[19].value="Yamanashi"
state.options[20].text="Nagano (Nagano)"
state.options[20].value="Nagano"
state.options[21].text="Gifu (Gifu)"
state.options[21].value="Gifu"
state.options[22].text="Shizuoka (Shizuoka)"
state.options[22].value="Shizuoka"
state.options[23].text="Aichi (Aichi)"
state.options[23].value="Aichi"
state.options[24].text="Mie (Mie)"
state.options[24].value="Mie"
state.options[25].text="Shiga (Shiga)"
state.options[25].value="Shiga"
state.options[26].text="Kyoto (Kyoto)"
state.options[26].value="Kyoto"
state.options[27].text="Osaka (Osaka)"
state.options[27].value="Osaka"
state.options[28].text="Hyogo (Hyogo)"
state.options[28].value="Hyogo"
state.options[29].text="Nara (Nara)"
state.options[29].value="Nara"
state.options[30].text="Wakayama (Wakayama)"
state.options[30].value="Wakayama"
state.options[31].text="Tottori (Tottori)"
state.options[31].value="Tottori"
state.options[32].text="Shimane (Shimane)"
state.options[32].value="Shimane"
state.options[33].text="Okayama (Okayama)"
state.options[33].value="Okayama"
state.options[34].text="Hiroshima (Hiroshima)"
state.options[34].value="Hiroshima"
state.options[35].text="Yamaguchi (Yamaguchi)"
state.options[35].value="Yamaguchi"
state.options[36].text="Tokushima (Tokushima)"
state.options[36].value="Tokushima"
state.options[37].text="Kagawa (Kagawa)"
state.options[37].value="Kagawa"
state.options[38].text="Ehime (Ehime)"
state.options[38].value="Ehime"
state.options[39].text="Kochi (Kochi)"
state.options[39].value="Kochi"
state.options[40].text="Fukuoka (Fukuoka)"
state.options[40].value="Fukuoka"
state.options[41].text="Saga (Saga)"
state.options[41].value="Saga"
state.options[42].text="Nagasaki (Nagasaki)"
state.options[42].value="Nagasaki"
state.options[43].text="Kumamoto (Kumamoto)"
state.options[43].value="Kumamoto"
state.options[44].text="Oita (Oita)"
state.options[44].value="Oita"
state.options[45].text="Miyazaki (Miyazaki)"
state.options[45].value="Miyazaki"
state.options[46].text="Kagoshima (Kagoshima)"
state.options[46].value="Kagoshima"
state.options[47].text="Okinawa (Okinawa)"
state.options[47].value="Okinawa"}
else if(country=="Australia"){state.length=9;state.options[0].text="STATE"
state.options[0].value="XX";state.options[1].text="New South Wales"
state.options[1].value="NSW"
state.options[2].text="Victoria"
state.options[2].value="VIC"
state.options[3].text="Queensland"
state.options[3].value="QLD"
state.options[4].text="Western Australia"
state.options[4].value="WA"
state.options[5].text="South Australia"
state.options[5].value="SA"
state.options[6].text="Tasmania"
state.options[6].value="TAS"
state.options[7].text="Australian Capital Territory"
state.options[7].value="ACT"
state.options[8].text="Northern Territory"
state.options[8].value="NT"}
else if(country=="XX"){state.length=1;state.options[0].text="ENTER COUNTRY FIRST"
state.options[0].value="XX";}
else{state.length=1;state.options[0].text="ENTER STATE (IF ANY) IN CITY FIELD"
state.options[0].value="XX";}}
function Check_Name_Field(c){v=sval(c);pattern=/^[a-zA-Z .\-\&\'\/]+$/;return checkstring(c,v,"The name you entered contains characters that we cannot recognize. Please enter name in English only.",pattern);}
function Check_Address_Field(c){v=sval(c);pattern=/^[a-zA-Z0-9 .,#();:"\-\&\'\/]+$/;if(0==v.length)return true;return checkstring(c,v,"The address you entered contains characters that we cannot recognize. Please enter address in English only.",pattern);}
function Check_Resid_Field(c){v=sval(c);pattern=/^[0-9 ,#\-]+$/;if(0==v.length)return true;return checkstring(c,v,"The reservation number you entered contains characters that we cannot recognize. Please enter numbers only. Reservation numbers are 5 or 6 digits in length.",pattern);}
function Check_PhoneNumber_Field(c){v=sval(c);pattern=/^[0-9 ,#\-]+$/;if(0==v.length)return true;return checkstring(c,v,"The phone number you entered contains characters that we cannot recognize. Please enter numbers and dashes only.",pattern);}
function Check_Comment_Field(c){v=sval(c);pattern=/^[a-zA-Z0-9 \n\t.,#();:"\-\&\?\'\/\!\@\$\%]+$/;if(0==v.length)return true;return checkstring(c,v,"The comments you entered contain characters that we cannot recognize. Please enter your comments or questions in English only.",pattern);}
function Check_EmailAddress_Field(c){v=sval(c);pattern=/^([a-zA-Z0-9\+])+([.a-zA-Z0-9_\+-])*@([a-zA-Z0-9-])+(.[a-zA-Z0-9-]+)+/;return checkstring(c,v,"The email address you entered appears to be incorrect. Please check it.",pattern);}
function Check_Client_Contact_Info1(fob){var f=fob;var c,m,v;if(c=f.clientfirstname){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a name in this field");}
if(!Check_Name_Field(c)){return false;};}
if(c=f.clientlastname){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a name in this field");}
if(!Check_Name_Field(c)){return false;};}
if(c=f.clientphone){msg="Please enter one or more phone numbers using digits, spaces, or dashes.";c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v.match(/[-0-9 ]+$/));else return abort(c,msg);}
if(c=f.clientemail){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter your email address");}
if(!Check_EmailAddress_Field(c)){return false;};}
for(idx=1;idx<=6;++idx){if(c=f["AdultFirst"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a first name for adult "+idx+".");}
if(!Check_Name_Field(c)){return false;};}
if(c=f["AdultLast"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a last name for adult "+idx+".");}
if(!Check_Name_Field(c)){return false;};}
if(c=f["AdultGender"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter the gender for adult "+idx+".");}}
if(c=f["AdultDOBmonth"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter month, day, and year for the date of birth for adult "+idx+".");}}
if(c=f["AdultDOBday"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter month, day, and year for the date of birth for adult "+idx+".");}}
if(c=f["AdultDOByear"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter month, day, and year for the date of birth for adult "+idx+".");}}
if(c=f["ChildFirst"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a first name for child "+idx+".");}
if(!Check_Name_Field(c)){return false;};}
if(c=f["ChildLast"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a last name for child "+idx+".");}
if(!Check_Name_Field(c)){return false;};}
if(c=f["ChildGender"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter the gender for child"+idx+".");}}
if(c=f["ChildDOBmonth"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter month, day, and year for the date of birth for child "+idx+".");}}
if(c=f["ChildDOBday"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter month, day, and year for the date of birth for child "+idx+".");}}
if(c=f["ChildDOByear"+idx]){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v=="XX"){return abort(c,"You must enter month, day, and year for the date of birth for child "+idx+".");}}}
return true;}
function checkstring(field,string,errormsg,pattern){if(!pattern.test(string)){return abort2(field,errormsg);}
return(true);}
function HHMM2min(HHMML){var hh=-1;var mm=-1;var anp="";if(!HHMML.match(/^\d\d?:\d\d[ANP]$/))return-1;hh=parseInt(HHMML.substring(0,HHMML.indexOf(':')),10);mm=parseInt(HHMML.substr(1+HHMML.indexOf(':'),2),10);anp=HHMML.substr(-1,1);anp=anp.toLowerCase();if(anp=="a"){if(hh==12)hh=0;}
else if(anp=="p"){if(hh<12)hh+=12;}
return hh*60+mm;}
function numonly(field){var w="";var onlyNumbers="0123456789";for(i=0;i<field.value.length;i++){x=field.value.charAt(i);if(onlyNumbers.indexOf(x,0)!=-1){w+=x;}}
field.value=w;}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function blogentryvalidate(fob){var f=fob;var c,v;if(c=f.author){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a name in this field");}
if(!Check_Name_Field(c)){return false;};}
if(c=f.email){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter your email address");}
if(!Check_EmailAddress_Field(c)){return false;};}
if(c=f.blogcomment){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter a comment");}
if(!Check_Comment_Field(c)){return false;};}
if(c=f.recaptcha_response_field){c.value=c.value.replace(/^\s+|\s+$/g,"");v=sval(c);if(v==""){return abort(c,"You must enter the coded words as best you can. This helps us make sure we accept only valid, human-entered comments.");}}
v=sval(f.msg);window.alert(v);}
function caravailvalidate(formobject){var f=formobject||document.carcalc;var c,m,v;var daysout=2;var maxlength=30;var startdaysout,enddaysout;msg="The car rental start date you have selected is not valid.";if(!CheckDate(f.date1))return abort(f.date1,msg);startdaysout=sval(f.date1);msg="The car rental end date you have selected is not valid.";if(!CheckDate(f.date2))return abort(f.date2,msg);enddaysout=sval(f.date2);if(enddaysout==startdaysout){var start24=HHMM2min(sval(f.Car_Start_Time));if(start24<0)return abort(c,"Please choose a valid car pickup time.");var end24=HHMM2min(sval(f.Car_End_Time));if(end24<0)return abort(c,"Please choose a valid car dropoff time.");if(end24<=start24)return abort(c,"Car pickup time must be before car dropoff time when the pickup day is the same as the dropoff day. Please check the times.");}
c=f.submit;return true;}
function getCheckedValue(radioObj){if(!radioObj)
return"";var radioLength=radioObj.length;if(radioLength==undefined)
if(radioObj.checked)
return radioObj.value;else
return"";for(var i=0;i<radioLength;i++){if(radioObj[i].checked){return radioObj[i].value;}}
return"";}
function setCheckedValue(radioObj,newValue){if(!radioObj)
return;var radioLength=radioObj.length;if(radioLength==undefined){radioObj.checked=(radioObj.value==newValue.toString());return;}
for(var i=0;i<radioLength;i++){radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()){radioObj[i].checked=true;}}}
function VerifyCarCat(){var f=document.hotelfinder;var c=f.Island;var area=c.value.match(/^[a-zA-Z\s]+/);var island=area?area[0]:"";if(island==""||island=="XX"){return abort(c,"You must select an island for your stay.");}
c=f.Car_Option;var carcat=parseInt(c.value,10);carcat=isNaN(carcat)?0:Math.round(carcat);if(carcat<0)carcat=0;if(carcat>17)carcat=17;if(carcat==0)return true;if(island=="Oahu")return true;if(island=="Maui")return true;if(island=="Molokai"){if((1<carcat&&carcat<6)||carcat==7||carcat==8||carcat==10)
return true;else return abort(c,"This car category is not available on Molokai. Please choose another kind of car.");}
if(island=="Kauai"){if(carcat!=15&&carcat!=16)return true;else return abort(c,"This car category is not available on Kauai. Please choose another kind of car.");}
if(island=="Big Island"){if(carcat!=15&&carcat!=16)return true;else return abort(c,"This car category is not available on the Big Island. Please choose another kind of car.");}
if(island=="Lanai")return abort(c,"Please choose No Car Please if you are staying on Lanai. Cars are not generally available there.");return true;}
function hotelfindervalidate(fob){var f=fob||document.forms.hotelfinder;var c,m,v;var daysout=1;var maxlength=60;v=sval(c=f.Island);if(v=="XX")return abort(c,"You must select an island in the \"Island/Area\" pulldown menu. Please select and Island and/or Area you desire and hit the \"Find My Hotel\" button again.");msg="The checkin date you have selected is not valid.";var cidate=CheckDate(f.date1);if(!cidate)return abort(f.date1,msg);var syyyy=cidate.getFullYear();var smm=1+cidate.getMonth();var sdd=cidate.getDate();msg="The checkout date you have selected is not valid.";var codate=CheckDate(f.date2);if(!codate)return abort(f.date2,msg);var eyyyy=codate.getFullYear();var emm=1+codate.getMonth();var edd=codate.getDate();msg="Check-in date must be at least "+daysout+" days in the future, please check it.";var startdaysout=days_in_future(syyyy,smm,sdd);if(startdaysout<daysout)return abort(f.date1,msg);msg="Check-out date must be on or after the check-in date, please check it.";var enddaysout=days_in_future(eyyyy,emm,edd);if(enddaysout<startdaysout)return abort(f.date2,msg);msg="Check out date must be within "+maxlength+" days of check in date, please check it.";if(startdaysout+maxlength<enddaysout)return abort(f.date2,msg);if(VerifyChildren(f));else return false;if(hotelfindersubmitcount>0){window.alert("We are in the process of finding the hotels you specified. Please be patient. If you cannot seem to get beyond this page, please reload this page and try again.");return false;}
++hotelfindersubmitcount;return true;}
function airavailvalidate(fob){var f=fob||document.forms.airavail;var c,msg;var daysout=1;msg="Please select an Origin (starting) airport";if(c=f.Origin_Airport){v=sval(c);if(v=="XX")return abort(c,msg);}
msg="Please select a destination airport";if(c=f.Hawaii_Airport){v=sval(c);if(v=="XX")return abort(c,msg);}
msg="Please enter a departure date";if(c=f.airdate1){v=sval(c);if(v=="")return abort(c,msg);}
msg="The departure date you have selected is not valid.";var cidate=CheckDate(f.airdate1);if(!cidate)return abort(f.airdate1,msg);var syyyy=cidate.getFullYear();var smm=1+cidate.getMonth();var sdd=cidate.getDate();msg="Please enter a return date";if(c=f.airdate2){v=sval(c);if(v=="")return abort(c,msg);}
msg="The return date you have selected is not valid.";var codate=CheckDate(f.airdate2);if(!codate)return abort(f.airdate2,msg);var eyyyy=codate.getFullYear();var emm=1+codate.getMonth();var edd=codate.getDate();msg="Departure date must be at least "+daysout+" days in the future, please check it.";var startdaysout=days_in_future(syyyy,smm,sdd);if(startdaysout<daysout)return abort(f.airdate1,msg);msg="Return date must be after the departure date, please check it.";var enddaysout=days_in_future(eyyyy,emm,edd);if(enddaysout<=startdaysout)return abort(f.airdate2,msg);var totalpax=0;if(c=f.Num_Adults){totalpax+=nval(c);msg="You must select at least one adult passenger.";if(totalpax<1)return abort(c,msg);}
if(c=f.Num_Children){totalpax+=nval(c);msg="You must select six or fewer passengers total.";if(6<totalpax)return abort(c,msg);}
if(VerifyChildren(f));else return false;if(airavailsubmitcount>0){window.alert("We are in the process of finding air fares according to your specifications. Please be patient. If you cannot seem to get beyond this page, please reload the page and try again.");return false;}
++airavailsubmitcount;return true;}
function FlashInstalled(){result=false;if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"])
{result=navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;}
else if(document.all&&(navigator.appVersion.indexOf("Mac")==-1))
{eval('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)	result = true; xObj = null;	} catch (e)	{}');}
return result;}
function FlashWrite(url,width,height){document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');document.write('  codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=5,0,0,0" ');document.write('  WIDTH='+width+' HEIGHT='+height+'>');document.write(' <PARAM NAME=movie VALUE="'+url+'"> <PARAM NAME=quality VALUE=high> <param name="wmode" value="transparent">');document.write(' <EMBED src="'+url+'" quality=high ');document.write(' wmode="transparent" swLiveConnect=FALSE WIDTH='+width+' HEIGHT='+height);document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');document.write(' </EMBED></OBJECT>');}
function submitFormActivities(){if(document.TravelRequestForm.activityRegionId.value==""){alert("Please select a destination.");return;}
if(document.TravelRequestForm.submitAction)document.TravelRequestForm.submitAction.value="";if(document.TravelRequestForm.currentDestination)document.TravelRequestForm.currentDestination.value=0;if(document.TravelRequestForm.currentComponent)document.TravelRequestForm.currentComponent.value="";validateAndSubmit();}
function validateAndSubmit(){if(isMultiCity()){if(dateCheckerMultiCity()&&discountChecker()&&checkNumOfPassengers()){document.TravelRequestForm.submit();}else{return false;}}else{if(checkFromToBeforeSubmit()&&regionIslandChecker()&&checkNumOfPassengers()&&dateChecker()&&discountChecker())
{document.TravelRequestForm.action="http://pts.get2hawaii.com/ots/Index.do?agID="+_agid+"&idxRedirect=SearchActivities.do";document.TravelRequestForm.submit();}else{return false;}}}
function checkFromToBeforeSubmit(){if(includesAir()){if(""==document.TravelRequestForm.from0.value||(document.TravelRequestForm.from0.value.length==1&&document.TravelRequestForm.from0.value.charAt(0)==" ")){alert('Please provide your departure location.');return false;}
if(""==document.TravelRequestForm.to0.value||(document.TravelRequestForm.to0.value.length==1&&document.TravelRequestForm.to0.value.charAt(0)==" ")){alert('Please provide your destination location.');return false;}}
return true;}
function regionIslandChecker(){if(includesHotel()){if(document.TravelRequestForm.region){var SelectedIsland=document.TravelRequestForm.to0.value;var SelectedRegion=document.TravelRequestForm.region.options[document.TravelRequestForm.region.selectedIndex].value;if(SelectedIsland==""){alert('Please select a Destination and Region before submitting the Travel Package Request.');return false;}
if(SelectedRegion==""){alert('Please select a Region before submitting the Travel Package Request.');return false;}}}
return true;}
function dateChecker(){var dtStart=null;var dtEnd=null;if(chkdate(document.TravelRequestForm.itineraryStartDate)){dtStart=new Date(getDateStr(document.TravelRequestForm.itineraryStartDate.value));}
else{alert('Please enter a valid departure date.');return false;}
if(chkdate(document.TravelRequestForm.itineraryEndDate)){dtEnd=new Date(getDateStr(document.TravelRequestForm.itineraryEndDate.value));}
else{alert('Please enter a valid return date.');return false;}
if(isNaN(dtStart)){if(includesAir()){alert('Please enter a valid departure date.');}
else if(includesHotel()){alert('Please enter a valid check-in date for your hotel.');}
else if(includesCar()){alert('Please enter a valid pick-up date for your car.');}
else{alert('Please enter a valid date in the From field.');}
return false;}
if(isOneWay()==false&&isNaN(dtEnd)){if(includesAir()){alert('Please enter a valid return date.');}
else if(includesHotel()){alert('Please enter a valid check-out date for your hotel.');}
else if(includesCar()){alert('Please enter a valid drop-off date for your car.');}
else{alert('Please enter a valid date in the To field.');}
return false;}
if(isOneWay()&&(includesHotel()||includesCar())&&isNaN(dtEnd)){if(includesHotel()){alert('Please enter a valid check-out date for your hotel.');}
else if(includesCar()){alert('Please enter a valid drop-off date for your car.');}
else{alert('Please enter a valid date in the To field.');}
return false;}
if(isOneWay()==false&&dtEnd<dtStart){if(includesAir()){alert('Return date must be after departure date.');}
else if(includesHotel()){alert('Check-out date must be after check-in date.');}
else if(includesCar()){alert('Drop-off date must be after pick-up date.');}
else{alert('The "To" date must be after the "From" date.');}
return false;}
if(isOneWay()&&(includesHotel()||includesCar())&&dtEnd<dtStart){if(includesHotel()){alert('The hotel check-out date must be after the inbound flight departure date.');}
else if(includesCar()){alert('The car drop-off date must be after the inbound flight departure date.');}
else{alert('The "To" date must be after the "From" date.');}
return false;}
return true;}
function discountChecker(){if(includesHotel()&&document.TravelRequestForm.localDiscount[0].checked=="0"&&document.TravelRequestForm.localDiscount[1].checked=="0")
{alert('Please specify if the primary traveler is a Hawaii resident.');return false;}
return true;}
if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0;i<arguments.length;i++)
this[this.length]=arguments[i];}}
function name_values(instring){var vars=new Array();rc="\235";instring=instring.replace(/\\\;/g,rc);var pattern=/[a-zA-Z0-9]+\=[\/:#a-zA-Z0-9\-\+\., \235]+/gi;var y=instring.match(pattern);for(i=0;i<y.length;i++){var s=y[i].split("=");s[1]=s[1].replace(rc,";");vars[i]="v_"+s[0];eval(vars[i]+" = '"+s[1]+"'");}
return vars;}
function chkVar(pvarname){if(eval(pvarname)&&eval(pvarname)!="")
return true;else
return false;}
function jiaDate(pvarw){var jia=pvarw;var shu=jia.indexOf(":");if(shu!=-1){var shushu=jia.substring(0,shu);if(shushu!="From"&&shushu!="To"){if(shushu=="Depart"||shushu=="Return"){return shushu+"ing"+" "+"Date";}else{return shushu+" "+"Date";}}else{return shushu;}}else{return jia;}}
function arrayElt(pArr,pElt){for(j=0;j<pArr.length;j++){if(pArr[j].toUpperCase()==pElt.toUpperCase())
return j;}
return"-1";}
var onClickFnCode="";var orig_onClickFnCode="";function onClickFn(pday){var re=/pday/;onClickFnCode=orig_onClickFnCode;onClickFnCode=onClickFnCode.replace(re,"'"+pday+"'");eval(onClickFnCode);}
function kdwn(pthis){if(event.keyCode==13)pthis.onchange();else return false;}
function Today(){var d=new Date();return((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());}
function dateAdd(indt,days,sign){var d=new Date(indt);var dv=d.valueOf();var ndv;if(sign=="+")
ndv=dv+(days*(1000*60*60*24));else
ndv=dv-(days*(1000*60*60*24));var nd=new Date(ndv);return((nd.getMonth()+1)+"/"+nd.getDate()+"/"+nd.getFullYear());}
function IESplit(re,st){var found;var ret=new Array();var pos;while((x=re.exec(st))!=null){ret.push(st.substring(0,st.indexOf(x[1])));ret.push(x[1]);st=st.substr(st.indexOf(x[1])+x[1].length);}
return ret;}
var v_CloseOnSelect,v_AppendOrReplace,v_AppendChar,v_ReturnData;var v_InlineX,v_InlineY,v_Title,v_CurrentDate,v_AllowWeekends;var v_Resizable,v_Width,v_Height,v_SelectAfter,v_NSHierarchy;var v_SelectBefore,v_CallFunction,v_PopupX,v_PopupY;var v_Nav,v_SmartNav,v_Fix,v_WeekStart,v_Weekends,v_Go,v_VB,v_NumberOfNights;var weekend=new Array();var weekendColor="";var fontface="Verdana";var fontsize=1;var gNow=new Date();var ggWinCal;var theLayer;var theLayerStyle;var currX,currY;var cx,cy;var x,y;var incrX,incrY;var mDown,mUp;isNav=(navigator.appName.indexOf("Netscape")!=-1)?true:false;isIE=(navigator.appName.indexOf("Microsoft")!=-1)?true:false;isDOM=(document.getElementById)?true:false;Calendar.Months=["January","February","March","April","May","June","July","August","September","October","November","December"];Calendar.SMonths=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];Calendar.EMonths=["January","February","March","April","May","June","July","August","September","October","November","December"];Calendar.DOMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Calendar.lDOMonth=[31,29,31,30,31,30,31,31,30,31,30,31];Calendar.DOW=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Calendar.count=0;Calendar.gInitText="";function Calendar(p_item,p_WinCal,p_month,p_year,p_format,p_type){if((p_month==null)&&(p_year==null))return;if(p_WinCal==null)
this.gWinCal=ggWinCal;else
this.gWinCal=p_WinCal;if(p_month==null){this.gMonthName=null;this.gMonth=null;this.gYearly=true;}else{this.gMonthName=Calendar.get_month(p_month);this.gMonth=new Number(p_month);this.gYearly=false;}
if(p_type==null)
this.gType="POPUP";else
this.gType=p_type;if(this.gType=="INLINE"){this.WHO="";this.INLINE="Calendar";this.codeINLINE="";}else
this.WHO="window.opener.";this.gYear=p_year;this.gFormat=p_format;this.gBGColor="#DDDDDD";this.gHeaderColor="black";this.gReturnItem=p_item;this.gTitle="Get2Hawaii, Inc. Calendar";}
Calendar.get_month=Calendar_get_month;Calendar.get_daysofmonth=Calendar_get_daysofmonth;Calendar.get_dow=Calendar_get_dow;Calendar.calc_month_year=Calendar_calc_month_year;Calendar.print=Calendar_print;Calendar.CreateCalendarLayer=Calendar_CreateCalendarLayer;Calendar.Close=Calendar_Close;Calendar.Lwwrite=Calendar_Lwwrite;Calendar.MoveTo=Calendar_MoveTo;Calendar.isWeekend=Calendar_isWeekend;Calendar.processDateData=Calendar_processDateData;Calendar.readDate=Calendar_readDate;function Calendar_get_month(monthNo,pLanguage){if(!pLanguage||pLanguage=="E")
return Calendar.EMonths[monthNo];else
return Calendar.Months[monthNo];}
function Calendar_get_dow(dayNo){return Calendar.DOW[dayNo];}
function Calendar_get_daysofmonth(monthNo,p_year){if((p_year%4)==0){if((p_year%100)==0&&(p_year%400)!=0)
return Calendar.DOMonth[monthNo];return Calendar.lDOMonth[monthNo];}else
return Calendar.DOMonth[monthNo];}
function Calendar_calc_month_year(p_Month,p_Year,incr){var ret_arr=new Array();if(incr==-1){if(p_Month==0){ret_arr[0]=11;ret_arr[1]=parseInt(p_Year,10)-1;}
else{ret_arr[0]=parseInt(p_Month,10)-1;ret_arr[1]=parseInt(p_Year,10);}}else if(incr==1){if(p_Month==11){ret_arr[0]=0;ret_arr[1]=parseInt(p_Year,10)+1;}
else{ret_arr[0]=parseInt(p_Month,10)+1;ret_arr[1]=parseInt(p_Year,10);}}
return ret_arr;}
function Calendar_print(){ggWinCal.print();}
function Calendar_isWeekend(pday){var i;for(i=0;i<weekend.length;i++){if(parseInt(pday)==parseInt(weekend[i]))
return true;}
return false;}
function Calendar_processDateData(vInputData,pFormat){var m;var td=Today();var ree=new RegExp("(Today)(([\\+\\-])([0-9DR]+))?","i");if((m=vInputData.match(ree))!=null){if(m[1].toUpperCase()=="TODAY"&&m[0].length>5){var leeDay;if(isNaN(parseInt(m[4]))==false){leeDay=m[4];}else if(typeof m[4]=="string"){leeDay=(m[4]=="R")?(331+1):3;}
return dateAdd(td,leeDay,m[3]);}
else if(m[1].toUpperCase()=="TODAY")
return td;}
else{return Calendar.readDate(vInputData,pFormat);}}
function Calendar_readDate(indt,infmt){var re="";var whoarr=new Array();whoarr.push("Dummy");var mach=IESplit(new RegExp("(DD|MM|MONTH|MON|YYYY|YY|DOW)"),infmt);for(i=0;i<mach.length;i++){switch(mach[i].toUpperCase()){case"DD":re+="(\\d{1,2})";whoarr.push(mach[i]);break;case"DOW":re+="(MONDAY|TUESDAY|WEDNESDAY|THURSDAY|FRIDAY|SATURDAY|SUNDAY)";whoarr.push(mach[i]);break;case"MM":re+="(\\d{1,2})";whoarr.push(mach[i]);break;case"MON":re+="(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)";whoarr.push(mach[i]);break;case"MONTH":re+="(JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER)";whoarr.push(mach[i]);break;case"YY":re+="(\\d{1,2})";whoarr.push(mach[i]);break;case"YYYY":re+="(\\d{4})";whoarr.push(mach[i]);break;default:re+=mach[i];}}
var dpart,mpart,ypart;var rege=new RegExp(re,"i");if(rege.test(indt)){var ma=indt.match(rege);for(i=0;i<ma.length;i++){switch(whoarr[i]){case"DD":dpart=parseInt(ma[i],10);break;case"MM":mpart=parseInt(ma[i],10);break;case"MON":mpart=parseInt(arrayElt(Calendar.SMonths,ma[i]),10)+1;break;case"MONTH":mpart=parseInt(arrayElt(Calendar.Months,ma[i]),10)+1;break;case"YY":ytpart=parseInt(ma[i],10);ypart=((ytpart>50)?(ytpart+1900):(ytpart+2000));break;case"YYYY":ypart=parseInt(ma[i],10);break;}}}
if(!(dpart||mpart||ypart))
return null;else
return(new Date(mpart+"/"+dpart+"/"+ypart));}
function Calendar_Close(pType,pINLINE,gogo){if(pType=="POPUP")
ggWinCal.close();if(pType=="INLINE")
Calendar.Lwwrite(Calendar.gInitText,pINLINE)
ggWinCal=null;var pp_Go;if(gogo=="Departing Date"||gogo=="Pick-up Date"||gogo=="Check-in Date"||gogo=="From"){if(gogo=="Departing Date")pp_Go="Return:";if(gogo=="Pick-up Date")pp_Go="Drop-off:";if(gogo=="Check-in Date")pp_Go="Check-out:";if(gogo=="From")pp_Go="To:";show_calendar('TravelRequestForm.itineraryEndDate',document.TravelRequestForm.itineraryStartDate.value,document.TravelRequestForm.itineraryStartDate.value,null,null,'CloseOnSelect=Yes;AppendOrReplace=Replace;ReturnData=Date;Title=Select Return Date;AllowWeekends=Yes;Resizable=Yes;NumberOfNights='+v_NumberOfNights+';SelectAfter='+document.TravelRequestForm.itineraryStartDate.value+';Nav=Yes;SmartNav=Yes;Go='+pp_Go+';');}
if(gogo=="Hotel Check-in Date"||gogo=="Car Pick-up Date"){if(gogo=="Hotel Check-in Date")pp_Go="Hotel Check-out:";if(gogo=="Car Pick-up Date")pp_Go="Car Drop-off:";show_calendar('TravelRequestForm.customEndDate',document.TravelRequestForm.customStartDate.value,document.TravelRequestForm.customStartDate.value,null,null,'CloseOnSelect=Yes;AppendOrReplace=Replace;ReturnData=Date;Title=Select Return Date;AllowWeekends=Yes;Resizable=Yes;NumberOfNights='+v_NumberOfNights+';SelectAfter='+document.TravelRequestForm.customStartDate.value+';Nav=Yes;SmartNav=Yes;Go='+pp_Go+';');}
}
new Calendar();Calendar.prototype.getMonthlyCalendarCode=function(theMonth,theYear){var vCode="";var vHeader_Code="";var vData_Code="";vCode=vCode+"<table width='"+(v_Width-30)+"' height=110 border='0' cellspacing='0' cellpadding='2' bgcolor='#FFFFFF'>";vHeader_Code=this.cal_header();vData_Code=this.cal_data(theMonth,theYear);vCode=vCode+vHeader_Code+vData_Code;vCode=vCode+
"<tr><td colspan='10' height='5'><img src='resources/common/images/spacer.gif' border='0' alt=''></td></tr>"+
"</table>";return vCode;}
Calendar.prototype.onclickfn=function(){var whois=this.WHO+
((this.gType=="POPUP")?"document."+v_NSHierarchy:"window.document."+v_NSHierarchy)+
this.gReturnItem+".value";var apchar=(this.returnMode=="Replace")?" = ":" += ";var retCode="apchar = ''"+
((this.returnMode=="Replace")?";":" + ")+
"(("+whois+" == '') ? '' : '"+this.appendChar+"');\n"+
whois+apchar+"apchar + pday;\n";return retCode;}
Calendar.prototype.showSmartNavBar=function(){var selcalendar="<table  width='100%' cellspacing='0' cellpadding='0' border='0'><tr>";var dd=new Date();var Year=eval(this.gYear);var nextMMYYYY=Calendar.calc_month_year(this.gMonth,this.gYear,1);var nextYYYY=nextMMYYYY[0];var nextyear=nextMMYYYY[1];var month=dd.getMonth();for(i=0;i<12;i++){if(parseInt(month)==i){for(j=0;j<12;j++,i++){var tian=12-parseInt(month);if(j==tian)Year=parseInt(Year)+1;if(j<tian){if(parseInt(this.gYear)>dd.getFullYear()){if(parseInt(this.gYear)==parseInt(nextyear))
Year=parseInt(this.gYear)-1;}}
if(i==12)i=0;var ggmonth=parseInt(this.gMonth);var asd=(ggmonth+1==i);if(ggmonth+1>11)asd=(nextYYYY==i);if(ggmonth==i||asd){selcalendar+="<td align=center><font face='"+fontface+"' size='"+fontsize+"' style=\"color:#ff0000;\"><strong><a style=\"color:#FF0000;\" href=\""+
"javascript:"+this.WHO+"Build("+
"'"+this.gReturnItem+"','"+i+"','"+
Year+"', '"+this.gFormat+"', '"+this.gType+"');\">"+Calendar.SMonths[i]+"</a></strong></font></td>";}else{selcalendar+="<td align=center><font face='"+fontface+"' size='"+fontsize+"' style=\" color:#ff0000;\"><a  style=\"color:#000000;\" href=\""+
"javascript:"+this.WHO+"Build("+
"'"+this.gReturnItem+"','"+i+"','"+
Year+"', '"+this.gFormat+"', '"+this.gType+"');\">"+Calendar.SMonths[i]+"</a></font></td>";}
if(j==5)selcalendar+="</tr><tr>";}
break;}}
selcalendar+="</tr></table>";this.wwrite(selcalendar);}
Calendar.prototype.show=function(displayTwoCals){var vCode="";if(this.gType=="POPUP")
this.gWinCal.document.open();this.wwrite("<html>");this.wwrite("<head><title>Calendar</title>");if(this.gType=="POPUP")
this.wwrite("<script language='javascript'>"+
"function onClickFn(pday) {\n"+
this.onclickfn()+"}\n<\/script>");else
orig_onClickFnCode=this.onclickfn();if(v_SmartNav=="Yes"&&this.gType=="POPUP")
this.wwrite("<script language='javascript'>\n"+
"function kdwn(pthis) {"+
"if (event.keyCode == 13) pthis.onchange(); else return false;}\n"+
"</script>");this.wwrite("</head>");this.wwrite("<body "+
"bgcolor='"+this.gBGColor+"' "+
"language=javascript onload=\"window.focus();\">");if(v_SmartNav=="Yes")
this.wwrite("<form name='frmCal' onsubmit='return false;' STYLE='margin: 0px; padding: 0px; border: 1px gray;  border-style: outset;'>");this.wwrite("<table width='"+(v_Width-30)+"' border='0' cellpadding='0' cellspacing='0' bgcolor='#F5F5F5'><tr><td>"+
"<table border='0' width='100%' cellpadding='2' cellspacing='0'>");if(v_Go!=""&&v_Go!=null){this.wwrite("<tr><td colspan=2>");this.wwrite("<font face='"+fontface+"' ><div style=\"text-align: center; background-color:#cccccc; margin:2px; color:#000000;\" >"+v_Go+"</div></font>");this.wwrite("</td></tr>");}
var ddd=new Date();var prevMMYYYY=Calendar.calc_month_year(this.gMonth,this.gYear,-1);var prevMM=prevMMYYYY[0];var prevYYYY=prevMMYYYY[1];var nextMMYYYY=Calendar.calc_month_year(this.gMonth,this.gYear,1);var nextMM=nextMMYYYY[0];var nextYYYY=nextMMYYYY[1];this.wwrite("<tr><td colspan=2>");if(v_SmartNav=="Yes")
this.showSmartNavBar();this.wwrite("</td></tr>");this.wwrite("<tr><td height=4>");this.wwrite("</td></tr>");this.wwrite("<tr><td style=vertical-align:top;  height=110>");this.wwrite("<table width='100%' cellspacing='0' cellpadding='0' border='0' bgcolor='#CCCCCC' id='header'><tr>");this.wwrite("<td align='center'><strong><font face='"+fontface+"' size='"+fontsize+"'>");this.wwrite(this.gMonthName+" "+this.gYear);this.wwrite("</font></strong></td>");this.wwrite("</tr></table>");vCode=this.getMonthlyCalendarCode(this.gMonth,this.gYear);if(displayTwoCals){vCode+="</td><td style=vertical-align:top; height=110><table width='100%' cellspacing='0' cellpadding='0' border='0' bgcolor='#CCCCCC' id='header2'>";vCode+="<tr><td align='center'><strong><font face='"+fontface+"' size='"+fontsize+"'>";vCode+=Calendar.get_month(nextMM)+" "+nextYYYY;vCode+="</font></strong></td></tr></table>";vCode+=this.getMonthlyCalendarCode(nextMM,nextYYYY);}
this.wwrite(vCode);if(this.gType=="POPUP"){this.wwrite("</td></tr><tr><td align='center'>"+
"<img src='resources/common/images/spacer.gif' border='0' alt=''><br><font face='"+fontface+"' size='"+fontsize+"'><strong>"+
"<a  href='javascript:"+
"Calendar.Close(\""+this.gType+"\", \""+this.INLINE+"\",\""+v_Go+"\");' "+
">"+
"Close Window</a></strong></font><BR></td></tr>");}
else{this.wwrite("</td></tr><tr><td colspan=2 align='center'><table bgcolor='#f5f5f5' width='"+(v_Width-30)+"'><tr align='center'><td><font face='"+fontface+"' size='"+fontsize+"'><strong><a   href='javascript:Calendar.Close(\""+this.gType+"\", \""+this.INLINE+"\",\""+v_Go+"\");'>Close</a></strong></font></td></tr></table></td></tr>");}
this.wwrite("</table></td></tr></table>");if(v_SmartNav=="Yes")
this.wwrite("</form>");this.wwrite("</font></body></html>");if(this.gType=="POPUP")
this.gWinCal.document.close();if(this.gType=="INLINE")
Calendar.Lwwrite(this.codeINLINE,this.INLINE);}
Calendar.prototype.showY=function(){var vCode="";var i;var vr,vc,vx,vy;var vxf=285;var vyf=200;var vxm=10;var vym;if(isIE)vym=75;else if(isDOM)vym=25;else if(isNav)vym=25;this.gWinCal.document.open();this.wwrite("<html>");this.wwrite("<head><title>Calendar</title>");this.wwrite("<style type='text/css'>\n<!--");for(i=0;i<12;i++){vc=i%3;if(i>=0&&i<=2)vr=0;if(i>=3&&i<=5)vr=1;if(i>=6&&i<=8)vr=2;if(i>=9&&i<=11)vr=3;vx=parseInt(vxf*vc)+vxm;vy=parseInt(vyf*vr)+vym;this.wwrite(".lclass"+i+" {position:absolute;top:"+vy+";left:"+vx+";}");}
this.wwrite("-->\n</style>");if(this.gType=="POPUP")
this.wwrite("<script language='javascript'>"+
"function onClickFn(pday) {\n"+
this.onclickfn()+"}\n<\/script>");else
orig_onClickFnCode=this.onclickfn();this.wwrite("</head>");this.wwrite("<font face='"+fontface+"' size='"+fontsize+"'><strong>");this.wwrite("Year : "+this.gYear);this.wwrite("</strong><br>");var prevYYYY=parseInt(this.gYear,10)-1;var nextYYYY=parseInt(this.gYear,10)+1;this.wwrite("<table width='"+(v_Width-30)+"' border='0' cellspacing='0' cellpadding='2'><tr><td align='center'>");this.wwrite("[<a href=\""+
"javascript:window.opener.Build("+
"'"+this.gReturnItem+"', null, '"+prevYYYY+"', '"+this.gFormat+"'"+
");"+
"\" alt='Prev Year'><<<\/a>]</td><td align='center'>");this.wwrite("[<a href=\"javascript:window.print();\">Print</a>]</td><td align='center'>");this.wwrite("[<a href=\""+
"javascript:window.opener.Build("+
"'"+this.gReturnItem+"', null, '"+nextYYYY+"', '"+this.gFormat+"'"+
");"+
"\">>><\/a>]</td></tr></table><br>");var j;for(i=11;i>=0;i--){if(isIE)
this.wwrite("<DIV ID=\"layer"+i+"\" CLASS=\"lclass"+i+"\">");else if(isDOM)
this.wwrite("<DIV ID=\"layer"+i+"\" CLASS=\"lclass"+i+"\">");else if(isNav)
this.wwrite("<LAYER ID=\"layer"+i+"\" CLASS=\"lclass"+i+"\">");this.gMonth=i;this.gMonthName=Calendar.get_month(this.gMonth);vCode=this.getMonthlyCalendarCode();this.wwrite(this.gMonthName+"/"+this.gYear+"<BR>");this.wwrite(vCode);if(isIE)
this.wwrite("</DIV>");else if(isDOM)
this.wwrite("</DIV>");else if(isNav)
this.wwrite("</LAYER>");}
this.wwrite("</font><br></body></html>");this.gWinCal.document.close();}
Calendar.prototype.cal_header=function(){var vCode="";vCode=vCode+"<tr>";for(i=v_WeekStart,j=0;j<7;i++,j++,i=i%7)
vCode=vCode+"<td width='"+((i==6)?16:14)+"%' align='center'>"+
"<font size='"+fontsize+"' face='"+fontface+"' color='"+this.gHeaderColor+"'><b>"+
Calendar.DOW[i].substring(0,1)+"</b></font></td>";vCode=vCode+"</tr>";return vCode;}
Calendar.prototype.cal_data=function(theMonth,theYear){var vDate=new Date();vDate.setDate(1);vDate.setMonth(theMonth);vDate.setFullYear(theYear);var vFirstDay=vDate.getDay();var vDay=1;var vLastDay=Calendar.get_daysofmonth(theMonth,theYear);var vOnLastDay=0;var vCode="";var linkText="";var linkCloseText="";if(this.closeable){closecodeP=((this.gType=="POPUP")?"window.close();":"");closecodeI="Calendar.Close(\""+this.gType+"\", \""+this.INLINE+"\" ,\""+v_Go+"\"); ";}else{closecodeP="";closecodeI="void(0);' ";}
var whois=this.WHO+
((this.gType=="POPUP")?"document.":"window.document.")+
this.gReturnItem+".value";vCode=vCode+"<tr>";for(j=v_WeekStart,i=0;j!=vFirstDay;j++,i++,j=j%7){vCode=vCode+"<td width='14%'"+this.write_weekend_string(j)+" align='center'><font size='"+fontsize+"' face='"+fontface+"'>&nbsp;</font></td>";}
var isBottomCal=(this.gMonth!=theMonth);var jsHighlight="onmouseover='javascript:switchColor(this, true, "+isBottomCal+");' onmouseout='javascript:switchColor(this, false, "+isBottomCal+");'";for(j=vFirstDay;i<7;j++,i++,j=j%7){vDate.setDate(vDay);if((this.gAllowWeekends=="No"&&Calendar.isWeekend(j))||(vDate<v_SelectAfter||vDate>v_SelectBefore)){linkText="<font color='gray'>";linkCloseText="</font>";}else{linkText="<a href='javascript:"+
((this.CallFunction!="")?(this.WHO+this.CallFunction+"();"):"")+
closecodeI+"' "+
"onClick=\"onClickFn('"+
((this.returnData=="Date")?this.format_data(vDay,theMonth,theYear):this.format_dow(vDay))+
"');"+
((this.CallFunction!="")?(this.WHO+this.CallFunction+"();"):"")+
closecodeP+
"return true;"+
"\">";linkCloseText="<\/a>";}
vCode=vCode+"<td "+jsHighlight+" width='14%'"+this.write_weekend_string(j)+
" align='center'><font size='"+fontsize+"' face='"+fontface+"'>"+
linkText+
this.format_day(vDay,isBottomCal)+
linkCloseText+
"</font></td>";vDay=vDay+1;}
vCode=vCode+"</TR>";for(k=2;k<7;k++){vCode=vCode+"<tr>";for(j=v_WeekStart,i=0;i<7;j++,i++,j=j%7){vDate.setDate(vDay);if((this.gAllowWeekends=="No"&&Calendar.isWeekend(j))||(vDate<v_SelectAfter||vDate>v_SelectBefore)){linkText="<font color='gray'>";linkCloseText="</font>";}else{linkText="<a href='javascript:"+
((this.CallFunction!="")?(this.WHO+this.CallFunction+"();"):"")+
closecodeI+"' "+
"onClick=\"onClickFn('"+
((this.returnData=="Date")?this.format_data(vDay,theMonth,theYear):this.format_dow(vDay))+
"');"+
((this.CallFunction!="")?(this.WHO+this.CallFunction+"();"):"")+
closecodeP+
"return true;"+
"\">";linkCloseText="<\/a>";}
vCode=vCode+"<td "+jsHighlight+" width='14%'"+this.write_weekend_string(j)+
" align='center'><font size='"+fontsize+"' face='"+fontface+"'>"+
linkText+
this.format_day(vDay,isBottomCal)+
linkCloseText+
"</font></td>";vDay=vDay+1;if(vDay>vLastDay){vOnLastDay=1;break;}}
if(i==6)
vCode=vCode+"</tr>";if(vOnLastDay==1)
break;}
for(m=1;m<(7-i);m++){if(this.gYearly)
vCode=vCode+"<td width='14%'"+this.write_weekend_string(j+m)+
" align='center'><font size='"+fontsize+"' face='"+fontface+"' color='gray'>&nbsp;</font></td>";else
vCode=vCode+"<td width='14%'"+this.write_weekend_string(j+m)+
" align='center'><font size='"+fontsize+"' face='"+fontface+"' color='gray'>&nbsp;</font></td>";}
return vCode;}
Calendar.prototype.format_day=function(vday,isBottomCal){var highDate;if(this.gCurrentDate!="NONE")
highDate=this.gCurrentDate;else
highDate=gNow;var vNowDay=highDate.getDate();var vNowMonth=highDate.getMonth();var vNowYear=highDate.getFullYear();if(vday==vNowDay&&this.gMonth==vNowMonth&&this.gYear==vNowYear&&!isBottomCal)
return("<font color=\"red\"><strong>"+vday+"</strong></font>");else
return(vday);}
Calendar.prototype.write_weekend_string=function(vday){var i;if(Calendar.isWeekend(vday))
return(" bgcolor=\""+weekendColor+"\"");return"";}
Calendar.prototype.format_data=function(p_day,theMonth,theYear){var vData=this.gFormat;var vMonth=1+theMonth;vMonth=(vMonth.toString().length<2)?"0"+vMonth:vMonth;var vMon=Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();var vFMon=Calendar.get_month(this.gMonth).toUpperCase();var vY4=new String(theYear);var vY2=new String(vY4.substr(2,2));var vDD=(p_day.toString().length<2)?"0"+p_day:p_day;var vDOW=Calendar.get_dow(new Date(vMonth+"/"+vDD+"/"+vY4).getDay());if((new RegExp("YYYY","ig")).test(vData))
vData=vData.replace(/YYYY/ig,vY4);else if((new RegExp("YY","ig")).test(vData))
vData=vData.replace(/YY/ig,vY2);if((new RegExp("DD","ig")).test(vData))
vData=vData.replace(/DD/ig,vDD);if((new RegExp("MM","ig")).test(vData))
vData=vData.replace(/MM/ig,vMonth);if((new RegExp("MONTH","ig")).test(vData))
vData=vData.replace(/MONTH/ig,vFMon);else if((new RegExp("MON","ig")).test(vData))
vData=vData.replace(/MON/ig,vMon);if((new RegExp("DOW","ig")).test(vData))
vData=vData.replace(/DOW/ig,vDOW);return vData;}
Calendar.prototype.format_dow=function(p_day){var vData;var vMonth=1+this.gMonth;vMonth=(vMonth.toString().length<2)?"0"+vMonth:vMonth;var vMon=Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();var vFMon=Calendar.get_month(this.gMonth).toUpperCase();var vY4=new String(this.gYear);var vDD=(p_day.toString().length<2)?"0"+p_day:p_day;var vDate=new Date(vMonth+"\/"+vDD+"\/"+vY4);vData=Calendar.get_dow(vDate.getDay());return vData;}
Calendar.prototype.wwrite=function(wtext){if(this.gType=="POPUP")
this.gWinCal.document.writeln(wtext);else{this.codeINLINE+=wtext;}}
Calendar.prototype.wwriteA=function(wtext){if(this.gType=="POPUP")
this.gWinCal.document.write(wtext);else{this.codeINLINE+=wtext;}}
function Calendar_CreateCalendarLayer(pLeft,pTop,pInitText){if(pInitText==null)
pInitText=Calendar.gInitText;else
Calendar.gInitText=pInitText;v_InlineX=pLeft;v_InlineY=pTop;var Calendar_ID="Calendar";if(isIE)
document.writeln("<DIV ID=\""+Calendar_ID+"\" STYLE=\""+
"z-index:1000;position:absolute;top:"+pTop+";left:"+pLeft+";"+
"\">"+pInitText+"<\/DIV>");else if(isDOM)
document.writeln("<DIV ID=\""+Calendar_ID+"\" STYLE=\""+
"z-index:1000;position:absolute;top:"+pTop+";left:"+pLeft+";"+
"\">"+pInitText+"<\/DIV>");else if(isNav)
document.writeln("<DIV ID=\""+Calendar_ID+"\" STYLE=\""+
"z-index:1000;position:absolute;top:"+pTop+";left:"+pLeft+";"+
"\">"+pInitText+"<\/DIV>");}
function Calendar_Lwwrite(pText,pINLINE){if(isIE){document.getElementById(pINLINE).innerHTML=pText;}else if(isDOM){rng=document.createRange();el=document.getElementById(pINLINE);rng.setStartBefore(el);htmlFrag=rng.createContextualFragment(pText)
while(el.hasChildNodes())el.removeChild(el.lastChild);el.appendChild(htmlFrag);}else if(isNav){var lyr=document.layers[pINLINE].document;lyr.open();lyr.write(pText);lyr.close();}}
function Calendar_MoveTo(pX,pY,pINLINE){if(isIE){document.getElementById(pINLINE).style.top=pY;document.getElementById(pINLINE).style.left=pX;}else if(isDOM){document.getElementById(pINLINE).style.top=pY+"px";document.getElementById(pINLINE).style.left=pX+"px";}else if(isNav){document.layers[pINLINE].top=pY;document.layers[pINLINE].left=pX;}}
mDown=false;mUp=false;function fixCal(chkd){if(chkd)
initEvents(0);else
initEvents(1);}
function click(e){x=(isIE)?(event.x+document.body.scrollLeft):e.pageX;y=(isIE)?(event.y+document.body.scrollTop):e.pageY;cx=(isIE)?(x-parseInt(theCSSLayer.left)):((isDOM)?(x-parseInt(theCSSLayer.left)):(x-theLayer.x));cy=(isIE)?(y-parseInt(theCSSLayer.top)):((isDOM)?(y-parseInt(theCSSLayer.top)):(y-theLayer.y));mUp=false;mDown=true;}
function unclick(e){mUp=true;mDown=false;}
function handleMove(e){currX=(isIE)?(event.x+document.body.scrollLeft):e.pageX;currY=(isIE)?(event.y+document.body.scrollTop):e.pageY;if(mDown){window.status="DRAGGGGGG : X="+(currX-cx)+", Y="+(currY-cy);v_InlineX=currX-cx;v_InlineY=currY-cy;MoveLayer(currX-cx,currY-cy,"myLayer");}else
window.status="X="+currX+", Y="+currY;}
function initEvents(able){if(able==1){if(isNav&&!isDOM){theLayer.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.MOUSEMOVE);}
if(isDOM&&isNav){theLayer.addEventListener("mousemove",handleMove,true);theLayer.addEventListener("mousedown",click,true);theLayer.addEventListener("mouseup",unclick,true);}else{theLayer.onmousemove=handleMove;theLayer.onmousedown=click;theLayer.onmouseup=unclick;}}else{if(isNav&&!isDOM){theLayer.releaseEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.MOUSEMOVE);}
if(isDOM&&isNav){theLayer.removeEventListener("mousemove",handleMove,true);theLayer.removeEventListener("mousedown",click,true);theLayer.removeEventListener("mouseup",unclick,true);}else{theLayer.onmousemove="";theLayer.onmousedown="";theLayer.onmouseup="";}}}
function MoveLayer(pX,pY){theCSSLayer.top=pY;theCSSLayer.left=pX;}
function drag_init(Leyer){if(isIE){theCSSLayer=document.all[Leyer].style;theLayer=document.all[Leyer];}else if(isDOM){theCSSLayer=document.getElementById(Leyer).style;theLayer=document.getElementById(Leyer);}else if(isNav){theCSSLayer=document.layers[Leyer];theLayer=document.layers[Leyer];}
if(v_Fix=="Yes")
initEvents(0);else
initEvents(1);}
function CalResize(){v_Height=ggWinCal.innerHeight;v_Width=ggWinCal.innerWidth;}
function SetupInline(){document.onmousedown=closeNow;document.getElementById('Calendar').onmouseout=function(){document.onmousedown=closeNow;}
document.getElementById('Calendar').onmouseover=function(){document.onmousedown=null;}
return"INLINE";}
function Build(p_item,p_month,p_year,p_format,p_type,p_custom){p_type=SetupInline();var displayTwoCals=true;if(p_custom&&p_custom!=""){v_CurrentDate="";var vvars=name_values(p_custom);var whois="document."+p_item+".value";var returnItemValue=eval(whois);if(returnItemValue!="")
v_CurrentDate=returnItemValue;v_Weekends=chkVar("v_Weekends")?v_Weekends:"06";for(i=0;i<v_Weekends.length;i++)
weekend.push(parseInt(v_Weekends.charAt(i)));}else
v_CurrentDate="";var vCurrentDate;if(chkVar("v_CurrentDate")){if(Calendar.processDateData(v_CurrentDate,p_format)==null)
vCurrentDate=new Date();else
vCurrentDate=new Date(Calendar.processDateData(v_CurrentDate,p_format));p_month=vCurrentDate.getMonth();p_year=vCurrentDate.getFullYear().toString();}else
vCurrentDate="NONE";v_Resizable=chkVar("v_Resizable")?v_Resizable:"No";v_SelectAfter=(typeof v_SelectAfter=="string")?new Date(Calendar.processDateData(v_SelectAfter,p_format)):v_SelectAfter;if(v_SelectBefore=="330")v_SelectBefore=new Date(Date.parse(new Date())+(86400000*parseInt(v_SelectBefore)));v_SelectBefore=(typeof v_SelectBefore=="string")?new Date(Calendar.processDateData(v_SelectBefore,p_format)):v_SelectBefore;v_NSHierarchy=isNav?(chkVar("v_NSHierarchy")?(v_NSHierarchy+".document."):""):"";v_CallFunction=chkVar("v_CallFunction")?v_CallFunction:"";v_Nav=chkVar("v_Nav")?v_Nav:"Yes";v_SmartNav=chkVar("v_SmartNav")?v_SmartNav:"No";v_Go=chkVar("v_Go")?jiaDate(v_Go):"";v_NumberOfNights=(v_NumberOfNights>0)?v_NumberOfNights:0;v_VB=chkVar("v_VB")?v_VB:"";v_Fix=chkVar("v_Fix")?v_Fix:"Yes";v_WeekStart=chkVar("v_WeekStart")?parseInt(v_WeekStart):0;var vHeight,vWidth;v_Width=chkVar("v_Width")?v_Width:250;v_Height=chkVar("v_Height")?v_Height:250;v_Width=170;if(p_type=="POPUP"){vWidth=chkVar("v_Width")?v_Width:250;if(isIE)vHeight=chkVar("v_Height")?v_Height:250;else if(isNav)vHeight=chkVar("v_Height")?v_Height:250;if(v_SmartNav=="Yes")
v_PopupX=chkVar("v_PopupX")?v_PopupX:-1;v_PopupY=chkVar("v_PopupY")?v_PopupY:-1;if(v_PopupX>=0&&v_PopupY>=0){if(!ggWinCal||ggWinCal.closed){ggWinCal=window.open("","Calendar","width="+vWidth+",height="+vHeight+
",status=no,resizable="+v_Resizable+
",screenX="+v_PopupX+",screenY="+v_PopupY+
",left="+v_PopupX+",top="+v_PopupY);}}else{if(!ggWinCal||ggWinCal.closed)
ggWinCal=window.open("","Calendar","width="+vWidth+",height="+vHeight+
",status=no,resizable="+v_Resizable);}
ggWinCal.opener=self;var p_WinCal=ggWinCal;if(isNav&&!isDOM){ggWinCal.captureEvents(Event.RESIZE);}
ggWinCal.onResize=CalResize;}
gCal=new Calendar(p_item,p_WinCal,p_month,p_year,p_format,p_type);var theelement=document.getElementById(gCal.INLINE);theelement.style.display='none';gCal.gCurrentDate=vCurrentDate;gCal.gAllowWeekends=(chkVar("v_AllowWeekends")&&v_AllowWeekends=="Yes")?"Yes":"No";gCal.closeable=chkVar("v_CloseOnSelect")?((v_CloseOnSelect=="Yes")?true:false):true;gCal.returnMode=chkVar("v_AppendOrReplace")?v_AppendOrReplace:"Replace";gCal.returnData=chkVar("v_ReturnData")?v_ReturnData:"Date";gCal.appendChar=(gCal.returnMode=="Append")?chkVar("v_AppendChar")?v_AppendChar:";":"";gCal.CallFunction=chkVar("v_CallFunction")?v_CallFunction:"";gCal.InlineX=chkVar("v_InlineX")?v_InlineX:100;gCal.InlineY=chkVar("v_InlineY")?v_InlineY:100;if(gCal.gType=="INLINE"){var e=eval('document.'+p_item);e.style.position='relative';var extra=0;yy=e.offsetTop+e.offsetHeight+extra;if(isIE&&e.offsetLeft>400)
xx=e.offsetLeft-210;else if(isNav&&e.offsetLeft>190){xx=e.offsetLeft-210;}
else xx=e.offsetLeft-133;Calendar.MoveTo(xx,yy,gCal.INLINE);var theelement=document.getElementById(gCal.INLINE);theelement.style.display='block';}
gCal.gTitle=v_Title?v_Title:gCal.gMonthName+"/"+gCal.gYear;gCal.gBGColor="#F5F5F5";gCal.gHeaderColor="#666666";if(gCal.gYearly)gCal.showY();else gCal.show(displayTwoCals);if(gCal.gType=="INLINE"){drag_init(gCal.INLINE);}}
INPUT_DATE_FORMAT="MM/DD/YYYY";function show_calendar(){p_item=arguments[0];if(arguments[1]==null||arguments[1]=="")
p_month=new String(gNow.getMonth());else
p_month=(typeof(arguments[1])=="number")?arguments[1].toString():(new Date(arguments[1]).getMonth()).toString();if(arguments[2]==null||arguments[2]=="")
p_year=new String(gNow.getFullYear().toString());else
p_year=(typeof(arguments[2])=="number")?arguments[2].toString():(new Date(arguments[2]).getFullYear()).toString();if(arguments[3]==null)
p_format=INPUT_DATE_FORMAT;else
p_format=(typeof(arguments[3])=="string")?arguments[3]:INPUT_DATE_FORMAT;if(arguments[4]==null)
p_type="POPUP";else
p_type=(typeof(arguments[4])=="string"&&(arguments[4]=="POPUP"||arguments[4]=="INLINE"))?arguments[4]:"POPUP";if(arguments[5]==null)
p_custom="CloseOnSelect=Yes;AppendOrReplace=Replace;AppendChar=';';ReturnData=Date;Title=Select Travel Dates;AllowWeekends=Yes;Resizable=Yes;";else
p_custom=typeof(arguments[5])=="string"?arguments[5]:"CloseOnSelect=Yes;AppendOrReplace=Replace;AppendChar=';';ReturnData=Date;Title=Select Travel Dates;AllowWeekends=Yes;Resizable=Yes;";var strings=p_custom;var cashu=strings.indexOf("Go");var cahou=strings.lastIndexOf(";");var tihuan=strings.substr(cashu,cahou);var tishu=strings.indexOf("SelectAfter");var houstring=strings.substr(tishu,strings.length);var tihou=houstring.indexOf(";");var tihuan2=strings.substr(tishu,tihou);var isnumber;var after="";if(cashu!=-1){var isnumber1=strings.indexOf("NumberOfNights");if(isnumber1!=-1){var shushushu=isnumber1+15;var isnumbers=strings.substr(shushushu,cahou);var isnumber2=isnumbers.indexOf(";");isnumber=isnumbers.substr(0,isnumber2);v_NumberOfNights=isnumber;if(tihuan=="Go=Return:;"||tihuan=="Go=Drop-off:;"||tihuan=="Go=Check-out:;"||tihuan=="Go=To:;"){after=document.TravelRequestForm.itineraryStartDate.value;if(v_NumberOfNights!=0){dtDepart=new Date(getDateStr(after));day=dtDepart.getDate();var nightsInt=isnumber-0;day+=nightsInt;oldDepart=new Date(getDateStr(after));oldDepart.setDate(day);after=(oldDepart.getMonth()+1)+"/"+oldDepart.getDate()+"/"+oldDepart.getFullYear();}}
if(after!=""){p_custom=strings.replace(tihuan2,"SelectAfter="+after);}else{p_custom=p_custom;}}
if(tihuan=="Go=Hotel Check-out:;"||tihuan=="Go=Car Drop-off:;"){var afterr=document.TravelRequestForm.customStartDate.value;if(afterr!=null){p_custom=strings.replace(tihuan2,"SelectAfter="+afterr);}else{p_custom=p_custom;}}}
Build(p_item,p_month,p_year,p_format,p_type,p_custom);}
function closeNow(e){if(!e){var e=window.event;}
var targ;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)
targ=targ.parentNode;if(targ.type!="select-one"){Calendar.Close('INLINE','Calendar');}}
function getMouseXY(e){currX=(isIE)?(event.x+document.body.scrollLeft):e.pageX;currY=(isIE)?(event.y+document.body.scrollTop):e.pageY;if(false){window.status="DRAGGGGGG : X="+(currX-cx)+", Y="+(currY-cy);v_InlineX=currX-cx;v_InlineY=currY-cy;MoveLayer(currX-cx,currY-cy,"myLayer");}else{}
return true}
function switchColor(obj,bSwitch,isBottomCal){var highlightColor='#adc9f0';var hasLink=false;var target=obj.firstChild.firstChild.firstChild;if(target!=null){if((target.firstChild!=null)&&(target.firstChild.nodeType==1)){hasLink=true;}
else{hasLink=(target.nodeType==3);}
}
if(hasLink){if(bSwitch){obj.style.background=highlightColor;if(!isBottomCal){document.getElementById('header').style.background=highlightColor;}
else{document.getElementById('header2').style.background=highlightColor;}}
else{obj.style.background='white';if(!isBottomCal){document.getElementById('header').style.background='#CCCCCC';}
else{document.getElementById('header2').style.background='#CCCCCC';}}}}
ie5=(document.all&&document.getElementById);ns6=(!document.all&&document.getElementById);opac=0;function fadein(){if(opac==100){opac=0;return;}
if(opac!=100){opac+=10;if(ie5)document.getElementById('Calendar').style.filter='alpha(opacity:'+opac+')';if(ns6)document.getElementById('Calendar').style.opacity=opac/100;setTimeout('fadein()',01);}}
function show_yearly_calendar(p_item,p_year,p_format){if(p_year==null||p_year=="")
p_year=new String(gNow.getFullYear().toString());else
p_year=(typeof(p_year)=="number")?p_year.toString():p_year;if(p_format==null||p_format=="")
p_format=INPUT_DATE_FORMAT;var ggWinCal=window.open("","Calendar","scrollbars=yes");ggWinCal.opener=self;Build(p_item,null,p_year,p_format,"POPUP");}
<!--Begin
var DATE_SEPERATOR_LIST=new Array("-"," ","/",".");function chkdate(objName){var strDate;var strDateArray;var strDay;var strMonth;var strYear;var intday;var intMonth;var intYear;var booFound=false;var datefield=objName;var intElementNr;var err=0;var strMonthArray=new Array(12);strMonthArray[0]="01";strMonthArray[1]="02";strMonthArray[2]="03";strMonthArray[3]="04";strMonthArray[4]="05";strMonthArray[5]="06";strMonthArray[6]="07";strMonthArray[7]="08";strMonthArray[8]="09";strMonthArray[9]="10";strMonthArray[10]="11";strMonthArray[11]="12";strDate=trim(datefield.value);if(strDate.length<1){return true;}
var strValidChars="0123456789.-/ ";for(iValid=0;iValid<strDate.length;iValid++){var strChar=strDate.charAt(iValid);if(strValidChars.indexOf(strChar)==-1){return false;}}
for(intElementNr=0;intElementNr<DATE_SEPERATOR_LIST.length;intElementNr++){if(strDate.indexOf(DATE_SEPERATOR_LIST[intElementNr])!=-1){strDateArray=strDate.split(DATE_SEPERATOR_LIST[intElementNr]);if(strDateArray.length!=3){err=1;return false;}else{var dayIdx=getDayIndex(INPUT_DATE_FORMAT);var monIdx=getMonIndex(INPUT_DATE_FORMAT);var yearIdx=getYearIndex(INPUT_DATE_FORMAT);strDay=strDateArray[dayIdx];strMonth=strDateArray[monIdx];strYear=strDateArray[yearIdx];}
booFound=true;}}
if(booFound==false){return false;}
if(strYear.length<2){return false;}
if(strYear.length==2){strYear="20"+strYear;}
intday=parseInt(strDay,10);if(isNaN(intday)){err=2;return false;}
intMonth=parseInt(strMonth,10);if(isNaN(intMonth)){for(i=0;i<12;i++){if(strMonth.toUpperCase()==strMonthArray[i].toUpperCase()){intMonth=i+1;strMonth=strMonthArray[i];i=12;}}
if(isNaN(intMonth)){err=3;return false;}}
intYear=parseInt(strYear,10);if(isNaN(intYear)){err=4;return false;}
if(intMonth>12||intMonth<1){err=5;return false;}
if((intMonth==1||intMonth==3||intMonth==5||intMonth==7||intMonth==8||intMonth==10||intMonth==12)&&(intday>31||intday<1))
{err=6;return false;}
if((intMonth==4||intMonth==6||intMonth==9||intMonth==11)&&(intday>30||intday<1)){err=7;return false;}
if(intMonth==2){if(intday<1){err=8;return false;}
if(LeapYear(intYear)==true){if(intday>29){err=9;return false;}}else{if(intday>28){err=10;return false;}}}
datefield.value=getFormattedDateStr(strYear,strMonth,strDay);return true;}
function LeapYear(intYear){if(intYear%100==0){if(intYear%400==0){return true;}}else{if((intYear%4)==0){return true;}}
return false;}
function getYearIndex(dateFormat){dateFormat=dateFormat.toUpperCase();var yearIdx=dateFormat.indexOf("Y");var monIdx=dateFormat.indexOf("M");var dayIdx=dateFormat.indexOf("D");if(yearIdx<monIdx&&yearIdx<dayIdx){return 0;}else if(yearIdx>monIdx&&yearIdx>dayIdx){return 2;}else{return 1;}}
function getMonIndex(dateFormat){dateFormat=dateFormat.toUpperCase();var yearIdx=dateFormat.indexOf("Y");var monIdx=dateFormat.indexOf("M");var dayIdx=dateFormat.indexOf("D");if(monIdx<yearIdx&&monIdx<dayIdx){return 0;}else if(monIdx>yearIdx&&monIdx>dayIdx){return 2;}else{return 1;}}
function getDayIndex(dateFormat){dateFormat=dateFormat.toUpperCase();var yearIdx=dateFormat.indexOf("Y");var monIdx=dateFormat.indexOf("M");var dayIdx=dateFormat.indexOf("D");if(dayIdx<yearIdx&&dayIdx<monIdx){return 0;}else if(dayIdx>yearIdx&&dayIdx>monIdx){return 2;}else{return 1;}}
function getFormattedDateStr(strYear,strMon,strDay){var dateStr=INPUT_DATE_FORMAT;if(INPUT_DATE_FORMAT.indexOf("YYYY")>=0){dateStr=dateStr.replace("YYYY",strYear);}else if(INPUT_DATE_FORMAT.indexOf("YY")>=0){dateStr=dateStr.replace("YY",strYear);}
if(INPUT_DATE_FORMAT.indexOf("MM")>=0){dateStr=dateStr.replace("MM",strMon);}else if(INPUT_DATE_FORMAT.indexOf("M")>=0){dateStr=dateStr.replace("M",strMon);}
if(INPUT_DATE_FORMAT.indexOf("DD")>=0){dateStr=dateStr.replace("DD",strDay);}else if(INPUT_DATE_FORMAT.indexOf("M")>=0){dateStr=dateStr.replace("D",strDay);}
return dateStr;}
function getDateStr(inputStr){if(inputStr==null)return;var separatorChar=getDateSeparator();var newDateSeparator="/";switch(separatorChar){case"/":return inputStr;case"-":return inputStr.replace(/-/g,newDateSeparator);case" ":return inputStr.replace(/ /g,newDateSeparator);case".":return inputStr.replace(/./g,newDateSeparator);}
return inputStr;}
function getDateSeparator(){for(index=0;index<DATE_SEPERATOR_LIST.length;index++){var strChar=DATE_SEPERATOR_LIST[index];if(INPUT_DATE_FORMAT.indexOf(strChar)>=0){return strChar;}}
return"/";}
function validateCalendar(dateValue){if(/^\d{2}\/\d{2}\/\d{4}$/.test(dateValue))return dateValue;else return null;}
function formatDateValue(dateObj){var all=dateObj.value.split("/");if(all&&all.length==3){if(all[0])
if(all[0].length==1)all[0]="0"+all[0];else if(all[0].length>2){alert("That date is invalid. Please use format \"mm/dd/yyyy\" try again ");return;}
if(all[1])
if(all[1].length==1)all[1]="0"+all[1];else if(all[1].length>2){alert("That date is invalid. Please use format \"mm/dd/yyyy\" try again ");return;}
if(all[2])
if(all[2].length==2)all[2]="20"+all[2];else if(all[2].length>4){alert("That date is invalid. Please use format \"mm/dd/yyyy\" try again ");return;}
dateObj.value=all[0]+"/"+all[1]+"/"+all[2];}}
INTERISLAND_STAY_DAYS=1;INBOUND_STAY_DAYS=7;OUTBOUND_STAY_DAYS=7;MAINLAND_STAY_DAYS=7;INTERNATIONAL_STAY_DAYS=7;INTERNATIONAL_DESTINATION="domestic";function displayHotels(destinationIdx,resKey){document.TravelRequestForm.submitAction.value="dsplHtls";document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"DisplayHotels.do");document.TravelRequestForm.dtIdx.value=destinationIdx;document.TravelRequestForm.dtRes.value=resKey;document.TravelRequestForm.submit();}
function displayCars(destinationIdx,resKey){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"DisplayCars.do");document.TravelRequestForm.submitAction.value="dsplCars";document.TravelRequestForm.dtIdx.value=destinationIdx;document.TravelRequestForm.dtRes.value=resKey;document.TravelRequestForm.submit();}
function displayFlights(){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"DisplayFlights.do");document.TravelRequestForm.submitAction.value="dsplFlts";document.TravelRequestForm.submit();}
function selectRoomDisplayFlights(destinationIdx,resKey){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"DisplayFlights.do");document.TravelRequestForm.submitAction.value="1";document.TravelRequestForm.selectedRoom.value=resKey;document.TravelRequestForm.submit();}
function updateCar(destinationIdx,resKey){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"SelectCar.do");document.TravelRequestForm.submitAction.value="SelectCar";document.TravelRequestForm.dtIdx.value=destinationIdx;document.TravelRequestForm.dtRes.value=resKey;document.TravelRequestForm.submit();}
function selectFlight(idx,resKey){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"SelectFlight.do");document.TravelRequestForm.dtIdx.value=idx;switch(idx){case 0:document.TravelRequestForm.selectedFlight0.value=resKey;break;case 1:document.TravelRequestForm.selectedFlight1.value=resKey;break;case 2:document.TravelRequestForm.selectedFlight2.value=resKey;break;case 3:document.TravelRequestForm.selectedFlight3.value=resKey;break;case 4:document.TravelRequestForm.selectedFlight4.value=resKey;break;case 5:document.TravelRequestForm.selectedFlight5.value=resKey;break;default:}
document.TravelRequestForm.submit();}
function selectHotel(destinationIdx,resKey){if(document.TravelRequestForm.action.indexOf("HotelInfo.do")<0){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"SelectHotel.do");}else{document.TravelRequestForm.submitAction.value=6;}
document.TravelRequestForm.dtIdx.value=destinationIdx;document.TravelRequestForm.dtRes.value=resKey;document.TravelRequestForm.submit();}
function processInsurance(){document.forms[0].submitAction.value="processInsurance";document.forms[0].submit();}
function showHotel(dtIdx,roomId,submitAction){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"HotelInfo.do");document.TravelRequestForm.dtIdx.value=dtIdx;document.TravelRequestForm.dtRes.value=roomId;if(document.TravelRequestForm.selectedRoom!=null){document.TravelRequestForm.selectedRoom.value=roomId;}
document.TravelRequestForm.submitAction.value=submitAction;document.TravelRequestForm.submit();}
function moreHotelOptionsSegmentIdx(idx,selectOptionIndex){if(document.TravelRequestForm.action.indexOf("SelectHotel.do")>=0){document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"DisplayHotels.do");}
document.TravelRequestForm.submitAction.value="moreHotelOptions";document.TravelRequestForm.dtIdx.value=idx;document.TravelRequestForm.stIdx0.value=selectOptionIndex;document.TravelRequestForm.submit();}
function showTerm(url,title,w,h,features){if(window.checkG2HPageTimeOut&&checkG2HPageTimeOut()){return;}else if(window.startG2HPageTimeOut){startG2HPageTimeOut();}
var win1=0;var wint=0;if(screen.width){winl=(screen.width-w)/2;wint=(screen.height-h)/2;}
if(winl<0)
winl=0;if(wint<0)
wint=0;var settings='height='+h+',';settings+='width='+w+',';settings+='top='+wint+',';settings+='left='+winl+',';settings+=features;win=window.open(url,'title',settings);}
function displayVoucher(voucherCode,localeCode){if(window.checkG2HPageTimeOut&&checkG2HPageTimeOut()){return;}else if(window.startG2HPageTimeOut){startG2HPageTimeOut();}
var w=600;var h=550;if(screen.width){var winl=(screen.width-w)/2;var wint=(screen.height-h)/2;}
else{winl=0;wint=0;}
if(winl<0)winl=0;if(wint<0)wint=0;var settings='height='+h+',';settings+='width='+w+',';settings+='top='+wint+',';settings+='left='+winl+',';settings+='scrollbars=yes,';settings+='resizable=yes';var strOpen="ActivityVoucher.jsp?voucherCode="+voucherCode;if(localeCode!=""){strOpen+="&lang="+localeCode;}
hotelWindow=window.open(strOpen,"replace",settings);}
function viewByHotels(){document.TravelRequestForm.submitAction.value="viewByHotels";document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"DisplayHotels.do");document.TravelRequestForm.submit();}
function replaceActionName(oldName,newName){var name=oldName.substring(0,oldName.lastIndexOf('/')+1);name+=newName;return name;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)
x=document.getElementById(n);return x;}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}
obj.visibility=v;}}
function getObj(objID){if(document.getElementById){return document.getElementById(objID);}
else if(document.all){return document.all[objID];}
else if(document.layers){return document.layers[objID];}}
function expandCar(show,showArray,hideArray){var i;var j;if(show){for(i=0;i<showArray.length;i++){for(j=0;j<showArray[i].length;j++){var o=getObj(showArray[i][j]);if(o!=null)
o.style.display="block";}}
for(i=0;i<hideArray.length;i++){for(j=0;j<hideArray[i].length;j++){var o=getObj(hideArray[i][j]);if(o!=null)
o.style.display="none";}}}else{for(i=0;i<showArray.length;i++){for(j=0;j<showArray[i].length;j++){var o=getObj(showArray[i][j]);if(o!=null)
o.style.display="none";}}
for(i=0;i<hideArray.length;i++){for(j=0;j<hideArray[i].length;j++){var o=getObj(hideArray[i][j]);if(o!=null)
o.style.display="block";}}}}
function expandHeader(show,showH,hideH){if(show){var o=getObj(showH);if(o!=null)
o.style.display="block";var h=getObj(hideH);if(h!=null)
h.style.display="none";}else{var o=getObj(showH);if(o!=null)
o.style.display="none";var h=getObj(hideH);if(h!=null)
h.style.display="block";}}
function carExpand(switchC,switchE,headerC,headerE,expArray,colArray){MM_showHideLayers(switchC,'','hide');MM_showHideLayers(switchE,'','show');expandHeader(true,headerE,headerC);expandCar(true,expArray,colArray);}
function carCollapse(switchC,switchE,headerC,headerE,expArray,colArray){MM_showHideLayers(switchC,'','show');MM_showHideLayers(switchE,'','hide');expandHeader(false,headerE,headerC);expandCar(false,expArray,colArray);}
function showDetailHotels(){document.TravelRequestForm.submitAction.value="showDetailHotels";document.TravelRequestForm.submit();}
function returnBack(returnAvailabilityPage){if(returnAvailabilityPage){document.TravelRequestForm.submitAction.value="showDetailHotels";}else{document.TravelRequestForm.action=replaceActionName(document.TravelRequestForm.action,"ReturnItinerary.do");}
document.TravelRequestForm.submit();}
function MM_displayLayers(){var i,p,v,obj,args=MM_displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){d=args[i+2];if(obj.style){obj=obj.style;}
obj.display=d;}}
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL){var newURL='',verStr=navigator.appVersion,app=navigator.appName,version=parseFloat(verStr);if(app.indexOf('Netscape')!=-1){if(version>=NSvers){if(NSpass>0)newURL=(NSpass==1)?URL:altURL;}
else{if(NSnoPass>0)newURL=(NSnoPass==1)?URL:altURL;}}else if(app.indexOf('Microsoft')!=-1){if(version>=IEvers||verStr.indexOf(IEvers)!=-1)
{if(IEpass>0)newURL=(IEpass==1)?URL:altURL;}
else{if(IEnoPass>0)newURL=(IEnoPass==1)?URL:altURL;}}else if(OBpass>0)newURL=(OBpass==1)?URL:altURL;if(newURL){window.location=unescape(newURL);document.MM_returnValue=false;}}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}
else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)
location.reload();}
MM_reloadPage(true);function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(n);return x;}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}
obj.visibility=v;}}
function displayLayers(){var i,p,v,obj,args=displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'block':(v='hide')?'none':v;}
obj.display=v;}}
function newWindow(url,title,w,h,features){if(screen.width){var winl=(screen.width-w)/2;var wint=(screen.height-h)/2;}
else{winl=0;wint=0;}
if(winl<0)
winl=0;if(wint<0)
wint=0;var settings='height='+h+',';settings+='width='+w+',';settings+='top='+wint+',';settings+='left='+winl+',';settings+=features;win=window.open(url,'title',settings);}
function changeto(highlightcolor){source=event.srcElement
if(source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TABLE")
source=source.parentElement
if(source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor}
function changeback(originalcolor){if(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if(event.toElement!=source)
source.style.backgroundColor=originalcolor}
function includesAir(){var value="";for(var i=0;i<document.TravelRequestForm.typeOfPackage.length;i++){if(document.TravelRequestForm.typeOfPackage[i].checked=="1"){value=document.TravelRequestForm.typeOfPackage[i].value;}}
if(value=="HOTEL-ONLY"||value=="CAR-HOTEL"||value=="CAR-ONLY"||value==""){return false;}
return true;}
function includesHotel(){var value="";for(var i=0;i<document.TravelRequestForm.typeOfPackage.length;i++){if(document.TravelRequestForm.typeOfPackage[i].checked=="1"){value=document.TravelRequestForm.typeOfPackage[i].value;}}
if(value=="AIR-ONLY"||value=="AIR-CAR"||value=="CAR-ONLY"||value==""){return false;}
return true;}
function cleanNumber(strNum){var temp=strNum.replace(/[^\d]/g,'');return temp;}
function isNumeric(strString){var strValidChars="0123456789.-";var strChar;if(strString.length==0)
return false;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
return true;}
function checkDecimal(num){var index=num.indexOf(".")-0;if(index!=-1){var temp=num.substring(index+1);if(temp.length>2){return false;}}
return true;}
function validateEmailAddressFormat(src){var regex=/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;return regex.test(src);}
function submitForm(){if(document.TravelRequestForm.submitAction)document.TravelRequestForm.submitAction.value="";if(document.TravelRequestForm.currentDestination)document.TravelRequestForm.currentDestination.value=0;if(document.TravelRequestForm.currentComponent)document.TravelRequestForm.currentComponent.value="";validateAndSubmit();}
function isCarOnlyPackage(){var value="";for(var i=0;i<document.TravelRequestForm.typeOfPackage.length;i++){if(document.TravelRequestForm.typeOfPackage[i].checked=="1"){value=document.TravelRequestForm.typeOfPackage[i].value;}}
if(value=="CAR-ONLY"){return true;}
return false;}
function showAirportNote(){var toDisplay=false;if((document.TravelRequestForm.from0.type=="select-one")&&(document.TravelRequestForm.to0.type=="select-one")){if(document.TravelRequestForm.from0.options[document.TravelRequestForm.from0.selectedIndex].value=="JHM"||document.TravelRequestForm.to0.options[document.TravelRequestForm.to0.selectedIndex].value=="JHM"){toDisplay=true;}}else if((document.TravelRequestForm.from0.type=="text")&&(document.TravelRequestForm.to0.type=="select-one")){if(document.TravelRequestForm.to0.options[document.TravelRequestForm.to0.selectedIndex].value=="JHM"){toDisplay=true;}}else if((document.TravelRequestForm.from0.type=="select-one")&&(document.TravelRequestForm.to0.type=="text")){if(document.TravelRequestForm.from0.options[document.TravelRequestForm.from0.selectedIndex].value=="JHM"){toDisplay=true;}}
if(toDisplay){displayLayers('airportNote','','show');}else{displayLayers('airportNote','','hide');}}
function showAirportNoteMulti(lastDestination){var toDisplay=false;var fromValue,toValue;for(var i=0;i<(lastDestination+1);i++){toValue=getValueOfSelectObject("to"+i);fromValue=getValueOfSelectObject("from"+i);if(toValue=="JHM"||fromValue=="JHM"){toDisplay=true;break;}}
if(toDisplay){displayLayers('airportNote','','show');}else{displayLayers('airportNote','','hide');}
return toDisplay;}
function showInternationalAirportNote(){var toDisplayPPT=false;var toDisplaySYD=false;var toDisplayMNL=false;var toDisplayPPG=false;if(document.TravelRequestForm.to0.options[document.TravelRequestForm.to0.selectedIndex].value=="PPT"){toDisplayPPT=true;}else if(document.TravelRequestForm.to0.options[document.TravelRequestForm.to0.selectedIndex].value=="SYD"){toDisplaySYD=true;}else if(document.TravelRequestForm.to0.options[document.TravelRequestForm.to0.selectedIndex].value=="MNL"){toDisplayMNL=true;}else if(document.TravelRequestForm.to0.options[document.TravelRequestForm.to0.selectedIndex].value=="PPG"){toDisplayPPG=true;}
if(toDisplayPPT){displayLayers('airportNotePPT','','show');}else{displayLayers('airportNotePPT','','hide');}
if(toDisplaySYD){displayLayers('airportNoteSYD','','show');}else{displayLayers('airportNoteSYD','','hide');}
if(toDisplayPPG){displayLayers('airportNotePPG','','show');}else{displayLayers('airportNotePPG','','hide');}}
function changeNumberOfChildren(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;var hasInfant=false;for(var i=0;i<6;i++){if(i<countChildren){displayLayers('divchild'+i,'','show');age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0"&&includesAir()){displayLayers('divinfant'+i,'','show');hasInfant=true;}else{displayLayers('divinfant'+i,'','hide');}}
else{displayLayers('divchild'+i,'','hide');displayLayers('divinfant'+i,'','hide');}}
if(countChildren>0&&hasInfant==true){displayLayers('infantInLapMsg','','show');}else{displayLayers('infantInLapMsg','','hide');}}
function changeChildAge(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;var displayInfantMsg=false;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0"&&includesAir()){displayLayers('divinfant'+i,'','show');displayInfantMsg=true;}else{displayLayers('divinfant'+i,'','hide');}}
if(displayInfantMsg==true){displayLayers('infantInLapMsg','','show');}else{displayLayers('infantInLapMsg','','hide');}}
function getValueOfSelectObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="select-one")){return document.TravelRequestForm.elements[i].value;}}
return"";}
function getValueOfRadioObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="radio")&&(document.TravelRequestForm.elements[i].checked)){return document.TravelRequestForm.elements[i].value;}}
return"";}
function cleanBlankStrPhoneFields(){var phoneFields=new Array('phoneCountry','phoneAreaCode','phoneNumber','businessPhoneCountry','businessPhoneAreaCode','businessPhoneNumber','faxCountry','faxAreaCode','faxNumber');var fieldObj;for(j in phoneFields){fieldObj=eval('document.OrderForm.'+phoneFields[j]);cleanBlankStr(fieldObj);}}
function cleanBlankStr(field){if((field!=null)&&(field!=undefined)){field.value=trim(field.value);}}
function isValidPhoneNumber(strString){var strValidChars=" 0123456789-";var strChar;if(strString.length==0)
return false;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
return true;}
function isValidAreaCode(strString){var strValidChars="0123456789";var strChar;if(strString.length!=3)
return false;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
return true;}
function isValidAreaPhoneSegIntl(strString){var strValidChars="0123456789";var strChar;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
return true;}
function isValidPhoneNumberIntl(strString){var strValidChars="0123456789-";var strChar;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
strString=cleanNumber(strString);if(strString.length<5)
return false;return true;}
function isValidPhoneNumber2(strString){strString=cleanNumber(strString);var strValidChars="0123456789";var strChar;if(strString.length!=7)
return false;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
return true;}
function isOneWay(){var value=2;if(document.TravelRequestForm.travelType){for(var i=0;i<document.TravelRequestForm.travelType.length;i++){if(document.TravelRequestForm.travelType[i].checked=="1"){value=document.TravelRequestForm.travelType[i].value;}}}
if(value==1){return true;}
return false;}
function isMultiCity(){var value;if(document.TravelRequestForm.travelType){for(var i=0;i<document.TravelRequestForm.travelType.length;i++){if(document.TravelRequestForm.travelType[i].checked=="1"){value=document.TravelRequestForm.travelType[i].value;}}
if(value==3){return true;}else{return false;}}else{return false;}}
function includesCar(){var value="";for(var i=0;i<document.TravelRequestForm.typeOfPackage.length;i++){if(document.TravelRequestForm.typeOfPackage[i].checked=="1"){value=document.TravelRequestForm.typeOfPackage[i].value;}}
if(value=="AIR-ONLY"||value=="AIR-HOTEL"||value=="HOTEL-ONLY"||value==""){return false;}
return true;}
function getValueOfTextObject(objectName){return getValueOfTextObjectFromForm(document.TravelRequestForm,objectName);}
function getValueOfTextObjectFromForm(thisForm,objectName){for(var i=0;i<thisForm.elements.length;i++){if((thisForm.elements[i].name==objectName)&&(thisForm.elements[i].type=="text")){return thisForm.elements[i].value;}}
return"";}
function trim(str){return str.replace(/^\s*|\s*$/g,"");}
function showMoreOptions(){displayLayers('moreOptions','','show');if(document.TravelRequestForm.showMoreOptions!=null){document.TravelRequestForm.showMoreOptions.value="show";}}
function validateDepartureDate(){if(checkdate(document.TravelRequestForm.itineraryStartDate)){DepartChecker(document.TravelRequestForm.itineraryStartDate,document.TravelRequestForm.itineraryEndDate,'<%=indexObj.getNumberOfNights()%>');}}
function validateReturnDate(){if(checkdate(document.TravelRequestForm.itineraryEndDate)){ReturnChecker(document.TravelRequestForm.itineraryStartDate,document.TravelRequestForm.itineraryEndDate);}}
function getHawaiianIslandByAirportCode(code){if(code=="HNL"){return"Oahu";}else if(code=="LIH"){return"Kauai";}else if(code=="OGG"){return"Maui";}else if(code=="KOA"){return"Hawaii/Big Island";}else if(code=="ITO"){return"Hawaii/Big Island";}else if(code=="LNY"){return"Lanai";}else if(code=="MKK"){return"Molokai";}else{alert("Please specify an Island/Airport.");return("Not Supported");}}
function clickNeedComponent(cbComponent,selectDateDivName,component){if(cbComponent.checked){displayLayers(selectDateDivName,'','show');}else{displayLayers(selectDateDivName,'','hide');}
if("hotel"==component){displayHotelLayers();}else if("car"==component){displayCarLayers();}}
function hideDestinations(startDestination){for(i=startDestination;i<3;i++){displayLayers('destination'+i,'','hide');}}
function deselectAllNextOption(destinationNo){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==('nextOption'+destinationNo))&&(document.TravelRequestForm.elements[i].type=="radio")){document.TravelRequestForm.elements[i].checked=false;}}}
function clickNextOption(rbValue,destinationNo,hasCustomDates){if(rbValue=="pkg"){displayLayers('destination'+(destinationNo+1),'','show');hideDestinations(destinationNo+2);displayLayers('returnFlight','','hide');document.TravelRequestForm.multiCityPkgLastIdx.value=destinationNo+1;}else if(rbValue=="flight"){hideDestinations(destinationNo+1);displayLayers('returnFlight','','show');document.TravelRequestForm.multiCityPkgLastIdx.value=destinationNo;}else if(rbValue=="end"){hideDestinations(destinationNo+1);displayLayers('returnFlight','','hide');document.TravelRequestForm.multiCityPkgLastIdx.value=destinationNo;if(isCheckBoxSelected("needHotel"+destinationNo)||isCheckBoxSelected("needCar"+destinationNo)){var cmpMsg;var currentComponent;var dtMsg;if(isCheckBoxSelected("needHotel"+destinationNo)){cmpMsg="hotel";dtMsg="check-out";currentComponent="hotel";if(isCheckBoxSelected("needCar"+destinationNo)){currentComponent="hotelcar";}}else{cmpMsg="car";dtMsg="drop-off";currentComponent="car";}
if(!hasCustomDates){if(confirm("To end your trip in "+getValueOfSelectObject('to'+destinationNo)
+", please provide your "+cmpMsg+" "+dtMsg+" date at this destination."+'\n'
+"Click OK to specify the "+dtMsg+" date at this destination or Cancel to reset your next action for this destination.")){document.TravelRequestForm.submitAction.value="EndTripDates";document.TravelRequestForm.currentDestination.value=destinationNo;document.TravelRequestForm.currentComponent.value=currentComponent;if(validateAndSubmit()==false){deselectAllNextOption(destinationNo);}}else{deselectAllNextOption(destinationNo);}}}}}
function isCheckBoxSelected(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="checkbox")){return document.TravelRequestForm.elements[i].checked;}}
return false;}
function displayHotelLayers(){displayLayers("hotelRatingLayer","","hide");displayLayers("hotelRatingLayer1","","hide");displayLayers("numberOfRoomLayer","","hide");var lastDestination=document.TravelRequestForm.multiCityPkgLastIdx.value;var hasHotel=false;for(var i=0;i<lastDestination+1;i++){if(isCheckBoxSelected("needHotel"+i)){displayLayers("hotelRatingLayer","","show");displayLayers("hotelRatingLayer1","","show");displayLayers("numberOfRoomLayer","","show");hasHotel=true;return;}}
if(!hasHotel&&document.TravelRequestForm.numberOfRooms){document.TravelRequestForm.numberOfRooms.value='1';}}
function displayCarLayers(){displayLayers("carCompanyLayer","","hide");displayLayers("carTypeLayer","","hide");var lastDestination=document.TravelRequestForm.multiCityPkgLastIdx.value;for(var i=0;i<lastDestination+1;i++){if(isCheckBoxSelected("needCar"+i)){displayLayers("carCompanyLayer","","show");displayLayers("carTypeLayer","","show");return;}}}
function isNumber(strString){var strValidChars="0123456789";var strChar;if(strString.length==0)
return true;for(i=0;i<strString.length;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){return false;}}
return true;}
function selectDifferentDates(destination,component){document.TravelRequestForm.submitAction.value="SelectDifferentDates";document.TravelRequestForm.currentDestination.value=destination;document.TravelRequestForm.currentComponent.value=component;validateAndSubmit();}
function validateDateRange(dateInput,startDateRangeValue,endDateRangeValue,errorMsg,isStartDate){if(checkdate(dateInput)){dateDt=new Date(getDateStr(dateInput.value));if(isStartDate){if(startDateRangeValue!=null&&startDateRangeValue!=""){startDateDt=new Date(getDateStr(startDateRangeValue));if(dateDt<startDateDt&&endDateRangeValue!=null&&endDateRangeValue!=""){alert(errorMsg);return false;}else if(dateDt<startDateDt){alert(errorMsg);return false;}}}else{if(endDateRangeValue!=null&&endDateRangeValue!=""){endDateDt=new Date(getDateStr(endDateRangeValue));if(dateDt>endDateDt&&startDateRangeValue!=null&&startDateRangeValue!=""){alert(errorMsg);return false;}else if(dateDt>endDateDt){alert(errorMsg);return false;}}}}
return true;}
function changeHasCustomDate(rbFormName,newValue,startDateValue,endDateValue){document.TravelRequestForm.customStartDate.value=startDateValue;if(document.TravelRequestForm.customEndDate){document.TravelRequestForm.customEndDate.value=endDateValue;}
if(document.TravelRequestForm.customStartTime){document.TravelRequestForm.customStartTime.value="3:00 PM";}
if(document.TravelRequestForm.customEndTime){document.TravelRequestForm.customEndTime.value="3:00 PM";}
for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==rbFormName)&&(document.TravelRequestForm.elements[i].type=="radio")&&(document.TravelRequestForm.elements[i].value==newValue)){document.TravelRequestForm.elements[i].checked=true;}}}
function isAirOnlyPackage(){var value="";for(var i=0;i<document.TravelRequestForm.typeOfPackage.length;i++){if(document.TravelRequestForm.typeOfPackage[i].checked=="1"){value=document.TravelRequestForm.typeOfPackage[i].value;}}
if(value=="AIR-ONLY"){return true;}
return false;}
function initMultiCityPackageDepartureCommon(lastDestinationIdx){for(var i=0;i<=lastDestinationIdx;i++){displayLayers('destination'+i,'','show');if(isCheckBoxSelected("needHotel"+i)){displayLayers('hotelDatesLinkShow'+i,'','show');}else{displayLayers('hotelDatesLinkShow'+i,'','hide');}
if(isCheckBoxSelected("needCar"+i)){displayLayers('carDatesLinkShow'+i,'','show');}else{displayLayers('carDatesLinkShow'+i,'','hide');}}
hideDestinations(lastDestinationIdx+1);if("flight"==getValueOfRadioObject("nextOption"+lastDestinationIdx)){displayLayers('returnFlight','','show');}
displayHotelLayers();displayCarLayers();}
function setMulticityReturnFlightDefaultDate(){if(document.TravelRequestForm.returnFlightDefaultDate&&document.TravelRequestForm.multiCityPkgLastIdx){last=document.TravelRequestForm.multiCityPkgLastIdx.value;document.TravelRequestForm.returnFlightDefaultDate.value=getValueOfTextObject("itineraryStartDate"+last);}}
function showClassNote(){if(document.TravelRequestForm.flightClass.selectedIndex==1){displayLayers('seatingclass','','show');}else{displayLayers('seatingclass','','hide');}}
function loadScript(){var now=new Date();var startDate=new Date();newDate=new Date(now.getTime()+(3*24*60*60*1000));if((newDate.getMonth()+1)<10){startMonth="0"+(newDate.getMonth()+1);}else{startMonth=(newDate.getMonth()+1);}
startDate=startMonth+"/"+newDate.getDate()+"/"+newDate.getFullYear();document.TravelRequestForm.itineraryStartDate.value=startDate;newDate=new Date(now.getTime()+(10*24*60*60*1000));if((newDate.getMonth()+1)<10){startMonth="0"+(newDate.getMonth()+1);}else{startMonth=(newDate.getMonth()+1);}
endDate=startMonth+"/"+newDate.getDate()+"/"+newDate.getFullYear();document.TravelRequestForm.itineraryEndDate.value=endDate;}
function sendOff(object){var strConfirm='';var now=new Date();if(eval("document.TravelRequestForm.localDiscount[0].checked")==true&&eval("document.TravelRequestForm.localDiscount[1].checked")==false){document.TravelRequestForm.localDiscount.value=1;}else if(eval("document.TravelRequestForm.localDiscount[0].checked")==false&&eval("document.TravelRequestForm.localDiscount[1].checked")==true){document.TravelRequestForm.localDiscount.value=0;}else{document.TravelRequestForm.localDiscount.value=0;}
if(navigator.appName=='Microsoft Internet Explorer'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear(),10);}else if(navigator.appName=='Netscape'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}else{var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}
if(!document.TravelRequestForm.from.value){strConfirm+='Please select a Departure City'+'\n';}
if(!document.TravelRequestForm.to.value){strConfirm+='Please select an Arrival City'+'\n';}
if(document.TravelRequestForm.from.value&&document.TravelRequestForm.to.value&&(document.TravelRequestForm.from.value==document.TravelRequestForm.to.value)){strConfirm+='Departing and Arrival cities must be different'+'\n';}
if(!checkdate(document.TravelRequestForm.itineraryStartDate)){strConfirm+='Departure Date is not filled in correctly'+'\n';}
if(!checkdate(document.TravelRequestForm.itineraryEndDate)){strConfirm+='Arrival Date is not filled in correctly'+'\n';}
if(daysElapsed(document.TravelRequestForm.itineraryStartDate.value,today)<=0){strConfirm+='Departure Date should be greater than today'+'\n';}
if(daysElapsed(document.TravelRequestForm.itineraryEndDate.value,today)<=0){strConfirm+='Arrival Date should be greater than today'+'\n';}
if(daysElapsed(date_diff(today),document.TravelRequestForm.itineraryStartDate.value)<0){strConfirm+='Please set the Departure Date within 330 days from today'+'\n';}
if(daysElapsed(date_diff(today),document.TravelRequestForm.itineraryEndDate.value)<0){strConfirm+='Please set the Arrival Date within 330 days from today'+'\n';}
if(strConfirm.length>0){alert(strConfirm);}else{if(regionIslandChecker()&&checkInfantsVersusAdults()&&checkNumOfPassengers()&&dateChecker()){document.TravelRequestForm.action='http://pts.get2hawaii.com/ots/Index.do';document.TravelRequestForm.submit();}}}
function date_diff(val){var date330="";var dateArray=val.split('/');strDate=new Date(dateArray[2],parseInt(dateArray[0],10)-1,dateArray[1]);date330=new Date(strDate.getTime()+(330*86400000));if(navigator.appName=='Microsoft Internet Explorer'){var tmpYear=parseInt(date330.getYear(),10);}else if(navigator.appName=='Netscape'){var tmpYear=parseInt(date330.getYear()+1900,10);}else{var tmpYear=parseInt(date330.getYear()+1900,10);}
return(parseInt(date330.getMonth()+1,10))
+'/'
+date330.getDate()
+'/'
+tmpYear
}
function daysElapsed(date1,date2){var dateArray1=date1.split('/');var dateArray2=date2.split('/');date1=new Date(dateArray1[2],parseInt(dateArray1[0],10)-1,dateArray1[1]);date2=new Date(dateArray2[2],parseInt(dateArray2[0],10)-1,dateArray2[1]);var difference=Date.UTC(y2k(date1.getYear()),date1.getMonth(),date1.getDate(),0,0,0)
-Date.UTC(y2k(date2.getYear()),date2.getMonth(),date2.getDate(),0,0,0);return difference/1000/60/60/24;}
function y2k(number){return(number<1000)?number+1900:number;}
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL){var newURL='',verStr=navigator.appVersion,app=navigator.appName,version=parseFloat(verStr);if(app.indexOf('Netscape')!=-1){if(version>=NSvers){if(NSpass>0)newURL=(NSpass==1)?URL:altURL;}else{if(NSnoPass>0)newURL=(NSnoPass==1)?URL:altURL;}}else if(app.indexOf('Microsoft')!=-1){if(version>=IEvers||verStr.indexOf(IEvers)!=-1){if(IEpass>0)newURL=(IEpass==1)?URL:altURL;}else{if(IEnoPass>0)newURL=(IEnoPass==1)?URL:altURL;}}else if(OBpass>0)newURL=(OBpass==1)?URL:altURL;if(newURL){window.location=unescape(newURL);document.MM_returnValue=false;}}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}else
if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload();}
MM_reloadPage(true);function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(n);return x;}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}
obj.visibility=v;}}
function changeto(highlightcolor){source=event.srcElement
if(source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TABLE")
source=source.parentElement
if(source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor}
function changeback(originalcolor){if(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if(event.toElement!=source)
source.style.backgroundColor=originalcolor}
var DepartDate="";var ReturnDate="";function InitSaveVariables(fieldDepartDate,fieldReturnDate){DepartDate=fieldDepartDate.value;ReturnDate=fieldReturnDate.value;}
INTERISLAND_STAY_DAYS=1;INBOUND_STAY_DAYS=7;OUTBOUND_STAY_DAYS=7;INTERISLAND_PACKAGE_ATTR=1;INBOUND_PACKAGE_ATTR=2;OUTBOUND_PACKAGE_ATTR=3;function DepartChecker(fieldDepartDate,fieldReturnDate){var leeDay;dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);day=dtDepart.getDate();month=dtDepart.getMonth();year=dtDepart.getFullYear();leeDay=INBOUND_STAY_DAYS;for(var i=1;i<=leeDay;i++){day++;}
oldDepart=new Date(fieldDepartDate.value);oldDepart.setDate(day);newDepart=(oldDepart.getMonth()+1)+"/"+oldDepart.getDate()+"/"+oldDepart.getFullYear();if(dtDepart>dtReturn){fieldReturnDate.value=newDepart;}}
function ReturnChecker(fieldDepartDate,fieldReturnDate){dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);if(dtReturn<dtDepart){fieldDepartDate.value=fieldReturnDate.value;}}
function includesHotel(){if(document.TravelRequestForm.typeOfPackage[0].checked=="1"||document.TravelRequestForm.typeOfPackage[2].checked=="1"){return true;}
return false;}
function checkInfantsVersusAdults(){var nAdults=new Number(document.TravelRequestForm.numberOfAdults.value);var nInfants=new Number(document.TravelRequestForm.numberOfInfants.value);if(nAdults<nInfants){alert("The number of infants must not be greater than the number of adults traveling");return false;}
return true;}
function checkNumOfPassengers(){var nAdults=new Number(document.TravelRequestForm.numberOfAdults.value);var nChildren=new Number(document.TravelRequestForm.numberOfChildren.value);if(nAdults+nChildren>7){alert("The total number of passengers must not be greater than 7.");return false;}
if(nAdults<1){alert("There must be at least 1 adult traveler in the party.");return false;}
return true;}
function discountChecker(){if(document.TravelRequestForm.localDiscount[0].checked=="0"&&document.TravelRequestForm.localDiscount[1].checked=="0"){alert("Please make sure that you specify if you are a Hawaii resident.");return false;}
return true;}
function dateChecker(){if(document.TravelRequestForm.typeOfPackage.value=="fullPackage"||document.TravelRequestForm.typeOfPackage.value=="AIR-CAR-HOTEL"){if(isInterislandPkg()&&document.TravelRequestForm.typeOfTour[0].checked=="0"&&document.TravelRequestForm.typeOfTour[1].checked=="1"){dtStart=new Date(document.TravelRequestForm.itineraryStartDate.value);dtEnd=new Date(document.TravelRequestForm.itineraryEndDate.value);endDay=new Date((dtEnd.getMonth()+1)+"/"+dtEnd.getDate()+"/"+dtEnd.getFullYear());startDay=new Date((dtStart.getMonth()+1)+"/"+(dtStart.getDate()+2)+"/"+dtStart.getFullYear());if(endDay<startDay){alert("Please make sure that the number of days you specify for this Multi-Island trip exceeds 1 day of travel.");return false;}else{return true;}}}
return true;}
function regionIslandChecker(){if(includesHotel()){var SelectedIsland=getHawaiianIslandByAirportCode(document.TravelRequestForm.to.value);var SelectedRegion=document.TravelRequestForm.region.options[document.TravelRequestForm.region.selectedIndex].value;if(SelectedIsland==""){alert('Please select an Island Destination and Island Region before submitting the Travel Package Request.');return false;}
if(SelectedRegion==""){alert('Please select an Island Region before submitting the Travel Package Request.');return false;}}
return true;}
function getHawaiianIslandByAirportCode(code){switch(code){case"HNL":return"Oahu";break;case"LIH":return"Kauai";break;case"OGG":return"Maui";break;case"KOA":return"Hawaii/Big Island";break;case"ITO":return"Hawaii/Big Island";break;case"LNY":return"Lanai";break;case"MKK":return"Molokai";break;default:alert("Airport code "+code+" is not Supported");return("Not Supported");break;}
}
function submitForm(){if(regionIslandChecker()&&checkInfantsVersusAdults()&&checkNumOfPassengers()&&dateChecker()
){document.TravelRequestForm.submit();}}
function submitForm1(){if(regionIslandChecker()&&checkNumOfPassengers()&&dateChecker()
){document.TravelRequestForm.submit();}}
function jc_Browser(){d=document;this.agt=navigator.userAgent.toLowerCase();this.major=parseInt(navigator.appVersion);this.dom=(d.getElementById);this.ns=(d.layers);this.ns4up=(this.ns&&this.major>=4);this.ns6=(this.dom&&navigator.appName=="Netscape");this.op=(window.opera);if(d.all)this.ie=1;else this.ie=0;this.ie4=(d.all&&!this.dom);this.ie4up=(this.ie&&this.major>=4);this.ie5=(d.all&&this.dom);this.ie6=(d.nodeType);this.sf=(this.agt.indexOf("safari")!=-1);this.win=((this.agt.indexOf("win")!=-1)||(this.agt.indexOf("16bit")!=-1));this.winme=(this.agt.indexOf("win 9x 4.90")!=-1);this.xpsp2=(this.agt.indexOf("sv1")!=-1);this.mac=(this.agt.indexOf("mac")!=-1);}
var oBw=new jc_Browser();function jc_getObj(id,d){var i,x;if(!d)d=document;if(!(x=d[id])&&d.all)x=d.all[id];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][id];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=jc_getObj(id,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(id);return x;}
function jc_getH(o){return(oBw.ns)?((o.height)?o.height:o.clip.height):((oBw.op&&typeof o.style.pixelHeight!='undefined')?o.style.pixelHeight:o.offsetHeight);}
function jc_setH(o,h){if(o.clip)o.clip.height=h;else if(oBw.op&&typeof o.style.pixelHeight!='undefined')o.style.pixelHeight=h;else o.style.height=h;}
function jc_getW(o){return(oBw.ns)?((o.width)?o.width:o.clip.width):((oBw.op&&typeof o.style.pixelWidth!='undefined')?w=o.style.pixelWidth:o.offsetWidth);}
function jc_setW(o,w){if(o.clip)o.clip.width=w;else if(oBw.op&&typeof o.style.pixelWidth!='undefined')o.style.pixelWidth=w;else o.style.width=w;}
function jc_getX(o){return(oBw.ns)?o.left:((o.style.pixelLeft)?o.style.pixelLeft:o.offsetLeft);}
function ylib_setX(o,x){if(oBw.ns){o.left=x;}else if(typeof o.style.pixelLeft!='undefined'){o.style.pixelLeft=x;}else{thisPos=parseInt(x);thisPos+="px";o.style.left=thisPos;}}
function jc_getY(o){return(oBw.ns)?o.top:((o.style.pixelTop)?o.style.pixelTop:o.offsetTop);}
function ylib_setY(o,y){if(oBw.ns){o.top=y;}else if(typeof o.style.pixelTop!='undefined'){o.style.pixelTop=y;}else{thisPos=parseInt(y);thisPos+="px";o.style.top=thisPos;}}
function jc_getPageX(o){var x=0;if(oBw.ns)x=o.pageX;else{while(eval(o)){x+=o.offsetLeft;o=o.offsetParent;}}return x;}
function jc_getPageY(o){var y=0;if(oBw.ns)y=o.pageY;else{while(eval(o)){y+=o.offsetTop;o=o.offsetParent;}}return y;}
function jc_getZ(o){return(oBw.ns)?o.zIndex:o.style.zIndex;}
function jc_moveTo(o,x,y){jc_setX(o,x);jc_setY(o,y);}
function jc_moveBy(o,x,y){jc_setX(o,jc_getPageX(o)+x);jc_setY(o,jc_getPageY(o)+y);}
function jc_setZ(o,z){if(oBw.ns)o.zIndex=z;else o.style.zIndex=z;}
function jc_setClip(o){}
function jc_show(o,disp){(oBw.ns)?'':(!disp)?o.style.display="inline":o.style.display=disp;(oBw.ns)?o.visibility='show':o.style.visibility='visible';}
function jc_hide(o,disp){(oBw.ns)?'':(arguments.length!=2)?o.style.display="none":o.style.display=disp;(oBw.ns)?o.visibility='hide':o.style.visibility='hidden';}
function jc_setStyle(o,s,v){if(oBw.ie5||oBw.dom)eval("o.style."+s+" = '"+v+"'");}
function jc_getStyle(o,s){if(oBw.ie5||oBw.dom)return eval("o.style."+s);}
function jc_getDocW(){}
function jc_getDocH(){}
function jc_addEvt(o,e,f,c){if(o.addEventListener)o.addEventListener(e,f,c);else if(o.attachEvent)o.attachEvent("on"+e,f);else eval("o.on"+e+"="+f)}
function jc_writeHTML(o,h){if(oBw.ns){var doc=o.document;doc.write(h);doc.close();return false;}
if(o.innerHTML)o.innerHTML=h;}
function jc_insertHTML(o,h,w){if(oBw.op)return;if(o.insertAdjacentHTML){o.insertAdjacentHTML(w,h);return;}
if(oBw.ns){jc_writeHTML(o,h);return;}
var r=o.ownerDocument.createRange();r.setStartBefore(o);var frag=r.createContextualFragment(h);jc_insertObj(o,w,frag)}
function jc_insertObj(o,w,node){switch(w){case'beforeBegin':o.parentNode.insertBefore(node,o)
break;case'afterBegin':o.insertBefore(node,o.firstChild);break;case'beforeEnd':o.appendChild(node);break;case'afterEnd':if(o.nextSibling){o.parentNode.insertBefore(node,o.nextSibling);}else{o.parentNode.appendChild(node)}
break;}}
var cur=new Date();var dtCh="/";var minYear=cur.getFullYear();var maxYear=(cur.getFullYear()+1);function isInteger(s){var i;for(i=0;i<s.length;i++){var c=s.charAt(i);if(((c<"0")||(c>"9")))return false;}
return true;}
function stripCharsInBag(s,bag){var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1)returnString+=c;}
return returnString;}
function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31
if(i==4||i==6||i==9||i==11){this[i]=30}
if(i==2){this[i]=29}}
return this}
function isDate(dtStr){var daysInMonth=DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strMonth=dtStr.substring(0,pos1)
var strDay=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if(strDay.charAt(0)=="0"&&strDay.length>1)strDay=strDay.substring(1)
if(strMonth.charAt(0)=="0"&&strMonth.length>1)strMonth=strMonth.substring(1)
for(var i=1;i<=3;i++){if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1)}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if(pos1==-1||pos2==-1){return false}
if(strMonth.length<1||month<1||month>12){alert("Please enter a valid month")
return false}
if(strDay.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]){alert("Please enter a valid day")
return false}
if(strYear.length!=4||year==0||year<minYear||year>maxYear){return false}
if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){return false}
return true}
function loadScript(){var now=new Date();var startDate=new Date();newDate=new Date(now.getTime()+(3*24*60*60*1000));if((newDate.getMonth()+1)<10){startMonth="0"+(newDate.getMonth()+1);}else{startMonth=(newDate.getMonth()+1);}
startDate=startMonth+"/"+newDate.getDate()+"/"+newDate.getFullYear();document.TravelRequestForm.itineraryStartDate.value=startDate;newDate=new Date(now.getTime()+(10*24*60*60*1000));if((newDate.getMonth()+1)<10){startMonth="0"+(newDate.getMonth()+1);}else{startMonth=(newDate.getMonth()+1);}
endDate=startMonth+"/"+newDate.getDate()+"/"+newDate.getFullYear();document.TravelRequestForm.itineraryEndDate.value=endDate;}
var DepartDate="";var ReturnDate="";function InitSaveVariables(fieldDepartDate,fieldReturnDate){DepartDate=fieldDepartDate.value;ReturnDate=fieldReturnDate.value;}
INTERISLAND_STAY_DAYS=7;INBOUND_STAY_DAYS=4;function DepartChecker(fieldDepartDate,fieldReturnDate){var leeDay;dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);day=dtDepart.getDate();month=dtDepart.getMonth();year=dtDepart.getFullYear();leeDay=INTERISLAND_STAY_DAYS;for(var i=1;i<=leeDay;i++){day++;}
oldDepart=new Date(fieldDepartDate.value);oldDepart.setDate(day);newDepart=(oldDepart.getMonth()+1)+"/"+oldDepart.getDate()+"/"+oldDepart.getFullYear();if(dtDepart>dtReturn){fieldReturnDate.value=newDepart;}}
function ReturnChecker(fieldDepartDate,fieldReturnDate){dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);if(dtReturn<dtDepart){fieldDepartDate.value=fieldReturnDate.value;}}
function submitForm(object){var strConfirm='';var now=new Date();if(navigator.appName=='Microsoft Internet Explorer'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear(),10);}else if(navigator.appName=='Netscape'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}else{var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}
if(!document.TravelRequestForm.from.value){strConfirm+='Please enter your departure location'+'\n';}
if(!document.TravelRequestForm.to.value){strConfirm+='Please select your destination location'+'\n';}
if(document.TravelRequestForm.from.value&&document.TravelRequestForm.to.value){var Current=document.TravelRequestForm.to.selectedIndex;if(document.TravelRequestForm.from.value==document.TravelRequestForm.to.value||document.TravelRequestForm.from.value==document.TravelRequestForm.to.options[Current].text){strConfirm+='Departing and Arrival cities must be different'+'\n';}}
var depdate=document.TravelRequestForm.itineraryStartDate.value
var retdate=document.TravelRequestForm.itineraryEndDate.value
var pos=depdate.indexOf(dtCh,depdate.indexOf(dtCh)+1)
var strYear=depdate.substring(pos+1)
if(strYear.length==2){depdate=depdate.substring(0,pos)+'/20'+strYear}
var pos=retdate.indexOf(dtCh,retdate.indexOf(dtCh)+1)
var strYear=retdate.substring(pos+1)
if(strYear.length==2){retdate=retdate.substring(0,pos)+'/20'+strYear}
if(!isDate(depdate)){strConfirm+='Departure Date is not filled in correctly'+'\n';}
if(!isDate(retdate)){strConfirm+='Return Date is not filled in correctly'+'\n';}
if(daysElapsed(depdate,today)<=0){strConfirm+='Departure Date should be greater than today'+'\n';}
if(daysElapsed(retdate,today)<=0){strConfirm+='Return Date should be greater than today'+'\n';}
if(daysElapsed(retdate,depdate)<=0){strConfirm+='Return Date should be greater than the Departure Date'+'\n';}
if(daysElapsed(date_diff(today),depdate)<0){strConfirm+='Please set the Departure Date within 330 days from today'+'\n';}
if(daysElapsed(date_diff(today),retdate)<0){strConfirm+='Please set the Return Date within 330 days from today'+'\n';}
if(strConfirm.length>0){alert(strConfirm);}else{if(checkNumOfPassengers()){document.TravelRequestForm.itineraryStartDate.value=depdate
document.TravelRequestForm.itineraryEndDate.value=retdate
document.TravelRequestForm.action='http://pts.get2hawaii.com/ots/Index.do';document.TravelRequestForm.submit();}}}
function trim(str){str.replace(/^\s*/,'').replace(/\s*$/,'');return str;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v;}
obj.visibility=v;}}
function displayLayers(){var i,p,v,obj,args=displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'block':(v='hide')?'none':v;}
obj.display=v;}}
function MM_displayLayers(){var i,p,v,obj,args=MM_displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){d=args[i+2];if(obj.style){obj=obj.style;}
obj.display=d;}}
function show(object){if(document.getElementById&&document.getElementById(object)!=null)
node=document.getElementById(object).style.visibility='visible';else if(document.layers&&document.layers[object]!=null)
document.layers[object].visibility='visible';else if(document.all)
document.all[object].style.visibility='visible';}
function hide(object){if(document.getElementById&&document.getElementById(object)!=null)
node=document.getElementById(object).style.visibility='hidden';else if(document.layers&&document.layers[object]!=null)
document.layers[object].visibility='hidden';else if(document.all)
document.all[object].style.visibility='hidden';}
function changeNumberOfChildren(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;for(var i=0;i<6;i++){if(i<countChildren){displayLayers('divchild'+i,'','show');age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0")
displayLayers('divinfant'+i,'','show');}else{displayLayers('divchild'+i,'','hide');displayLayers('divinfant'+i,'','hide');}}}
function changeChildAge(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0")
displayLayers('divinfant'+i,'','show');else
displayLayers('divinfant'+i,'','hide');}}
function getValueOfSelectObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="select-one")){return document.TravelRequestForm.elements[i].value;}}
return"";}
function getValueOfRadioObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="radio")&&(document.TravelRequestForm.elements[i].checked)){return document.TravelRequestForm.elements[i].value;}}
return"";}
function checkNumOfPassengers(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var countAdults=document.TravelRequestForm.numberOfAdults.value;var tripTypeValue=document.TravelRequestForm.packageAttrStr.value;var countLapInfants=0;var age;var inf;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(Number(countAdults)+Number(countChildren)>6){alert("The total number of people must not be greater than 6.");return false;}
if(age==""){alert("Please specify the age of the child.");return false;}
if(age!=""&&age=="0"){inf=getValueOfRadioObject("infant"+i);if(inf==""){alert("Please select infant in seat or lap.");return false;}
if(inf=="lap"){countLapInfants++;}}}
if(countAdults<countLapInfants){alert("The number of infants in laps must not be greater than the number of adults traveling");return false;}
return true;}
function selectForm(link){var url=link;if((url!="")&&(url!=null))
window.location=url;else
alert("\nYou must make a selection.");}
var ie4=(document.all)?true:false;var ns4=(document.layers)?true:false;var ns6=(document.getElementById&&!document.all)?true:false;function hidelayer(lay){if(ie4){document.all[lay].style.visibility="hidden";}
if(ns4){document.layers[lay].visibility="hide";}
if(ns6){document.getElementById([lay]).style.display="none";}}
function showlayer(lay){if(ie4){document.all[lay].style.visibility="visible";}
if(ns4){document.layers[lay].visibility="show";}
if(ns6){document.getElementById([lay]).style.display="block";}}
var cur=new Date();var dtCh="/";var minYear=cur.getFullYear();var maxYear=(cur.getFullYear()+1);function isInteger(s){var i;for(i=0;i<s.length;i++){var c=s.charAt(i);if(((c<"0")||(c>"9")))return false;}
return true;}
function stripCharsInBag(s,bag){var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1)returnString+=c;}
return returnString;}
function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31
if(i==4||i==6||i==9||i==11){this[i]=30}
if(i==2){this[i]=29}}
return this}
function isDate(dtStr){var daysInMonth=DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strMonth=dtStr.substring(0,pos1)
var strDay=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if(strDay.charAt(0)=="0"&&strDay.length>1)strDay=strDay.substring(1)
if(strMonth.charAt(0)=="0"&&strMonth.length>1)strMonth=strMonth.substring(1)
for(var i=1;i<=3;i++){if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1)}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if(pos1==-1||pos2==-1){return false}
if(strMonth.length<1||month<1||month>12){alert("Please enter a valid month")
return false}
if(strDay.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]){alert("Please enter a valid day")
return false}
if(strYear.length!=4||year==0||year<minYear||year>maxYear){return false}
if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){return false}
return true}
function sendOff(object){var strConfirm='';var now=new Date();if(navigator.appName=='Microsoft Internet Explorer'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear(),10);}else if(navigator.appName=='Netscape'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}else{var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}
if(!document.TravelRequestForm.from.value){strConfirm+='Please enter your departure location'+'\n';}
if(!document.TravelRequestForm.to.value){strConfirm+='Please enter your destination location'+'\n';}
if(document.TravelRequestForm.from.value&&document.TravelRequestForm.to.value&&(document.TravelRequestForm.from.value==document.TravelRequestForm.to.value)){strConfirm+='Departure location and Destination location must be different'+'\n';}
var depdate=document.TravelRequestForm.itineraryStartDate.value
var retdate=document.TravelRequestForm.itineraryEndDate.value
var pos=depdate.indexOf(dtCh,depdate.indexOf(dtCh)+1)
var strYear=depdate.substring(pos+1)
if(strYear.length==2){depdate=depdate.substring(0,pos)+'/20'+strYear}
var pos=retdate.indexOf(dtCh,retdate.indexOf(dtCh)+1)
var strYear=retdate.substring(pos+1)
if(strYear.length==2){retdate=retdate.substring(0,pos)+'/20'+strYear}
if(!isDate(depdate)){strConfirm+='Departure Date is not filled in correctly'+'\n';}
if(!isDate(retdate)){strConfirm+='Return Date is not filled in correctly'+'\n';}
if(daysElapsed(depdate,today)<=0){strConfirm+='Departure Date should be greater than today'+'\n';}
if(daysElapsed(retdate,today)<=0){strConfirm+='Return Date should be greater than today'+'\n';}
if(daysElapsed(depdate,today)==daysElapsed(retdate,today)&&(document.TravelRequestForm.departureTime.value==document.TravelRequestForm.returnTime.value)){strConfirm+='Return time must be after departure time'+'\n';}
if(daysElapsed(date_diff(today),depdate)<0){strConfirm+='Please set the Departure Date within 330 days from today'+'\n';}
if(daysElapsed(date_diff(today),retdate)<0){strConfirm+='Please set the Return Date within 330 days from today'+'\n';}
if(strConfirm.length>0){alert(strConfirm);}else{if(checkNumOfPassengers()){document.TravelRequestForm.itineraryStartDate.value=depdate
document.TravelRequestForm.itineraryEndDate.value=retdate
document.TravelRequestForm.action='http://pts.get2hawaii.com/ots/Index.do';document.TravelRequestForm.submit();}}}
function date_diff(val){var date330="";var dateArray=val.split('/');strDate=new Date(dateArray[2],parseInt(dateArray[0],10)-1,dateArray[1]);date330=new Date(strDate.getTime()+(330*86400000));if(navigator.appName=='Microsoft Internet Explorer'){var tmpYear=parseInt(date330.getYear(),10);}else if(navigator.appName=='Netscape'){var tmpYear=parseInt(date330.getYear()+1900,10);}else{var tmpYear=parseInt(date330.getYear()+1900,10);}
return(parseInt(date330.getMonth()+1,10))
+'/'
+date330.getDate()
+'/'
+tmpYear
}
function daysElapsed(date1,date2){var dateArray1=date1.split('/');var dateArray2=date2.split('/');date1=new Date(dateArray1[2],parseInt(dateArray1[0],10)-1,dateArray1[1]);date2=new Date(dateArray2[2],parseInt(dateArray2[0],10)-1,dateArray2[1]);var difference=Date.UTC(y2k(date1.getYear()),date1.getMonth(),date1.getDate(),0,0,0)
-Date.UTC(y2k(date2.getYear()),date2.getMonth(),date2.getDate(),0,0,0);return difference/1000/60/60/24;}
function y2k(number){return(number<1000)?number+1900:number;}
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL){var newURL='',verStr=navigator.appVersion,app=navigator.appName,version=parseFloat(verStr);if(app.indexOf('Netscape')!=-1){if(version>=NSvers){if(NSpass>0)newURL=(NSpass==1)?URL:altURL;}else{if(NSnoPass>0)newURL=(NSnoPass==1)?URL:altURL;}}else if(app.indexOf('Microsoft')!=-1){if(version>=IEvers||verStr.indexOf(IEvers)!=-1){if(IEpass>0)newURL=(IEpass==1)?URL:altURL;}else{if(IEnoPass>0)newURL=(IEnoPass==1)?URL:altURL;}}else if(OBpass>0)newURL=(OBpass==1)?URL:altURL;if(newURL){window.location=unescape(newURL);document.MM_returnValue=false;}}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}else
if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload();}
MM_reloadPage(true);function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(n);return x;}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}
obj.visibility=v;}}
function changeto(highlightcolor){source=event.srcElement
if(source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TABLE")
source=source.parentElement
if(source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor}
function changeback(originalcolor){if(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if(event.toElement!=source)
source.style.backgroundColor=originalcolor}
var DepartDate="";var ReturnDate="";function InitSaveVariables(fieldDepartDate,fieldReturnDate){DepartDate=fieldDepartDate.value;ReturnDate=fieldReturnDate.value;}
INTERISLAND_STAY_DAYS=1;INBOUND_STAY_DAYS=7;OUTBOUND_STAY_DAYS=7;function DepartChecker(fieldDepartDate,fieldReturnDate){var leeDay;dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);day=dtDepart.getDate();month=dtDepart.getMonth();year=dtDepart.getFullYear();leeDay=INTERISLAND_STAY_DAYS;for(var i=1;i<=leeDay;i++){day++;}
oldDepart=new Date(fieldDepartDate.value);oldDepart.setDate(day);newDepart=(oldDepart.getMonth()+1)+"/"+oldDepart.getDate()+"/"+oldDepart.getFullYear();if(dtDepart>dtReturn){fieldReturnDate.value=newDepart;}}
function ReturnChecker(fieldDepartDate,fieldReturnDate){dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);if(dtReturn<dtDepart){fieldDepartDate.value=fieldReturnDate.value;}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v;}
obj.visibility=v;}}
function displayLayers(){var i,p,v,obj,args=displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'block':(v='hide')?'none':v;}
obj.display=v;}}
function MM_displayLayers(){var i,p,v,obj,args=MM_displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){d=args[i+2];if(obj.style){obj=obj.style;}
obj.display=d;}}
function show(object){if(document.getElementById&&document.getElementById(object)!=null)
node=document.getElementById(object).style.visibility='visible';else if(document.layers&&document.layers[object]!=null)
document.layers[object].visibility='visible';else if(document.all)
document.all[object].style.visibility='visible';}
function hide(object){if(document.getElementById&&document.getElementById(object)!=null)
node=document.getElementById(object).style.visibility='hidden';else if(document.layers&&document.layers[object]!=null)
document.layers[object].visibility='hidden';else if(document.all)
document.all[object].style.visibility='hidden';}
function changeNumberOfChildren(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;for(var i=0;i<6;i++){if(i<countChildren){displayLayers('divchild'+i,'','show');age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0")
displayLayers('divinfant'+i,'','show');}else{displayLayers('divchild'+i,'','hide');displayLayers('divinfant'+i,'','hide');}}}
function changeChildAge(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0")
displayLayers('divinfant'+i,'','show');else
displayLayers('divinfant'+i,'','hide');}}
function getValueOfSelectObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="select-one")){return document.TravelRequestForm.elements[i].value;}}
return"";}
function getValueOfRadioObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="radio")&&(document.TravelRequestForm.elements[i].checked)){return document.TravelRequestForm.elements[i].value;}}
return"";}
function checkNumOfPassengers(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var countAdults=document.TravelRequestForm.numberOfAdults.value;var tripTypeValue=document.TravelRequestForm.packageAttrStr.value;var countLapInfants=0;var age;var inf;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(Number(countAdults)+Number(countChildren)>6){alert("The total number of people must not be greater than 6.");return false;}
if(age==""){alert("Please specify the age of the child.");return false;}
if(age!=""&&age=="0"){inf=getValueOfRadioObject("infant"+i);if(inf==""){alert("Please select infant in seat or lap.");return false;}
if(inf=="lap"){countLapInfants++;}}}
if(countAdults<countLapInfants){alert("The number of infants in laps must not be greater than the number of adults traveling");return false;}
return true;}
function selectForm(link){var url=link;if((url!="")&&(url!=null))
window.location=url;else
alert("\nYou must make a selection.");}
var ie4=(document.all)?true:false;var ns4=(document.layers)?true:false;var ns6=(document.getElementById&&!document.all)?true:false;function hidelayer(lay){if(ie4){document.all[lay].style.visibility="hidden";}
if(ns4){document.layers[lay].visibility="hide";}
if(ns6){document.getElementById([lay]).style.display="none";}}
function showlayer(lay){if(ie4){document.all[lay].style.visibility="visible";}
if(ns4){document.layers[lay].visibility="show";}
if(ns6){document.getElementById([lay]).style.display="block";}}
var cur=new Date();var dtCh="/";var minYear=cur.getFullYear();var maxYear=(cur.getFullYear()+1);function isInteger(s){var i;for(i=0;i<s.length;i++){var c=s.charAt(i);if(((c<"0")||(c>"9")))return false;}
return true;}
function stripCharsInBag(s,bag){var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1)returnString+=c;}
return returnString;}
function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31
if(i==4||i==6||i==9||i==11){this[i]=30}
if(i==2){this[i]=29}}
return this}
function isDate(dtStr){var daysInMonth=DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strMonth=dtStr.substring(0,pos1)
var strDay=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if(strDay.charAt(0)=="0"&&strDay.length>1)strDay=strDay.substring(1)
if(strMonth.charAt(0)=="0"&&strMonth.length>1)strMonth=strMonth.substring(1)
for(var i=1;i<=3;i++){if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1)}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if(pos1==-1||pos2==-1){return false}
if(strMonth.length<1||month<1||month>12){alert("Please enter a valid month")
return false}
if(strDay.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]){alert("Please enter a valid day")
return false}
if(strYear.length!=4||year==0||year<minYear||year>maxYear){return false}
if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){return false}
return true}
function loadScript(){var now=new Date();var startDate=new Date();newDate=new Date(now.getTime()+(3*24*60*60*1000));if((newDate.getMonth()+1)<10){startMonth="0"+(newDate.getMonth()+1);}else{startMonth=(newDate.getMonth()+1);}
startDate=startMonth+"/"+newDate.getDate()+"/"+newDate.getFullYear();document.TravelRequestForm.itineraryStartDate.value=startDate;newDate=new Date(now.getTime()+(4*24*60*60*1000));if((newDate.getMonth()+1)<10){startMonth="0"+(newDate.getMonth()+1);}else{startMonth=(newDate.getMonth()+1);}
endDate=startMonth+"/"+newDate.getDate()+"/"+newDate.getFullYear();document.TravelRequestForm.itineraryEndDate.value=endDate;}
var DepartDate="";var ReturnDate="";function InitSaveVariables(fieldDepartDate,fieldReturnDate){DepartDate=fieldDepartDate.value;ReturnDate=fieldReturnDate.value;}
INTERISLAND_STAY_DAYS=1;INBOUND_STAY_DAYS=4;function DepartChecker(fieldDepartDate,fieldReturnDate){var leeDay;dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);day=dtDepart.getDate();month=dtDepart.getMonth();year=dtDepart.getFullYear();leeDay=INTERISLAND_STAY_DAYS;for(var i=1;i<=leeDay;i++){day++;}
oldDepart=new Date(fieldDepartDate.value);oldDepart.setDate(day);newDepart=(oldDepart.getMonth()+1)+"/"+oldDepart.getDate()+"/"+oldDepart.getFullYear();if(dtDepart>dtReturn){fieldReturnDate.value=newDepart;}}
function ReturnChecker(fieldDepartDate,fieldReturnDate){dtDepart=new Date(fieldDepartDate.value);dtReturn=new Date(fieldReturnDate.value);if(dtReturn<dtDepart){fieldDepartDate.value=fieldReturnDate.value;}}
function sendOff(object){var strConfirm='';var now=new Date();if(navigator.appName=='Microsoft Internet Explorer'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear(),10);}else if(navigator.appName=='Netscape'){var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}else{var today=parseInt(now.getMonth()+1,10)+'/'+now.getDate()+'/'+parseInt(now.getYear()+1900,10);}
if(!document.TravelRequestForm.to.value){strConfirm+='Please select an Destination'+'\n';}
var depdate=document.TravelRequestForm.itineraryStartDate.value
var retdate=document.TravelRequestForm.itineraryEndDate.value
var pos=depdate.indexOf(dtCh,depdate.indexOf(dtCh)+1)
var strYear=depdate.substring(pos+1)
if(strYear.length==2){depdate=depdate.substring(0,pos)+'/20'+strYear}
var pos=retdate.indexOf(dtCh,retdate.indexOf(dtCh)+1)
var strYear=retdate.substring(pos+1)
if(strYear.length==2){retdate=retdate.substring(0,pos)+'/20'+strYear}
if(!isDate(depdate)){strConfirm+='Departure Date is not filled in correctly'+'\n';}
if(!isDate(retdate)){strConfirm+='Return Date is not filled in correctly'+'\n';}
if(daysElapsed(depdate,today)<=0){strConfirm+='Departure Date should be greater than today'+'\n';}
if(daysElapsed(retdate,today)<=0){strConfirm+='Return Date should be greater than today'+'\n';}
if(daysElapsed(date_diff(today),depdate)<0){strConfirm+='Please set the Departure Date within 330 days from today'+'\n';}
if(daysElapsed(date_diff(today),retdate)<0){strConfirm+='Please set the Return Date within 330 days from today'+'\n';}
if(strConfirm.length>0){alert(strConfirm);}else{if(checkNumOfPassengers()){document.TravelRequestForm.itineraryStartDate.value=depdate
document.TravelRequestForm.itineraryEndDate.value=retdate
document.TravelRequestForm.action='http://pts.get2hawaii.com/ots/Index.do';document.TravelRequestForm.submit();}}}
function trim(str){str.replace(/^\s*/,'').replace(/\s*$/,'');return str;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v;}
obj.visibility=v;}}
function displayLayers(){var i,p,v,obj,args=displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'block':(v='hide')?'none':v;}
obj.display=v;}}
function MM_displayLayers(){var i,p,v,obj,args=MM_displayLayers.arguments;for(i=0;i<(args.length-2);i+=3)
if((obj=MM_findObj(args[i]))!=null){d=args[i+2];if(obj.style){obj=obj.style;}
obj.display=d;}}
function show(object){if(document.getElementById&&document.getElementById(object)!=null)
node=document.getElementById(object).style.visibility='visible';else if(document.layers&&document.layers[object]!=null)
document.layers[object].visibility='visible';else if(document.all)
document.all[object].style.visibility='visible';}
function hide(object){if(document.getElementById&&document.getElementById(object)!=null)
node=document.getElementById(object).style.visibility='hidden';else if(document.layers&&document.layers[object]!=null)
document.layers[object].visibility='hidden';else if(document.all)
document.all[object].style.visibility='hidden';}
function changeNumberOfChildren(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;for(var i=0;i<6;i++){if(i<countChildren){displayLayers('divchild'+i,'','show');age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0")
displayLayers('divinfant'+i,'','show');}else{displayLayers('divchild'+i,'','hide');displayLayers('divinfant'+i,'','hide');}}}
function changeChildAge(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var age;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(age!=""&&age=="0")
displayLayers('divinfant'+i,'','show');else
displayLayers('divinfant'+i,'','hide');}}
function getValueOfSelectObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="select-one")){return document.TravelRequestForm.elements[i].value;}}
return"";}
function getValueOfRadioObject(objectName){for(var i=0;i<document.TravelRequestForm.elements.length;i++){if((document.TravelRequestForm.elements[i].name==objectName)&&(document.TravelRequestForm.elements[i].type=="radio")&&(document.TravelRequestForm.elements[i].checked)){return document.TravelRequestForm.elements[i].value;}}
return"";}
function checkNumOfPassengers(){var countChildren=document.TravelRequestForm.numberOfChildren.value;var countAdults=document.TravelRequestForm.numberOfAdults.value;var tripTypeValue=document.TravelRequestForm.packageAttrStr.value;var age;var inf;for(var i=0;i<countChildren;i++){age=getValueOfSelectObject("childAge"+i);if(Number(countAdults)+Number(countChildren)>6){alert("The total number of people must not be greater than 6.");return false;}
if(age==""){alert("Please specify the age of the child.");return false;}}
return true;}
function selectForm(link){var url=link;if((url!="")&&(url!=null))
window.location=url;else
alert("\nYou must make a selection.");}
function daysElapsed(date1,date2){var dateArray1=date1.split('/');var dateArray2=date2.split('/');date1=new Date(dateArray1[2],parseInt(dateArray1[0],10)-1,dateArray1[1]);date2=new Date(dateArray2[2],parseInt(dateArray2[0],10)-1,dateArray2[1]);var difference=Date.UTC(y2k(date1.getYear()),date1.getMonth(),date1.getDate(),0,0,0)
-Date.UTC(y2k(date2.getYear()),date2.getMonth(),date2.getDate(),0,0,0);return difference/1000/60/60/24;}
function y2k(number){return(number<1000)?number+1900:number;}
function date_diff(val){var date330="";var dateArray=val.split('/');strDate=new Date(dateArray[2],parseInt(dateArray[0],10)-1,dateArray[1]);date330=new Date(strDate.getTime()+(330*86400000));if(navigator.appName=='Microsoft Internet Explorer'){var tmpYear=parseInt(date330.getYear(),10);}else if(navigator.appName=='Netscape'){var tmpYear=parseInt(date330.getYear()+1900,10);}else{var tmpYear=parseInt(date330.getYear()+1900,10);}
return(parseInt(date330.getMonth()+1,10))
+'/'
+date330.getDate()
+'/'
+tmpYear
}
var ie4=(document.all)?true:false;var ns4=(document.layers)?true:false;var ns6=(document.getElementById&&!document.all)?true:false;function hidelayer(lay){if(ie4){document.all[lay].style.visibility="hidden";}
if(ns4){document.layers[lay].visibility="hide";}
if(ns6){document.getElementById([lay]).style.display="none";}}
function showlayer(lay){if(ie4){document.all[lay].style.visibility="visible";}
if(ns4){document.layers[lay].visibility="show";}
if(ns6){document.getElementById([lay]).style.display="block";}}
