// Global Variable Declarations ns4 = (document.layers)? true:false; // netscape 4? ie4 = (document.all)? true:false; // internet explorer 4/5? ns6 = (ns4|ie4)? false:true; // (Netscape 6) var isLoaded = false; var page_position_left = 0; var unroll_timeouttheme = 0; var unroll_timeoutplan = 0; var unroll_timeoutbefore = 0; var unroll_timeoutabout = 0; var unroll_timeoutimage = 0; ResortMenu = new Array; SubNav = new Array; var hasTabs = false; var hasAir = true; var activeTab = ""; var vWinCal = null; var showHomePopup = true; window.name = "JamaicaTravel"; // Submits a form function submitForm( in_flag ) { if( in_flag == "true" ) clearSearchFlag(); document.forms[0].submit(); return true; } // Submit Target Form function submitTargetForm(formIndex) { document.forms[formIndex].submit(); return true; } function clearSearchFlag() { if(document.forms[0].elements['GlobalSubmitType']) document.forms[0].elements['GlobalSubmitType'].value = ""; } function clearFlags() { if(document.forms[0].elements['GlobalSearchFlag']) document.forms[0].elements['GlobalSearchFlag'].value = ""; if(document.forms[0].elements['GlobalNewsletterSignupFlag']) document.forms[0].elements['GlobalNewsletterSignupFlag'].value = ""; if(document.forms[0].elements['GlobalIslandTriviaFlag']) document.forms[0].elements['GlobalIslandTriviaFlag'].value = ""; if(document.forms[0].elements['GlobalTravelAgentLocatorStateFlag']) document.forms[0].elements['GlobalTravelAgentLocatorStateFlag'].value = ""; } // Submit the Global Search function submitGlobalSearch() { clearFlags(); document.forms[0].elements["GlobalSubmitType"].value = "site_search"; document.forms[0].elements["GlobalSearchFlag"].value = "true"; submitForm("false"); } // Submit the Global Newsletter Signup function submitNewsletterSignup() { clearFlags(); document.forms[0].elements["GlobalSubmitType"].value = "newsletter_signup"; document.forms[0].elements["GlobalNewsletterSignupFlag"].value = "true"; submitForm("false"); } // Submit the Global Island Trivia function submitIslandTrivia() { clearFlags(); document.forms[0].elements["GlobalSubmitType"].value = "island_trivia"; document.forms[0].elements["GlobalIslandTriviaFlag"].value = "true"; submitForm("false"); } // Submit the Global Travel Agent Locator Zip Code function submitTravelAgentLocatorZip() { clearFlags(); document.forms[0].elements["GlobalSubmitType"].value = "travel_agent_locator_search"; document.forms[0].elements["GlobalTravelAgentLocatorZipCodeFlag"].value = "true"; //alert("Global Travel Agent Locator Post"); submitForm("false"); } // Window Openers function popWindow(in_URI, in_WindowParameters) { //windowParameters are very browser dependent. Be sure to test in all browswers when //changing window parameters. //For instance for Both IE and Netscape browsers to absolutely position a window properly 2 sets // of dimensions should be included example: screenX=0,screenY=0,left=0,top=0 //To set the height and width of the windows example: width=625,height=400 //A Good PopupWindow in all browsers with no toolbar, no scrollbar, and not resizable. //in_WindowParameters = "scrollbars=no,width=625,height=400"; if ( in_WindowParameters.length == 0 ) { in_WindowParameters = "resizable,dependent,toolbar,scrollbars,location,status,menubar"; } popupWin = window.open(in_URI,'PopupWindow',in_WindowParameters); } // Opens popup window for common pages like "email to a friend", "print this page", etc. function popCommonWindow(in_URI) { windowParameters = 'resizable,dependent,scrollbars,menubar,toolbar,statusbar,width=786,height=580'; popupWin = window.open(in_URI,'CommonPopupWindow',windowParameters); } // Function Provided by 2Advanced Studios, LLC function openCenterWin(url,theWidth,theHeight) { var theTop = (screen.height/2) - (theHeight/2); var theLeft = (screen.width/2) - (theWidth/2); var features = 'height='+ theHeight + ',width=' + theWidth + ',top=' + theTop+ ',left=' + theLeft + ",scrollbars=no"; theWin = window.open(url,'',features); } function popWindowNoNavigation(in_URI) { popupWin = window.open(in_URI,'NewWindow','toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=1'); } function popWindowHtml(in_URI,in_name,in_width) { popupWin = window.open(in_URI,in_name,'height=520,width=' + in_width + ',scrollbars,resizable=no'); } function popWindowWithName(in_URI, in_Name, in_WindowParameters) { if ( in_WindowParameters.length == 0 ) { in_WindowParameters = "resizable,dependent,toolbar,scrollbars,location,status,menubar"; } popupWin = window.open(in_URI, in_Name ,in_WindowParameters); } // Opens the Jamaica Interactive Map function openInteractiveJamaicaModule(IN_RegionId) { var RegionId; if (IN_RegionId == "") { RegionId = "entireisland"; } else { RegionId = IN_RegionId; } myInteraciveMap=window.open(js_root + "interactive_modules/map/popup_interactive_map.aspx?regionid=" + RegionId,"InteractiveMap","toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=0,width=765,height=579"); } // Opens the Port Royal Flash module function openPortRoyalModule() { myPortRoyal=window.open(js_root + "interactive_modules/map/popup_port_royal.aspx","PortRoyal","toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=0,width=765,height=508"); } // Opens the Music (Reggae Yard) Flash module function openMusicModule() { myMusic=window.open(js_root + "interactive_modules/popup_reggaeyard.aspx","ReggaeYard","toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=0,width=764,height=482"); } // Opens homepage event popup function openEventPopop() { if (showHomePopup == true) { myEventWindow=window.open(js_root + "interactive_modules/popup_reggae_marathon.aspx","Event","toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=0,width=400,height=250"); } } // Image Swaps function image_swap(in_name,in_state) { if (!isLoaded) { return true; } document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } function left_nav_image_swap(in_name,in_state,in_real_name) { if (!isLoaded) { return true; } document.images[in_name].src = eval(in_real_name + "_" + in_state + ".src"); } function nav_image_swap(in_name,in_state) { if (!isLoaded) { return true; } document.images[in_name].src = eval("nav_" + in_name + "_" + in_state + ".src"); if (in_state=='off') { document.images['nav_text'].src = eval("nav_text_off.src"); } else { document.images['nav_text'].src = eval("nav_text_" + in_name + ".src"); } } function image_swap_dynamic(in_name,in_state) { if (!isLoaded) { return true; } document.images[in_name].src = eval(in_state + ".src"); } function menu_image_swap(in_menu,in_name,in_state) { if (!isLoaded) { return true; } if (ie4) { returnElement(in_menu).document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } if (ns4) { returnElement(in_menu).document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } if (ns6) { document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } } function tools_image_swap(in_menu,in_name,in_state) { if (!isLoaded) { return true; } if (ie4) { if (returnElement(in_menu).style.visibility=="visible") { return true; } else { document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } } if (ns4) { if (window.document.layers[in_menu].visibility=="show") { return true; } else { document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } } if (ns6) { if (returnElement(in_menu).style.visibility=="visible") { return true; } else { document.images[in_name].src = eval(in_name + "_" + in_state + ".src"); } } } // DHTML function openMenuImmediate(in_menu) { if (isLoaded) { var layer_to_change = in_menu.toString(); //shift_menu_left(layer_to_change); if (document.layers) { window.document.layers[layer_to_change].visibility = "show"; } else { returnElement(in_menu).style.visibility = "visible"; } } } function closeMenuImmediate(in_menu) { var layer_to_change = in_menu.toString(); if (document.layers) { window.document.layers[layer_to_change].visibility = "hide"; } else { returnElement(in_menu).style.visibility = "hidden"; } } function returnElement(thename) { if (document.all) { return eval("window.document.all." + thename); } else { if (document.layers) { return eval("window.document.layers['" + thename + "']"); } else { return window.document.getElementById(thename); } } } function resort_menu_swap(in_menu) { if (isLoaded) { for(i=0; i< ResortMenu.length; i++) if(ResortMenu[i] != in_menu) closeMenuImmediate(ResortMenu[i]); openMenuImmediate(in_menu); } } function resort_menu_clear() { if (isLoaded) { for(i=0; i< ResortMenu.length; i++) closeMenuImmediate(ResortMenu[i]); } } function sub_menu_clear(in_menu,in_state) { if (isLoaded) { for(i=0; i< SubNav.length; i++) { closeMenuImmediate(SubNav[i]); if(SubNav[i] == in_menu) main_image_swap(SubNav[i], in_state); else main_image_swap(SubNav[i], 'off'); } } } function submenu_swap(in_ubermenu,in_submenu,in_state,in_parent_state) { if(isLoaded) { clearTimeout(unroll_timeoutimage); if (in_ubermenu=="SubNavThemes") { clearTimeout(unroll_timeouttheme); } else if (in_ubermenu=="SubNavPlan") { clearTimeout(unroll_timeoutplan); } else if (in_ubermenu=="SubNavBefore") { clearTimeout(unroll_timeoutbefore); } else if (in_ubermenu=="SubNavAbout") { clearTimeout(unroll_timeoutabout); } if (in_submenu!="null") { layer_to_change = in_submenu; main_image_to_change = in_ubermenu + "_Main_image"; main_image_to_change_to = in_ubermenu + "_Main_roll.src"; image_to_change = in_ubermenu + "_" + layer_to_change + "_image"; image_to_change_to = in_ubermenu + "_" + layer_to_change + "_" + in_state + ".src"; if (ie4) { returnElement(in_ubermenu).document.images[image_to_change].src = eval(image_to_change_to); returnElement(in_ubermenu).document.images[main_image_to_change].src = eval(main_image_to_change_to); } if (ns4) { returnElement(in_ubermenu).document.layers[layer_to_change].document.images[image_to_change].src = eval(image_to_change_to); returnElement(in_ubermenu).document.layers[main_image_to_change].document.images[main_image_to_change].src = eval(main_image_to_change_to); } if (ns6) { document.images[image_to_change].src = eval(image_to_change_to); document.images[main_image_to_change].src = eval(main_image_to_change_to); } } if (in_state=="off") { if ( in_parent_state!=null && in_parent_state!="null") unroll_timeoutimage = setTimeout("main_image_swap('" + in_ubermenu + "','" + in_parent_state + "')",200); else unroll_timeoutimage = setTimeout("main_image_swap('" + in_ubermenu + "', 'off')",200); if (in_ubermenu=="SubNavThemes") { unroll_timeouttheme = setTimeout("closeMenuImmediate('SubNavThemes')",200); } else if (in_ubermenu=="SubNavPlan") { unroll_timeoutplan = setTimeout("closeMenuImmediate('SubNavPlan')",200); } else if (in_ubermenu=="SubNavBefore") { unroll_timeoutbefore = setTimeout("closeMenuImmediate('SubNavBefore')",200); } else if (in_ubermenu=="SubNavAbout") { unroll_timeoutabout = setTimeout("closeMenuImmediate('SubNavAbout')",200); } } if (in_state == "on") { //unroll_timeoutimage = setTimeout("main_image_swap('" + in_ubermenu + "', 'on')",200); if (in_ubermenu=="SubNavThemes") { unroll_timeouttheme = setTimeout("closeMenuImmediate('SubNavThemes')",200); } else if (in_ubermenu=="SubNavPlan") { unroll_timeoutplan = setTimeout("closeMenuImmediate('SubNavPlan')",200); } else if (in_ubermenu=="SubNavBefore") { unroll_timeoutbefore = setTimeout("closeMenuImmediate('SubNavBefore')",200); } else if (in_ubermenu=="SubNavAbout") { unroll_timeoutabout = setTimeout("closeMenuImmediate('SubNavAbout')",200); } } } } function shift_menu_left(in_menu){ if (in_menu=="languageselecthigh") { var left_shift_amount = 90; } if (in_menu=="languageselectlow") { var left_shift_amount = 300; } if (document.layers) { window.document.layers[in_menu].left = page_position_left + left_shift_amount; } else { returnElement(in_menu).style.left = page_position_left + left_shift_amount; } } function main_image_swap(in_ubermenu, in_state) { main_image_to_change = in_ubermenu + "_Main_image"; main_image_to_change_to = in_ubermenu + "_Main_" + in_state + ".src"; if (ie4) { returnElement(in_ubermenu).document.images[main_image_to_change].src = eval(main_image_to_change_to); } if (ns4) { returnElement(in_ubermenu).document.layers[main_image_to_change].document.images[main_image_to_change].src = eval(main_image_to_change_to); } if (ns6) { document.images[main_image_to_change].src = eval(main_image_to_change_to); } } //Checkbox check all function checkAll( in_element, in_state ) { if( !in_state ) { for (i=0; i0) document.forms[0].elements[i].checked = false; } else { for (i=0; i0) document.forms[0].elements[i].checked = true; } } //Clear Layers function layers_clear( in_layers ) { if (isLoaded) { for(i=0; i< in_layers.length; i++) { closeMenuImmediate(in_layers[i]); } } } // Get Current URL function get_url () { return document.location.href; } // Global Initialization function global_init(in_localeCode) { ResortMenu[0] = "RnKingMenu"; ResortMenu[1] = "RnMontMenu"; ResortMenu[2] = "RnNegrilMenu"; ResortMenu[3] = "RnOchoMenu"; ResortMenu[4] = "RnPortMenu"; ResortMenu[5] = "RnSouthMenu"; SubNav[0] = "SubNavThemes"; SubNav[1] = "SubNavPlan"; SubNav[2] = "SubNavBefore"; SubNav[3] = "SubNavAbout"; rn_king_off = new Image; rn_king_off.src = js_root + "images/common/rn_king_off_" + in_localeCode + ".gif"; rn_king_roll = new Image; rn_king_roll.src = js_root + "images/common/rn_king_roll_" + in_localeCode + ".gif"; rn_king_on = new Image; rn_king_on.src = js_root + "images/common/rn_king_on_" + in_localeCode + ".gif"; rn_mont_off = new Image; rn_mont_off.src = js_root + "images/common/rn_mont_off_" + in_localeCode + ".gif"; rn_mont_roll = new Image; rn_mont_roll.src = js_root + "images/common/rn_mont_roll_" + in_localeCode + ".gif"; rn_mont_on = new Image; rn_mont_on.src = js_root + "images/common/rn_mont_on_" + in_localeCode + ".gif"; rn_negril_off = new Image; rn_negril_off.src = js_root + "images/common/rn_negril_off_" + in_localeCode + ".gif"; rn_negril_roll = new Image; rn_negril_roll.src = js_root + "images/common/rn_negril_roll_" + in_localeCode + ".gif"; rn_negril_on = new Image; rn_negril_on.src = js_root + "images/common/rn_negril_on_" + in_localeCode + ".gif"; rn_ocho_off = new Image; rn_ocho_off.src = js_root + "images/common/rn_ocho_off_" + in_localeCode + ".gif"; rn_ocho_roll = new Image; rn_ocho_roll.src = js_root + "images/common/rn_ocho_roll_" + in_localeCode + ".gif"; rn_ocho_on = new Image; rn_ocho_on.src = js_root + "images/common/rn_ocho_on_" + in_localeCode + ".gif"; rn_port_off = new Image; rn_port_off.src = js_root + "images/common/rn_port_off_" + in_localeCode + ".gif"; rn_port_roll = new Image; rn_port_roll.src = js_root + "images/common/rn_port_roll_" + in_localeCode + ".gif"; rn_port_on = new Image; rn_port_on.src = js_root + "images/common/rn_port_on_" + in_localeCode + ".gif"; rn_south_off = new Image; rn_south_off.src = js_root + "images/common/rn_south_off_" + in_localeCode + ".gif"; rn_south_roll = new Image; rn_south_roll.src = js_root + "images/common/rn_south_roll_" + in_localeCode + ".gif"; rn_south_on = new Image; rn_south_on.src = js_root + "images/common/rn_south_on_" + in_localeCode + ".gif"; bullet_lnsn_off = new Image; bullet_lnsn_off.src = js_root + "images/common/bullet_lnsn_off.gif"; bullet_lnsn_roll = new Image; bullet_lnsn_roll.src = js_root + "images/common/bullet_lnsn_roll.gif"; bullet_lnsn_on = new Image; bullet_lnsn_on.src = js_root + "images/common/bullet_lnsn_on.gif"; bullet_ln_off = new Image; bullet_ln_off.src = js_root + "images/common/bullet_ln_off.gif"; bullet_ln_roll = new Image; bullet_ln_roll.src = js_root + "images/common/bullet_ln_roll.gif"; bullet_ln_on = new Image; bullet_ln_on.src = js_root + "images/common/bullet_ln_on.gif"; gn_themes_off = new Image; gn_themes_off.src = js_root + "images/common/gn_themes_off_" + in_localeCode + ".gif"; gn_themes_roll = new Image; gn_themes_roll.src = js_root + "images/common/gn_themes_roll_" + in_localeCode + ".gif"; gn_themes_on = new Image; gn_themes_on.src = js_root + "images/common/gn_themes_on_" + in_localeCode + ".gif"; gn_bego_off = new Image; gn_bego_off.src = js_root + "images/common/gn_bego_off_" + in_localeCode + ".gif"; gn_bego_roll = new Image; gn_bego_roll.src = js_root + "images/common/gn_bego_roll_" + in_localeCode + ".gif"; gn_bego_on = new Image; gn_bego_on.src = js_root + "images/common/gn_bego_on_" + in_localeCode + ".gif"; gn_about_off = new Image; gn_about_off.src = js_root + "images/common/gn_about_off_" + in_localeCode + ".gif"; gn_about_roll = new Image; gn_about_roll.src = js_root + "images/common/gn_about_roll_" + in_localeCode + ".gif"; gn_about_on = new Image; gn_about_on.src = js_root + "images/common/gn_about_on_" + in_localeCode + ".gif"; SubNavThemes_Main_off = new Image; SubNavThemes_Main_off.src = js_root + "images/common/gn_themes_off_" + in_localeCode + ".gif"; SubNavThemes_Main_on = new Image; SubNavThemes_Main_on.src = js_root + "images/common/gn_themes_on_" + in_localeCode + ".gif"; SubNavThemes_Main_roll = new Image; SubNavThemes_Main_roll.src = js_root + "images/common/gn_themes_roll_" + in_localeCode + ".gif"; SubNavPlan_Main_off = new Image; SubNavPlan_Main_off.src = js_root + "images/common/gn_plan_off_" + in_localeCode + ".gif"; SubNavPlan_Main_on = new Image; SubNavPlan_Main_on.src = js_root + "images/common/gn_plan_on_" + in_localeCode + ".gif"; SubNavPlan_Main_roll = new Image; SubNavPlan_Main_roll.src = js_root + "images/common/gn_plan_roll_" + in_localeCode + ".gif"; SubNavBefore_Main_off = new Image; SubNavBefore_Main_off.src = js_root + "images/common/gn_bego_off_" + in_localeCode + ".gif"; SubNavBefore_Main_on = new Image; SubNavBefore_Main_on.src = js_root + "images/common/gn_bego_on_" + in_localeCode + ".gif"; SubNavBefore_Main_roll = new Image; SubNavBefore_Main_roll.src = js_root + "images/common/gn_bego_roll_" + in_localeCode + ".gif"; SubNavAbout_Main_off = new Image; SubNavAbout_Main_off.src = js_root + "images/common/gn_about_off_" + in_localeCode + ".gif"; SubNavAbout_Main_on = new Image; SubNavAbout_Main_on.src = js_root + "images/common/gn_about_on_" + in_localeCode + ".gif"; SubNavAbout_Main_roll = new Image; SubNavAbout_Main_roll.src = js_root + "images/common/gn_about_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeAdventure_off = new Image; SubNavThemes_ThemeAdventure_off.src = js_root + "images/common/gnsn_adventure_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeAdventure_roll = new Image; SubNavThemes_ThemeAdventure_roll.src = js_root + "images/common/gnsn_adventure_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeBeaches_off = new Image; SubNavThemes_ThemeBeaches_off.src = js_root + "images/common/gnsn_beach_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeBeaches_roll = new Image; SubNavThemes_ThemeBeaches_roll.src = js_root + "images/common/gnsn_beach_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeFamily_off = new Image; SubNavThemes_ThemeFamily_off.src = js_root + "images/common/gnsn_family_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeFamily_roll = new Image; SubNavThemes_ThemeFamily_roll.src = js_root + "images/common/gnsn_family_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeGolf_off = new Image; SubNavThemes_ThemeGolf_off.src = js_root + "images/common/gnsn_golf_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeGolf_roll = new Image; SubNavThemes_ThemeGolf_roll.src = js_root + "images/common/gnsn_golf_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeGroupMeetings_off = new Image; SubNavThemes_ThemeGroupMeetings_off.src = js_root + "images/common/gnsn_meetings_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeGroupMeetings_roll = new Image; SubNavThemes_ThemeGroupMeetings_roll.src = js_root + "images/common/gnsn_meetings_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeHeritage_off = new Image; SubNavThemes_ThemeHeritage_off.src = js_root + "images/common/gnsn_heritage_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeHeritage_roll = new Image; SubNavThemes_ThemeHeritage_roll.src = js_root + "images/common/gnsn_heritage_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeSports_off = new Image; SubNavThemes_ThemeSports_off.src = js_root + "images/common/gnsn_sports_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeSports_roll = new Image; SubNavThemes_ThemeSports_roll.src = js_root + "images/common/gnsn_sports_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeSpringBreak_off = new Image; SubNavThemes_ThemeSpringBreak_off.src = js_root + "images/common/gnsn_spring_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeSpringBreak_roll = new Image; SubNavThemes_ThemeSpringBreak_roll.src = js_root + "images/common/gnsn_spring_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeWeddings_off = new Image; SubNavThemes_ThemeWeddings_off.src = js_root + "images/common/gnsn_wedding_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeWeddings_roll = new Image; SubNavThemes_ThemeWeddings_roll.src = js_root + "images/common/gnsn_wedding_roll_" + in_localeCode + ".gif"; SubNavThemes_ThemeUntrodden_off = new Image; SubNavThemes_ThemeUntrodden_off.src = js_root + "images/common/gnsn_untrodden_off_" + in_localeCode + ".gif"; SubNavThemes_ThemeUntrodden_roll = new Image; SubNavThemes_ThemeUntrodden_roll.src = js_root + "images/common/gnsn_untrodden_roll_" + in_localeCode + ".gif"; SubNavPlan_TravelLocator_off = new Image; SubNavPlan_TravelLocator_off.src = js_root + "images/common/gnsn_agent_off_" + in_localeCode + ".gif"; SubNavPlan_TravelLocator_roll = new Image; SubNavPlan_TravelLocator_roll.src = js_root + "images/common/gnsn_agent_roll_" + in_localeCode + ".gif"; SubNavPlan_Packages_off = new Image; SubNavPlan_Packages_off.src = js_root + "images/common/gnsn_pkgs_off_" + in_localeCode + ".gif"; SubNavPlan_Packages_roll = new Image; SubNavPlan_Packages_roll.src = js_root + "images/common/gnsn_pkgs_roll_" + in_localeCode + ".gif"; SubNavPlan_Lodgings_off = new Image; SubNavPlan_Lodgings_off.src = js_root + "images/common/gnsn_lodgings_off_" + in_localeCode + ".gif"; SubNavPlan_Lodgings_roll = new Image; SubNavPlan_Lodgings_roll.src = js_root + "images/common/gnsn_lodgings_roll_" + in_localeCode + ".gif"; SubNavPlan_Restaurants_off = new Image; SubNavPlan_Restaurants_off.src = js_root + "images/common/gnsn_restaurants_off_" + in_localeCode + ".gif"; SubNavPlan_Restaurants_roll = new Image; SubNavPlan_Restaurants_roll.src = js_root + "images/common/gnsn_restaurants_roll_" + in_localeCode + ".gif"; SubNavPlan_Nightlife_off = new Image; SubNavPlan_Nightlife_off.src = js_root + "images/common/gnsn_night_off_" + in_localeCode + ".gif"; SubNavPlan_Nightlife_roll = new Image; SubNavPlan_Nightlife_roll.src = js_root + "images/common/gnsn_night_roll_" + in_localeCode + ".gif"; SubNavPlan_Rentals_off = new Image; SubNavPlan_Rentals_off.src = js_root + "images/common/gnsn_rentals_off_" + in_localeCode + ".gif"; SubNavPlan_Rentals_roll = new Image; SubNavPlan_Rentals_roll.src = js_root + "images/common/gnsn_rentals_roll_" + in_localeCode + ".gif"; SubNavPlan_Shopping_off = new Image; SubNavPlan_Shopping_off.src = js_root + "images/common/gnsn_shop_off_" + in_localeCode + ".gif"; SubNavPlan_Shopping_roll = new Image; SubNavPlan_Shopping_roll.src = js_root + "images/common/gnsn_shop_roll_" + in_localeCode + ".gif"; SubNavPlan_Attractions_off = new Image; SubNavPlan_Attractions_off.src = js_root + "images/common/gnsn_attractions_off_" + in_localeCode + ".gif"; SubNavPlan_Attractions_roll = new Image; SubNavPlan_Attractions_roll.src = js_root + "images/common/gnsn_attractions_roll_" + in_localeCode + ".gif"; SubNavPlan_Tours_off = new Image; SubNavPlan_Tours_off.src = js_root + "images/common/gnsn_walk_off_" + in_localeCode + ".gif"; SubNavPlan_Tours_roll = new Image; SubNavPlan_Tours_roll.src = js_root + "images/common/gnsn_walk_roll_" + in_localeCode + ".gif"; SubNavPlan_Events_off = new Image; SubNavPlan_Events_off.src = js_root + "images/common/gnsn_events_off_" + in_localeCode + ".gif"; SubNavPlan_Events_roll = new Image; SubNavPlan_Events_roll.src = js_root + "images/common/gnsn_events_roll_" + in_localeCode + ".gif"; SubNavBefore_ShouldKnow_off = new Image; SubNavBefore_ShouldKnow_off.src = js_root + "images/common/gnsn_what_off_" + in_localeCode + ".gif"; SubNavBefore_ShouldKnow_roll = new Image; SubNavBefore_ShouldKnow_roll.src = js_root + "images/common/gnsn_what_roll_" + in_localeCode + ".gif"; SubNavBefore_GettingThere_off = new Image; SubNavBefore_GettingThere_off.src = js_root + "images/common/gnsn_getthere_off_" + in_localeCode + ".gif"; SubNavBefore_GettingThere_roll = new Image; SubNavBefore_GettingThere_roll.src = js_root + "images/common/gnsn_getthere_roll_" + in_localeCode + ".gif"; SubNavBefore_Services_off = new Image; SubNavBefore_Services_off.src = js_root + "images/common/gnsn_services_off_" + in_localeCode + ".gif"; SubNavBefore_Services_roll = new Image; SubNavBefore_Services_roll.src = js_root + "images/common/gnsn_services_roll_" + in_localeCode + ".gif"; SubNavBefore_Links_off = new Image; SubNavBefore_Links_off.src = js_root + "images/common/gnsn_links_off_" + in_localeCode + ".gif"; SubNavBefore_Links_roll = new Image; SubNavBefore_Links_roll.src = js_root + "images/common/gnsn_links_roll_" + in_localeCode + ".gif"; SubNavBefore_Talk_off = new Image; SubNavBefore_Talk_off.src = js_root + "images/common/gnsn_talk_off_" + in_localeCode + ".gif"; SubNavBefore_Talk_roll = new Image; SubNavBefore_Talk_roll.src = js_root + "images/common/gnsn_talk_roll_" + in_localeCode + ".gif"; SubNavBefore_Around_off = new Image; SubNavBefore_Around_off.src = js_root + "images/common/gnsn_getaround_off_" + in_localeCode + ".gif"; SubNavBefore_Around_roll = new Image; SubNavBefore_Around_roll.src = js_root + "images/common/gnsn_getaround_roll_" + in_localeCode + ".gif"; SubNavAbout_Culture_off = new Image; SubNavAbout_Culture_off.src = js_root + "images/common/gnsn_culture_off_" + in_localeCode + ".gif"; SubNavAbout_Culture_roll = new Image; SubNavAbout_Culture_roll.src = js_root + "images/common/gnsn_culture_roll_" + in_localeCode + ".gif"; SubNavAbout_Facts_off = new Image; SubNavAbout_Facts_off.src = js_root + "images/common/gnsn_facts_off_" + in_localeCode + ".gif"; SubNavAbout_Facts_roll = new Image; SubNavAbout_Facts_roll.src = js_root + "images/common/gnsn_facts_roll_" + in_localeCode + ".gif"; SubNavAbout_History_off = new Image; SubNavAbout_History_off.src = js_root + "images/common/gnsn_history_off_" + in_localeCode + ".gif"; SubNavAbout_History_roll = new Image; SubNavAbout_History_roll.src = js_root + "images/common/gnsn_history_roll_" + in_localeCode + ".gif"; SubNavAbout_Jamaicans_off = new Image; SubNavAbout_Jamaicans_off.src = js_root + "images/common/gnsn_great_off_" + in_localeCode + ".gif"; SubNavAbout_Jamaicans_roll = new Image; SubNavAbout_Jamaicans_roll.src = js_root + "images/common/gnsn_great_roll_" + in_localeCode + ".gif"; SubNavAbout_News_off = new Image; SubNavAbout_News_off.src = js_root + "images/common/gnsn_news_off_" + in_localeCode + ".gif"; SubNavAbout_News_roll = new Image; SubNavAbout_News_roll.src = js_root + "images/common/gnsn_news_roll_" + in_localeCode + ".gif"; cal_2002 = new Image; cal_2002.src = js_root + "images/common/cal_2002.gif"; cal_2003 = new Image; cal_2003.src = js_root + "images/common/cal_2003.gif"; cal_2004 = new Image; cal_2004.src = js_root + "images/common/cal_2004.gif"; cal_2005 = new Image; cal_2005.src = js_root + "images/common/cal_2005.gif"; cal_month_1_off = new Image; cal_month_1_off.src = js_root + "images/common/cal_btn_jan_off_" + in_localeCode + ".gif"; cal_month_1_on = new Image; cal_month_1_on.src = js_root + "images/common/cal_btn_jan_on_" + in_localeCode + ".gif"; cal_month_2_off = new Image; cal_month_2_off.src = js_root + "images/common/cal_btn_feb_off_" + in_localeCode + ".gif"; cal_month_2_on = new Image; cal_month_2_on.src = js_root + "images/common/cal_btn_feb_on_" + in_localeCode + ".gif"; cal_month_3_off = new Image; cal_month_3_off.src = js_root + "images/common/cal_btn_mar_off_" + in_localeCode + ".gif"; cal_month_3_on = new Image; cal_month_3_on.src = js_root + "images/common/cal_btn_mar_on_" + in_localeCode + ".gif"; cal_month_4_off = new Image; cal_month_4_off.src = js_root + "images/common/cal_btn_apr_off_" + in_localeCode + ".gif"; cal_month_4_on = new Image; cal_month_4_on.src = js_root + "images/common/cal_btn_apr_on_" + in_localeCode + ".gif"; cal_month_5_off = new Image; cal_month_5_off.src = js_root + "images/common/cal_btn_may_off_" + in_localeCode + ".gif"; cal_month_5_on = new Image; cal_month_5_on.src = js_root + "images/common/cal_btn_may_on_" + in_localeCode + ".gif"; cal_month_6_off = new Image; cal_month_6_off.src = js_root + "images/common/cal_btn_jun_off_" + in_localeCode + ".gif"; cal_month_6_on = new Image; cal_month_6_on.src = js_root + "images/common/cal_btn_jun_on_" + in_localeCode + ".gif"; cal_month_7_off = new Image; cal_month_7_off.src = js_root + "images/common/cal_btn_jul_off_" + in_localeCode + ".gif"; cal_month_7_on = new Image; cal_month_7_on.src = js_root + "images/common/cal_btn_jul_on_" + in_localeCode + ".gif"; cal_month_8_off = new Image; cal_month_8_off.src = js_root + "images/common/cal_btn_aug_off_" + in_localeCode + ".gif"; cal_month_8_on = new Image; cal_month_8_on.src = js_root + "images/common/cal_btn_aug_on_" + in_localeCode + ".gif"; cal_month_9_off = new Image; cal_month_9_off.src = js_root + "images/common/cal_btn_sep_off_" + in_localeCode + ".gif"; cal_month_9_on = new Image; cal_month_9_on.src = js_root + "images/common/cal_btn_sep_on_" + in_localeCode + ".gif"; cal_month_10_off = new Image; cal_month_10_off.src = js_root + "images/common/cal_btn_oct_off_" + in_localeCode + ".gif"; cal_month_10_on = new Image; cal_month_10_on.src = js_root + "images/common/cal_btn_oct_on_" + in_localeCode + ".gif"; cal_month_11_off = new Image; cal_month_11_off.src = js_root + "images/common/cal_btn_nov_off_" + in_localeCode + ".gif"; cal_month_11_on = new Image; cal_month_11_on.src = js_root + "images/common/cal_btn_nov_on_" + in_localeCode + ".gif"; cal_month_12_off = new Image; cal_month_12_off.src = js_root + "images/common/cal_btn_dec_off_" + in_localeCode + ".gif"; cal_month_12_on = new Image; cal_month_12_on.src = js_root + "images/common/cal_btn_dec_on_" + in_localeCode + ".gif"; isLoaded = true; } function submitSearch(in_search_action, in_trim_url){ if (in_trim_url == null || in_trim_url == true) document.forms[0].action = document.location.href.substring(0, document.location.href.indexOf('?')); if (in_search_action == null) document.forms[0].elements["searchAction"].value = "display_results"; else document.forms[0].elements["searchAction"].value = in_search_action; submitForm("true"); } function changePage(pageNo){ document.forms[0].elements["CurrentPage"].value = pageNo; submitForm("true"); } function enterSubmit(event){ if (event.keyCode == 13) { clearSearchFlag(); submitSearch(); } } function enterSubmitGlobalSearch(event){ if (event.keyCode == 13) { submitGlobalSearch(); return false; } } function enterNewsletter(event){ if (event.keyCode == 13) { doSubmitNewsletterSignup(); } } function enterTravelLocator(event){ if (event.keyCode == 13) { submitTravelAgentLocatorZip(); } } function enterPromotion(event){ if (event.keyCode == 13) { checkAnswer(); } } function enterTravelOCSearch(event){ if (event.keyCode == 13) { submitTravelAgentSearch('oc'); } } function enterTravelNASearch(event){ if (event.keyCode == 13) { submitTravelAgentSearch('na'); } } function init_expedia_form(in_name) { var f=document.forms[in_name]; if(hasTabs) { if(activeTab!=null && activeTab == "hot") { if(hasAir) { hide('flt'); } hide('pac'); show('hot'); SetTab('hot'); set_image('hot'); } else { if (f.elements['tab'].value=="hot") { if(hasAir) hide('flt'); hide('pac'); show('hot'); SetTab('hot'); set_image('hot'); } else if(f.elements['tab'].value=="fly") { hide('hot'); hide('pac'); show('flt'); SetTab('flt'); set_image('flt'); } else { if(hasAir) hide('flt'); hide('hot'); show('pac'); SetTab('pac'); set_image('pac'); } } } } function mrd(in_name) { var room_number; for(i=0; i0) { l = document.forms[0].elements[i].options[document.forms[0].elements[i].selectedIndex].value; if (l == "1") {hide('hotrm2'); hide('hotrm3'); hide('rm1txt'); room_number=1;} if (l == "2") {show('hotrm2'); hide('hotrm3'); show('rm1txt'); room_number=2;} if (l == "3") {show('hotrm2'); show('hotrm3'); show('rm1txt'); room_number=3;} break; } } var found = 0; for(i=0; i0) { document.forms[0].elements[i].options[0].selected = true; found++; } if(document.forms[0].elements[i].name.indexOf( 'NumChild2Temp' )>0) { document.forms[0].elements[i].options[0].selected = true; found++; } if(document.forms[0].elements[i].name.indexOf( 'NumAdult3Temp' )>0) { document.forms[0].elements[i].options[0].selected = true; found++; } if(document.forms[0].elements[i].name.indexOf( 'NumChild3Temp' )>0) { document.forms[0].elements[i].options[0].selected = true; found++; } if(found>4) break; } else { if(room_number==2) { if(document.forms[0].elements[i].name.indexOf( 'NumAdult3Temp' )>0) { document.forms[0].elements[i].options[0].selected = true; found++; } if(document.forms[0].elements[i].name.indexOf( 'NumChild3Temp' )>0) { document.forms[0].elements[i].options[0].selected = true; found++; } if(found>1) break; } } } }