function __doPanZoom(_1,_2,_3,_4){
var _5=null;
try{
_5=eval(_1);
}
catch(ex){
}
if(_5==null){
return;
}
var _6=__getMapTools(_2);
if(_6==null){
return;
}
var _7=_6.GetZoom();
switch(_3){
case "ZoomFull":
_5.updateThumb(0);
break;
case "ZoomIn":
_5.updateThumb(_7+1);
break;
case "ZoomOut":
_5.updateThumb(_7-1);
break;
case "SetZoom":
_5.updateThumb(_4);
break;
}
_6[_3](_4);
}
function __UpdateAnimationLayer(_8,_9){
try{
var _a=_8.split("``");
if(_a[0]=="LAYER"){
var _b=__$(_9+"_animdiv");
__clearDiv(_b);
_b.innerHTML=_a[2];
__$(_9+"_animarg").value=_a[1];
}else{
var _c=__$(_9);
__clearDiv(_c);
_c.innerHTML=_a[1];
}
}
catch(e){
}
var _d=__getMapTools(_9);
if(!_d){
return;
}
if(_d.GetEnableAnimation()){
_d.RunAnimationTimer();
}
}
function __AspMapTools(){
this.ZOOMFULL=100;
this.PIXELPAN=101;
this.ZOOMIN=102;
this.ZOOMOUT=103;
this.SETZOOM=104;
this.CENTERAT=105;
this.SETSCALE=106;
this.CENTERANDZOOM=107;
this.CENTERANDSCALE=108;
this.mouseMoveHandler=null;
this.apiVar=null;
this.Add_MouseMove=function(_e){
this.mouseMoveHandler=_e;
};
this.Remove_MouseMove=function(_f){
this.mouseMoveHandler=null;
};
this.PanLeft=function(_10){
this.Pan(-this.MapWidth()*_10/100,0);
};
this.PanTop=function(_11){
this.Pan(0,-this.MapHeight()*_11/100);
};
this.PanRight=function(_12){
this.Pan(this.MapWidth()*_12/100,0);
};
this.PanBottom=function(_13){
this.Pan(0,this.MapHeight()*_13/100);
};
this.ZoomFull=function(){
this.ApiCall(this.ZOOMFULL);
};
this.ZoomIn=function(){
this.ApiCall(this.ZOOMIN);
};
this.ZoomOut=function(){
this.ApiCall(this.ZOOMOUT);
};
this.Pan=function(dx,dy){
this.ApiCallXY(this.PIXELPAN,"",dx,dy);
};
this.Refresh=function(){
this.Pan(0,0);
};
this.CenterAt=function(x,y){
this.ApiCallXY(this.CENTERAT,"",x,y);
};
this.CenterAndZoom=function(x,y,_1a){
this.ApiCallXY(this.CENTERANDZOOM,_1a,x,y);
};
this.CenterAndScale=function(x,y,_1d){
this.ApiCallXY(this.CENTERANDSCALE,_1d,x,y);
};
this.SetZoom=function(_1e){
if(this.GetZoom()!=_1e){
this.ApiCall(this.SETZOOM,_1e);
}
};
this.GetZoom=function(){
return this.GetInt("zoom");
};
this.GetZoomLevelCount=function(){
return this.GetInt("zlct");
};
this.GetMapScale=function(){
return this.GetDbl("scl");
};
this.SetMapScale=function(_1f){
this.ApiCall(this.SETSCALE,_1f);
};
this.ApiCall=function(cmd,arg){
this.ApiCallXY(cmd,arg,"","");
};
this.ApiCallXY=function(cmd,arg,x,y){
if(typeof (arg)=="undefined"){
arg="";
}
this.SetApiCall();
this.SubmitTool(cmd,x,y,arg);
};
this.ttimer=null;
this.OnLoad=function(){
if(this.ttimer==null&&this.GetEnableAnimation()){
this.RunAnimationTimer();
}
};
this.RunAnimationTimer=function(){
if(this.GetAnimationInterval()>0){
this.ttimer=setTimeout(__getMapToolsName(this.MapID)+".DoAnimation()",this.GetAnimationInterval());
}
};
this.DoAnimation=function(){
map_callback(this.UniqueID,__UpdateAnimationLayer,"ANIM",this.MapID);
};
this.RefreshAnimationLayer=function(){
if(!this.GetEnableAnimation()){
this.DoAnimation();
}
return false;
};
this.SetAnimationInterval=function(_26){
this.SetInt("animint",_26);
};
this.GetAnimationInterval=function(){
return this.GetInt("animint");
};
this.GetEnableAnimation=function(){
return this.GetBool("at");
};
this.SetEnableAnimation=function(_27){
if(_27!=this.GetEnableAnimation()){
this.SetBool("at",_27);
if(_27){
this.DoAnimation();
}else{
clearTimeout(this.ttimer);
this.ttimer=null;
}
}
return false;
};
this.hspc=0;
this.vspc=0;
this.MapCanvas=null;
this.MapID="";
this.UniqueID="";
this.ZoomBarVar="";
this.TOOL_ZOOMIN=1;
this.TOOL_ZOOMOUT=2;
this.TOOL_CENTER=3;
this.TOOL_PAN=4;
this.TOOL_INFO=5;
this.TOOL_DISTANCE=6;
this.TOOL_QINFO=7;
this.TOOL_POINT=8;
this.TOOL_LINE=9;
this.TOOL_POLYLINE=10;
this.TOOL_RECT=11;
this.TOOL_CIRCLE=12;
this.TOOL_POLYGON=13;
this.isDragging=false;
this.x1=0;
this.y1=0;
this.x2=0;
this.y2=0;
this.Xpts=null;
this.Ypts=null;
this.rleft=0;
this.rright=0;
this.rtop=0;
this.rbottom=0;
this.isOnMoveInited=false;
this.qInfoX=0;
this.qInfoY=0;
this.SetTool=function(_28){
this.CancelTool();
this.SetMapTool(_28);
this.UpdateCursor();
};
this.SetArgument=function(arg){
this.SetToolArgument(arg);
};
this.GetArgument=function(){
return this.GetToolArgument();
};
this.GetTool=function(){
return this.GetMapTool();
};
this.UpdateCursor=function(){
this.SetCursor(this.GetCursor());
};
this.StartTool=function(x,y){
this.MapCanvas.setStroke(this.LineWidth());
this.MapCanvas.setColor(this.LineColor());
switch(this.GetTool()){
case this.TOOL_POINT:
this.StartPoint(x,y);
break;
case this.TOOL_ZOOMIN:
case this.TOOL_RECT:
this.StartRect(x,y);
break;
case this.TOOL_LINE:
this.StartLine(x,y);
break;
case this.TOOL_PAN:
this.StartPan(x,y);
break;
case this.TOOL_CIRCLE:
this.StartPolyline(x,y);
this.StartCircle(x,y);
break;
case this.TOOL_DISTANCE:
case this.TOOL_POLYLINE:
this.StartPolyline(x,y);
break;
case this.TOOL_POLYGON:
this.StartPolygon(x,y);
break;
case this.TOOL_ZOOMOUT:
this.StartZoomOut(x,y);
break;
case this.TOOL_CENTER:
this.StartCenter(x,y);
break;
case this.TOOL_INFO:
this.StartInfo(x,y);
break;
case this.TOOL_QINFO:
this.StartQuickInfo(x,y);
break;
}
};
this.DragTool=function(x,y){
switch(this.GetTool()){
case this.TOOL_RECT:
case this.TOOL_ZOOMIN:
this.DrawRect(x,y);
break;
case this.TOOL_LINE:
this.DrawLine(x,y);
break;
case this.TOOL_PAN:
this.DrawPan(x,y);
break;
case this.TOOL_CIRCLE:
this.DrawDistance(x,y,false);
this.DrawCircle(x,y,false);
break;
case this.TOOL_POLYLINE:
this.DrawPolyline(x,y);
break;
case this.TOOL_DISTANCE:
this.DrawDistance(x,y,true);
break;
case this.TOOL_POLYGON:
this.DrawPolygon(x,y);
break;
case this.TOOL_INFO:
this.DrawInfo(x,y);
break;
case this.TOOL_QINFO:
this.DrawInfo(x,y);
break;
}
};
this.StopTool=function(x,y){
switch(this.GetTool()){
case this.TOOL_RECT:
this.StopRect();
break;
case this.TOOL_LINE:
this.StopLine();
break;
case this.TOOL_PAN:
this.StopPan();
break;
case this.TOOL_CIRCLE:
this.StopCircle();
this.StopDistance();
break;
case this.TOOL_ZOOMIN:
this.StopZoomIn();
break;
case this.TOOL_INFO:
this.StopInfo();
break;
case this.TOOL_QINFO:
this.StopQuickInfo();
break;
}
};
this.CancelTool=function(){
this.StopDrag();
this.MapCanvas.clear();
};
this.StopCompTool=function(){
switch(this.GetTool()){
case this.TOOL_POLYLINE:
this.StopPolyline();
break;
case this.TOOL_DISTANCE:
this.StopDistance();
break;
case this.TOOL_POLYGON:
this.StopPolygon();
break;
}
};
this.StartPoint=function(x,y){
this.MapCanvas.clear();
this.OnPointTool(x,y);
};
this.StartZoomOut=function(x,y){
this.MapCanvas.clear();
this.OnZoomOutTool(x,y);
};
this.StartCenter=function(x,y){
this.MapCanvas.clear();
this.OnCenterTool(x,y);
};
this.StartInfo=function(x,y){
this.MapCanvas.clear();
if(this.EnablePan()){
this.StartDrag(x,y);
}else{
this.OnInfoTool(x,y);
}
};
this.StartQuickInfo=function(x,y){
this.HideInfoWindow();
this.MapCanvas.clear();
if(this.EnablePan()){
this.StartDrag(x,y);
}else{
this.OnQuickInfoTool(x,y);
}
};
this.DrawInfo=function(x,y){
this.UpdateDrag(x,y);
if(Math.abs(this.x1-this.x2)>1||Math.abs(this.y1-this.y2)>1){
this.SetPanCursor();
this.DrawPan(x,y);
this.UpdateCursor();
}
};
this.StopInfo=function(){
this.StopDrag();
if(Math.abs(this.x1-this.x2)>1||Math.abs(this.y1-this.y2)>1){
this.SetOverrideTool(this.TOOL_PAN);
this.StopPan();
}else{
this.OnInfoTool(this.x1,this.y1);
}
};
this.StopQuickInfo=function(){
this.StopDrag();
if(Math.abs(this.x1-this.x2)>1||Math.abs(this.y1-this.y2)>1){
this.SetOverrideTool(this.TOOL_PAN);
this.StopPan();
}else{
this.OnQuickInfoTool(this.x1,this.y1);
}
};
this.StopZoomIn=function(){
this.StopDrag();
this.MapCanvas.clear();
this.UpdateRect();
if(this.rright-this.rleft>1){
this.OnZoomInRectTool(this.rleft,this.rtop,this.rright,this.rbottom);
}else{
this.OnZoomInTool(this.x1,this.y1);
}
};
this.StartRect=function(x,y){
this.StartDrag(x,y);
this.UpdateRect();
};
this.DrawRect=function(x,y){
this.MapCanvas.clear();
this.UpdateDrag(x,y);
this.UpdateRect();
this.MapCanvas.drawRect(this.rleft,this.rtop,this.rright-this.rleft,this.rbottom-this.rtop);
this.MapCanvas.paint();
};
this.StopRect=function(){
this.StopDrag();
this.MapCanvas.clear();
this.UpdateRect();
if(this.rright-this.rleft>1){
this.OnRectTool(this.rleft,this.rtop,this.rright,this.rbottom);
}
};
this.UpdateRect=function(){
var _40=this.x1;
var _41=this.y1;
if(this.x1>this.x2){
this.rright=this.x1;
this.rleft=this.x2;
}else{
this.rleft=this.x1;
this.rright=this.x2;
}
if(this.y1>this.y2){
this.rbottom=this.y1;
this.rtop=this.y2;
}else{
this.rtop=this.y1;
this.rbottom=this.y2;
}
};
this.StartLine=function(x,y){
this.StartDrag(x,y);
};
this.DrawLine=function(x,y){
this.MapCanvas.clear();
this.UpdateDrag(x,y);
this.MapCanvas.drawLine(this.x1,this.y1,this.x2,this.y2);
this.MapCanvas.paint();
};
this.StopLine=function(){
this.StopDrag();
this.MapCanvas.clear();
if(Math.abs(this.x1-this.x2)>1||Math.abs(this.y1-this.y2)>1){
this.OnLineTool(this.x1,this.y1,this.x2,this.y2);
}
};
this.StartPan=function(x,y){
this.HideInfoWindow();
this.StartDrag(x,y);
};
this.DrawPan=function(x,y){
this.UpdateDrag(x,y);
var img=__$(this.MapID+"_Image");
var _4b=(this.x2-this.x1)+"px";
var top=(this.y2-this.y1)+"px";
img.style.left=_4b;
img.style.top=top;
var _4d=0;
while(true){
img=__$(this.MapID+"wms"+_4d);
if(!img){
break;
}
img.style.left=_4b;
img.style.top=top;
_4d++;
}
};
this.StopPan=function(){
this.StopDrag();
if(Math.abs(this.x1-this.x2)>1||Math.abs(this.y1-this.y2)>1){
this.OnLineTool(this.x1,this.y1,this.x2,this.y2);
}
};
this.StartCircle=function(x,y){
this.StartDrag(x,y);
};
this.DrawCircle=function(x,y,_52){
if(_52){
this.MapCanvas.clear();
}
this.UpdateDrag(x,y);
var d=this.dist(this.x1,this.y1,this.x2,this.y2);
this.MapCanvas.drawEllipse(this.x1-d,this.y1-d,d*2,d*2);
this.MapCanvas.paint();
};
this.StopCircle=function(){
this.StopDrag();
this.MapCanvas.clear();
if(Math.abs(this.x1-this.x2)>1){
var d=this.dist(this.x1,this.y1,this.x2,this.y2);
this.OnCircleTool(this.x1,this.y1,d);
}
};
this.dist=function(x1,y1,x2,y2){
return Math.round(Math.abs(this.hypot(x1-x2,y1-y2)));
};
this.hypot=function(a,b){
return Math.sqrt((a*a)+(b*b));
};
this.StartPolyline=function(x,y){
if(!this.isDragging){
this.Xpts=new Array();
this.Ypts=new Array();
}
this.StartDrag(x,y);
this.Xpts[this.Xpts.length]=x;
this.Ypts[this.Ypts.length]=y;
};
this.DrawPolyline=function(x,y){
this.MapCanvas.clear();
this.UpdateDrag(x,y);
this.MapCanvas.drawPolyline(this.Xpts,this.Ypts);
this.MapCanvas.drawLine(this.x1,this.y1,this.x2,this.y2);
this.MapCanvas.paint();
};
this.StopPolyline=function(){
this.StopDrag();
this.MapCanvas.clear();
if(this.Xpts.length>1&&this.dist(this.Xpts[0],this.Ypts[0],this.Xpts[1],this.Ypts[1])>1){
this.OnPolylineTool(this.Xpts,this.Ypts);
}
};
this.DrawDistance=function(x,y,_61){
var _62="#000000";
var _63="#FFFFFF";
this.MapCanvas.clear();
this.UpdateDrag(x,y);
this.MapCanvas.drawPolyline(this.Xpts,this.Ypts);
this.MapCanvas.drawLine(this.x1,this.y1,this.x2,this.y2);
var _64=0;
for(var i=0;i<this.Xpts.length-1;i++){
_64+=this.dist(this.Xpts[i],this.Ypts[i],this.Xpts[i+1],this.Ypts[i+1]);
}
_64+=this.dist(this.x1,this.y1,this.x2,this.y2);
_64*=this.mpp();
var top=this.MapHeight()-28;
if((_64/1609.34)>1){
var _67=Math.round(1000*_64/1609.34)/1000;
this.MapCanvas.drawString(_67+" "+this.miles(),1,top,_62,_63);
}else{
_67=Math.round(_64/0.3048);
this.MapCanvas.drawString(_67+" "+this.feet(),1,top,_62,_63);
}
if((_64/1000)>1){
_67=Math.round(1000*_64/1000)/1000;
this.MapCanvas.drawString(_67+" "+this.km(),1,top+14,_62,_63);
}else{
this.MapCanvas.drawString((Math.round(10*_64)/10)+" "+this.meters(),1,top+14,_62,_63);
}
if(_61){
this.MapCanvas.paint();
}
};
this.StopDistance=function(){
this.StopDrag();
this.MapCanvas.clear();
};
this.StartPolygon=function(x,y){
if(!this.isDragging){
this.Xpts=new Array();
this.Ypts=new Array();
}
this.StartDrag(x,y);
this.Xpts[this.Xpts.length]=x;
this.Ypts[this.Ypts.length]=y;
};
this.DrawPolygon=function(x,y){
this.MapCanvas.clear();
this.UpdateDrag(x,y);
var tx=new Array().concat(this.Xpts);
var ty=new Array().concat(this.Ypts);
tx[tx.length]=this.x2;
ty[ty.length]=this.y2;
this.MapCanvas.drawPolygon(tx,ty);
this.MapCanvas.paint();
};
this.StopPolygon=function(){
this.StopDrag();
this.MapCanvas.clear();
if(this.Xpts.length>2&&this.dist(this.Xpts[0],this.Ypts[0],this.Xpts[1],this.Ypts[1])>1){
this.Xpts[this.Xpts.length]=this.Xpts[0];
this.Ypts[this.Ypts.length]=this.Ypts[0];
this.OnPolygonTool(this.Xpts,this.Ypts);
}
};
this.StartDrag=function(x,y){
this.x1=x;
this.y1=y;
this.x2=this.x1+1;
this.y2=this.y1+1;
this.isDragging=true;
};
this.UpdateDrag=function(x,y){
this.x2=x;
this.y2=y;
};
this.StopDrag=function(){
this.isDragging=false;
return true;
};
this.mouseX=0;
this.mouseY=0;
this.IsLeftDown=function(e){
var _73;
if(e.which==null){
_73=(e.button<2)?1:((e.button==4)?2:3);
}else{
_73=(e.which<2)?1:((e.which==2)?2:3);
}
return (_73==1);
};
this.OnMouseDown=function(e){
if(!this.IsLeftDown(e)){
this.CancelTool();
return;
}
this.OnResize();
this.GetImageXY(e);
if(this.mouseX>=0&&this.mouseX<this.MapWidth()&&this.mouseY>=0&&this.mouseY<this.MapHeight()){
this.StartTool(this.mouseX,this.mouseY);
return false;
}
return false;
};
function CallOnMouseMove(){
var t=_76;
var W=t.MapWidth();
var H=t.MapHeight();
if(t.mouseX>W){
t.mouseX=W-1;
}
if(t.mouseY>H){
t.mouseY=H-1;
}
if(t.mouseX<=0){
t.mouseX=1;
}
if(t.mouseY<=0){
t.mouseY=1;
}
if(t.isDragging){
t.DragTool(t.mouseX,t.mouseY);
}
return false;
}
var _79;
var _7a;
var _7b=0;
var _76=null;
this.OnMouseMove=function(e){
_76=this;
if(!this.isDragging){
this.RefreshCursor();
this.OnResize();
}
this.GetImageXY(e);
if(this.isDragging){
clearTimeout(_79);
_7b++;
_7a=function(){
CallOnMouseMove();
};
if(_7b<=3){
_79=setTimeout(_7a,80);
}else{
_7a();
_7b=0;
}
}
this.ShowLatLong(true);
return false;
};
this.RefreshCursor=function(){
var _7d=__$(this.MapID+"_rf");
if(_7d==null){
return;
}
if(_7d.value=="1"){
this.UpdateCursor();
_7d.value="0";
}
};
this.OnMouseLeave=function(e){
this.ShowLatLong(false);
return false;
};
this.ShowLatLong=function(_7f){
var dpp=__$(this.MapID+"_dpp");
if(dpp==null){
return;
}
dpp=parseFloat(dpp.value);
var _81=__$(this.MapID+"_ld");
if(_81==null){
return;
}
_81=parseFloat(_81.value);
var top=__$(this.MapID+"_td");
if(top==null){
return;
}
top=parseFloat(top.value);
var lng=_81+this.mouseX*dpp;
var lat=top-this.mouseY*dpp;
try{
if(this.mouseMoveHandler){
var _85=new AspMap.MouseEventArgs();
_85.x=this.mouseX;
_85.y=this.mouseY;
_85.isInside=_7f;
_85.longitude=lng;
_85.latitude=lat;
this.mouseMoveHandler(this.ApiVar,_85);
}
}
catch(ex){
}
};
this.OnMouseOver=function(e){
this.RefreshCursor();
return false;
};
this.OnMouseUp=function(e){
if(this.isDragging){
this.GetImageXY(e);
this.StopTool(this.mouseX,this.mouseY);
}
return false;
};
this.OnDoubleClick=function(e){
if(this.isDragging){
this.StopCompTool();
}
return false;
};
this.OnKeyDown=function(e){
if(e.keyCode==27){
this.CancelTool();
}
};
this.OnMouseWheel=function(e){
if(this.isDragging||!this.EnableMouseWheel()){
return;
}
this.OnResize();
this.GetImageXY(e);
e=e?e:window.event;
var _8b=e.detail?e.detail*-1:e.wheelDelta/40;
this.OnWheel(_8b>0,this.mouseX,this.mouseY);
return __cancelEvent(e);
};
this.GetImageXY=function(_8c){
if(_8c.pageX){
this.mouseX=_8c.pageX;
this.mouseY=_8c.pageY;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
this.mouseX=_8c.clientX+document.documentElement.scrollLeft-2;
this.mouseY=_8c.clientY+document.documentElement.scrollTop-2;
}else{
this.mouseX=_8c.clientX+document.body.scrollLeft-2;
this.mouseY=_8c.clientY+document.body.scrollTop-2;
}
}
this.mouseX=this.mouseX-this.hspc;
this.mouseY=this.mouseY-this.vspc;
};
this.Init=function(_8d,_8e,_8f){
var _90=_8d+"_Canvas";
this.MapID=_8d;
this.UniqueID=_8e;
this.ZoomBarVar=_8f;
this.MapCanvas=new jsGraphicsEx(_90);
this.MapCanvas.setStroke(1);
this.MapCanvas.setColor("#FF0000");
this.MapCanvas.setFont("verdana,geneva,helvetica,sans-serif","12px","font-weight:bold;");
this.UpdateCursor();
};
this.MapWidth=function(){
return parseInt(this.GetMapCanvas().style.width);
};
this.MapHeight=function(){
return parseInt(this.GetMapCanvas().style.height);
};
this.OnResize=function(){
try{
this.vspc=0;
this.hspc=0;
var _91=this.GetMapCanvas();
do{
this.hspc+=_91.offsetLeft;
this.vspc+=_91.offsetTop;
}while((_91=_91.offsetParent));
}
catch(ex){
}
};
this.GetMapCanvas=function(){
return __$(this.MapID+"_Canvas");
};
this.GetMapImg=function(){
return __$(this.MapID+"_Image");
};
this.OnPointTool=function(x,y){
this.Submit(x,y,"");
};
this.OnRectTool=function(x1,y1,x2,y2){
this.Submit(this.pack(x1,x2),this.pack(y1,y2),"");
};
this.OnLineTool=function(x1,y1,x2,y2){
this.OnRectTool(x1,y1,x2,y2);
};
this.OnCircleTool=function(x,y,_9e){
this.Submit(x,y,_9e);
};
this.OnPolylineTool=function(_9f,_a0){
this.Submit(_9f.join(";"),_a0.join(";"),"");
};
this.OnPolygonTool=function(_a1,_a2){
this.Submit(_a1.join(";"),_a2.join(";"),"");
};
this.OnZoomInTool=function(x,y){
this.Submit(x,y,"");
};
this.OnZoomInRectTool=function(x1,y1,x2,y2){
this.OnRectTool(x1,y1,x2,y2);
};
this.OnZoomOutTool=function(x,y){
this.Submit(x,y,"");
};
this.OnCenterTool=function(x,y){
this.Submit(x,y,"");
};
this.OnInfoTool=function(x,y){
this.Submit(x,y,"");
};
this.OnWheel=function(_af,x,y){
if(_af){
var cx=Math.round(this.MapWidth()/2+(x-this.MapWidth()/2)/2);
var cy=Math.round(this.MapHeight()/2+(y-this.MapHeight()/2)/2);
this.SubmitTool(this.TOOL_ZOOMIN,cx,cy,"");
}else{
var xy=this.Rotate(this.MapWidth()/2,this.MapHeight()/2,x-this.MapWidth()/2,y-this.MapHeight()/2,180);
this.SubmitTool(this.TOOL_ZOOMOUT,xy.x,xy.y,"");
}
};
this.Rotate=function(_b5,_b6,x,y,_b9){
_b9=(_b9)*Math.PI/180;
var px=Math.round(x*Math.cos(_b9)-y*Math.sin(_b9)+_b5);
var py=Math.round(x*Math.sin(_b9)+y*Math.cos(_b9)+_b6);
return {x:px,y:py};
};
this.OnQuickInfoTool=function(x,y){
this.SetCmdParams(this.GetTool(),this.GetArgument(),x,y,"");
this.qInfoX=x;
this.qInfoY=y;
map_callback(this.UniqueID,__showQuickInfo,"QINFO",this);
};
this.HideInfoWindow=function(){
__hideQuickInfo(this.MapID);
};
this.ShowInfo=function(_be){
var _bf=__$(this.MapID+"_infodiv");
if(!_bf){
return;
}
var _c0=__$(this.MapID+"_infoct");
if(!_c0){
return;
}
var _c1=__$(this.MapID+"_infodivc");
if(!_c1){
return;
}
__hideQuickInfo(this.MapID);
_c1.innerHTML=_be;
var x=this.qInfoX;
var y=this.qInfoY;
var _c4=__getDivW(_bf);
var _c5=__getDivH(_bf);
var _c6=this.MapWidth();
var _c7=this.MapHeight();
var _c8=12;
var _c9=20;
var _ca=20;
var _cb=0;
var _cc=0;
if(_c4<=_c6){
_cb=x-_c4/2-_c9/2;
if(_cb+_c4>_c6){
var d=_cb+_c4-_c6+1;
if(_c6-x<=_c8){
d-=_c8-(_c6-x)+1;
}
_cb-=d;
}
if(_cb<=0){
var d=Math.abs(_cb);
if(x<=_c9+_c8){
d-=_c9+_c8-x;
}else{
d+=1;
}
_cb+=d;
}
}else{
_cb=x-_c4/2-_c9/2;
if(_cb<=0){
var d=Math.abs(_cb);
if(x<_c9+_c8){
d-=_c9+_c8-x;
}else{
d+=1;
}
_cb+=d;
}else{
_cb=1;
}
}
x-=_c9;
if(((y+_c5+_ca>=_c7)||(y-_c5-_ca>0))&&(y-_c5-_ca)>=0){
_cc=y-_c5-_ca;
y-=22;
}else{
_cc=y+_ca;
}
if(_cc>y){
_c0.src=__$("rtct$").src;
}else{
_c0.src=__$("rbct$").src;
}
_bf.style.left=_cb+"px";
_bf.style.top=_cc+"px";
_c0.style.left=x+"px";
_c0.style.top=y+"px";
_c0.style.visibility="visible";
_bf.style.visibility="visible";
};
this.Submit=function(x,y,arg){
this.HideInfoWindow();
this.SetCmdParams(this.GetTool(),this.GetArgument(),x,y,arg);
__submitMapToolCmd();
};
this.SubmitTool=function(_d1,x,y,arg){
this.HideInfoWindow();
this.SetCmdParams(this.GetTool(),this.GetArgument(),x,y,arg);
this.SetOverrideTool(_d1);
__submitMapToolCmd();
};
this.SetCmdParams=function(_d5,_d6,x,y,arg){
__$(this.MapID+"_arg").value=arg;
__$(this.MapID+"_targ").value=_d6;
__$(this.MapID+"_tool").value=_d5;
__$(this.MapID+"_x").value=x;
__$(this.MapID+"_y").value=y;
};
this.SetInfoCursor=function(){
this.GetMapCanvas().style.cursor="help";
};
this.SetCrossCursor=function(){
this.GetMapCanvas().style.cursor="crosshair";
};
this.SetPanCursor=function(){
this.GetMapCanvas().style.cursor="move";
};
this.SetDefCursor=function(){
this.GetMapCanvas().style.cursor="default";
};
this.GetCursor=function(){
return __$(this.MapID+"_curs").value;
};
this.SetCursor=function(c){
if(c==null){
return;
}
__$(this.MapID+"_curs").value=c;
if(c.length>0){
this.GetMapCanvas().style.cursor=c;
return;
}
var _db=this.GetTool();
if(_db==this.TOOL_CENTER){
this.SetCrossCursor();
}else{
if(_db==this.TOOL_PAN){
this.SetPanCursor();
}else{
if(_db==this.TOOL_INFO||_db==this.TOOL_QINFO){
this.SetInfoCursor();
}else{
this.SetDefCursor();
}
}
}
};
this.GetMapTool=function(){
return parseInt(__$(this.MapID+"_tool").value);
};
this.SetMapTool=function(_dc){
__$(this.MapID+"_tool").value=_dc;
};
this.SetOverrideTool=function(_dd){
__$(this.MapID+"_otool").value=_dd;
};
this.SetApiCall=function(){
__$(this.MapID+"_api").value="1";
};
this.SetToolArgument=function(arg){
__$(this.MapID+"_targ").value=arg;
};
this.GetToolArgument=function(){
return __$(this.MapID+"_targ").value;
};
this.mpp=function(){
return parseFloat(__$(this.MapID+"_mpp").value);
};
this.miles=function(){
return __$(this.MapID+"_mis").value;
};
this.feet=function(){
return __$(this.MapID+"_fts").value;
};
this.km=function(){
return __$(this.MapID+"_kms").value;
};
this.meters=function(){
return __$(this.MapID+"_mts").value;
};
this.LineWidth=function(){
return parseInt(__$(this.MapID+"_tlw").value);
};
this.LineColor=function(){
return __$(this.MapID+"_tlc").value;
};
this.EnablePan=function(){
return __$(this.MapID+"_enpan").value=="1";
};
this.EnableMouseWheel=function(){
return __$(this.MapID+"_emw").value=="1";
};
this.GetDbl=function(_df){
return parseFloat(this.GetStr(_df));
};
this.SetDbl=function(_e0,_e1){
this.SetStr(_e0,_e1);
};
this.GetBool=function(_e2){
return this.GetStr(_e2)=="1";
};
this.SetBool=function(_e3,_e4){
this.SetStr(_e3,_e4?"1":"0");
};
this.GetInt=function(_e5){
return parseInt(this.GetStr(_e5));
};
this.SetInt=function(_e6,_e7){
this.SetStr(_e6,Math.round(_e7));
};
this.GetStr=function(_e8){
return __$(this.MapID+_e8).value;
};
this.SetStr=function(_e9,_ea){
__$(this.MapID+_e9).value=_ea;
};
this.pack=function(a,b){
return (a+";"+b);
};
}
function AspMapZoomBar(_ed,_ee,_ef,_f0,_f1,pos){
this.mapID=_ee;
this.clientID=_ed;
this.showBar=_f1;
this.levelCount=_ef;
this.levelH=_f0;
this.drag=false;
this.pos=pos;
this.mousedown=function(e){
if(!this.showBar){
return true;
}
if(e.preventDefault){
e.preventDefault();
}
this.drag=true;
return false;
};
this.mousemove=function(e){
if(!this.drag||!this.showBar){
return true;
}
this.moveThumb(e);
return false;
};
this.mouseup=function(e){
if(!this.drag||!this.showBar){
return true;
}
this.drag=false;
var _f6=this.moveThumb(e);
if(_f6>=0){
var map=__getMapTools(this.mapID);
if(!map){
return false;
}
map.SetZoom(_f6);
}
return false;
};
this.resize=function(e){
if(this.drag||!this.showBar){
return true;
}
var ext=__getDivExt(this.mapID);
if(!ext){
return true;
}
var div=__$(this.clientID);
div.style.top=ext.top+2+"px";
if(this.pos==1){
div.style.left=ext.left+2+"px";
}else{
div.style.left=ext.right-__getDivW(div)-2+"px";
}
div.style.visibility="visible";
return true;
};
this.load=function(e){
this.resize();
return true;
};
this.moveThumb=function(e){
e=e||window.event;
var _fd=this.getMouseY(this.barID(),e);
var _fe=__getDivH(__$(this.barID()));
var _ff=0;
if(_fd<=0){
_ff=this.levelCount-1;
}else{
if(_fd>=_fe){
_ff=0;
}else{
_ff=this.mouseToLevel(_fd);
}
}
if(_ff<0||_ff>=this.levelCount){
return -1;
}
this.updateThumb(_ff);
return _ff;
};
this.updateThumb=function(_100){
if(_100<0||_100>=this.levelCount){
return;
}
var _101=__$(this.thumbID());
if(!_101){
return;
}
var _102=__getDivH(_101);
_101.style.top=(this.levelCount-_100-1)*this.levelH-Math.round((_102-this.levelH)/2)+"px";
};
this.mouseToLevel=function(_103){
return this.levelCount-Math.floor(_103/this.levelH)-1;
};
this.getMouseY=function(_104,ev){
var _106=__$(_104);
if(!_106){
return 0;
}
var top=0,y=0;
while(_106.offsetParent){
top+=_106.offsetTop;
_106=_106.offsetParent;
}
top+=_106.offsetTop;
var _109=__$(this.clientID);
top+=Math.round((_109.offsetHeight-_109.clientHeight)/2);
ev=ev||window.event;
if(ev.pageY){
y=ev.pageY;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
y=ev.clientY+document.documentElement.scrollTop-document.documentElement.clientTop;
}else{
y=ev.clientY+document.body.scrollTop-document.body.clientTop;
}
}
return y-top;
};
this.thumbID=function(){
return this.clientID+"_th";
};
this.barID=function(){
return this.clientID+"_bar";
};
this.pageLoaded=function(_10a,args){
var _10c=__getMapTools(this.mapID);
if(_10c==null){
return;
}
this.updateThumb(_10c.GetZoom());
};
if(this.showBar){
__addHandlerCtx(document.body,"mousemove",this);
__addHandlerCtx(document.body,"mouseup",this);
__addHandlerCtx(__$(this.thumbID()),"mousedown",this);
}
if(this.pos>0){
__addHandlerCtx(window,"load",this);
__addHandlerCtx(window,"resize",this);
this.resize(null);
}
try{
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(__getAjaxEventCtx(this,"pageLoaded"));
}
catch(ex){
}
}
function __selectMapTool(_10d,_10e,_10f,arg){
if(_10f==null){
return;
}
var _111=__$(_10d+"_tbutt");
if(_111==null){
return;
}
var _112=__$(_111.value);
if(_112==null){
return;
}
var _113=__getMapTools(_10d);
if(_113==null){
return;
}
_113.SetTool(_10e);
_113.SetArgument(arg);
var attr=_10f.getAttribute("curs");
if(attr!=null){
_113.SetCursor(attr);
}
var attr=_112.getAttribute("normimg");
if(attr!=null){
_112.src=attr;
}
attr=_112.getAttribute("normbord");
if(attr!="notset"){
_112.style.borderStyle=attr;
}
attr=_10f.getAttribute("selimg");
if(attr!=null){
_10f.src=attr;
}
attr=_10f.getAttribute("selbord");
if(attr!="notset"){
_10f.style.borderStyle=attr;
}
_111.value=_10f.id;
}
function __showQuickInfo(_115,_116){
if(!_115||_115.length==0||!_116){
return;
}
_116.ShowInfo(_115);
}
function __hideQuickInfo(_117){
try{
__$(_117+"_infodiv").style.visibility="hidden";
__$(_117+"_infoct").style.visibility="hidden";
}
catch(e){
}
}
function __$(id){
if(id==null){
return null;
}
var elem=(document.getElementById?document.getElementById(id):document.all?document.all[id]:null);
if(elem==null){
var _11a=document.getElementsByName(id);
if(_11a!=null){
elem=_11a[0];
}
}
return elem;
}
function __getDivExt(_11b){
var _11c=__$(_11b);
if(!_11c){
return null;
}
var top=0,left=0;
var div=_11c;
while(_11c.offsetParent){
top+=_11c.offsetTop;
left+=_11c.offsetLeft;
_11c=_11c.offsetParent;
}
top+=_11c.offsetTop;
left+=_11c.offsetLeft;
return {left:left,top:top,right:left+__getDivW(div),bottom:top+__getDivH(div)};
}
function __getDivW(el){
return (el?(el.offsetWidth||el.style.pixelWidth||0):0);
}
function __getDivH(el){
return (el?(el.offsetHeight||el.style.pixelHeight||0):0);
}
function __clearDiv(elem){
if(elem){
while(elem.hasChildNodes()){
elem.removeChild(elem.firstChild);
}
elem.innerHTML="";
}
}
function __cancelEvent(e){
e=e?e:window.event;
if(e.stopPropagation){
e.stopPropagation();
}
if(e.preventDefault){
e.preventDefault();
}
e.cancelBubble=true;
e.cancel=true;
e.returnValue=false;
return false;
}
function __MWFF(_124,_125){
var el=__$(_124);
if(!el){
return;
}
if(el.addEventListener){
el.addEventListener("DOMMouseScroll",_125,false);
}
}
function __addHandler(el,_128,_129){
if(!el){
return;
}
if(el.addEventListener){
el.addEventListener(_128,_129,false);
}else{
if(el.attachEvent){
el.attachEvent("on"+_128,_129);
}else{
el["on"+_128]=_129;
}
}
}
function __addHandlerCtx(el,_12b,_12c){
var _12d=__getHandlerCtx(_12c,_12b);
__addHandler(el,_12b,_12d);
}
function __getHandlerCtx(_12e,_12f){
return (function(e){
return _12e[_12f](e);
});
}
function __getAjaxEventCtx(_131,_132){
return (function(_133,args){
return _131[_132](_133,args);
});
}
function __getMapTools(_135){
var _136=null;
try{
_136=eval(_135.toLowerCase()+"_tools");
}
catch(ex){
}
return _136;
}
function __getMapToolsName(_137){
return _137.toLowerCase()+"_tools";
}
var jg_ok,jg_ie,jg_fast,jg_dom,jg_moz;
function chkDHTM(x,i){
x=document.body||null;
jg_ie=x&&typeof x.insertAdjacentHTML!="undefined"&&document.createElement;
jg_dom=(x&&!jg_ie&&typeof x.appendChild!="undefined"&&typeof document.createRange!="undefined"&&typeof (i=document.createRange()).setStartBefore!="undefined"&&typeof i.createContextualFragment!="undefined");
jg_fast=jg_ie&&document.all&&!window.opera;
jg_moz=jg_dom&&typeof x.style.MozOpacity!="undefined";
jg_ok=!!(jg_ie||jg_dom);
}
function pntCnvDom(){
var x=this.wnd.document.createRange();
var _13b=this.cnv();
x.setStartBefore(_13b);
x=x.createContextualFragment(jg_fast?this.htmRpc():this.htm);
if(_13b){
_13b.appendChild(x);
}
this.htm="";
}
function pntCnvIe(){
var _13c=this.cnv();
if(_13c){
_13c.insertAdjacentHTML("BeforeEnd",jg_fast?this.htmRpc():this.htm);
}
this.htm="";
}
function pntDoc(){
this.wnd.document.write(jg_fast?this.htmRpc():this.htm);
this.htm="";
}
function pntN(){
}
function mkDiv(x,y,w,h){
this.htm+="<div style=\"position:absolute;"+"left:"+x+"px;"+"top:"+y+"px;"+"width:"+w+"px;"+"height:"+h+"px;"+"clip:rect(0,"+w+"px,"+h+"px,0);"+"background-color:"+this.color+(!jg_moz?";overflow:hidden":"")+";\"></div>";
}
function mkDivIe(x,y,w,h){
this.htm+="%%"+this.color+";"+x+";"+y+";"+w+";"+h+";";
}
function mkDivPrt(x,y,w,h){
this.htm+="<div style=\"position:absolute;"+"border-left:"+w+"px solid "+this.color+";"+"left:"+x+"px;"+"top:"+y+"px;"+"width:0px;"+"height:"+h+"px;"+"clip:rect(0,"+w+"px,"+h+"px,0);"+"background-color:"+this.color+(!jg_moz?";overflow:hidden":"")+";\"></div>";
}
var regex=/%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
function htmRpc(){
return this.htm.replace(regex,"<div style=\"overflow:hidden;position:absolute;background-color:"+"$1;left:$2;top:$3;width:$4;height:$5\"></div>\n");
}
function htmPrtRpc(){
return this.htm.replace(regex,"<div style=\"overflow:hidden;position:absolute;background-color:"+"$1;left:$2;top:$3;width:$4;height:$5;border-left:$4px solid $1\"></div>\n");
}
function mkLin(x1,y1,x2,y2){
if(x1>x2){
var _x2=x2;
var _y2=y2;
x2=x1;
y2=y1;
x1=_x2;
y1=_y2;
}
var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,_153=(y1>y2)?-1:1;
if(dx>=dy){
var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;
while(dx>0){
--dx;
++x;
if(p>0){
this.mkDiv(ox,y,x-ox,1);
y+=_153;
p+=pru;
ox=x;
}else{
p+=pr;
}
}
this.mkDiv(ox,y,x2-ox+1,1);
}else{
var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;
if(y2<=y1){
while(dy>0){
--dy;
if(p>0){
this.mkDiv(x++,y,1,oy-y+1);
y+=_153;
p+=pru;
oy=y;
}else{
y+=_153;
p+=pr;
}
}
this.mkDiv(x2,y2,1,oy-y2+1);
}else{
while(dy>0){
--dy;
y+=_153;
if(p>0){
this.mkDiv(x++,oy,1,y-oy);
p+=pru;
oy=y;
}else{
p+=pr;
}
}
this.mkDiv(x2,oy,1,y2-oy+1);
}
}
}
function mkLin2D(x1,y1,x2,y2){
if(x1>x2){
var _x2=x2;
var _y2=y2;
x2=x1;
y2=y1;
x1=_x2;
y1=_y2;
}
var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,_163=(y1>y2)?-1:1;
var s=this.stroke;
if(dx>=dy){
if(dx>0&&s-3>0){
var _s=(s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy)/dx;
_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;
}else{
var _s=s;
}
var ad=Math.ceil(s/2);
var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;
while(dx>0){
--dx;
++x;
if(p>0){
this.mkDiv(ox,y,x-ox+ad,_s);
y+=_163;
p+=pru;
ox=x;
}else{
p+=pr;
}
}
this.mkDiv(ox,y,x2-ox+ad+1,_s);
}else{
if(s-3>0){
var _s=(s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy)/dy;
_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;
}else{
var _s=s;
}
var ad=Math.round(s/2);
var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;
if(y2<=y1){
++ad;
while(dy>0){
--dy;
if(p>0){
this.mkDiv(x++,y,_s,oy-y+ad);
y+=_163;
p+=pru;
oy=y;
}else{
y+=_163;
p+=pr;
}
}
this.mkDiv(x2,y2,_s,oy-y2+ad);
}else{
while(dy>0){
--dy;
y+=_163;
if(p>0){
this.mkDiv(x++,oy,_s,y-oy+ad);
p+=pru;
oy=y;
}else{
p+=pr;
}
}
this.mkDiv(x2,oy,_s,y2-oy+ad+1);
}
}
}
function mkOv(left,top,_16e,_16f){
var a=(++_16e)>>1,b=(++_16f)>>1,wod=_16e&1,hod=_16f&1,cx=left+a,cy=top+b,x=0,y=b,ox=0,oy=b,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1),w,h;
while(y>0){
if(st<0){
st+=bb2*((x<<1)+3);
tt+=bb4*(++x);
}else{
if(tt<0){
st+=bb2*((x<<1)+3)-aa4*(y-1);
tt+=bb4*(++x)-aa2*(((y--)<<1)-3);
w=x-ox;
h=oy-y;
if((w&2)&&(h&2)){
this.mkOvQds(cx,cy,x-2,y+2,1,1,wod,hod);
this.mkOvQds(cx,cy,x-1,y+1,1,1,wod,hod);
}else{
this.mkOvQds(cx,cy,x-1,oy,w,h,wod,hod);
}
ox=x;
oy=y;
}else{
tt-=aa2*((y<<1)-3);
st-=aa4*(--y);
}
}
}
w=a-ox+1;
h=(oy<<1)+hod;
y=cy-oy;
this.mkDiv(cx-a,y,w,h);
this.mkDiv(cx+ox+wod-1,y,w,h);
}
function mkOv2D(left,top,_184,_185){
var s=this.stroke;
_184+=s+1;
_185+=s+1;
var a=_184>>1,b=_185>>1,wod=_184&1,hod=_185&1,cx=left+a,cy=top+b,x=0,y=b,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1);
if(s-4<0&&(!(s-2)||_184-51>0&&_185-51>0)){
var ox=0,oy=b,w,h,pxw;
while(y>0){
if(st<0){
st+=bb2*((x<<1)+3);
tt+=bb4*(++x);
}else{
if(tt<0){
st+=bb2*((x<<1)+3)-aa4*(y-1);
tt+=bb4*(++x)-aa2*(((y--)<<1)-3);
w=x-ox;
h=oy-y;
if(w-1){
pxw=w+1+(s&1);
h=s;
}else{
if(h-1){
pxw=s;
h+=1+(s&1);
}else{
pxw=h=s;
}
}
this.mkOvQds(cx,cy,x-1,oy,pxw,h,wod,hod);
ox=x;
oy=y;
}else{
tt-=aa2*((y<<1)-3);
st-=aa4*(--y);
}
}
}
this.mkDiv(cx-a,cy-oy,s,(oy<<1)+hod);
this.mkDiv(cx+a+wod-s,cy-oy,s,(oy<<1)+hod);
}else{
var _a=(_184-(s<<1))>>1,_b=(_185-(s<<1))>>1,_x=0,_y=_b,_aa2=(_a*_a)<<1,_aa4=_aa2<<1,_bb2=(_b*_b)<<1,_bb4=_bb2<<1,_st=(_aa2>>1)*(1-(_b<<1))+_bb2,_tt=(_bb2>>1)-_aa2*((_b<<1)-1),pxl=new Array(),pxt=new Array(),_pxb=new Array();
pxl[0]=0;
pxt[0]=b;
_pxb[0]=_b-1;
while(y>0){
if(st<0){
pxl[pxl.length]=x;
pxt[pxt.length]=y;
st+=bb2*((x<<1)+3);
tt+=bb4*(++x);
}else{
if(tt<0){
pxl[pxl.length]=x;
st+=bb2*((x<<1)+3)-aa4*(y-1);
tt+=bb4*(++x)-aa2*(((y--)<<1)-3);
pxt[pxt.length]=y;
}else{
tt-=aa2*((y<<1)-3);
st-=aa4*(--y);
}
}
if(_y>0){
if(_st<0){
_st+=_bb2*((_x<<1)+3);
_tt+=_bb4*(++_x);
_pxb[_pxb.length]=_y-1;
}else{
if(_tt<0){
_st+=_bb2*((_x<<1)+3)-_aa4*(_y-1);
_tt+=_bb4*(++_x)-_aa2*(((_y--)<<1)-3);
_pxb[_pxb.length]=_y-1;
}else{
_tt-=_aa2*((_y<<1)-3);
_st-=_aa4*(--_y);
_pxb[_pxb.length-1]--;
}
}
}
}
var ox=-wod,oy=b,_oy=_pxb[0],l=pxl.length,w,h;
for(var i=0;i<l;i++){
if(typeof _pxb[i]!="undefined"){
if(_pxb[i]<_oy||pxt[i]<oy){
x=pxl[i];
this.mkOvQds(cx,cy,x,oy,x-ox,oy-_oy,wod,hod);
ox=x;
oy=pxt[i];
_oy=_pxb[i];
}
}else{
x=pxl[i];
this.mkDiv(cx-x,cy-oy,1,(oy<<1)+hod);
this.mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);
ox=x;
oy=pxt[i];
}
}
this.mkDiv(cx-a,cy-oy,1,(oy<<1)+hod);
this.mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);
}
}
function mkRect(x,y,w,h){
var s=this.stroke;
this.mkDiv(x,y,w,s);
this.mkDiv(x+w,y,s,h);
this.mkDiv(x,y+h,w+s,s);
this.mkDiv(x,y+s,s,h-s);
}
function jsgFont(){
this.PLAIN="font-weight:normal;";
this.BOLD="font-weight:bold;";
this.ITALIC="font-style:italic;";
this.ITALIC_BOLD=this.ITALIC+this.BOLD;
this.BOLD_ITALIC=this.ITALIC_BOLD;
}
var Font=new jsgFont();
function jsgStroke(){
this.DOTTED=-1;
}
var Stroke=new jsgStroke();
function jsGraphicsEx(cnv,wnd){
this.setColor=new Function("arg","this.color = arg.toLowerCase();");
this.setStroke=function(x){
this.stroke=x;
if(!(x+1)){
}else{
if(x-1>0){
this.drawLine=mkLin2D;
this.mkOv=mkOv2D;
this.drawRect=mkRect;
}else{
this.drawLine=mkLin;
this.mkOv=mkOv;
this.drawRect=mkRect;
}
}
};
this.setPrintable=function(arg){
this.printable=arg;
if(jg_fast){
this.mkDiv=mkDivIe;
this.htmRpc=arg?htmPrtRpc:htmRpc;
}else{
this.mkDiv=arg?mkDivPrt:mkDiv;
}
};
this.setFont=function(fam,sz,sty){
this.ftFam=fam;
this.ftSz=sz;
this.ftSty=sty||Font.PLAIN;
};
this.drawPolyline=this.drawPolyLine=function(x,y){
for(var i=x.length-1;i;){
--i;
this.drawLine(x[i],y[i],x[i+1],y[i+1]);
}
};
this.fillRect=function(x,y,w,h){
this.mkDiv(x,y,w,h);
};
this.drawPolygon=function(x,y){
this.drawPolyline(x,y);
this.drawLine(x[x.length-1],y[x.length-1],x[0],y[0]);
};
this.drawEllipse=this.drawOval=function(x,y,w,h){
this.mkOv(x,y,w,h);
};
this.drawString=function(txt,x,y,_1c6,_1c7){
this.htm+="<div style=\"position:absolute;white-space:nowrap;"+"left:"+x+"px;"+"top:"+y+"px;"+"font-family:"+this.ftFam+";"+"font-size:"+this.ftSz+";"+"color:"+_1c6+";"+"background-color:"+_1c7+";"+this.ftSty+"\">"+txt+"</div>";
};
this.clear=function(){
this.htm="";
__clearDiv(this.cnv());
};
this.mkOvQds=function(cx,cy,x,y,w,h,wod,hod){
var xl=cx-x,xr=cx+x+wod-w,yt=cy-y,yb=cy+y+hod-h;
if(xr>xl+w){
this.mkDiv(xr,yt,w,h);
this.mkDiv(xr,yb,w,h);
}else{
w=xr-xl+w;
}
this.mkDiv(xl,yt,w,h);
this.mkDiv(xl,yb,w,h);
};
this.setStroke(1);
this.setFont("verdana,geneva,helvetica,sans-serif","12px",Font.PLAIN);
this.color="#000000";
this.htm="";
this.wnd=wnd||window;
this.cnvID=cnv;
if(!jg_ok){
chkDHTM();
}
if(jg_ok){
if(cnv){
if(typeof (cnv)=="string"){
this.cont=document.all?(this.wnd.document.all[cnv]||null):document.getElementById?(this.wnd.document.getElementById(cnv)||null):null;
}else{
if(cnv==window.document){
this.cont=document.getElementsByTagName("body")[0];
}else{
this.cont=cnv;
}
}
this.paint=jg_dom?pntCnvDom:pntCnvIe;
}else{
this.paint=pntDoc;
}
}else{
this.paint=pntN;
}
this.setPrintable(false);
this.cnv=function(){
var _1d4=__$(this.cnvID);
var _1d5=_1d4.getElementsByTagName("DIV");
if(_1d5==null){
return _1d4;
}
return _1d5[0];
};
}
function CompInt(x,y){
return (x-y);
}
function map_enableAutoRefresh(){
alert("The map_enableAutoRefresh() function has been deprecated. Use the Map.set_enableAnimation property.");
}
function map_setAnimationInterval(){
alert("The map_setAnimationInterval() function has been deprecated. Use the Map.set_animationInterval property.");
}
function map_refreshAnimationLayer(){
alert("The map_refreshAnimationLayer() function has been deprecated. Use the Map.refreshAnimationLayer method.");
}

