function HotArea(aa,id){this.rectangle=aa;this.id=id;}
function Rectangle(ba,ca,da,ea){this.top=ba;this.left=ca;this.bottom=da;this.right=ea;}
function SpatialPoint_MapClient(fa){this.themeColors=[];this.zoomLevels=11;this.host=null;this.handler="AtlasMapRequestHandler.ashx";this.MODE_NONE=-1;this.MODE_NAVIGATE=0;this.MODE_QUERY=1;this.centroid=null;this.defaultCentroid=null;this.dimensions={width:0,height:0};this.zoomDistance=null;this.zoomLevel=null;this.defaultZoomLevel=null;this.icon=null;this.icons=null;this.annotationTheme=null;this.streetsAttributes=null;this.validationKey=null;this.imageMapElements=null;this.hideIcons=false;this.hideAnnotationTheme=false;this.state=null;this.control=null;this.mapImage=null;this.onServerResponse=null;this.onViewPortChanged=null;this.onQueryResponse=null;this.onGeocodeResponse=null;this.onToolTipResponse=null;this.suppressOnViewPortChangedEvent=false;this.onHotAreaClick=null;var ga=false;this.toolTipCoords=null;this.toolTipControl=null;this.toolTipOffset={x:10,y:10};this.toolTipMaxDisplayOffset=24;this.toolTipThemeIndex=0;this.toolTipFieldIndex=1;this.shapeInput=null;this.keepFullState=false;this.panAreas=false;this.panningAnchor=null;var ha=null;var ia=null;this.getZoomEnabled=function(){return ia;};this.getToolTips=function(){return ga;};this.suppressToolTips=function(ja){if((ja===false)&&(ga===true)){this.control.onmousemove=this.toolTipMouseMove;this.control.onmouseout=this.toolTipMouseOut;}
else{this.control.onmousemove=null;this.control.onmouseout=null;this.hideToolTip();}};this.setToolTips=function(ka){ga=ka;if(ka&&!this.toolTipControl){this.createToolTipControl();}
this.suppressToolTips(!ga);};this.getMode=function(){return ha;};this.applyMode=function(){this.control.scriptActive=false;this.mapImage.onmousedown=this.control.onmousedown=null;this.mapImage.onclick=this.control.onclick=null;switch(ha){case this.MODE_NAVIGATE:if(ia==true){this.mapImage.onmousedown=this.control.onmousedown=this.shapeInput.mouseDown;}
else{this.control.onclick=this.click;}
break;case this.MODE_QUERY:this.control.onclick=this.click;break;}};this.setMode=function(la){this.mapImage.onmousedown=this.control.onmousedown=null;this.mapImage.onclick=this.control.onclick=null;switch(la){case this.MODE_NONE:this.control.style.cursor="";break;case this.MODE_NAVIGATE:if(ia==true){this.shapeInput.setShapeType(this.shapeInput.SHAPE_RECTANGLE);this.mapImage.style.cursor=this.control.style.cursor="url('images/cursors/navigate.cur'), crosshair";this.mapImage.onmousedown=this.control.onmousedown=this.shapeInput.mouseDown;}
else{this.mapImage.style.cursor=this.control.style.cursor="hand";this.control.onclick=this.click;}
break;case this.MODE_QUERY:this.mapImage.style.cursor=this.control.style.cursor="url('images/cursors/info.cur'), help";this.control.onclick=this.click;break;default:alert("Invalid Mode");return;}
ha=la;};if(fa){this.name=fa.name;if(!fa.name){throw("Missing required property: name. The global name of this object instance.");}
if(!fa.controlId){throw("Missing required property: controlId.  The id of the DIV element to attach the map to.");}
this.control=document.getElementById(fa.controlId);if(!this.control){throw("Cannot find DIV element with id of '"+fa.controlId+"'");}
this.control.className="mapArea";this.control.controller=this;if(fa.toolTipControl){this.toolTipControl=fa.toolTipControl;this.toolTipControl.contoller=this;}
if(fa.toolTips){this.setToolTips(fa.toolTips);}
this.dimensions={width:this.getInt(this.control.style.width),height:this.getInt(this.control.style.height)};if(fa.host){this.host=fa.host;}
if(fa.handler){this.handler=fa.handler;}
this.defaultZoomLevel=this.zoomLevel=fa.zoomLevel;if(fa.zoomDistance){this.zoomDistance=fa.zoomDistance;}
if(fa.centroid){this.defaultCentroid=this.centroid=fa.centroid;}
if(fa.icon){this.icon=fa.icon;}
if(fa.icons){this.icons=fa.icons;}
if(fa.annotationTheme){this.annotationTheme=fa.annotationTheme;}
if(fa.streetsAttributes){this.streetsAttributes=fa.streetsAttributes;}
if(fa.validationKey){this.validationKey=fa.validationKey;}
if(fa.onServerResponse){this.onServerResponse=fa.onServerResponse;}
if(fa.onViewPortChanged){this.onViewPortChanged=fa.onViewPortChanged;}
if(fa.onQueryResponse){this.onQueryResponse=fa.onQueryResponse;}
if(fa.onGeocodeResponse){this.onGeocodeResponse=fa.onGeocodeResponse;}
if(fa.onToolTipResponse){this.onToolTipResponse=fa.onToolTipResponse;}
if(fa.onHotAreaClick){this.onHotAreaClick=fa.onHotAreaClick;}
if(fa.panAreas){this.panAreas=fa.panAreas;}
if(fa.zoomEnabled){ia=fa.zoomEnabled;}
else{ia=false;}
if(fa.hiddenThemes){this.hiddenThemes=fa.hiddenThemes;}
if(fa.displayThemes&&fa.displayThemes.length&&fa.displayThemes.length>0){this.displayThemes=fa.displayThemes;}
if(fa.zoomLevels){this.zoomLevels=fa.zoomLevels;}
if(fa.state){this.state=fa.state;}
onprogress=null;if(fa.onProgress){onprogress=fa.onProgress;}
this.ajaxClient=new AjaxClient(function(ma){var na=1;eval(ma.responseText);},onprogress);this.ajaxClientToolTips=new AjaxClient(function(oa){eval(oa.responseText);},null);var pa=this.createMapImage(fa.initialMapImageUrl);this.mapImage=this.control.appendChild(pa);if(this.panAreas==true){this.arrangePanAreas();}
var qa=new Object();qa.owner=this;qa.shapeParent=this.control;qa.srcEventId=this.mapImage.id;qa.onEndShapeInput=this.endShapeInput;this.control.shapeInput=this.shapeInput=this.mapImage.shapeInput=new SpatialPoint_ShapeInput(qa);this.mapImage.oncontextmenu=this.shapeInput.oncontextmenu=this.control.oncontextmenu=this.contextmenu;if(fa.mode){this.setMode(fa.mode);}
else{this.setMode(this.MODE_NAVIGATE);}}
else{alert("Can't do much without initialization parameters");}}
SpatialPoint_MapClient.prototype.contextmenu=function(ra){var e=ra||window.event;e.cancelBubble=true;return false;}
SpatialPoint_MapClient.prototype.startTrackPanning=function(sa){var e=sa||window.event;this.suppressToolTips(true);this.panningAnchor=this.getMouseScreenPosition(e);}
SpatialPoint_MapClient.prototype.endTrackPanning=function(ta){this.panningAnchor=null;this.suppressToolTips(false);}
SpatialPoint_MapClient.prototype.mouseMove=function(ua){var e=ua||window.event;var xy=this.getMouseScreenPosition(e);this.mapImage.style.pixelLeft=xy.x-this.panningAnchor.x;this.mapImage.style.pixelTop=xy.y-this.panningAnchor.y;}
SpatialPoint_MapClient.prototype.createToolTipControl=function(){var va=document.createElement("span");va.id=this.name+"_SpatialPoint_Map_Image_ToolTip";va.controller=this;var wa=va.style;wa.position="absolute";wa.zIndex="1000";wa.overflow="visible";wa.visibility="hidden";wa.border="1px solid black";wa.fontSize="xx-small";wa.background="LightYellow";wa.padding="1px";this.toolTipControl=this.control.appendChild(va);}
SpatialPoint_MapClient.prototype.toolTipMouseMove=function(xa){if(!this.controller.getToolTips()){return;}
var e=xa||window.event;var ya=e.target||e.srcElement;if(ya.tagName!='INPUT'){return;}
var xy=this.controller.getMouseClientPosition(e);if(this.controller.toolTipControl.style.visibility=="visible"&&this.controller.toolTipCoords&&(this.controller.toolTipControl.innerHTML.indexOf('spMap.driveTo')>=0)&&((Math.abs(this.controller.toolTipCoords.x-xy.x)<this.controller.toolTipMaxDisplayOffset)&&(Math.abs(this.controller.toolTipCoords.y-xy.y))<this.controller.toolTipMaxDisplayOffset)){return;}
else if(this.controller.toolTipCoords&&((this.controller.toolTipCoords.x==xy.x)&&(this.controller.toolTipCoords.y==xy.y))){return;}
this.controller.toolTipCoords=xy;var za=this.controller.getHotArea(xy);if(za!=null){this.controller.setToolTip(xy.x,xy.y,za.id);return;}
var Aa=this.controller.name+".toolTipMouseCheck("+xy.x+","+xy.y+")";window.setTimeout(Aa,300);this.controller.hideToolTip();}
SpatialPoint_MapClient.prototype.toolTipMouseOut=function(Ba){var e=Ba||window.event;var Ca=e.toElement||e.currentTarget;if(Ca==null||Ca.tagName=='TD'){if(this.controller.getToolTips()){this.controller.toolTipCoords=null;this.controller.hideToolTip();}}}
SpatialPoint_MapClient.prototype.hideToolTip=function(){if(this.toolTipControl){if(this.toolTipControl.style.visibility=="visible"){this.toolTipControl.style.visibility="hidden";if(this.control.scriptActive==true){this.applyMode(this.mode);}}}}
SpatialPoint_MapClient.prototype.toolTipMouseCheck=function(x,y){if(!x||!y||!this.toolTipCoords){return;}
if((this.toolTipCoords.x==x)&&(this.toolTipCoords.y==y)){this.getToolTip(this.toolTipCoords,this.toolTipThemeIndex,this.toolTipFieldIndex);}}
SpatialPoint_MapClient.prototype.getToolTip=function(Da,Ea,Fa){var Ga=[];Ga.push("TT="+encodeURIComponent(Da.x+":"+Da.y+":"+Ea+":"+Fa));this.ajaxClientToolTips.addRequest(this.host+this.handler+"?"+this.getViewPortParameters(Ga),null);}
SpatialPoint_MapClient.prototype.setToolTip=function(x,y,Ha,Ia){if(!this.getToolTips()||!this.toolTipCoords||this.toolTipCoords.x!=x||this.toolTipCoords.y!=y){return;}
deselect();if(Ha.charAt(0)=='"'){Ha=Ha.substr(1,Ha.length-2);}
this.toolTipControl.innerHTML=Ha;if((x+this.toolTipOffset.x+this.toolTipControl.offsetWidth)<this.dimensions.width){this.toolTipControl.style.left=(x+this.toolTipOffset.x)+"px";}
else{this.toolTipControl.style.left=(x-this.toolTipOffset.x-this.toolTipControl.offsetWidth)+"px";}
if((y+this.toolTipOffset.y+this.toolTipControl.offsetHeight)<this.dimensions.height){this.toolTipControl.style.top=(y+this.toolTipOffset.y)+"px";}
else{this.toolTipControl.style.top=(y-this.toolTipOffset.y-this.toolTipControl.offsetHeight)+"px";}
this.toolTipControl.style.visibility="visible";this.toolTipControl.style.cursor="url('images/cursors/select.cur'), pointer;";if(Ia){if(document.all){this.control.onmousedown=function(){eval(Ia);};}
else{this.control.onmousedown=null;this.mapImage.onmousedown=function(){eval(Ia);};}
this.control.scriptActive=true;}
else if(this.control.scriptActive==true){this.applyMode(this.mode);}}
SpatialPoint_MapClient.prototype.getInt=function(Ja){return parseInt(Ja.substr(0,Ja.length-2));}
SpatialPoint_MapClient.prototype.createMapImage=function(Ka){var La;if(this.getZoomEnabled()==true){La=document.createElement("input");La.type="image";}
else{La=document.createElement("img");}
La.disabled=(window.navigate);La.name=La.id=this.name+"_SpatialPoint_Map_Image"+this.ajaxClient.getTimeStamp();if(Ka){La.src=Ka;}
La.style.position="absolute";La.style.zIndex="10";La.style.width=this.dimensions.width;La.style.height=this.dimensions.height;La.controller=this;return La;}
SpatialPoint_MapClient.prototype.getBaseParameters=function(Ma){var Na=Ma||new Array();Na.push("T="+this.name);if(this.validationKey){Na.push("VK="+this.validationKey);}
var Oa="";for(var i=0;i<Na.length;i++){Oa+=Na[i]+"&";}
Oa+=this.ajaxClient.getTimeStamp();return Oa;}
SpatialPoint_MapClient.prototype.getViewPortParameters=function(Pa){var Qa=Pa||new Array();if(this.centroid!=null){Qa.push("C="+this.centroid);}
if(this.zoomDistance){Qa.push("ZD="+this.zoomDistance);}
else{Qa.push("Z="+this.zoomLevel);}
Qa.push("D="+this.dimensions.width+":"+this.dimensions.height);if(this.displayThemes&&this.displayThemes.length>0){var Ra="";for(var i=0;i<this.displayThemes.length;i++){Ra+=this.displayThemes[i];if(i<this.displayThemes.length-1){Ra+=";";}}
Qa.push("DT="+Ra);}
else if(this.hiddenThemes&&this.hiddenThemes.length>0){var Ra="";for(var i=0;i<this.hiddenThemes.length;i++){Ra+=this.hiddenThemes[i];if(i<this.hiddenThemes.length-1){Ra+=";";}}
Qa.push("HT="+Ra);}
var Sa=this.getBaseParameters(null)+"&";for(var i=0;i<Qa.length;i++){Sa+=Qa[i]+"&";}
return Sa;}
SpatialPoint_MapClient.prototype.getParameters=function(Ta){var Ua=Ta||new Array();if(this.state!=null){Ua.push("I="+this.state);}
if(this.streetsAttributes!=null){Ua.push("SA="+this.streetsAttributes.fontSize+";"+this.streetsAttributes.mapStyle+";"+this.streetsAttributes.position);}
if(this.icon!=null){var Va;if(this.icon.coordinates.longitude){Va=this.icon.coordinates.longitude+","+this.icon.coordinates.latitude+";";}
else{Va=this.icon.coordinates+";";}
Va+=this.icon.source+";"+this.icon.name+";"+this.icon.label;Ua.push("ICO="+Va);}
if(!this.hideIcons){if(this.icons!=null){Ua.push("ICOS="+this.icons);}}
if(!this.hideAnnotationTheme){if(this.annotationTheme!=null){Ua.push("AT="+this.annotationTheme);}}
if(this.themeColors!=null){Ua.push("CTC="+this.themeColors);}
var Wa=this.getViewPortParameters(null)+"&";for(var i=0;i<Ua.length;i++){Wa+=Ua[i]+"&";}
return Wa;}
SpatialPoint_MapClient.prototype.getUrl=function(Xa){if(this.keepFullState==true){var Ya=null;if(this.state==null){Ya="STATE=";}
else{Ya="STATE="+encodeURIComponent(this.state)+"\n";alert(Ya);}
Ya+="&"+this.getParameters(Xa);alert(Ya);return[this.host+this.handler,Ya];}
else{return "?"+this.getParameters(Xa);}}
SpatialPoint_MapClient.prototype.getRequest=function(Za){return[this.host+this.handler,this.getParameters(Za)];}
SpatialPoint_MapClient.prototype.refresh=function(){this.ajaxClient.addRequest(this.host+this.handler,this.getParameters());}
SpatialPoint_MapClient.prototype.paintMap=function(){this.paint(this.getUrl());}
SpatialPoint_MapClient.prototype.getMap=function(){this.refresh();}
SpatialPoint_MapClient.prototype.refreshWithParams=function($a){this.ajaxClient.addRequest(this.getRequest($a));}
SpatialPoint_MapClient.prototype.getMapWithParams=function(ab){this.refreshWithParams(ab);}
SpatialPoint_MapClient.prototype.setMapImageUrl=function(bb){this.mapImage.src=bb;if(!this.suppressOnViewPortChangedEvent&&this.onViewPortChanged){this.onViewPortChanged();}
this.suppressOnViewPortChangedEvent=false;}
SpatialPoint_MapClient.prototype.paint=function(cb){if((this.mapImage.style.pixelLeft!=0)||(this.mapImage.style.pixelTop!=0)){var db=this.createMapImage(this.host+this.imageHandler+cb);var eb=this.control.appendChild(db);window.setTimeout(this.name+".control.removeChild(document.getElementById('"+this.mapImage.id+"'))",1000);this.mapImage=eb;}
else{this.mapImage.src=this.host+this.imageHandler+cb;}
if(!this.suppressOnViewPortChangedEvent&&this.onViewPortChanged){this.onViewPortChanged();}
this.suppressOnViewPortChangedEvent=false;}
SpatialPoint_MapClient.prototype.click=function(fb){var e=fb||window.event;var gb=this.controller.getMouseClientPosition(e);switch(this.controller.getMode()){case this.controller.MODE_NAVIGATE:if(this.controller.imageMapElements!=null){var hb=this.controller.getHotArea(this.shapeAnchor);if(hb!=null){this.controller.onHotAreaClick(hb);break;}}
this.controller.recenter(gb);break;case this.controller.MODE_QUERY:this.controller.query(gb);break;}
return false;}
SpatialPoint_MapClient.prototype.mousewheel=function(ib){var e=ib||window.event;if(e.wheelDelta>0){this.controller.zoomIn();}
else{this.controller.zoomOut();}}
SpatialPoint_MapClient.prototype.getFireFoxOffset=function(jb){var kb={x:0,y:0};while(jb.offsetParent){kb.x+=jb.offsetLeft;kb.y+=jb.offsetTop;jb=jb.offsetParent;}
return kb;}
SpatialPoint_MapClient.prototype.getMouseClientPosition=function(lb){var e=lb||window.event;var mb={x:0,y:0};if(e.offsetX){mb.x=e.offsetX;mb.y=e.offsetY;}
else if(e.layerX){mb.x=e.layerX;mb.y=e.layerY;}
return mb;}
SpatialPoint_MapClient.prototype.getMouseScreenPosition=function(nb){var e=nb||window.event;var ob={x:0,y:0};if(e.pageX){ob.x=e.pageX;ob.y=e.pageY;}
else{if(e.clientX){ob.x=e.clientX+document.body.scrollLeft;ob.y=e.clientY+document.body.scrollTop;}}
return ob;}
SpatialPoint_MapClient.prototype.recenter=function(pb){var qb="Recenter="+pb.x+":"+pb.y;this.ajaxClient.addRequest(this.host+this.handler,this.getParameters([qb]));}
SpatialPoint_MapClient.prototype.query=function(rb){var sb="Query="+rb.x+":"+rb.y+":1";this.ajaxClient.addRequest(this.host+this.handler,this.getParameters([sb]));}
SpatialPoint_MapClient.prototype.pan=function(tb){this.ajaxClient.addRequest(this.host+this.handler,this.getParameters(["Pan="+tb]));}
SpatialPoint_MapClient.prototype.zoomIn=function(){this.setZoomLevel(this.zoomLevel+1);}
SpatialPoint_MapClient.prototype.zoomOut=function(){if(this.zoomLevel>=0){this.setZoomLevel(this.zoomLevel-1);}}
SpatialPoint_MapClient.prototype.zoomExtents=function(){this.ajaxClient.addRequest(this.host+this.handler,this.getParameters(['VPBAT=true']));}
SpatialPoint_MapClient.prototype.SetThemeColor=function(ub,vb){this.themeColors[ub]=vb;this.getMap();}
SpatialPoint_MapClient.prototype.setDefaultZoom=function(){this.suppressOnViewPortChangedEvent=false;this.centroid=this.defaultCentroid;this.setZoomLevel(this.defaultZoomLevel);}
SpatialPoint_MapClient.prototype.setZoomLevel=function(wb){if((wb>=0)&&(wb<this.zoomLevels)){this.zoomLevel=wb;delete this.zoomDistance;this.getMap();}
else{alert("ZoomLevel "+wb+" is out of range");}}
SpatialPoint_MapClient.prototype.setCentroid=function(xb,yb){if(xb){this.suppressOnViewPortChangedEvent=yb;this.centroid=xb;this.getMap();}}
SpatialPoint_MapClient.prototype._setDimensions=function(zb){this.dimensions=zb;if(this.mapImage.style.width!=zb.width){this.control.style.width=this.mapImage.style.width=zb.width+"px";}
if(this.mapImage.style.height!=zb.height){this.control.style.height=this.mapImage.style.height=zb.height+"px";}
if(this.panAreas){this.arrangePanAreas();}}
SpatialPoint_MapClient.prototype.setDimensions=function(Ab){this.dimensions=Ab;this.refresh();}
SpatialPoint_MapClient.prototype.getPanElement=function(id){var Bb=this.control.id+"_"+id;var Cb=document.getElementById(Bb);if(!Cb){Cb=document.createElement("div");Cb.className="panControl";Cb.id=Bb;Cb.map=this;Cb.onclick=function(Db){this.map.pan(id);this.map.cancelEvent(Db);};Cb.onmousemove=Cb.onmouseup=Cb.onmousedown=this.cancelEvent;Cb.style.backgroundColor="transparent";Cb.innerHTML="<img src='images/transparent-spacer.gif' width='100%' height='100%'>";}
return Cb;}
SpatialPoint_MapClient.prototype.arrangePanAreas=function(){var Eb=20;var Fb=0;var Gb=parseInt(this.dimensions.width)+Fb;var Hb=parseInt(this.dimensions.height)+Fb;var Ib=this.getPanElement("North");Ib.style.cursor="url('images/cursors/MapPanUp.cur'), pointer";Ib.style.left=Eb+"px";Ib.style.top=0+"px";Ib.style.width=(Gb-(Eb*2))+"px";Ib.style.height=Eb+"px";this.control.appendChild(Ib);Ib=this.getPanElement("South");Ib.style.cursor="url('images/cursors/MapPanDown.cur'), pointer";Ib.style.left=Eb+"px";Ib.style.top=(Hb-Eb)+"px";Ib.style.width=(Gb-(Eb*2))+"px";Ib.style.height=Eb+"px";this.control.appendChild(Ib);Ib=this.getPanElement("East");Ib.style.cursor="url('images/cursors/MapPanRight.cur'), pointer";Ib.style.left=(Gb-Eb)+"px";Ib.style.top=Eb+"px";Ib.style.width=Eb+"px";Ib.style.height=(Hb-(Eb*2))+"px";this.control.appendChild(Ib);Ib=this.getPanElement("West");Ib.style.cursor="url('images/cursors/MapPanLeft.cur'), pointer";Ib.style.left=0+"px";Ib.style.top=Eb+"px";Ib.style.width=Eb+"px";Ib.style.height=(Hb-(Eb*2))+"px";this.control.appendChild(Ib);Ib=this.getPanElement("NorthWest");Ib.style.cursor="url('images/cursors/MapPanLeftUp.cur'), pointer";Ib.style.left=0+"px";Ib.style.top=0+"px";Ib.style.width=Eb+"px";Ib.style.height=Eb+"px";this.control.appendChild(Ib);Ib=this.getPanElement("NorthEast");Ib.style.cursor="url('images/cursors/MapPanRightUp.cur'), pointer";Ib.style.left=(Gb-Eb)+"px";Ib.style.top=0+"px";Ib.style.width=Eb+"px";Ib.style.height=Eb+"px";this.control.appendChild(Ib);Ib=this.getPanElement("SouthWest");Ib.style.cursor="url('images/cursors/MapPanLeftDown.cur'), pointer";Ib.style.left=0+"px";Ib.style.top=(Hb-Eb)+"px";Ib.style.width=Eb+"px";Ib.style.height=Eb+"px";this.control.appendChild(Ib);Ib=this.getPanElement("SouthEast");Ib.style.cursor="url('images/cursors/MapPanRightDown.cur'), pointer";Ib.style.left=(Gb-Eb)+"px";Ib.style.top=(Hb-Eb)+"px";Ib.style.width=Eb+"px";Ib.style.height=Eb+"px";this.control.appendChild(Ib);}
SpatialPoint_MapClient.prototype.cancelEvent=function(Jb){var e=Jb||window.event;if(e.stopPropagation){e.stopPropagation();}
else{e.cancelBubble=true;}}
SpatialPoint_MapClient.prototype.endShapeInput=function(Kb){var Lb=this.getOwner();var Mb=this.shape;switch(Lb.getMode()){case Lb.MODE_NAVIGATE:if(Lb.getInt(Mb.width)<2){if(Lb.imageMapElements!=null){var Nb=Lb.getHotArea(this.shapeAnchor);if(Nb!=null){Lb.onHotAreaClick(Nb);break;}}
Lb.recenter(this.shapeAnchor);}
else{Lb.zoomToRectangle(Lb.getInt(Mb.left),Lb.getInt(Mb.top),Lb.getInt(Mb.left)+Lb.getInt(Mb.width),Lb.getInt(Mb.top)+Lb.getInt(Mb.height));}
break;case Lb.MODE_QUERY:break;}
Lb.suppressToolTips(false);}
SpatialPoint_MapClient.prototype.zoomToRectangle=function(x1,y1,x2,y2){var Ob="ZoomRect="+x1+":"+y1+":"+x2+":"+y2;this.ajaxClient.addRequest(this.host+this.handler,this.getParameters([Ob]));}
SpatialPoint_MapClient.prototype.setHideIcons=function(Pb){this.hideIcons=Pb;this.refresh();}
SpatialPoint_MapClient.prototype.setHideAnnotationTheme=function(Qb){this.hideAnnotationTheme=Qb;this.refresh();}
SpatialPoint_MapClient.prototype.getIsInRectangle=function(Rb,Sb){return((Rb.left<=Sb.x)&&(Sb.x<=Rb.right)&&(Rb.top<=Sb.y)&&(Sb.y<=Rb.bottom));}
SpatialPoint_MapClient.prototype.getHotArea=function(Tb){if(this.imageMapElements&&(this.imageMapElements!=null)){for(var i=0;i<this.imageMapElements.length;i++){var Ub=this.imageMapElements[i];if(Ub&&(Ub!=null)){if(this.getIsInRectangle(Ub.rectangle,Tb)){return Ub;}}}}
return null;}
SpatialPoint_MapClient.prototype.setImageMapElements=function(Vb){this.imageMapElements=Vb;}
SpatialPoint_MapClient.prototype.setServerResponse=function(Wb){if(this.onServerResponse){this.onServerResponse(Wb);}
else{alert(Wb);}}
SpatialPoint_MapClient.prototype.setQueryResponse=function(Xb){if(this.onQueryResponse){this.onQueryResponse(Xb);}}
SpatialPoint_MapClient.prototype.setGeocodeResponse=function(Yb){if(this.onGeocodeResponse){this.onGeocodeResponse(Yb);}}
SpatialPoint_MapClient.prototype.setToolTipResponse=function(x,y,Zb,$b){if(this.onToolTipResponse){this.onToolTipResponse(x,y,Zb,$b);}
else{this.setToolTip(x,y,Zb,$b);}}
SpatialPoint_MapClient.prototype.geocode=function(ac){var bc="Geocode="+encodeURIComponent(ac.street+";"+ac.city+";"+ac.state+";"+ac.zip+";"+ac.country);this.ajaxClient.addRequest(this.host+this.handler+"?"+this.getBaseParameters([bc]));}
SpatialPoint_MapClient.prototype.driveTo=function(cc,dc,ec,fc,gc,hc,ic,jc,kc){var lc=new Object();lc.street=lc.city=lc.state=lc.zip=lc.country="";if(currentTab=='Address'){lc.street=trim(document.getElementById("addrStreet").value);lc.city=trim(document.getElementById("addrCity").value);lc.state=trim(document.getElementById("addrState").value);lc.zip=trim(document.getElementById("addrZIP").value);}
this.hideToolTip();var mc='DriveToStore.aspx?storeName='+cc+'&address1='+dc+'&city='+ec+'&state='+fc+'&zip='+gc+'&phone='+hc+'&storeId='+ic+'&latitude='+jc+'&longitude='+kc+'&startStreet='+lc.street+'&startCity='+lc.city+'&startState='+lc.state+'&startZip='+lc.zip;mc=mc.replace("#","%23");makewindow(mc,'directions','580','250','1');}