var GeoCode={VERSION_STRING:"$Id$",IMAGE_DIR:"/hyatt/images/map/",IMAGE_INTERFACE_DIR:"/hyatt/features/",IMAGE_DOT_DIR:"/hyatt/images/map/dots/",IMAGE_LOGO_DIR:"/hyatt/images/map/logos/",MAX_DEFAULT_ZOOM:15,GEOCODE_STATE_UNKNOWN:0,GEOCODE_STATE_LOADING:1,GEOCODE_STATE_READY:2,GEOCODE_STATE_ERROR:3,DISAMBIG_TRAY_TIMEOUT:10000,VIEW_MAP_AND_LISTINGS:0,VIEW_LISTINGS_ONLY:1,VIEW_MAP_ONLY:2,LOADING_TIMEOUT:20000,BRAND_ICON_ZOOM_LEVEL:10,URL_PLACE_REGEX:/\/place\//,URL_SUMMERFIELD_REGEX:/\/summerfield\//,URL_HCOM_LOCATIONS:"/hyatt/features/hotel-search-results.jsp",URL_PLACE_LOCATIONS:"/hyatt/place/locations/index.jsp",URL_SUMMERFIELD_LOCATIONS:"/hyatt/summerfield/hotel-search-results.jsp",HIDE_SUMMERFIELD_VTOURS:true,state:this.GEOCODE_STATE_UNKNOWN,errorTimeOut:null,executingHoverHandler:false,executingAction:false,currentlyDisplayedBubble:false,currentDistanceUnit:"m",PAN_STATE_NORMAL:0,PAN_STATE_DISPLAY_BUBBLE:1,panOrigin:0,panState:this.PAN_STATE_NORMAL,MiniMapButtonActionIsShow:true,DEBUG:false,StyleSheet:null,initialize:function(a){GeoCode.setLoadingState();GeoCode.mergeStyleSheets(a);this.map=null;this.getMap();this.createLayers();this.addTray();this.locations=$H({});this.showcontrol=false;this.getMapCoordinates();this.userPan=true;this.trayopen=false;this.unitType="m";this.bubbleID=null},createLayers:function(){this.splatLayer=new VEShapeLayer();this.map.AddShapeLayer(this.splatLayer);this.centerLayer=new VEShapeLayer();this.map.AddShapeLayer(this.centerLayer);this.hvcLayer=new VEShapeLayer();this.map.AddShapeLayer(this.hvcLayer);this.summerfieldLayer=new VEShapeLayer();this.map.AddShapeLayer(this.summerfieldLayer);this.placeLayer=new VEShapeLayer();this.map.AddShapeLayer(this.placeLayer);this.resortsLayer=new VEShapeLayer();this.map.AddShapeLayer(this.resortsLayer);this.domesticLayer=new VEShapeLayer();this.map.AddShapeLayer(this.domesticLayer);this.hyattLayer=new VEShapeLayer();this.map.AddShapeLayer(this.hyattLayer);this.regencyLayer=new VEShapeLayer();this.map.AddShapeLayer(this.regencyLayer);this.grandLayer=new VEShapeLayer();this.map.AddShapeLayer(this.grandLayer);this.andazLayer=new VEShapeLayer();this.map.AddShapeLayer(this.andazLayer);this.parkLayer=new VEShapeLayer();this.map.AddShapeLayer(this.parkLayer)},setLoadingState:function(){GeoCode.state=GeoCode.GEOCODE_STATE_LOADING;if($("loading-map")){$("loading-map").style.display="block"}GeoCode.ErrorTimeOut=setTimeout(GeoCode.setErrorState,GeoCode.LOADING_TIMEOUT)},setReadyState:function(){GeoCode.state=GeoCode.GEOCODE_STATE_READY;if($("loading-map")){$("loading-map").style.display="none"}clearTimeout(GeoCode.ErrorTimeOut)},setErrorState:function(){GeoCode.state=GeoCode.GEOCODE_STATE_ERROR;if($("loading-map")){$("loading-map").style.display="none"}if($("loading-error")){$("loading-error").style.display="block"}},mergeStyleSheets:function(a){GeoCode.StyleSheet=$H(DefaultStyleSheet);if(isDefined(a)){Object.keys(a).each(function(b){if(a[b]){GeoCode.StyleSheet[b]=$H(GeoCode.StyleSheet[b]).merge($H(a[b]))}})}},pullOutMapIfTooClose:function(){setTimeout((function(){if(GeoCode.map.GetZoomLevel()>GeoCode.MAX_DEFAULT_ZOOM){GeoCode.map.SetZoomLevel(GeoCode.MAX_DEFAULT_ZOOM);GeoCode.redisplayDots()}}),350)},getMap:function(){this.map=new VEMap("locationMap");this.map.LoadMap();this.map.ClearInfoBoxStyles();this.map.AttachEvent("onendpan",GeoCode.endPanHandler);this.map.AttachEvent("onendzoom",GeoCode.onEndZoomHandler);this.adjustWatermarks();this.map.Hide3DNavigationControl();this.addCloseButton();this.addExpandButton();this.adjustDashboard()},adjustDashboard:function(){$("expandmap").setStyle({display:"none"});mapdiv=$("locationMap");mapdivstyle=(GeoCode.StyleSheet.MapDiv);if(mapdivstyle!=null){mapdiv.setStyle(GeoCode.StyleSheet.MapDiv)}},findLocationByName:function(c,a){try{map.Find(c,a,null,null,null,null,null,null,null,null,this.testMessage())}catch(b){geoCodeError("findLocationByName",b.message)}},getMapCoordinates:function(){var url="/hyatt/geocode/GeocodeLoader";new Ajax.Request(url,{method:"get",encoding:"UTF-8",onException:function(requester,exception){geoCodeError("anonymous ajax",exception)},onSuccess:function(transport){var json=eval("("+transport.responseText+")");if(json==null){GeoCode.setErrorState();return}var token=$H(json.TOKEN);GeoCode.spelling=$H(json.SPELLING);GeoCode.disambig=$H(json.DISAMBIG);GeoCode.radius=$H(json.RADIUS_SEARCH);GeoCode.locations=$H(json.HOTELS);GeoCode.totalrecs=$H(json.TOTAL_RECS);if(isDefined(GeoCode.map)){GeoCode.setupMapWithResults();GeoCode.displaySearchedLocation()}}})},setupMapWithResults:function(){var a=GeoCode.totalrecs;GeoCode.setupDisambigTray();GeoCode.setupLayers();if((a>99)||($("toggleMap")&&($("toggleMap").selectedIndex==GeoCode.VIEW_LISTINGS_ONLY))){GeoCode.closeMap()}else{GeoCode.openMap()}GeoCode.getBestMapView();GeoCode.setReadyState()},displaySearchedLocation:function(){if(!(GeoCode.radius&&GeoCode.radius.LATITUDE&&GeoCode.radius.LONGITUDE)){return}var b=new VEShape(VEShapeType.Pushpin,new VELatLong(GeoCode.radius.LATITUDE,GeoCode.radius.LONGITUDE));b.SetTitle("Center of Search");b.SetDescription("This is the the centerpoint of your search term.");var a='<div id="centerofsearch"></div>';b.SetCustomIcon(a);GeoCode.centerLayer.AddShape(b);b=new VEShape(VEShapeType.Pushpin,new VELatLong(GeoCode.radius.LATITUDE,GeoCode.radius.LONGITUDE));b.SetTitle("Center of Search");b.SetDescription("This is the the centerpoint of your search term.");var a='<div id="centerofsearch"></div>';b.SetCustomIcon(a);GeoCode.splatLayer.AddShape(b)},getBestMapView:function(){var d=GeoCode.splatLayer.GetShapeCount()+GeoCode.centerLayer.GetShapeCount();var c=GeoCode.map.GetMapStyle();if(c=="b"){GeoCode.map.SetMapStyle(VEMapStyle.Road)}if(d==1){var a=GeoCode.splatLayer.GetShapeByIndex(0).GetPoints()[0];if(isDefined(a)){GeoCode.map.SetCenterAndZoom(a,GeoCode.MAX_DEFAULT_ZOOM)}}else{GeoCode.map.SetMapView(GeoCode.splatLayer.GetBoundingRectangle());var b=GeoCode.map.GetZoomLevel()-1;GeoCode.map.SetZoomLevel(b)}GeoCode.pullOutMapIfTooClose()},setupLayers:function(){GeoCode.locations.each(function(a){var c;var g=$H(a.value);var b=GeoCode.getLatLong(g);var f=g.HOTEL_BRAND;switch(f){case"Domestic Park":case"Park Hyatt":case"International Park":c="parkLayer";break;case"International Grand":case"Grand Hyatt":case"Domestic Grand":c="grandLayer";break;case"Domestic Regency":case"Hyatt Regency":case"International Regency":case"International Hyatt":case"Domestic Hyatt":c="regencyLayer";break;case"Hyatt Place":c="placeLayer";break;case"Hyatt Summerfield Suites":c="summerfieldLayer";break;case"Continental Resort":case"Tropical Resort":case"Hyatt Vacation Club":case"Vacation Club":case"Hyatt Resorts":c="hvcLayer";break;case"Andaz":case"ANdAZ":c="andazLayer";default:c="hyattLayer";break}try{if(b.Latitude!=0&&b.Longitude!=0){GeoCode.createShape(c,b,g)}}catch(d){geoCodeError("getMapCoordinates",d)}finally{GeoCode.displaySearchedLocation()}})},setupDisambigTray:function(){var f=GeoCode.disambig;if(f[0]!=null&&f[0]!=""&&f.toArray().length>1){var b=0;var a=GeoCode.getDisambigUrl();while(f[b]!=null&&f[b]!=""){b++}var d=f[b-1]["ORIGINAL"];if(d!=null){if(!$("traydiv")){return}var e=document.createElement("div");var g='<p style="position:relative; width:145px; left:25px; font-size:10px; padding: 0; margin: 45px 0 0 0;">RESULTS DISPLAYED FOR:<p>';g+='<p class="disambig-location">'+f[0]["ADDRESS"]+"</p>";g+='<p style="padding-left: 25px; font-size:10px;">OR WERE YOU LOOKING FOR:</p>';g+='<div class="trayList">';var c;for(var h=1;h<5;h++){if(f[h]!=null&&f[h]!=""){c="SearchTerm="+f[h]["ADDRESS"]+"&lat="+f[h]["LATITUDE"]+"&long="+f[h]["LONGITUDE"]+"&radiusSearch="+f[h]["RADIUS_SEARCH"];if(ischeckavailablity==true){c+="&type=disambigCA"}g+="<p>";g+='<span class="tray-arrow">&gt;</span>';g+='<a href="'+a+"?"+c+'"  >'+f[h]["ADDRESS"]+"</a>";g+="</p>"}}g+="</div>";if(f[b]!=null&&f[b]!=""){}e.innerHTML=g;$("traydiv").appendChild(e);GeoCode.openTray()}}},getDisambigUrl:function(){if(window.location.pathname.match(GeoCode.URL_SUMMERFIELD_REGEX)){return GeoCode.URL_SUMMERFIELD_LOCATIONS}else{if(window.location.pathname.match(GeoCode.URL_PLACE_REGEX)){return GeoCode.URL_PLACE_LOCATIONS}else{return GeoCode.URL_HCOM_LOCATIONS}}},fullDis:function(){var c=GeoCode.disambig;var b=$("traydiv");if(c[0]!=null&&c[0]!=""){var d=0;while(c[d]!=null&&c[d]!=""){d++}b.innerHTML='<img src="'+this.IMAGE_INTERFACE_DIR+'"errors_multiply.jpg" /><p style="position:relative; top:0; left:25px;">'+c[a-1]["ORIGINAL"]+"</p>";for(var a=1;a<9;a++){if(c[a]!=null&&c[a]!=""){b.innerHTML+='<p style="position:relative; left:25px; padding-right:25px;"><strong><a href="'+this.IMAGE_INTERFACE_DIR+"hotel-search-results.jsp?SearchTerm="+c[a]["ADDRESS"]+'"  >'+c[a]["ADDRESS"]+"</a></strong></p>"}}GeoCode.openTray(true)}},testMessage:function(){alert("Seach Sucessful!")},clearMap:function(){if(GeoCode.map){GeoCode.map.DeleteAllShapes()}},getBrandGroup:function(a){switch(a){case"Domestic Park":case"Park Hyatt":case"International Park":return"park";case"International Grand":case"Grand Hyatt":case"International Grand":case"Domestic Grand":return"grand";case"Domestic Regency":case"Hyatt Regency":case"International Regency":case"International Hyatt":case"Domestic Hyatt":return"regency";case"Hyatt Place":return"place";case"Hyatt Summerfield Suites":return"summerfield";case"Continental Resort":case"Tropical Resort":case"Hyatt Resorts":return"resorts";case"Hyatt Vacation Club":case"Vacation Club":return"hvc";case"Andaz":return"andaz";default:return"hyatt"}},createShape:function(x,k,o){var y=GeoCode[x];var h=o.SPIRIT_CODE;var c=o.HOTEL_BRAND;var q=o.HOTEL_NAME;var r=o.HOTEL_NAME_SHORT;var u=o.AREA_MASS_CODE;var b;var j="17";var d="17";var f=GeoCode.getBrandGroup(c);var g="102";var s="73";var p="240";var w="73";var v="110";var l="120";q=q.replace("/"," / ");var m="";m+='<div id="'+h+'" style="float:left; "  >';m+='<div id="'+h+'_branddot" ';m+='class="brand-dot brand-dot-'+f+'" ';m+="onmouseover=\"GeoCode.shapeHoverHandler('"+h+"_brandlogofull','mouseover');\"  ";m+="onmouseout=\"GeoCode.shapeHoverHandler('"+h+"_brandlogofull','mouseout');\" ";m+='style="float:left;width:'+j+"px;height:"+d+'px;z-index:-10;" >';m+="</div>";m+='<div id="'+h+'_brandlogo" ';m+='class="brand-logo brand-logo-'+f+'" ';m+="onmouseover=\"GeoCode.shapeHoverHandler('"+h+"_brandlogofull','mouseover'); \" ";m+="onmouseout=\"GeoCode.shapeHoverHandler('"+h+"_brandlogofull','mouseout');\" ";m+='style="float:left; width:'+g+"px;height:"+s+'px;z-index:0; display:none; " >';m+="</div>";m+='<div id="'+h+'_brandlogofull" ';m+='class="brand-full brand-full-'+f+'" ';m+="onclick=\"GeoCode.shapeClickHandler('"+h+"','mouseover'); \" ";m+="onmouseover=\"GeoCode.shapeHoverHandler('"+h+"_brandlogofull','mouseover', true);\" ";m+="onmouseout=\"GeoCode.shapeHoverHandler('"+h+"_brandlogofull','mouseout', false);\" ";m+='style="float:left; position:relative; width:'+p+"px;height:"+w+'px;z-index:0; display:none; cursor:pointer; " >';m+='<p style="margin-top:14px; margin-left:'+v+"px;  width:"+l+'px; text-decoration: none; font-size:10px; ">'+q+"</p>";m+="</div>";var a;var n;try{splat='<div id="'+h+'_splat" class="hotel-splat" style="float: left; width: 40px; height: 40px; z-index:-11; position: absolute; margin-left: -12px; margin-top: -12px;"></div>';n=new VEShape(VEShapeType.Pushpin,k);n.SetCustomIcon(splat);n.SetTitle(c);n.SetDescription(q)}catch(t){geoCodeError("create splat",t)}try{a=new VEShape(VEShapeType.Pushpin,k);a.SetCustomIcon(m);a.SetTitle(c);a.SetDescription(q)}catch(t){geoCodeError("create shape",t)}try{GeoCode.splatLayer.AddShape(n)}catch(t){geoCodeError("splatlayer",t.message)}try{GeoCode.getLayerForBrand(f).AddShape(a)}catch(t){geoCodeError("shapelayer",t.message)}invalidateCached$$()},getLayerForBrand:function(b){var a=GeoCode[b+"Layer"];if(isDefined(a)){return a}else{throw"Cannot find Layer for brandgroup "+b}},getLatLong:function(d){var a;if(typeof d.LATITUDE!="undefined"&&d.LATITUDE!=""&&typeof d.LATITUDE!="undefined"&&d.LONGITUDE!=""){var c=parseFloat(d.LATITUDE);var b=parseFloat(d.LONGITUDE);a=new VELatLong(c,b)}else{a=new VELatLong(0,0)}return a},SHOW_BUBBLE_PAN_PIXEL_DISTANCE:133,showBubblePan:function(a){if(GeoCode.panState==this.PAN_STATE_DISPLAY_BUBBLE){geoCodeWarn("Already in Display Bubble Pan State");return}GeoCode.panOrigin=GeoCode.map.GetCenter();GeoCode.map.AttachEvent("onendpan",function(b){GeoCode.userPan=true;GeoCode.PAN_STATE_DISPLAY_NORMAL});GeoCode.panTo((GeoCode.SHOW_BUBBLE_PAN_PIXEL_DISTANCE*-1),a);GeoCode.panState=GeoCode.PAN_STATE_DISPLAY_BUBBLE;GeoCode.panSize=(GeoCode.SHOW_BUBBLE_PAN_PIXEL_DISTANCE);GeoCode.userPan=false},hideBubblePan:function(){if(GeoCode.panState==GeoCode.PAN_STATE_NORMAL){geoCodeWarn("Already in Normal mode Pan State");return}GeoCode.userPan=false;GeoCode.map.SetCenter(this.panOrigin);GeoCode.panState=GeoCode.PAN_STATE_NORMAL;GeoCode.panOrigin=0;GeoCode.userPan=true},panTo:function(c,b){GeoCode.userPan=false;var a=GeoCode.map.LatLongToPixel(b);a.y+=c;b=GeoCode.map.PixelToLatLong(a);GeoCode.map.PanToLatLong(b);GeoCode.userPan=true},shapeClickHandler:function(e,b){var d=$(e);var c=$H(this.locations[e]);var a=this.getLatLong(c);if(this.bubbleID==e){}this.bubbleID=e;GeoCode.shapeClickHandlerHelper(e);GeoCode.showBubblePan(a)},shapeClickHandlerHelper:function(b){var a=$(b);$(b+"_branddot").setStyle({display:"block"});$(b+"_brandlogo").setStyle({display:"none"});$(b+"_brandlogofull").setStyle({display:"none"});GeoCode.locations.each(function(c){var e=$H(c.value);var d=e.SPIRIT_CODE;if(d!=b&&d!=null){if($(d+"_branddot")){$(d+"_branddot").setStyle({display:"none"})}if($(d+"_brandlogo")){$(d+"_brandlogo").setStyle({display:"none"})}if($(d+"_brandlogofull")){$(d+"_brandlogofull").setStyle({display:"none"})}}});GeoCode.closeTray();GeoCode.btnCloseBubble(b);GeoCode.bubbleHotelData(b)},shapeHoverHandler:function(b,a){GeoCode.syncronizeEvent(function(){GeoCode.shapeHoverHandlerHelper(b,a)})},shapeHoverHandlerHelper:function(f,d,a){if(a==null){a=false}var e=$(f);switch(d){case"mouseout":if(!a){e.setStyle({display:"none"})}break;case"mouseover":e.setStyle({display:"block"});var c=$$("#VELayerListDiv div a");c.each(function(g){g.setStyle({zIndex:"650"})});var b=e.ancestors();b[2].setStyle({zIndex:"700"});break;default:geoCodeWarn("Unsupported case reached: shapeHoverHandlerHelper/default");geoCodeWarn(d);geoCodeWarn(f);break}this.executingHoverHandler=false},onEndZoomHandler:function(a){setTimeout("GeoCode.onEndZoomHandlerHelper();",125);setTimeout(GeoCode.redisplayDots,600)},onEndZoomHandlerHelper:function(){var d=GeoCode.map.GetZoomLevel();var f;var g;var h;var b,e,a;if(d>=GeoCode.BRAND_ICON_ZOOM_LEVEL){b="none";e="block";a="none"}else{b="block";e="none";a="block"}GeoCode.fixZoomBarForIe();var j=cached$$("#VELayerListDiv div a");var c=GeoCode.locations;c.each(function(k){var q=$H(k.value);var l=q.SPIRIT_CODE;var p=q.HOTEL_BRAND;var r=$(l);if(typeof r=="undefined"||r==null){return}var m=r.ancestors();var o=r.down();var n=o.next();o.setStyle({display:b});n.setStyle({display:e});$(l+"_splat").style.display=a;j.each(function(s){s.setStyle({zIndex:"650"})});if(d>=GeoCode.BRAND_ICON_ZOOM_LEVEL){r.setStyle({zIndex:"900"})}GeoCode.setBubbleDisplay(l,"none");if($("checkavail-"+l)){$("checkavail-"+l).setStyle({display:"none"})}if($("form-checkrateandavail")){$("form-checkrateandavail").setStyle({display:"none"})}if($("geocodedrates")){$("geocodedrates").setStyle({display:"none"})}});return},hideIfExists:function(c,b){var a=$(c);if(a){a.setStyle({display:"none"})}},endPanHandler:function(a){if(!GeoCode.userPan){return false}if(GeoCode.currentlyDisplayedBubble){GeoCode.setBubbleDisplay(GeoCode.currentlyDisplayedBubble,"none")}GeoCode.panState=GeoCode.PAN_STATE_NORMAL;setTimeout("GeoCode.onEndZoomHandlerHelper();",90);return},adjustWatermarks:function(){var f=$$(".MSVE_PoweredByLogo");var g=$$(".MSVE_ScaleBarLabel");var e=$$(".MSVE_ScaleBarForeground");var d=$$(".MSVE_ScaleBarBackground");var c=$$(".MSVE_Copyright");var b=$$(".MSVE_CopyrightBackground");var a=$$(".MSVE_CopyrightForeground");f[0].style.top="250px";f[0].style.bottom="auto";f[0].style.border="none";g[0].style.left=g[0].getStyle("right");g[0].style.right="auto";g[0].style.bottom="24px";g[1].style.left=g[1].getStyle("right");g[1].style.right="auto";g[1].style.bottom="23px";c[0].style.left=c[0].getStyle("right");c[0].style.right="auto";c[0].style.textAlign="left";c[0].style.bottom="27px";b[0].style.left=a[0].getStyle("left");b[0].style.right="auto";b[0].style.textAlign="left";b[0].style.bottom="17px";a[0].style.left=a[0].getStyle("left");a[0].style.right="auto";a[0].style.textAlign="left";a[0].style.bottom="18px"},addLegend:function(){var e=250;var b=20;var d=$(GeoCode.map.ID);var a=document.createElement("div");a.id="legendContainer";Element.extend(a);a.setStyle({width:e+"px",height:b+"px",textAlign:"left",top:(d.clientHeight-b)+"px",left:(d.clientWidth-e)+"px"});this.map.AddControl(a);var c=document.createElement("div");c.id="legendOpen";a.appendChild(c);$(c.id).observe("click",function(){$(c.id).setStyle({display:"none"});$(f.id).setStyle({display:"block"})});c.setStyle({backgroundImage:'url("/hyatt/features/legend_open.png")',width:"133px",height:"127px",zIndex:"0",display:"none",cssFloat:"right",styleFloat:"right",top:(c.offsetTop-107)+"px",position:"relative"});var f=document.createElement("div");f.id="legendClosed";a.appendChild(f);$(f.id).observe("click",function(){$(c.id).setStyle({display:"block"});$(f.id).setStyle({display:"none"})});f.setStyle({backgroundImage:'url("/hyatt/features/brand_legend.png")',width:"133px",height:"19px",zIindex:"0",cssFloat:"right",styleFloat:"right"})},addCloseButton:function(){var a=document.createElement("div");a.id="closemap";Element.extend(a);a.setStyle(GeoCode.StyleSheet.CloseMapButton);a.observe("click",GeoCode.closeMap);this.map.AddControl(a)},addExpandButton:function(){var a=document.createElement("div");a.id="expandmap";Element.extend(a);a.setStyle(GeoCode.StyleSheet.OpenMapButton);a.observe("click",GeoCode.openMap);this.map.AddControl(a)},closeMap:function(){var d=$("locationMap");var c=$("expandMapSection");var b=$("closemap");var a=$("traydiv");d.style.display="none";c.style.display="block";b.style.display="none";a.style.display="none";document.body.focus();$("expandmap").style.display="block";if(GeoCode.currentlyDisplayedBubble){GeoCode.setBubbleDisplay(GeoCode.currentlyDisplayedBubble,"none")}if($("toggleMap")){$("toggleMap").selectedIndex=GeoCode.VIEW_LISTINGS_ONLY}if($("search-results-list")){$("search-results-list").style.display="block"}if($("sort-control")){$("sort-control").style.display="block"}},openMap:function(){var d=$("locationMap").style;var c=$("expandMapSection").style;var b=$("closemap").style;var a=$("traydiv").style;if(d.display=="none"){d.display="block"}if(c.display=="block"){c.display="none"}if(b.display="none"){b.display="block"}if(GeoCode.trayopen){a.display="block"}GeoCode.fixZoomBarForIe();if($("expandmap")){$("expandmap").style.display="none"}GeoCode.redisplayDots();if(isDefined($("search-results-list"))){if($("search-results-list").style.display!="none"){$("toggleMap").selectedIndex=GeoCode.VIEW_MAP_AND_LISTINGS}else{$("toggleMap").selectedIndex=GeoCode.VIEW_MAP_ONLY}}},allocatedElementList:{},allocateOrGetMapElement:function(a,c){if(typeof GeoCode.allocatedElementList[c]=="undefined"){var b=document.createElement(a);b.id=c;GeoCode.allocatedElementList[c]=b}return(GeoCode.allocatedElementList[c])},btnCloseBubble:function(b){var a=$(GeoCode.map.ID);btnCloseBubble=GeoCode.allocateOrGetMapElement("div","closebubble-"+b);btnCloseBubble.style.width="15px";btnCloseBubble.style.height="20px";btnCloseBubble.style.top=(a.clientHeight-266+GeoCode.StyleSheet.MapHackyKludge.VerticalBubbleOffset)+"px";btnCloseBubble.style.left=(a.clientWidth-132+GeoCode.StyleSheet.MapHackyKludge.HorizontalBubbleOffset)+"px";btnCloseBubble.style.display="block";btnCloseBubble.style.cursor="pointer";this.map.AddControl(btnCloseBubble);$(btnCloseBubble.id).observe("click",function(){$(b).setStyle({});$("closebubble-"+b).setStyle({display:"none"});$("bubbledata-"+b).setStyle({display:"none"});$("bubbledataleft-"+b).setStyle({display:"none"});$("bubbledataright-"+b).setStyle({display:"none"});if($("checkavail-"+b)){$("checkavail-"+b).setStyle({display:"none"})}if($("form-checkrateandavail")){$("form-checkrateandavail").setStyle({display:"none"})}if($("geocodedrates")){$("geocodedrates").setStyle({display:"none"})}if($("bubble-"+b)){$("bubble-"+b).setStyle({display:"none"})}GeoCode.hideBubblePan();GeoCode.redisplayDots()})},setBubbleDisplay:function(c,d){var a=$("bubbledata-"+c);if(a==null){return}var b=[$("bubble-"+c),$("bubbledata-"+c),$("bubbledesc-"+c),$("bubbledataleft-"+c),$("bubbledataright-"+c),$("closebubble-"+c)];b.each(function(f){f.style.display=d})},createdBubbles:{},bubbleHotelData:function(a){if(isDefined(GeoCode.createdBubbles[a])){GeoCode.setBubbleDisplay(a,"block")}else{GeoCode.createBubble(a);GeoCode.createdBubbles[a]=a}GeoCode.currentlyDisplayedBubble=a},massageHotelUrl:function(a){if(a.substring(0,7)=="http://"){return a}return"http://"+a+".hyatt.com"},createBubble:function(d){var y=$H(this.locations[d]);var p=$(GeoCode.map.ID);var m=GeoCode.StyleSheet.MapHackyKludge.HorizontalBubbleOffset;var k=y.HOTEL_NAME;var h=d;var n=y.HOTEL_URL;var H=y.HOTEL_STREET_ADDRESS;var q=y.ACTUAL_HOTEL_CITY;var Q=y.HOTEL_STATE;var F=y.HOTEL_COUNTRY;var t=y.HOTEL_ZIPCODE;var o=y.HOTEL_DESCRIPTION;var s=y.DISTANCE_MILES;var G=y.HOTEL_BRAND;var g=y.SIGNATURE_THUMBNAIL;var f=y.EXTERNAL_VTOUR_URL;var u=y.HOTEL_ID;var A=y.AVG_RATE_PER_NIGHT;var w=y.INT_TOTAL_RATE;var M=y.CURRENCY_CODE;var e=y.AREA_MASS_CODE;var D=y.CHAIN_CODE;var C=y.SLIDESHOW_PICS;var B;if(isDefined(y.CORPORATE_ID)){B=""}else{B=""}var O=17;var z=17;n=GeoCode.massageHotelUrl(n);var P=Position.positionedOffset(p);var j=document.createElement("div");Element.extend(j);j.id="bubble-"+d;j.addClassName("bubble");j.setStyle({width:"543px",height:"232px",backgroundRepeat:"no-repeat",left:(P[0]+84)+"px",top:(P[1]+65)+"px",zIndex:"997",position:"relative"});var L=document.createElement("div");Element.extend(L);L.id="bubbledata-"+d;L.addClassName("bubbleData");var E=document.createElement("div");Element.extend(E);E.id="bubbledataleft-"+d;E.addClassName("bubbleDataLeft");var l=document.createElement("div");Element.extend(l);l.id="bubbledataright-"+d;l.addClassName("bubbleDataRight");var b=document.createElement("div");b.id="spiritcode";b.innerHTML=h;b.style.left=(p.clientWidth-5512)+"px";b.style.display="none";L.style.width="250px";L.style.height="100px";L.style.top=(p.clientHeight-249+GeoCode.StyleSheet.MapHackyKludge.VerticalBubbleOffset)+"px";L.style.left=(p.clientWidth-512+m)+"px";L.style.zIndex="998";L.style.textAlign="left";var r="";switch(G){case"Domestic Park":case"Park Hyatt":case"International Park":r="park";rightimage="/hyatt/images/map/brandright/Park.jpg";break;case"International Grand":case"Grand Hyatt":case"Domestic Grand":r="grand";rightimage="/hyatt/images/map/brandright/Grand.jpg";break;case"Domestic Regency":case"Hyatt Regency":case"International Regency":case"International Hyatt":case"Domestic Hyatt":r="regency";rightimage="/hyatt/images/map/brandright/Regency.jpg";break;case"Hyatt Place":r="place";rightimage="/hyatt/images/map/brandright/HP.jpg";break;case"Hyatt Summerfield Suites":r="summerfield";rightimage="/hyatt/images/map/brandright/HSS.jpg";break;case"Continental Resort":case"Tropical Resort":case"Hyatt Resorts":r="resorts";rightimage="/hyatt/images/map/brandright/Resorts.jpg";break;case"Hyatt Vacation Club":case"Vacation Club":r="hvc";rightimage="/hyatt/images/map/brandright/Vacation.jpg";break;case"Andaz":r="andaz";rightimage="/hyatt/images/map/brandright/Andaz.jpg";break;default:r="hyatt";rightimage="/hyatt/images/map/brandright/Hyatt.jpg";break}var a;switch(GeoCode.unitType){case"km":a="Kilometers";break;default:a="Miles";break}var K='<div class="brand-dot brand-dot-inline brand-dot-'+r+'"> &nbsp; </div>';if(y.HOTEL_URL!=null&&y.HOTEL_URL!=""){L.innerHTML='<dt class="fn org"><a class="b" href="'+n+B+'">'+k+" </a></dt>"}else{L.innerHTML='<dt class="fn org">'+k+"</dt>"}var J='<p style="font-family:arial; font-size:12px; margin-top:4px; font-weight:bold;" ><span class="adr"><span class="address street-address">'+H+'</span><br/><span class="locality">'+q+"</span>, ";if(Q!=""&&Q!=null){J+='<span class="region">'+Q+"</span>, "}J+='<span class="country-name">'+F+'</span><br/><span class="postal-code">'+t+"</span></span></p>";L.innerHTML+=J;var N;var v;switch(GeoCode.currentDistanceUnit){case"m":N="block";v="none";break;case"km":N="none";v="block";break;default:geoCodeError("Unreachable State, inconsistant currentDistanceUnit:"+currentDistanceUnit)}if(s!=""&&s!="undefined"&&s!=null){distanceMiles=Math.round(s*10)/10;L.innerHTML+='<div class="bubbleDist bubblem" style="display: '+N+';">'+K+" "+distanceMiles+" Miles</div>";distanceKilometers=Math.round((s*1.609344)*10)/10;L.innerHTML+='<div class="bubbleDist bubblekm" style="display: '+v+';" >'+K+" "+distanceKilometers+" Kilometers</div>"}else{L.innerHTML+='<p style="margin-top:4px; " ></p>'}L.innerHTML+='<p style="font-family:arial; font-size:12px; font-weight:bold; " id="bubbledesc-'+h+'">'+o+" </p>";if(A!=0){if(A){var x=queryString("xactionid");L.innerHTML+='<p style="color:#C59D08;"><strong>Average Daily Rate per Room '+A+'</strong> <a href="/hyatt/reservations/popCurrencyConvert.jsp?currencycodefrom='+M+"&amountfrom="+A+'.00" onclick="winOpen(this.href,\'name\',380,200,0,0,\'resizable=0,scrollbars=0\'); return false;" target="_blank">'+M+'</a><sup style="color:#000;">1</sup><br />';L.innerHTML+='<span style="font-weight:bold;">Total Price per Room '+w+'.00 <a href="/hyatt/reservations/popCurrencyConvert.jsp?currencycodefrom='+M+"&amountfrom="+w+'.00" onclick="winOpen(this.href,\'name\',380,200,0,0,\'resizable=0,scrollbars=0\'); return false;" target="_blank">'+M+"</a><sup>2</sup></p>";L.innerHTML+='<form action="/hyatt/reservations/flow1/corpRatesAvailable.jsp" name="hotels" method="post">';L.innerHTML+='<input value="ISO-8859-1" type="hidden" name="_dyncharset">';L.innerHTML+='<div class="submit sub-hov-off" id="bubblebutton"><button type="submit" onmouseout="this.parentNode.className=\'submit sub-hov-off\';" onmouseover="this.parentNode.className=\'submit sub-hov-on\';" onclick="GeoCode.viewRoomRates(\''+e+"', '"+D+"', '"+h+"', '"+x+"' );return false\" >VIEW ALL ROOMS &amp; RATES</button></div>";L.innerHTML+="</form>"}else{if(GeoCode.isBookable(y.HOTEL_STATUS)&&(!GeoCode.isPreOpening(y.HOTEL_STATUS))){L.innerHTML+='<div class="button" id="bubbleCheckRates-'+h+'" style="margin-bottom: 10px; margin-top: 30px;"><a href="#"  onclick="GeoCode.checkAvail(\''+h+"');return false\" > CHECK RATES & AVAILABILITY</a></div>"}else{L.innerHTML+='<p class="non-bookable"> This hotel is currently not yet bookable online.</p>'}}}else{L.innerHTML+="<p><em>HOTEL NOT AVAILABLE</em><br />"}E.style.width="120px";E.style.top=(p.clientHeight-264+GeoCode.StyleSheet.MapHackyKludge.VerticalBubbleOffset)+"px";E.style.left=(p.clientWidth-656+m)+"px";var I=4;var c="";c+='<img class="bubbleThumb" src="/hyatt'+g+'" width="120" height="90" alt="'+k+'" />';c+='<div class="bubbleNav">';if(y.HOTEL_URL!=null&&y.HOTEL_URL!=""){c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+n+B+'" >Visit Hotel Site</a></p>'}else{I-=1}if(C>0){if(G!="Hyatt Summerfield Suites"){c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="/hyatt/hotels/gallery/photos.jsp?hotelId='+u+"&icamp=corpPhotoGallery\" onclick=\"winOpen(this.href,'galPopUp',672,410,180,225,'status=0,resizable=0,scrollbars=0,location=0');return false\" >Photo Gallery</a></p>"}else{c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="/hyatt/hotels/summerfield/gallery/photos.jsp?hotelId='+u+"&icamp=corpPhotoGallery\" onclick=\"winOpen(this.href,'galPopUp',299,318,180,225,'status=0,resizable=0,scrollbars=0,location=0');return false\" >Photo Gallery</a></p>"}}else{I-=1}if(f==""||(G=="Hyatt Summerfield Suites"&&GeoCode.HIDE_SUMMERFIELD_VTOURS)){I-=1}else{if(G=="Hyatt Place"){c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+n+'/hyatt/hotels/place/gallery/virtual-tour.jsp?icamp=corpVirtualTour" target="_blank" onclick="winOpen(this.href,\'tourPopUp\',600,525,5,5,\'status=0,resizable=0,scrollbars=0,location=0\');return false" >Virtual Tour</a></p>'}else{if(f=="vrx_virtual_tour"){c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+n+'/hyatt/hotels/gallery/virtual-tour.jsp?icamp=corpVirtualTour" target="_blank" onclick="winOpen(this.href,\'tourPopUp\',925,500,5,5,\'status=0,resizable=0,scrollbars=0,location=0\');return false" >Virtual Tour</a></p>'}else{if(G=="Hyatt Summerfield Suites"||G=="Summerfield Suites"){c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+f+'" target="_blank" onclick="winOpen(this.href,\'tourPopUp\',600,490,5,5,\'status=0,resizable=0,scrollbars=0,location=0\');return false" >Virtual Tour</a></p>'}else{c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+n+'/hyatt/hotels/gallery/virtual-tour.jsp?icamp=corpVirtualTour" target="_blank" onclick="winOpen(this.href,\'tourPopUp\',925,500,5,5,\'status=0,resizable=0,scrollbars=0,location=0\');return false" >Virtual Tour</a></p>'}}}}if(y.HOTEL_URL!=null&&y.HOTEL_URL!=""&&h!="victo"){c+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+n+"/hyatt/hotels/maps/maps_popup.jsp?hotelId="+u+"&icamp=corpMapDirections\" onclick=\"winOpen(this.href,'mapsPopUp',650,600,5,5,'status=0,resizable=0,scrollbars=1,location=0');return false\" >Hotel Directions</a></p>"}else{I-=1}c+="</div>";E.innerHTML=c;l.style.width="120px";l.style.height="210px";l.style.top=(p.clientHeight-232)+"px";l.style.left=(p.clientWidth-237+m)+"px";l.innerHTML+='<img src="'+rightimage+'"  alt="'+k+'" />';this.map.AddControl(j);this.map.AddControl(L);this.map.AddControl(E);this.map.AddControl(l);if(I<=0){thisid="bubble-"+$(d).id;$(thisid).setStyle({backgroundImage:"url(/hyatt/images/map/bubble-nothing.png)"})}GeoCode.btnCloseBubble(d)},isBookable:function(a){return((a!=4)&&(a!=6))},isPreOpening:function(a){return((status==4)||(status==5)||(status==6)||(status==7))},showHideMap:function(){if(!($("toggleMap"))){return}var a=$("search-results-list").style;switch($("toggleMap").selectedIndex){case GeoCode.VIEW_LISTINGS_ONLY:a.display="block";GeoCode.closeMap();break;case GeoCode.VIEW_MAP_AND_LISTINGS:a.display="block";GeoCode.openMap();break;case GeoCode.VIEW_MAP_ONLY:a.display="none";GeoCode.openMap();break;default:geoCodeError(GeoCode.showHideMap,"Unreachable state, unkonwn state for toggleMap selectbox")}},search:function(a,d,b,c){alert("Function 'GeoCode.search' does not exist")},reset:function(a){alert("Function 'GeoCode.reset' does not exist")},setUnitBubble:function(b){GeoCode.currentDistanceUnit=b;var a;var c;switch(b){case"m":a="none";c="block";break;case"km":a="block";c="none";break;default:geoCodeError("Unreachable state in setUnitBubble")}document.getElementsByClassName("bubblekm").each(function(d){d.style.display=a});document.getElementsByClassName("bubblem").each(function(d){d.style.display=c})},opacity:function(f,d,a,b){var c=Math.round(b/100);var e=0;if(d>a){for(i=d;i>=a;i--){setTimeout("GeoCode.changeOpac("+i+",'"+f+"')",(e*c));e++}}else{if(d<a){for(i=d;i<=a;i++){setTimeout("GeoCode.changeOpac("+i+",'"+f+"')",(e*c));e++}}}},changeOpac:function(b,c){var a=document.getElementById(c).style;a.opacity=(b/100);a.MozOpacity=(b/100);a.KhtmlOpacity=(b/100);a.filter="alpha(opacity="+b+")"},addTray:function(){var a=$(GeoCode.map.ID);var b=document.createElement("div");b.id="traydiv";Element.extend(b);b.addClassName("traydiv");b.setStyle(GeoCode.StyleSheet.DisambigTray);this.map.AddControl(b);GeoCode.addCloseTray()},openTray:function(b){var a=$("traydiv");a.style.display="block";var d=true;var c=function(f){d=false};Event.observe(a,"click",c);Event.observe(a,"mouseover",c);Event.observe(a,"mouseout",function(f){d=true});GeoCode.trayopen=true;setTimeout(function(){if(d){GeoCode.closeTray()}},GeoCode.DISAMBIG_TRAY_TIMEOUT)},closeTray:function(){var a=$("traydiv");GeoCode.opacity("traydiv",90,0,500);setTimeout("GeoCode.closeTrayHelper('traydiv');",500);GeoCode.trayopen=false},closeTrayHelper:function(a){thisdiv=$(a);thisdiv.style.display="none"},addCloseTray:function(){var a=$("traydiv");var b=$(GeoCode.map.ID);var c=document.createElement("div");c.id="closetray";Element.extend(c);c.setStyle({width:"75px",height:"15px",position:"absolute",cursor:"pointer",top:"0",left:"130px",zIndex:"250"});c.observe("click",GeoCode.closeTray);a.appendChild(c)},checkRatesandAvail:function(c){var n=$("bubbledata-"+c);var j=$("bubbledesc-"+c);var m=$("bubbleCheckRates-"+c);var q=$("bubbledataright-"+c);n.style.display="none";j.style.display="none";m.style.display="none";q.style.display="none";var o=$H(this.locations[c]);var s=$(GeoCode.map.ID);var e=document.createElement("div");var l=o.HOTEL_NAME;var f=c;var u=o.HOTEL_URL;var b=o.HOTEL_STREET_ADDRESS;var h=o.HOTEL_CITY;var g=o.HOTEL_STATE;var r=o.HOTEL_COUNTRY;var v=o.HOTEL_ZIPCODE;var t=o.HOTEL_DESCRIPTION;var d=o.DISTANCE;var k=o.HOTEL_BRAND;var p=o.SIGNATURE_THUMBNAIL;var w=o.EXTERNAL_VTOUR_URL;u=GeoCode.massageHotelUrl(u);e.id="checkavail-"+f;e.style.width="250px";e.style.height="100px";e.style.top=(s.clientHeight-285)+"px";e.style.left=(s.clientWidth-512)+"px";if(u!=""){e.innerHTML='<dt class="fn org"><a class="b" href="'+u+'">'+l+" </a></dt>"}else{e.innerHTML='<dt class="fn org">'+l+"</dt>"}var a=$("form-checkrateandavail");a.setStyle({display:"block"});this.map.AddControl(e)},checkAvail:function(a){document.location="/hyatt/reservations/flow6/propCheckAvailability.jsp?xactionid=&pid="+a},viewRoomRates:function(c,a,d,b){document.location="/hyatt/reservations/flow1/corpSelectedHotelRates.jsp?areaMassCode="+c+"&chainCode="+a+"&spiritCode="+d+"&xactionid="+b+"&action=getRates"},encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b},syncronizeEvent:function(a){if(GeoCode.DEBUG&&typeof console!="undefined"){console.info("Syncing call from "+GeoCode.syncronizeEvent.caller)}if(!GeoCode.executingAction){GeoCode.lastCaller=GeoCode.syncronizeEvent.caller;GeoCode.executingAction=true;result=a();GeoCode.executingAction=false;if(GeoCode.DEBUG&&typeof console!="undefined"){console.info("Releasing Mutex")}return result}else{geoCodeWarn("Skipping event from "+GeoCode.syncronizeEvent.caller+" Previous Caller with lock:"+GeoCode.lastCaller)}},redisplayDots:function(){},fixZoomBarForIe:function(){},handleTokenError:function(){console.info("token error")},handleTokenExpire:function(){console.info("token expired")}};function geoCodeWarn(a){if(!GeoCode.DEBUG){return}if(typeof console!="undefined"){console.warn(a)}else{alert(a)}}function geoCodeError(b,a){if(typeof console!="undefined"){console.error("Error in "+b);console.error(a)}else{alert("Error in "+b+":"+a.message)}}function isDefined(a){if(typeof a!="undefined"){return true}else{return false}}(function(){var a=Array();cached$$=function(b){return $$(b);if(!isDefined(a[b])){a[b]=$$(b)}return a[b]};invalidateCached$$=function(){a=Array()}})();function PageQuery(b){if(b.length>1){this.q=b.substring(1,b.length)}else{this.q=null}this.keyValuePairs=new Array();if(b){for(var a=0;a<this.q.split("&").length;a++){this.keyValuePairs[a]=this.q.split("&")[a]}}this.getKeyValuePairs=function(){return this.keyValuePairs};this.getValue=function(d){for(var c=0;c<this.keyValuePairs.length;c++){if(this.keyValuePairs[c].split("=")[0]==d){return this.keyValuePairs[c].split("=")[1]}}return false};this.getParameters=function(){var c=new Array(this.getLength());for(var d=0;d<this.keyValuePairs.length;d++){c[d]=this.keyValuePairs[d].split("=")[0]}return c};this.getLength=function(){return this.keyValuePairs.length}}function queryString(a){var b=new PageQuery(window.location.search);return unescape(b.getValue(a))}DefaultStyleSheet={ExpandButton:{textAlign:"left",top:"0",left:"670px",width:"670px",cursor:"pointer"},PanButton:{top:"1px",left:"718px",cursor:"pointer"},NavButtons:{left:"544px",top:"1px",cursor:"pointer"},CloseMapButton:{left:"663px",top:"2px"},OpenMapButton:{top:"1px",left:"662px",marginRight:"3px"},MapHackyKludge:{HorizontalBubbleOffset:0,VerticalBubbleOffset:0}};