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(b){GeoCode.setLoadingState();GeoCode.mergeStyleSheets(b);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(b){GeoCode.StyleSheet=$H(DefaultStyleSheet);if(isDefined(b)){Object.keys(b).each(function(a){if(b[a]){GeoCode.StyleSheet[a]=$H(GeoCode.StyleSheet[a]).merge($H(b[a]))}})}},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.SetCredentials("Atd0Lpclib11TtpGL2yacGjzef0iqC_BpTOylr-ZYAjll0HNrsxW1eY_diW8v4pj");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(f,e){try{map.Find(f,e,null,null,null,null,null,null,null,null,this.testMessage())}catch(d){geoCodeError("findLocationByName",d.message)}},getMapCoordinates:function(){var url="/hyatt/geocode/GeocodeLoader?r="+Math.random();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 b=GeoCode.totalrecs;GeoCode.setupDisambigTray();GeoCode.setupLayers();if((b>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 c=new VEShape(VEShapeType.Pushpin,new VELatLong(GeoCode.radius.LATITUDE,GeoCode.radius.LONGITUDE));c.SetTitle("Center of Search");c.SetDescription("This is the the centerpoint of your search term.");var d='<div id="centerofsearch"></div>';c.SetCustomIcon(d);GeoCode.centerLayer.AddShape(c);c=new VEShape(VEShapeType.Pushpin,new VELatLong(GeoCode.radius.LATITUDE,GeoCode.radius.LONGITUDE));c.SetTitle("Center of Search");c.SetDescription("This is the the centerpoint of your search term.");var d='<div id="centerofsearch"></div>';c.SetCustomIcon(d);GeoCode.splatLayer.AddShape(c)},getBestMapView:function(){var g=GeoCode.splatLayer.GetShapeCount()+GeoCode.centerLayer.GetShapeCount();var h=GeoCode.map.GetMapStyle();if(h=="b"){GeoCode.map.SetMapStyle(VEMapStyle.Road)}if(g==1){var f=GeoCode.splatLayer.GetShapeByIndex(0).GetPoints()[0];if(isDefined(f)){GeoCode.map.SetCenterAndZoom(f,GeoCode.MAX_DEFAULT_ZOOM)}}else{GeoCode.map.SetMapView(GeoCode.splatLayer.GetBoundingRectangle());var e=GeoCode.map.GetZoomLevel()-1;GeoCode.map.SetZoomLevel(e)}GeoCode.pullOutMapIfTooClose()},setupLayers:function(){GeoCode.locations.each(function(h){var m;var j=$H(h.value);var e=GeoCode.getLatLong(j);var k=j.HOTEL_BRAND;switch(k){case"Domestic Park":case"Park Hyatt":case"International Park":m="parkLayer";break;case"International Grand":case"Grand Hyatt":case"Domestic Grand":m="grandLayer";break;case"Domestic Regency":case"Hyatt Regency":case"International Regency":case"International Hyatt":case"Domestic Hyatt":m="regencyLayer";break;case"Hyatt Place":m="placeLayer";break;case"Hyatt House":m="summerfieldLayer";break;case"Continental Resort":case"Tropical Resort":case"Hyatt Vacation Club":case"Vacation Club":case"Hyatt Resorts":m="hvcLayer";break;case"Andaz":case"ANdAZ":m="andazLayer";default:m="hyattLayer";break}try{if(e.Latitude!=0&&e.Longitude!=0){GeoCode.createShape(m,e,j)}}catch(l){geoCodeError("getMapCoordinates",l)}finally{GeoCode.displaySearchedLocation()}})},setupDisambigTray:function(){var n=GeoCode.disambig;if(n[0]!=null&&n[0]!=""&&n.toArray().length>1){var j=0;var k=GeoCode.getDisambigUrl();while(n[j]!=null&&n[j]!=""){j++}var p=n[j-1]["ORIGINAL"];if(p!=null){if(!$("traydiv")){return}var o=document.createElement("div");var m='<p style="position:relative; width:145px; left:25px; font-size:10px; padding: 0; margin: 45px 0 0 0;">RESULTS DISPLAYED FOR:<p>';m+='<p class="disambig-location">'+n[0]["ADDRESS"]+"</p>";m+='<p style="padding-left: 25px; font-size:10px;">OR WERE YOU LOOKING FOR:</p>';m+='<div class="trayList">';var q;for(var l=1;l<5;l++){if(n[l]!=null&&n[l]!=""){q="SearchTerm="+n[l]["ADDRESS"]+"&lat="+n[l]["LATITUDE"]+"&long="+n[l]["LONGITUDE"]+"&radiusSearch="+n[l]["RADIUS_SEARCH"];if(ischeckavailablity==true){q+="&type=disambigCA"}m+="<p>";m+='<span class="tray-arrow">&gt;</span>';m+='<a href="'+k+"?"+q+'"  >'+n[l]["ADDRESS"]+"</a>";m+="</p>"}}m+="</div>";if(n[j]!=null&&n[j]!=""){}o.innerHTML=m;$("traydiv").appendChild(o);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 h=GeoCode.disambig;var e=$("traydiv");if(h[0]!=null&&h[0]!=""){var g=0;while(h[g]!=null&&h[g]!=""){g++}e.innerHTML='<img src="'+this.IMAGE_INTERFACE_DIR+'"errors_multiply.jpg" /><p style="position:relative; top:0; left:25px;">'+h[f-1]["ORIGINAL"]+"</p>";for(var f=1;f<9;f++){if(h[f]!=null&&h[f]!=""){e.innerHTML+='<p style="position:relative; left:25px; padding-right:25px;"><strong><a href="'+this.IMAGE_INTERFACE_DIR+"hotel-search-results.jsp?SearchTerm="+h[f]["ADDRESS"]+'"  >'+h[f]["ADDRESS"]+"</a></strong></p>"}}GeoCode.openTray(true)}},testMessage:function(){alert("Seach Sucessful!")},clearMap:function(){if(GeoCode.map){GeoCode.map.DeleteAllShapes()}},getBrandGroup:function(b){switch(b){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 House":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(z,M,I){var e=GeoCode[z];var O=I.SPIRIT_CODE;var S=I.HOTEL_BRAND;var G=I.HOTEL_NAME;var F=I.HOTEL_NAME_SHORT;var C=I.AREA_MASS_CODE;var T;var N="17";var R="17";var Q=GeoCode.getBrandGroup(S);var P="102";var E="73";var H="240";var A="73";var B="110";var L="120";G=G.replace("/"," / ");var K="";K+='<div id="'+O+'" style="float:left; "  >';K+='<div id="'+O+'_branddot" ';K+='class="brand-dot brand-dot-'+Q+'" ';K+="onmouseover=\"GeoCode.shapeHoverHandler('"+O+"_brandlogofull','mouseover');\"  ";K+="onmouseout=\"GeoCode.shapeHoverHandler('"+O+"_brandlogofull','mouseout');\" ";K+='style="float:left;width:'+N+"px;height:"+R+'px;z-index:-10;" >';K+="</div>";K+='<div id="'+O+'_brandlogo" ';K+='class="brand-logo brand-logo-'+Q+'" ';K+="onmouseover=\"GeoCode.shapeHoverHandler('"+O+"_brandlogofull','mouseover'); \" ";K+="onmouseout=\"GeoCode.shapeHoverHandler('"+O+"_brandlogofull','mouseout');\" ";K+='style="float:left; width:'+P+"px;height:"+E+'px;z-index:0; display:none; " >';K+="</div>";K+='<div id="'+O+'_brandlogofull" ';K+='class="brand-full brand-full-'+Q+'" ';K+="onclick=\"GeoCode.shapeClickHandler('"+O+"','mouseover'); \" ";K+="onmouseover=\"GeoCode.shapeHoverHandler('"+O+"_brandlogofull','mouseover', true);\" ";K+="onmouseout=\"GeoCode.shapeHoverHandler('"+O+"_brandlogofull','mouseout', false);\" ";K+='style="float:left; position:relative; width:'+H+"px;height:"+A+'px;z-index:0; display:none; cursor:pointer; " >';K+='<p style="margin-top:14px; margin-left:'+B+"px;  width:"+L+'px; text-decoration: none; font-size:10px; ">'+G+"</p>";K+="</div>";var U;var J;try{splat='<div id="'+O+'_splat" class="hotel-splat" style="float: left; width: 40px; height: 40px; z-index:-11; position: absolute; margin-left: -12px; margin-top: -12px;"></div>';J=new VEShape(VEShapeType.Pushpin,M);J.SetCustomIcon(splat);J.SetTitle(S);J.SetDescription(G)}catch(D){geoCodeError("create splat",D)}try{U=new VEShape(VEShapeType.Pushpin,M);U.SetCustomIcon(K);U.SetTitle(S);U.SetDescription(G)}catch(D){geoCodeError("create shape",D)}try{GeoCode.splatLayer.AddShape(J)}catch(D){geoCodeError("splatlayer",D.message)}try{GeoCode.getLayerForBrand(Q).AddShape(U)}catch(D){geoCodeError("shapelayer",D.message)}invalidateCached$$()},getLayerForBrand:function(c){var d=GeoCode[c+"Layer"];if(isDefined(d)){return d}else{throw"Cannot find Layer for brandgroup "+c}},getLatLong:function(g){var f;if(typeof g.LATITUDE!="undefined"&&g.LATITUDE!=""&&typeof g.LATITUDE!="undefined"&&g.LONGITUDE!=""){var h=parseFloat(g.LATITUDE);var e=parseFloat(g.LONGITUDE);f=new VELatLong(h,e)}else{f=new VELatLong(0,0)}return f},SHOW_BUBBLE_PAN_PIXEL_DISTANCE:133,showBubblePan:function(b){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(a){GeoCode.userPan=true;GeoCode.PAN_STATE_DISPLAY_NORMAL});GeoCode.panTo((GeoCode.SHOW_BUBBLE_PAN_PIXEL_DISTANCE*-1),b);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(f,d){GeoCode.userPan=false;var e=GeoCode.map.LatLongToPixel(d);e.y+=f;d=GeoCode.map.PixelToLatLong(e);GeoCode.map.PanToLatLong(d);GeoCode.userPan=true},shapeClickHandler:function(h,f){var j=$(h);var k=$H(this.locations[h]);var g=this.getLatLong(k);if(this.bubbleID==h){}this.bubbleID=h;GeoCode.shapeClickHandlerHelper(h);GeoCode.showBubblePan(g)},shapeClickHandlerHelper:function(c){var d=$(c);$(c+"_branddot").setStyle({display:"block"});$(c+"_brandlogo").setStyle({display:"none"});$(c+"_brandlogofull").setStyle({display:"none"});GeoCode.locations.each(function(f){var a=$H(f.value);var b=a.SPIRIT_CODE;if(b!=c&&b!=null){if($(b+"_branddot")){$(b+"_branddot").setStyle({display:"none"})}if($(b+"_brandlogo")){$(b+"_brandlogo").setStyle({display:"none"})}if($(b+"_brandlogofull")){$(b+"_brandlogofull").setStyle({display:"none"})}}});GeoCode.closeTray();GeoCode.btnCloseBubble(c);GeoCode.bubbleHotelData(c)},shapeHoverHandler:function(c,d){GeoCode.syncronizeEvent(function(){GeoCode.shapeHoverHandlerHelper(c,d)})},shapeHoverHandlerHelper:function(j,l,h){if(h==null){h=false}var k=$(j);switch(l){case"mouseout":if(!h){k.setStyle({display:"none"})}break;case"mouseover":k.setStyle({display:"block"});var m=$$("#VELayerListDiv div a");m.each(function(a){a.setStyle({zIndex:"650"})});var g=k.ancestors();g[2].setStyle({zIndex:"700"});break;default:geoCodeWarn("Unsupported case reached: shapeHoverHandlerHelper/default");geoCodeWarn(l);geoCodeWarn(j);break}this.executingHoverHandler=false},onEndZoomHandler:function(b){setTimeout("GeoCode.onEndZoomHandlerHelper();",125);setTimeout(GeoCode.redisplayDots,600)},onEndZoomHandlerHelper:function(){var p=GeoCode.map.GetZoomLevel();var n;var m;var l;var r,o,s;if(p>=GeoCode.BRAND_ICON_ZOOM_LEVEL){r="none";o="block";s="none"}else{r="block";o="none";s="block"}GeoCode.fixZoomBarForIe();var k=cached$$("#VELayerListDiv div a");var q=GeoCode.locations;q.each(function(c){var e=$H(c.value);var b=e.SPIRIT_CODE;var f=e.HOTEL_BRAND;var d=$(b);if(typeof d=="undefined"||d==null){return}var a=d.ancestors();var g=d.down();var h=g.next();g.setStyle({display:r});h.setStyle({display:o});$(b+"_splat").style.display=s;k.each(function(j){j.setStyle({zIndex:"650"})});if(p>=GeoCode.BRAND_ICON_ZOOM_LEVEL){d.setStyle({zIndex:"900"})}GeoCode.setBubbleDisplay(b,"none");if($("checkavail-"+b)){$("checkavail-"+b).setStyle({display:"none"})}if($("form-checkrateandavail")){$("form-checkrateandavail").setStyle({display:"none"})}if($("geocodedrates")){$("geocodedrates").setStyle({display:"none"})}});return},hideIfExists:function(f,d){var e=$(f);if(e){e.setStyle({display:"none"})}},endPanHandler:function(b){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 l=$$(".MSVE_PoweredByLogo");var k=$$(".MSVE_ScaleBarLabel");var m=$$(".MSVE_ScaleBarForeground");var n=$$(".MSVE_ScaleBarBackground");var o=$$(".MSVE_Copyright");var h=$$(".MSVE_CopyrightBackground");var j=$$(".MSVE_CopyrightForeground");k[0].style.left=k[0].getStyle("right");k[0].style.right="auto";k[0].style.bottom="24px";k[1].style.left=k[1].getStyle("right");k[1].style.right="auto";k[1].style.bottom="23px";o[0].style.left=o[0].getStyle("right");o[0].style.right="auto";o[0].style.textAlign="left";o[0].style.bottom="27px";h[0].style.left=j[0].getStyle("left");h[0].style.right="auto";h[0].style.textAlign="left";h[0].style.bottom="17px";j[0].style.left=j[0].getStyle("left");j[0].style.right="auto";j[0].style.textAlign="left";j[0].style.bottom="18px"},addLegend:function(){var k=250;var g=20;var l=$(GeoCode.map.ID);var h=document.createElement("div");h.id="legendContainer";Element.extend(h);h.setStyle({width:k+"px",height:g+"px",textAlign:"left",top:(l.clientHeight-g)+"px",left:(l.clientWidth-k)+"px"});this.map.AddControl(h);var m=document.createElement("div");m.id="legendOpen";h.appendChild(m);$(m.id).observe("click",function(){$(m.id).setStyle({display:"none"});$(j.id).setStyle({display:"block"})});m.setStyle({backgroundImage:'url("/hyatt/features/legend_open.png")',width:"133px",height:"127px",zIndex:"0",display:"none",cssFloat:"right",styleFloat:"right",top:(m.offsetTop-107)+"px",position:"relative"});var j=document.createElement("div");j.id="legendClosed";h.appendChild(j);$(j.id).observe("click",function(){$(m.id).setStyle({display:"block"});$(j.id).setStyle({display:"none"})});j.setStyle({backgroundImage:'url("/hyatt/features/brand_legend.png")',width:"133px",height:"19px",zIindex:"0",cssFloat:"right",styleFloat:"right"})},addCloseButton:function(){var b=document.createElement("div");b.id="closemap";Element.extend(b);b.setStyle(GeoCode.StyleSheet.CloseMapButton);b.observe("click",GeoCode.closeMap);this.map.AddControl(b)},addExpandButton:function(){var b=document.createElement("div");b.id="expandmap";Element.extend(b);b.setStyle(GeoCode.StyleSheet.OpenMapButton);b.observe("click",GeoCode.openMap);this.map.AddControl(b)},closeMap:function(){var g=$("locationMap");var h=$("expandMapSection");var e=$("closemap");var f=$("traydiv");g.style.display="none";h.style.display="block";e.style.display="none";f.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 g=$("locationMap").style;var h=$("expandMapSection").style;var e=$("closemap").style;var f=$("traydiv").style;if(g.display=="none"){g.display="block"}if(h.display=="block"){h.display="none"}if(e.display="none"){e.display="block"}if(GeoCode.trayopen){f.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(e,f){if(typeof GeoCode.allocatedElementList[f]=="undefined"){var d=document.createElement(e);d.id=f;GeoCode.allocatedElementList[f]=d}return(GeoCode.allocatedElementList[f])},btnCloseBubble:function(c){var d=$(GeoCode.map.ID);btnCloseBubble=GeoCode.allocateOrGetMapElement("div","closebubble-"+c);btnCloseBubble.style.width="15px";btnCloseBubble.style.height="20px";btnCloseBubble.style.top=(d.clientHeight-266+GeoCode.StyleSheet.MapHackyKludge.VerticalBubbleOffset)+"px";btnCloseBubble.style.left=(d.clientWidth-132+GeoCode.StyleSheet.MapHackyKludge.HorizontalBubbleOffset)+"px";btnCloseBubble.style.display="block";btnCloseBubble.style.cursor="pointer";this.map.AddControl(btnCloseBubble);$(btnCloseBubble.id).observe("click",function(){$(c).setStyle({});$("closebubble-"+c).setStyle({display:"none"});$("bubbledata-"+c).setStyle({display:"none"});$("bubbledataleft-"+c).setStyle({display:"none"});$("bubbledataright-"+c).setStyle({display:"none"});if($("checkavail-"+c)){$("checkavail-"+c).setStyle({display:"none"})}if($("form-checkrateandavail")){$("form-checkrateandavail").setStyle({display:"none"})}if($("geocodedrates")){$("geocodedrates").setStyle({display:"none"})}if($("bubble-"+c)){$("bubble-"+c).setStyle({display:"none"})}GeoCode.hideBubblePan();GeoCode.redisplayDots()})},setBubbleDisplay:function(h,g){var f=$("bubbledata-"+h);if(f==null){return}var e=[$("bubble-"+h),$("bubbledata-"+h),$("bubbledesc-"+h),$("bubbledataleft-"+h),$("bubbledataright-"+h),$("closebubble-"+h)];e.each(function(a){a.style.display=g})},createdBubbles:{},bubbleHotelData:function(b){if(isDefined(GeoCode.createdBubbles[b])){GeoCode.setBubbleDisplay(b,"block")}else{GeoCode.createBubble(b);GeoCode.createdBubbles[b]=b}GeoCode.currentlyDisplayedBubble=b},massageHotelUrl:function(b){if(b.substring(0,7)=="http://"){return b}return"http://"+b+".hyatt.com"},createBubble:function(aO){var at=$H(this.locations[aO]);var aD=$(GeoCode.map.ID);var aG=GeoCode.StyleSheet.MapHackyKludge.HorizontalBubbleOffset;var aI=at.HOTEL_NAME;var aK=aO;var aF=at.HOTEL_URL;var af=at.HOTEL_STREET_ADDRESS;var aC=at.ACTUAL_HOTEL_CITY;var V=at.HOTEL_STATE;var ah=at.HOTEL_COUNTRY;var ay=at.HOTEL_ZIPCODE;var aE=at.HOTEL_DESCRIPTION;var aA=at.DISTANCE_MILES;var ag=at.HOTEL_BRAND;var aL=at.SIGNATURE_THUMBNAIL;var aM=at.EXTERNAL_VTOUR_URL;var ax=at.HOTEL_ID;var am=at.AVG_RATE_PER_NIGHT;var av=at.INT_TOTAL_RATE;var aq=av+"";var ao=aq.lastIndexOf(".");var ae=aq.length-2;if(ao<0){var av=av+".00"}else{if(ao==ae){var av=av+"0"}}var Z=at.CURRENCY_CODE;var aN=at.AREA_MASS_CODE;var aj=at.CHAIN_CODE;var ak=at.SLIDESHOW_PICS;var T=at.SOLD_OUT;var az=document.getElementById("special-offer").value;var U=document.getElementById("corp_id").value;var R=document.getElementsByName("ratetype");for(var ap=0,an=R.length;ap<an;++ap){if(R[ap].checked==true){var S=R[ap].value}}var al;if(isDefined(at.CORPORATE_ID)){al=""}else{al=""}var X=17;var ar=17;aF=GeoCode.massageHotelUrl(aF);var W=Position.positionedOffset(aD);var aJ=document.createElement("div");Element.extend(aJ);aJ.id="bubble-"+aO;aJ.addClassName("bubble");aJ.setStyle({width:"543px",height:"232px",backgroundRepeat:"no-repeat",left:(W[0]+84)+"px",top:(W[1]+65)+"px",zIndex:"997",position:"relative"});var aa=document.createElement("div");Element.extend(aa);aa.id="bubbledata-"+aO;aa.addClassName("bubbleData");var ai=document.createElement("div");Element.extend(ai);ai.id="bubbledataleft-"+aO;ai.addClassName("bubbleDataLeft");var aH=document.createElement("div");Element.extend(aH);aH.id="bubbledataright-"+aO;aH.addClassName("bubbleDataRight");var aQ=document.createElement("div");aQ.id="spiritcode";aQ.innerHTML=aK;aQ.style.left=(aD.clientWidth-5512)+"px";aQ.style.display="none";aa.style.width="250px";aa.style.height="100px";aa.style.top=(aD.clientHeight-249+GeoCode.StyleSheet.MapHackyKludge.VerticalBubbleOffset)+"px";aa.style.left=(aD.clientWidth-512+aG)+"px";aa.style.zIndex="998";aa.style.textAlign="left";var aB="";switch(ag){case"Domestic Park":case"Park Hyatt":case"International Park":aB="park";rightimage="/hyatt/images/map/brandright/Park.jpg";break;case"International Grand":case"Grand Hyatt":case"Domestic Grand":aB="grand";rightimage="/hyatt/images/map/brandright/Grand.jpg";break;case"Domestic Regency":case"Hyatt Regency":case"International Regency":case"International Hyatt":case"Domestic Hyatt":aB="regency";rightimage="/hyatt/images/map/brandright/Regency.jpg";break;case"Hyatt Place":aB="place";rightimage="/hyatt/images/map/brandright/HP.jpg";break;case"Hyatt House":aB="summerfield";rightimage="/hyatt/images/map/brandright/HSS.jpg";break;case"Continental Resort":case"Tropical Resort":case"Hyatt Resorts":aB="resorts";rightimage="/hyatt/images/map/brandright/Resorts.jpg";break;case"Hyatt Vacation Club":case"Vacation Club":aB="hvc";rightimage="/hyatt/images/map/brandright/Vacation.jpg";break;case"Andaz":aB="andaz";rightimage="/hyatt/images/map/brandright/Andaz.jpg";break;default:aB="hyatt";rightimage="/hyatt/images/map/brandright/Hyatt.jpg";break}var aR;switch(GeoCode.unitType){case"km":aR="Kilometers";break;default:aR="Miles";break}var ab='<div class="brand-dot brand-dot-inline brand-dot-'+aB+'"> &nbsp; </div>';if(at.HOTEL_URL!=null&&at.HOTEL_URL!=""){aa.innerHTML='<dt class="fn org"><a class="b" href="'+aF+al+'">'+aI+" </a></dt>"}else{aa.innerHTML='<dt class="fn org">'+aI+"</dt>"}var ac='<p style="font-family:arial; font-size:12px; margin-top:4px; font-weight:bold;" ><span class="adr"><span class="address street-address">'+af+'</span><br/><span class="locality">'+aC+"</span>, ";if(V!=""&&V!=null){ac+='<span class="region">'+V+"</span>, "}ac+='<span class="country-name">'+ah+'</span><br/><span class="postal-code">'+ay+"</span></span></p>";aa.innerHTML+=ac;var Y;var aw;switch(GeoCode.currentDistanceUnit){case"m":Y="block";aw="none";break;case"km":Y="none";aw="block";break;default:geoCodeError("Unreachable State, inconsistant currentDistanceUnit:"+currentDistanceUnit)}if(aA!=""&&aA!="undefined"&&aA!=null){distanceMiles=Math.round(aA*10)/10;aa.innerHTML+='<div class="bubbleDist bubblem" style="display: '+Y+';">'+ab+" "+distanceMiles+" Miles</div>";distanceKilometers=Math.round((aA*1.609344)*10)/10;aa.innerHTML+='<div class="bubbleDist bubblekm" style="display: '+aw+';" >'+ab+" "+distanceKilometers+" Kilometers</div>"}else{aa.innerHTML+='<p style="margin-top:4px; " ></p>'}aa.innerHTML+='<p style="font-family:arial; font-size:12px; font-weight:bold; " id="bubbledesc-'+aK+'">'+aE+" </p>";if(T==false){var au=queryString("xactionid");if(am!=0){aa.innerHTML+='<p style="color:#C59D08;"><strong>Average Daily Rate per Room '+am+'</strong> <a href="/hyatt/reservations/popCurrencyConvert.jsp?currencycodefrom='+Z+"&amountfrom="+am+'" onclick="winOpen(this.href,\'name\',380,200,0,0,\'resizable=0,scrollbars=0\'); return false;" target="_blank">'+Z+'</a><sup style="color:#000;">1</sup><br />';aa.innerHTML+='<span style="font-weight:bold;">Total Price per Room '+av+' <a href="/hyatt/reservations/popCurrencyConvert.jsp?currencycodefrom='+Z+"&amountfrom="+av+' " onclick="winOpen(this.href,\'name\',380,200,0,0,\'resizable=0,scrollbars=0\'); return false;" target="_blank">'+Z+"</a><sup>2</sup></p>"}aa.innerHTML+='<form action="/hyatt/reservations/flow1/corpRatesAvailable.jsp" name="hotels" method="post">';aa.innerHTML+='<input value="ISO-8859-1" type="hidden" name="_dyncharset">';aa.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(\''+aN+"', '"+aj+"', '"+aK+"', '"+au+"', '"+az+"', '"+U+"', '"+S+"');return false\" >VIEW ALL ROOMS &amp; RATES</button></div>";aa.innerHTML+="</form>"}else{if(T==true){aa.innerHTML+="<p><em>HOTEL NOT AVAILABLE</em><br />"}else{if(GeoCode.isBookable(at.HOTEL_STATUS)&&(!GeoCode.isPreOpening(at.HOTEL_STATUS))){aa.innerHTML+='<div class="button" id="bubbleCheckRates-'+aK+'" style="margin-bottom: 10px; margin-top: 30px;"><a href="#"  onclick="GeoCode.checkAvail(\''+aK+"');return false\" > CHECK RATES & AVAILABILITY</a></div>"}else{aa.innerHTML+='<p class="non-bookable"> This hotel is currently not yet bookable online.</p>'}}}ai.style.width="120px";ai.style.top=(aD.clientHeight-264+GeoCode.StyleSheet.MapHackyKludge.VerticalBubbleOffset)+"px";ai.style.left=(aD.clientWidth-656+aG)+"px";var ad=4;var aP="";aP+='<img class="bubbleThumb" src="/hyatt'+aL+'" width="120" height="90" alt="'+aI+'" />';aP+='<div class="bubbleNav">';if(at.HOTEL_URL!=null&&at.HOTEL_URL!=""){aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+aF+al+'" >Visit Hotel Site</a></p>'}else{ad-=1}if(ak>0){if(ag!="Hyatt Summerfield Suites"){aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="/hyatt/hotels/gallery/photos.jsp?hotelId='+ax+"&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{aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="/hyatt/hotels/summerfield/gallery/photos.jsp?hotelId='+ax+"&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{ad-=1}if(aM==""||(ag=="Hyatt Summerfield Suites"&&GeoCode.HIDE_SUMMERFIELD_VTOURS)){ad-=1}else{if(ag=="Hyatt Place"){aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+aF+'/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(aM=="vrx_virtual_tour"){aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+aF+'/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(ag=="Hyatt Summerfield Suites"||ag=="Summerfield Suites"){aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+aM+'" 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{aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+aF+'/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(at.HOTEL_URL!=null&&at.HOTEL_URL!=""&&aK!="victo"){aP+='<p class="navItem"><a style="text-decoration:none; color:#fff; font-size:10px; " href="'+aF+"/hyatt/hotels/maps/maps_popup.jsp?hotelId="+ax+"&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{ad-=1}aP+="</div>";ai.innerHTML=aP;aH.style.width="120px";aH.style.height="210px";aH.style.top=(aD.clientHeight-232)+"px";aH.style.left=(aD.clientWidth-237+aG)+"px";aH.innerHTML+='<img src="'+rightimage+'"  alt="'+aI+'" />';this.map.AddControl(aJ);this.map.AddControl(aa);this.map.AddControl(ai);this.map.AddControl(aH);if(ad<=0){thisid="bubble-"+$(aO).id;$(thisid).setStyle({backgroundImage:"url(/hyatt/images/map/bubble-nothing.png)"})}GeoCode.btnCloseBubble(aO)},isBookable:function(b){return((b!=4)&&(b!=6))},isPreOpening:function(b){return((status==4)||(status==5)||(status==6)||(status==7))},showHideMap:function(){if(!($("toggleMap"))){return}var b=$("search-results-list").style;switch($("toggleMap").selectedIndex){case GeoCode.VIEW_LISTINGS_ONLY:b.display="block";GeoCode.closeMap();break;case GeoCode.VIEW_MAP_AND_LISTINGS:b.display="block";GeoCode.openMap();break;case GeoCode.VIEW_MAP_ONLY:b.display="none";GeoCode.openMap();break;default:geoCodeError(GeoCode.showHideMap,"Unreachable state, unkonwn state for toggleMap selectbox")}},search:function(f,g,e,h){alert("Function 'GeoCode.search' does not exist")},reset:function(b){alert("Function 'GeoCode.reset' does not exist")},setUnitBubble:function(d){GeoCode.currentDistanceUnit=d;var e;var f;switch(d){case"m":e="none";f="block";break;case"km":e="block";f="none";break;default:geoCodeError("Unreachable state in setUnitBubble")}document.getElementsByClassName("bubblekm").each(function(a){a.style.display=e});document.getElementsByClassName("bubblem").each(function(a){a.style.display=f})},opacity:function(j,l,h,g){var m=Math.round(g/100);var k=0;if(l>h){for(i=l;i>=h;i--){setTimeout("GeoCode.changeOpac("+i+",'"+j+"')",(k*m));k++}}else{if(l<h){for(i=l;i<=h;i++){setTimeout("GeoCode.changeOpac("+i+",'"+j+"')",(k*m));k++}}}},changeOpac:function(d,f){var e=document.getElementById(f).style;e.opacity=(d/100);e.MozOpacity=(d/100);e.KhtmlOpacity=(d/100);e.filter="alpha(opacity="+d+")"},addTray:function(){var d=$(GeoCode.map.ID);var c=document.createElement("div");c.id="traydiv";Element.extend(c);c.addClassName("traydiv");c.setStyle(GeoCode.StyleSheet.DisambigTray);this.map.AddControl(c);GeoCode.addCloseTray()},openTray:function(e){var f=$("traydiv");f.style.display="block";var g=true;var h=function(a){g=false};Event.observe(f,"click",h);Event.observe(f,"mouseover",h);Event.observe(f,"mouseout",function(a){g=true});GeoCode.trayopen=true;setTimeout(function(){if(g){}},GeoCode.DISAMBIG_TRAY_TIMEOUT)},closeTray:function(){var b=$("traydiv");GeoCode.opacity("traydiv",90,0,500);setTimeout("GeoCode.closeTrayHelper('traydiv');",500);GeoCode.trayopen=false},closeTrayHelper:function(b){thisdiv=$(b);thisdiv.style.display="none"},addCloseTray:function(){var e=$("traydiv");var d=$(GeoCode.map.ID);var f=document.createElement("div");f.id="closetray";Element.extend(f);f.setStyle({width:"75px",height:"15px",position:"absolute",cursor:"pointer",top:"0",left:"130px",zIndex:"250"});f.observe("click",GeoCode.closeTray);e.appendChild(f)},checkRatesandAvail:function(Q){var G=$("bubbledata-"+Q);var K=$("bubbledesc-"+Q);var H=$("bubbleCheckRates-"+Q);var D=$("bubbledataright-"+Q);G.style.display="none";K.style.display="none";H.style.display="none";D.style.display="none";var F=$H(this.locations[Q]);var B=$(GeoCode.map.ID);var O=document.createElement("div");var I=F.HOTEL_NAME;var N=Q;var z=F.HOTEL_URL;var R=F.HOTEL_STREET_ADDRESS;var L=F.HOTEL_CITY;var M=F.HOTEL_STATE;var C=F.HOTEL_COUNTRY;var y=F.HOTEL_ZIPCODE;var A=F.HOTEL_DESCRIPTION;var P=F.DISTANCE;var J=F.HOTEL_BRAND;var E=F.SIGNATURE_THUMBNAIL;var x=F.EXTERNAL_VTOUR_URL;z=GeoCode.massageHotelUrl(z);O.id="checkavail-"+N;O.style.width="250px";O.style.height="100px";O.style.top=(B.clientHeight-285)+"px";O.style.left=(B.clientWidth-512)+"px";if(z!=""){O.innerHTML='<dt class="fn org"><a class="b" href="'+z+'">'+I+" </a></dt>"}else{O.innerHTML='<dt class="fn org">'+I+"</dt>"}var S=$("form-checkrateandavail");S.setStyle({display:"block"});this.map.AddControl(O)},checkAvail:function(b){document.location="/hyatt/reservations/flow6/propCheckAvailability.jsp?xactionid=&pid="+b},viewRoomRates:function(l,g,k,f,j,e,h){document.location="/hyatt/reservations/flow1/corpSelectedHotelRates.jsp?areaMassCode="+l+"&chainCode="+g+"&spiritCode="+k+"&xactionid="+f+"&action=getRates&offerCode="+j+"&corp_id="+e+"&RATETYPE="+h},encode:function(c){c=c.replace(/\r\n/g,"\n");var f="";for(var g=0;g<c.length;g++){var h=c.charCodeAt(g);if(h<128){f+=String.fromCharCode(h)}else{if((h>127)&&(h<2048)){f+=String.fromCharCode((h>>6)|192);f+=String.fromCharCode((h&63)|128)}else{f+=String.fromCharCode((h>>12)|224);f+=String.fromCharCode(((h>>6)&63)|128);f+=String.fromCharCode((h&63)|128)}}}return f},decode:function(f){var c="";var h=0;var g=c1=c2=0;while(h<f.length){g=f.charCodeAt(h);if(g<128){c+=String.fromCharCode(g);h++}else{if((g>191)&&(g<224)){c2=f.charCodeAt(h+1);c+=String.fromCharCode(((g&31)<<6)|(c2&63));h+=2}else{c2=f.charCodeAt(h+1);c3=f.charCodeAt(h+2);c+=String.fromCharCode(((g&15)<<12)|((c2&63)<<6)|(c3&63));h+=3}}}return c},syncronizeEvent:function(b){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=b();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(b){if(!GeoCode.DEBUG){return}if(typeof console!="undefined"){console.warn(b)}else{alert(b)}}function geoCodeError(c,d){if(typeof console!="undefined"){console.error("Error in "+c);console.error(d)}else{alert("Error in "+c+":"+d.message)}}function isDefined(b){if(typeof b!="undefined"){return true}else{return false}}(function(){var b=Array();cached$$=function(a){return $$(a);if(!isDefined(b[a])){b[a]=$$(a)}return b[a]};invalidateCached$$=function(){b=Array()}})();function PageQuery(c){if(c.length>1){this.q=c.substring(1,c.length)}else{this.q=null}this.keyValuePairs=new Array();if(c){for(var d=0;d<this.q.split("&").length;d++){this.keyValuePairs[d]=this.q.split("&")[d]}}this.getKeyValuePairs=function(){return this.keyValuePairs};this.getValue=function(a){for(var b=0;b<this.keyValuePairs.length;b++){if(this.keyValuePairs[b].split("=")[0]==a){return this.keyValuePairs[b].split("=")[1]}}return false};this.getParameters=function(){var b=new Array(this.getLength());for(var a=0;a<this.keyValuePairs.length;a++){b[a]=this.keyValuePairs[a].split("=")[0]}return b};this.getLength=function(){return this.keyValuePairs.length}}function queryString(d){var c=new PageQuery(window.location.search);return document.xactionIdForm.xactionidValue.value}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}};
