var activeEro=null;var mapChange=false;var customIconList=new Array("baby.gif","beer.gif","book.gif","buildings.gif","computer.gif","construction.gif","doctor.gif","event.gif","food.gif","golf.gif","gym.gif","hiker.gif","home.gif","mail.gif","martini.gif","party.gif","piano.gif","school.gif","service.gif","shopping.gif","ski.gif","suitcase.gif","wedding.gif","xcSki.gif");var EroSize={Small:0,Large:1};var zIndex=1001;function MouseHandler(e){if(e.eventName=="onclick"){if(isAddingNewLocation&&e.elementID==null){isAddingNewLocation=false;var pixel=new VEPixel(e.mapX,e.mapY);var point=mapManager.Map.PixelToLatLong(pixel);var shape=new VEShape(VEShapeType.Pushpin,point);shape.SetCustomIcon("<div class='pin_personal'></div>");mapManager.Map.AddShape(shape);var locationContent={title:"",description:"",latitude:point.Latitude,longitude:point.Longitude,lastUpdated:"",shapeID:shape.GetID(),iconURL:""};var des=SetMyLocationDescription("",locationContent);totalPersonalPins++;var key=InfoBoxManager.StoreDescription("Personal",totalPersonalPins,des);shape.SetDescription(key);activeEro=new PushpinERO(shape.GetID(),mapManager.Map);activeEro.Show();SetMapCursor("auto");return true}else{if(e.elementID!=null&&mapManager.Map.GetShapeByID(e.elementID)!=null){if(activeEro!=null&&activeEro.ShapeId!=e.elementID){activeEro.Hide()}else{if(activeEro!=null&&e.elementID==activeEro.ShapeId){return true}}var shape=mapManager.Map.GetShapeByID(e.elementID);if(shape._customIcon!=undefined){var curCustomIconString=shape._customIcon;if(debug){console.log("MouseHandler: curCustomIconString: %s",curCustomIconString)}if(curCustomIconString.match(/pin_wf|pin_v_wf/)!=null){_hbSet("lid","num_icon");_hbSet("lpos","imap_sr");_hbSend()}if(curCustomIconString.match(/pin_nonad|pin_v_nonad/)!=null){_hbSet("lid","dot_icon");_hbSet("lpos","imap_sr");_hbSend()}if(curCustomIconString.match(/pin_wf|pin_v_wf|pin_nonad|pin_v_nonad|mapIcon/)!=null){var keyInSpan=shape.GetDescription();var imKey=InfoBoxManager.StripSpan(keyInSpan);if(InfoBoxManager.IsFormattedKey(imKey)){var fields=imKey.split("||");var type=fields[0];var index=parseInt(fields[1]);var imPattern=new RegExp("imListing","i");if(imPattern.test(type)){if(debug){console.log("MouseHandler: found an imListing pin")}YPSearchManager.GetMPData(shape.GetID(),index)}else{activeEro=new PushpinERO(e.elementID,mapManager.Map);activeEro.Show()}return true}}else{if(debug){console.log("MouseHandler: css class not one of pin_wf|pin_v_wf|pin_nonad|pin_v_nonad|mapIcon")}activeEro=new PushpinERO(e.elementID,mapManager.Map);activeEro.Show();return true}}return true}}}}function ShowMiniMerchantBubble(shapeID){if(activeEro!=null){activeEro.Hide();activeEro=null}activeEro=new PushpinERO(shapeID,mapManager.Map);activeEro.Show()}function Decluster(shape){var latLongs=shape.GetDescription().split("|");var points=new Array();for(var i=0;i<latLongs.length;i++){var point=latLongs[i].split(",");points.push(new VELatLong(point[0],point[1]))}mapManager.Map.SetMapView(points)}function GenerateLocationDescription(locationID,locationContent){var latlong=new VELatLong(locationContent.latitude,locationContent.longitude);var shapeID=locationContent.shapeID;var title=locationContent.title.replace("'","%27").replace('"',"%28");var des=locationContent.description.replace("'","%27").replace('"',"%28");var lastUpdated=locationContent.lastUpdated;var iconURL=locationContent.iconURL;if(!iconURL||iconURL==""){iconURL="Images/MyLocationPin.gif"}var divHeight="170px";var topMargin="8px";var description='<div style="height: '+divHeight+";margin-top:"+topMargin+';">';description+='<div class="popupTop">';description+='<div class="popupTopLeft">';description+='<div style="font-weight: bold; font: 12px/14px Arial;">';description+='<strong style="width: 175px; overflow: auto">'+title.replace("%27","'").replace("%28",'"')+"</strong>";description+="<br />";description+='<span style="width: 175px; height: overflow: auto">'+des.replace("%27","'").replace("%28",'"')+"</span>";description+="</div>";description+="</div>";description+='<div class="popupTopRight" style="float: right">';description+='<div class="popupTopRightVisible" style="float: left; width: 140px">';description+='<div class="popupTopRightLeft" style="width: 130px">';if(locationID!=""&&!isCurrMapFriends){description+='<span class="deleteButton" onclick="PersistenceManager.DeleteMyLocation(\''+shapeID+"', '"+locationID+"')\">"+resourceDelete+"</span> | ";description+='<span class="deleteButton" onclick="restorePushPin(\''+locationID+"','"+shapeID+"','"+title+"','"+des+"',"+locationContent.latitude+","+locationContent.longitude+",'"+lastUpdated+"','"+iconURL+"')\">"+editText+"</span><br/>"}description+="<div class='lastUpdatedClass'>"+resourceLastUpdatedAt+" "+lastUpdated+"</div>";description+="</div>";description+='<div class="popupRightRight" style="float: right; position: absolute; top: 0px; left: 300px">';description+='<div style="display:block;margin-top:5px; margin-bottom:5px;"><img style="border:1px solid black;" src="'+iconURL+'"></img>';description+='<br/><div class="popupChangeIcon" onClick="ShowSelectCustomPins(\''+locationID+"','"+shapeID+"','"+title+"','"+des+"',"+locationContent.latitude+","+locationContent.longitude+",'"+lastUpdated+"','"+iconURL+"')\">"+resourceChange+"</div></div>";description+="</div>";description+="</div>";description+='<div id="AP_ACTION_'+locationID+'" class="popupActionArea" style="height:50px;top:60px; margin-left: ';if(browserManager.BrowserName=="msie"){description+='-140px">'}else{description+='0px">'}description+='<div id="AP_EMPTY_'+locationID+'" style="height:70px; width:100px;"></div>';description+='<div id="AP_TO_'+locationID+'" style="height:70px;display:none;"><div class="popupHeader"><strong>'+resourceDD+":</strong></div>";description+=resourceToHere+":<br/>";description+='<input type="text" id="p_toAddress'+locationID+'" style="width:158px;" onkeydown="ExecuteFindFromInput(\'p_imgTo'+(locationID)+"', event);\"/><br/>";description+='<div><img id="p_imgTo'+locationID+'" src="'+images+'GetDD.gif" class="popupLink" style="left:100px; float: right;" onclick="PersistenceManager.GDDForPopup(\'TO\', \''+(locationID)+"', "+locationContent.latitude+","+locationContent.longitude+');" /></div>';description+="</div>";description+='<div id="AP_FROM_'+locationID+'" style="height:70px;display:none;"><div class="popupHeader"><strong>'+resourceDD+": </strong></div>";description+=resourceFromHere+":<br/>";description+='<input type="text" id="p_fromAddress'+locationID+'" style="width:158px;" onkeydown="ExecuteFindFromInput(\'p_imgFrom'+(locationID)+"', event);\"/><br/>";description+='<div><img id="p_imgFrom'+(locationID)+'" src="'+images+'GetDD.gif" class="popupLink" style="left:100px; float: right;" onclick="PersistenceManager.GDDForPopup(\'FROM\', \''+(locationID)+"', "+locationContent.latitude+","+locationContent.longitude+');"/></div>';description+="</div>";description+='<div id="AP_NEAR_'+locationID+'" style="height:70px;display:none;"><div class="popupHeader"><strong>'+resourceWhatsNearby+": </strong></div>";description+='<div class="popupSubheader">'+resourceSearchForCategory+":<br/></div>";description+='<input type="text" id="p_nearby'+locationID+'" style="width:158px;" onkeydown="ExecuteFindFromInput(\'p_imgNear'+(locationID)+"', event);\"/><br/>";description+='<div style="float:left; width:120px">'+resourceWhatsNearbyExample+"</div>";description+='<div><img id="p_imgNear'+(locationID)+'" src="'+images+'GetDD.gif" class="popupLink" style="margin-top:11px; left:100px; float: right;" onclick="PersistenceManager.GNBForPOIPopup(\''+(locationID)+"', "+locationContent.latitude+","+locationContent.longitude+');"/></div>';description+="</div>";description+='<div id="AP_MAP_'+locationID+'" style="height:70px;display:none;">';description+='<div id="AP_MAP_SAVE_'+locationID+'" style="display:none;">';description+='<div style="float:left;">';description+='<div class="popupHeader" style="width:120px"><strong>'+resourceSaveToAMap+": </strong></div>";description+='<div style="width:150px">'+resourceSaveToAMapPrompt+"</div>";description+="</div>";description+='<div style="">';description+='<select id="mapSelect" style="width:158px;">';description+="</select><br/></div>";description+='<div><img id="p_imgAdd'+(locationID)+'" src="'+images+'doneButton.gif" class="popupLink" style="left:100px; float: right;" onclick="POIManager.SavePOIToCustomMap(\''+(locationID)+"',"+locationContent.latitude+","+locationContent.longitude+",'"+locationContent.title.replace("'","%27").replace('"',"%28")+"','"+locationContent.description.replace("'","%27").replace('"',"%28")+"','"+locationContent.iconURL+"');\"/></div>";description+="</div>";description+='<div id="AP_MAP_WARN_'+locationID+'" style="float:left;display:none">';description+='<div class="popupHeader" style="width:110px"><strong>'+resourceSaveToAMap+": </strong></div><br />";description+='<div style="width:180px">'+resourceLoginNeeded+"</div>";description+="</div>";description+="</div>";description+="</div>";description+="</div>";description+="</div>";description+='<div class="popupBottom">';description+="<table>";description+='<tr><td><table><td><img src="images/drivingicon.gif" align="left" style="margin-right:3px;margin-left:3px"></img></td>';description+="<td>"+resourceDD.toUpperCase();description+='<div></div><span class="popupLink popupDrivingFunctionTo" ';description+="onclick=\"YPSearchManager.ShowActionDiv('AP_', '"+(locationID)+"', 'FROM');\"";description+='><img src="images/tohereicon.gif"><span>'+resourceToHere.toUpperCase()+"</span></img></span> | ";description+='<span class="popupLink popupDrivingFunctionFrom" ';description+="onclick=\"YPSearchManager.ShowActionDiv('AP_', '"+(locationID)+"', 'TO');\"";description+='><img src="images/fromhereicon.gif"><span>'+resourceFromHere.toUpperCase()+"</span></img></span>";description+="</td>";description+='<td style="width:60px;margin-right:3px;"><span class="popupLink" ';description+="onclick=\"YPSearchManager.ShowActionDiv('AP_', '"+(locationID)+"', 'NEAR');\"";description+='><img src="images/nearbyicon.gif" align="left" style="margin-right:3px"></img>';description+='<span class="popupLink">'+resourceWhatsNearby.toUpperCase()+"</div></span></td>";description+='<td style="margin-right:3px; width:70px;"><span class="popupLink" ';description+="onclick=\"YPSearchManager.ShowActionDiv('AP_', '"+(locationID)+"', 'MAP');\"";description+='><img src="images/savemapicon.gif" align="left" style="margin-right:3px;margin-left:3px"></img>';description+=resourceAddToAMap.toUpperCase()+"</span></td>";description+="</tr></table>";description+="</div>";description+="</div>";description="(S)"+description;return description}function SetMyLocationDescription(locationID,locationContent){var latlong=new VELatLong(locationContent.latitude,locationContent.longitude);var shapeID=locationContent.shapeID;var title=locationContent.title;var des=locationContent.description;var lastUpdated=locationContent.lastUpdated;var iconURL=locationContent.iconURL;var deleteText="";if(!iconURL||iconURL==""){iconURL="Images/MyLocationPin.gif"}if(locationID!=""&&!isCurrMapFriends){deleteText+="<span id='deleteButton' class='deleteButton' onclick='PersistenceManager.DeleteMyLocation(\""+shapeID+'", "'+locationID+"\")'> "+resourceDelete+"</span><br/>"}var description="";var disableInput="";description+="<table class='myLocationTable' align='center' cell-padding='10px'>";description+="<tr>";if(isCurrMapFriends){disableInput='disabled="true"'}description+="<td style='font-weight: bold; font-size: 12px'>"+titleText+"<br/><input maxlength='255' class='myLocTitle' style='border: 1px solid black;width:285px;' "+disableInput+" id='myLocTitle_"+shapeID+"' type='text' value='"+title+"'";description+="></input></td>";title=title.replace('"',"%28");des=des.replace("'","%27").replace('"',"%28");description+="<td rowspan='2' style='vertical-align: top'><img style='border: 1px solid black' src='"+iconURL+"'/>";description+="<br/><div class='popupChangeIcon' onClick='ShowSelectCustomPins(\""+locationID+'","'+shapeID+'","'+title+'","'+des+'",'+latlong.Latitude+","+latlong.Longitude+',"'+lastUpdated+'","'+iconURL+"\")'>"+resourceChange+"</div>";description+="<div class='deleteHolder' id='deleteHolder_"+shapeID+"'>"+deleteText+"</div></td></tr>";description+="<tr>";description+="<td style='font-weight: bold; font-size: 12px'>"+descriptionText+"<br/><textarea row='5' class='myLocDescription'"+disableInput+" id='myLocDescription_"+shapeID+"' type='text' >"+des+"</textarea></td>";description+="</tr>";if(!isCurrMapFriends){description+="<tr><td align='right'><img alt='Done' src='"+images+"doneButton.gif' style='align: right; cursor: hand' ";description+="onclick='PersistenceManager.SaveMapLocation(\""+locationID+'","'+currMapID+'",'+latlong.Latitude+","+latlong.Longitude+',"'+shapeID+'", "'+iconURL+"\");' /></td></tr>"}description+="</table>";return description}function ShowSelectCustomPins(locationID,shapeID,title,description,lat,lon,lastUpdated,iconURL){var pushpin=mapManager.Map.GetShapeByID(shapeID);var customPinContent="";customPinContent+="<div style='float: left; height: 164px; width: 60px; padding: 10px'>";customPinContent+="<img style='width: 45px; height: 45px; border:1px solid black;' id='customStarIcon' src='"+iconURL+"'/><br/>";customPinContent+="<div class='customizeButtonText' onclick='PersistenceManager.SaveIconSelection(\""+locationID+"\")'>"+addIconText+"</div></br>";customPinContent+="<div class='customizeButtonText' onclick='restorePushPin(\""+locationID+'","'+shapeID+'","'+title+'","'+description+'",'+lat+","+lon+',"'+lastUpdated+'","'+iconURL+"\")'>&lt;"+backText+"</div>";customPinContent+="</div>";customPinContent+="<div style='padding-top: 5px'>";var i=0;for(i=0;i<customIconList.length;i++){var iconURL="Images/CustomIcons/"+customIconList[i];customPinContent+="<img class='customIcon' src='"+iconURL+"' onclick='SelectIcon(\""+iconURL+"\")'/>"}customPinContent+="</div>";pushpin.SetDescription(customPinContent);HideCurrentEro(null);activeEro=new PushpinERO(shapeID,mapManager.Map);activeEro.Show()}function restorePushPin(locationID,shapeID,title,des,lat,lon,lastUpdated,iconURL){HideCurrentEro(null);title=title.replace("%27","'").replace("%28",'"');des=des.replace("%27","'").replace("%28",'"');var shape=mapManager.Map.GetShapeByID(shapeID);var locationContent={title:title,description:des,latitude:lat,longitude:lon,lastUpdated:lastUpdated,shapeID:shapeID,iconURL:iconURL};var des=SetMyLocationDescription(locationID,locationContent);shape.SetDescription(des);activeEro=new PushpinERO(shape.GetID(),mapManager.Map);activeEro.Show()}function SelectIcon(iconURL){var starIcon=document.getElementById("customStarIcon");starIcon.src=iconURL}function HideCurrentEro(e){if(activeEro!=null&&mapChange==false){activeEro.Hide();activeEro=null}return true}function ShowCurrentEro(e){if(mapChange==true&&activeEro!=null){mapChange=false;activeEro.Show();setTimeout(function(){mapManager.Map.AttachEvent("onstartpan",HideCurrentEro);mapManager.Map.AttachEvent("onclick",MouseHandler)},300)}return true}function GetVisitedIconClass(pushpinClass){switch(pushpinClass){case"pin_wf":return"pin_v_wf";case"pin_nonad":return"pin_v_nonad";case"clusterPin100":return"clusterPin100_v";case"clusterPin101":return"clusterPin101_v";default:return pushpinClass}}function PushpinERO(shapeId,mapInstance){if(shapeId==null||mapInstance==null){return}this.BaseMap=mapInstance;this.ShapeId=shapeId;this.Shape=mapInstance.GetShapeByID(this.ShapeId);this.Type=ClientCache.Retrieve("pane_"+paneNumber+"_type");this.CSSPin="";if(this.Shape._customIcon!=undefined){var curCustomIconString=this.Shape._customIcon;if(debug){console.log("PushpinERO: curCustomIconString: %s",curCustomIconString)}var curCustomIconClass=this.Shape._customIcon.match(/class=(["'])?([\w\s]*)\1/)[2];if(debug){console.log("PushpinERO: curCustomIconClass: %s",curCustomIconClass)}if(curCustomIconClass.match(/^pin_wf|pin_v_wf/i)!=null){this.Shape.SetCustomIcon("<div class='ypgMapMarker'></div><div class="+GetVisitedIconClass(curCustomIconClass)+"></div>");this.CSSPin=curCustomIconClass;if(debug){console.log("PushpinERO: Just added ypgMapMarker around curCustomIconClass: %s",curCustomIconClass)}}else{if(curCustomIconClass.match(/pin_nonad|pin_v_nonad/i)!=null){this.Shape.SetCustomIcon("<div class='ypgMapMarker ypgMapMarker4NonAdPin'></div><div class="+GetVisitedIconClass(curCustomIconClass)+"></div>");this.CSSPin=curCustomIconClass;if(debug){console.log("PushpinERO: Just added ypgMapMarker around curCustomIconClass: %s",curCustomIconClass)}}else{if(curCustomIconClass.match(/clusterPin100/i)!=null){this.Shape.SetCustomIcon("<div class="+GetVisitedIconClass(curCustomIconClass)+"></div>");this.Type="poiCluster";if(debug){console.log("PushpinERO: this.Type: %s",this.Type)}}}}}if(this.Shape.GetTitle()=="cluster"){this.Type="poiCluster"}else{if(this.Shape.GetTitle()=="poi"){this.Type="poi"}else{if(this.Type=="dd"){var turnpointIds=ClientCache.Retrieve("pane_"+paneNumber+"_turnpointIds").split("|");this.prevShapeId=this.Shape.GetID();this.nextShapeId=this.Shape.GetID();for(var i=0;i<turnpointIds.length;i++){if(turnpointIds[i]==this.Shape.GetID()){if(i>0){this.prevShapeId=turnpointIds[i-1]}if(i<(turnpointIds.length-1)){this.nextShapeId=turnpointIds[i+1]}}}}}}if(debug){console.log("PushpinERO: this.Type: %s",this.Type)}this.Elements=new Array();this.Size=EroSize.Small;this.Show=function(){if(mapChange){return}var pixel=mapInstance.LatLongToPixel(this.Shape.GetIconAnchor());if(this.Type=="poiCluster"){pixel.x+=23;pixel.y+=18}else{if(this.Type=="poi"){pixel.x+=10}}centerX=(mapManager.Map.GetWidth()/2);centerY=(mapManager.Map.GetHeight()/2);if((pixel.x<centerX)&&(pixel.y<centerY)){topLeftX=Math.round(pixel.x)+28;topLeftY=Math.round(pixel.y)+50;drawLeft=false;drawAbove=false}else{if((pixel.x>=centerX)&&(pixel.y<=centerY)){topLeftX=Math.round(pixel.x)-435;topLeftY=Math.round(pixel.y)+50;drawLeft=true;drawAbove=false}else{if((pixel.x<centerX)&&(pixel.y>centerY)){topLeftX=Math.round(pixel.x)+28;topLeftY=Math.round(pixel.y)-150;drawLeft=false;drawAbove=true}else{if((pixel.x>=centerX)&&(pixel.y>=centerY)){topLeftX=Math.round(pixel.x)-435;topLeftY=Math.round(pixel.y)-150;drawLeft=true;drawAbove=true}}}}if(debug){console.log("PushpinERO.Show(): pixel.x:%d Original[topLeftX:%d + contentTop:%d = %d] Applying:containerStyleTop:%d",pixel.x,topLeftX,contentTop,topLeftY+contentTop,containerStyleTop)}var contentTop=0;var footerTop=0;var description=this.Shape.GetDescription();var imKey=InfoBoxManager.StripSpan(description);if(debug){console.log("PushpinERO.Show(): imKey:",imKey)}if(InfoBoxManager.IsFormattedKey(imKey)){description=InfoBoxManager.GetDescription(imKey);if(debug){console.log("PushpinERO.Show(): Retrieved description because imKey is valid: %s",imKey)}}var title=this.Shape.GetTitle();if(debug){console.log("PushpinERO.Show(): description.substring():%s",description.substring(0,5))}if(description.substring(0,3)=="(S)"){this.Size=EroSize.Small;description=description.substring(3,description.length);footerTop=resources.EroFooterTopLarge}else{if(description.substring(0,3)=="(B)"){this.Size=EroSize.Large;description=description.substring(3,description.length);footerTop=resources.EroFooterTopSmall}else{if(description.substring(0,5)=="(DDL)"){this.Type="ddl";description=description.substring(5,description.length);description=description.replace(/mapManager.ShowInfoBoxp/g,'ShowNewEro("'+this.prevShapeId+'")')}else{if(description.substring(0,5)=="(DDF)"){this.Type="ddf";description=description.substring(5,description.length);description=description.replace(/mapManager.ShowInfoBoxn/g,'ShowNewEro("'+this.nextShapeId+'")')}else{if(description.substring(0,5)=="(DDI)"){this.Type="ddi";description=description.substring(5,description.length);description=description.replace(/mapManager.ShowInfoBoxp/g,'ShowNewEro("'+this.prevShapeId+'")');description=description.replace(/mapManager.ShowInfoBoxn/g,'ShowNewEro("'+this.nextShapeId+'")')}}}}}if(this.Size==EroSize.Small){contentTop=-137}else{if(this.Size==EroSize.Large){if(drawAbove==true){contentTop=-255}else{contentTop=-137}}}if(debug){console.log("PushpinERO.Show(): contentTop: %d",contentTop)}if(this.Type=="ddf"){contentTop+=113}else{if(this.Type=="ddl"){contentTop+=13}}var containerStyleTop=topLeftY+contentTop<0?0:topLeftY+contentTop;if(debug){console.log("PushpinERO.Show(): pixel.y:%d Original[topLeftY:%d + contentTop:%d = %d] Applying:containerStyleTop:%d",pixel.y,topLeftY,contentTop,topLeftY+contentTop,containerStyleTop)}var container=document.createElement("div");container.id=shapeId+"c";container.style.top=containerStyleTop+"px";container.style.left=topLeftX+"px";if(this.Type=="poiCluster"){container.style.width="364px";container.style.backgroundColor="White";container.style.border="solid 1px #999999";container.style.MozBorderRadius="10px";container.style.WebkitBorderRadius="10px"}if(this.Type=="ddf"||this.Type=="ddl"){container.style.width="364px";container.style.backgroundColor="#66676a"}else{if(this.Type=="ddi"){container.style.width="364px";container.style.backgroundColor="#66676a"}else{}}if(title!=null&&this.Type!="poi"){var titleDiv=document.createElement("div");titleDiv.id=shapeId+"t";titleDiv.innerHTML=title;container.appendChild(titleDiv)}if(description!=null){var descriptionDiv=document.createElement("div");descriptionDiv.className="InfoBox";descriptionDiv.id=shapeId+"d";container.appendChild(descriptionDiv);var closeLine='<div class="ypgMMBClose"><a class="ypSpLayerFunctions ypSmClose" href="#" onclick="javascript:activeEro.Hide();return false;" rel="nofollow">&nbsp;</a></div>';descriptionDiv.innerHTML=closeLine+description}if(this.Type=="ddf"||this.Type=="ddi"||this.Type=="ddl"){var footer=document.createElement("div");footer.id=shapeId+"f";footer.innerHTML="<table><tr style='height:5px;'><td style='width:5px; background:url(\"Images/GDD_InfoBox/lowerLeftCorner.png\");'></td><td style='width:354px; background:#66676a;'></td><td style='width:5px; background: url(\"Images/GDD_InfoBox/lowerRightCorner.png\") no-repeat 0% 100%;'></td></tr></table>";container.appendChild(footer)}else{var footer=document.createElement("img");footer.id=shapeId+"f";footer.src="Images/PopupFooter.gif";if(this.Size==EroSize.Large){if(drawAbove==true){footer.style.top=topLeftY+92+footerTop+(0-((this.Type=="poiCluster"||this.Type=="poi")?0:30))+"px"}else{footer.style.top=topLeftY+210+footerTop+(0-((this.Type=="poiCluster"||this.Type=="poi")?0:30))+"px"}}else{footer.style.top=topLeftY+63+footerTop+(0-((this.Type=="poiCluster"||this.Type=="poi")?0:30))+"px"}footer.style.left=topLeftX+"px";this.Elements.push(footer)}this.Elements.push(container);for(var i=0;i<this.Elements.length;i++){mapInstance.AddControl(this.Elements[i])}this.Shape.SetZIndex(zIndex);zIndex++;if(debug){console.log("PushpinERO.Show(): End of method.  zIndex",zIndex)}};this.Hide=function(){try{if(this.CSSPin.length>0){this.Shape.SetCustomIcon("<div class="+GetVisitedIconClass(this.CSSPin)+"></div>");if(debug){console.log("PushpinERO.Hide(): reset CustomIcon value: %s",this.CSSPin)}}for(var i=0;i<this.Elements.length;i++){mapInstance.DeleteControl(document.getElementById(this.Elements[i].id))}}catch(e){}};this.IsOutside=function(x,y){var result=false;var center=mapInstance.LatLongToPixel(this.Shape.GetIconAnchor());var height=0;if(this.Size==EroSize.Small){height=138}else{if(this.Size==EroSize.Large){height=334}}if(x<center.x-30||(x<center.x+15&&y<center.y-30)||x>center.x+368||y<center.y-height||y>center.y+2){result=true}return result}}function ShowNewEro(shapeID){activeEro.Hide();activeEro=null;var center=mapManager.Map.GetShapeByID(shapeID).GetPoints()[0];POIManager.HidePOIs();mapManager.Map.SetCenterAndZoom(center,5);mapManager.Map.SetCenterAndZoom(center,13);POIManager.RefreshPOIs();activeEro=new PushpinERO(shapeID,mapManager.Map);activeEro.Show()};
