        	var g_strResource = "http://maps.chzero.com/MapImage_gray_2/";
	var g_strServer = "http://maps.chzero.com/";
	//var g_strServer = "http://local.map.com:8080/";
		
	function ZeroMapPositionData()
	{
		this.m_dx = 0;
		this.m_dy = 0;
		this.m_nScale = 0;
	};
			
	function ZeroMap(dParent , x , y , s , logourl)
	{
	    this.m_dMapX = x;
		this.m_dMapY = y;
		this.m_nMapScale = s;
		if(this.m_nMapScale > 18)this.m_nMapScale = 18;
		this.m_fMapZoom = 1.0;
		this.m_nWheelCount = 0;
		
		this.m_nLastScale = null;
		this.m_dptLastLT = null;
		this.m_dptLastRB = null;
				
		this.m_dParent = dParent;
		if(dParent.offsetHeight == 0 || dParent.offsetWidth == 0)
		{
			this.m_dParent = dParent.offsetParent;      
		}
		
		this.m_nScreenX = this.m_dParent.offsetWidth;	
		this.m_nScreenY = this.m_dParent.offsetHeight;
	
		//this.m_nScreenY -= 100;
		
		var nScreenX = this.m_nScreenX;
		var nScreenY = this.m_nScreenY;
		this.m_nHalfScreenX = this.m_nScreenX / 2;
		this.m_nHalfScreenY = this.m_nScreenY / 2;
		
		this.m_dPrimary = CreateDiv(this.m_dParent,0,0,nScreenX,nScreenY);
		this.m_dPrimary.setAttribute("id","PrimaryDiv");
		this.m_dPrimary.style.zIndex = 1;
		this.m_dPrimary.style.position = "relative";
		this.m_dPrimary.style.overflow = "hidden";
		//this.m_dPrimary.style.backgroundImage = "url(http://imcook.imbc.com/GIS/images/bglogo1.gif)";
		this.m_dPrimary.oncontextmenu = falseFunc;
		
		var logo = CreateImage(this.m_dPrimary,"http://maps.chzero.com/Images/new_maplogo_s.gif" , this.m_nScreenX - 65  , this.m_nScreenY - 21 , 55 , 16);
		logo.style.zIndex = 3;
		
		if(typeof(logourl) == "undefined")logourl = "Images/logo.gif";
		var logo2 = CreateImage(this.m_dPrimary,logourl, 10  , this.m_nScreenY - 20 , 70 , 16);
		logo2.style.zIndex = 3;
		
		
		this.m_dBack = CreateDiv(this.m_dPrimary,0,0,nScreenX,nScreenY);
		this.m_dBack.setAttribute("id","BackDiv");
		this.m_dBack.style.zIndex = 2;
				  
		this.m_dBack.onmousedown = this.MouseDown;
		this.m_dBack.onmousemove = this.MouseMove;
		this.m_dBack.onmouseup   = this.MouseUp;
		this.m_dBack.onclick = this.MouseClick;
		//this.m_dBack.onmousewheel = this.MouseWheel;
		this.m_dBack.ondragstart = falseFunc;
		this.m_dBack.m_bClick = false;
		this.m_dBack.m_ZeroMap = this;
		
		this.m_cCallBack = null;
		
		this.m_dWorldRatioX = 0.0;
		this.m_dWorldRatioY = 0.0;
		this.m_dScreenRatioX = 0.0;
		this.m_dScreenRatioY = 0.0;
		
		this.m_ZeroMapImage = new ZeroMapImage(this);
		this.m_ZeroMapLayer = new ZeroMapLayer(this);
		    
		this.m_vZoomRect = null;
						
		this.m_aPosition = new Array();
		this.m_nPositionInx = -1;
				
		this.m_aWheelMove = new Array();
		   	
    	this.SetMode("move");
    };
	
	ZeroMap.prototype.ReSize = function()
	{
		this.m_nScreenX = this.m_dParent.clientWidth;	
		this.m_nScreenY = this.m_dParent.clientHeight;
		
		this.m_nHalfScreenX = this.m_nScreenX / 2;
		this.m_nHalfScreenY = this.m_nScreenY / 2;
		
		if(this.m_dPrimary != null && this.m_dBack != null)
		{
		    this.m_dPrimary.style.width = this.m_nScreenX;
		    this.m_dPrimary.style.height = this.m_nScreenY;
		    this.m_dBack.style.width = this.m_nScreenX;
		    this.m_dBack.style.height = this.m_nScreenY;
		    this.SetGridData();
		}
	};

	ZeroMap.prototype.SetBasisInfo = function()
	{
		var nImageSizeX = GetImageSizeX(this.m_fMapZoom);
		var nImageSizeY = GetImageSizeY(this.m_fMapZoom);
		var dOneGridSize = GetOneGridSize(this.m_nMapScale);
		
		this.m_dWorldRatioX = parseFloat(nImageSizeX / dOneGridSize);
		this.m_dWorldRatioY = parseFloat(nImageSizeY / dOneGridSize);
		this.m_dScreenRatioX = parseFloat(dOneGridSize / nImageSizeX);
		this.m_dScreenRatioY = parseFloat(dOneGridSize / nImageSizeY);
	};
	
	ZeroMap.prototype.GetZeroMapLayer = function()
	{
		return this.m_ZeroMapLayer;
	};
	
	ZeroMap.prototype.SetCenter = function(x,y)
	{
		this.m_dMapX = x;
		this.m_dMapY = y;
	};

	ZeroMap.prototype.SetScale = function(s)
	{
		this.m_nMapScale = s
	};
	
	ZeroMap.prototype.SetCallBack = function(fun)
	{
		if(typeof(fun) != "undefined")
		this.m_cCallBack = fun;
	};
	
	ZeroMap.prototype.SetMode = function(mode)
    {
        this.m_strMapMode = mode;
        this.ClosePopup();
        
        
        //this.m_dPrimary.style.cursor = "http://maps.chzero.com/moneta/cursor/" + mode + ".cur";
        
        if(mode == "length")
        {
        	this.m_ZeroMapLength.NewPoint();
        }
        if(typeof(toolBarClick) != "undefined")
        {
           toolBarClick();
        }
        
    };
    
    ZeroMap.prototype.ClosePopup = function()
    {
        if(this.m_PopupMenu != null)
        this.m_PopupMenu.style.display = "none";
    };
    ZeroMap.prototype.MouseDown = function(event) 
	{
		if (this.setCapture) this.setCapture();
		if(!event) event = window.event;
		
		var ZeroMap = this.m_ZeroMap;
		switch(event.button)
		{
			case 1: 
			{
			    ZeroMap.ClosePopup();
			    
				this.nOffsetX = event.x;
				this.nOffsetY = event.y;
			
				this.nx = event.clientX;
				this.ny = event.clientY;
									
				this.bd = true;
				this.bMove = false;
			}
			break;
			
			case 2:
			{
				if(ZeroMap.m_strMapMode == "length")
				{
					ZeroMap.m_ZeroMapLength.MouseUp();
					ZeroMap.SetMode("move");
				}
				else
				{
				    if(ZeroMap.m_PopupMenu != null)
				    {
				        ZeroMap.m_PopupMenu.style.display = "";
				        
				        ZeroMap.m_PopupMenu.style.left = event.x;
				        
				        var RightBig = ZeroMap.m_nScreenX - 115;
				        if(RightBig < event.x)ZeroMap.m_PopupMenu.style.left = RightBig;
				        
				        ZeroMap.m_PopupMenu.style.top = event.y;
				        
				        var BottomBig = ZeroMap.m_nScreenY - 118;
				        if(BottomBig < event.y)ZeroMap.m_PopupMenu.style.top = BottomBig;
			        
				    }
				};
				
			}
		}
		return false;
	};
	
	ZeroMap.prototype.MouseMove = function(event) 
	{
		if(!event) event = window.event;
		var ZeroMap = this.m_ZeroMap;
		
		ZeroMap.m_dBack.onmousedown = ZeroMap.MouseDown;
        ZeroMap.m_dBack.onmouseup   = ZeroMap.MouseUp;
		
		if(this.bd == true) 
		{
			var nx = (event.clientX - this.nx);
			var ny = (event.clientY - this.ny);
			
			
			var nOffsetX = event.x;
			var nOffsetY = event.y;
				
			if(ZeroMap.m_strMapMode == "move")
			{
				ZeroMap.m_dBack.style.left = nx;
				ZeroMap.m_dBack.style.top = ny;
			}
			else if(ZeroMap.m_strMapMode == "zoom_in" || ZeroMap.m_strMapMode == "zoom_out" || ZeroMap.m_strMapMode == "boundary")
			{
				this.bMove = true;
				if(ZeroMap.m_vZoomRect != null)
				{
					ZeroMap.m_dBack.removeChild(ZeroMap.m_vZoomRect);
					ZeroMap.m_vZoomRect = null;
				}
							    
			    var rt = document.createElement("v:rect");
			    
			    var fill = document.createElement("v:fill");
		        fill.on = "false";
		        rt.appendChild(fill);
		
			    rt.style.position = "absolute";
			    
				if(nx > 0 ){rt.style.left = this.nOffsetX; this.nZoomCenterX = this.nOffsetX;}
				else {rt.style.left = nOffsetX; this.nZoomCenterX = nOffsetX;}
				
				if(ny > 0 ){rt.style.top = this.nOffsetY; this.nZoomCenterY = this.nOffsetY;}
				else {rt.style.top = nOffsetY; this.nZoomCenterY = nOffsetY;}
			
			    rt.style.width = Math.abs(nx);
			    rt.style.height = Math.abs(ny);
			    
			    this.nZoomLeft = Math.abs(nx);
			    this.nZoomTop = Math.abs(ny);
			    this.nZoomCenterWidth = Math.abs(nx);
			    this.nZoomCenterHeight = Math.abs(ny);
			    
			    if(ZeroMap.m_strMapMode == "zoom_in")
			    {
			    	rt.strokecolor ="#71A4AD";
			    }
			    else
			    {
			    	rt.strokecolor ="#D6AC70";
			    }
		    	rt.strokeweight="1px";
  			    rt.innerHTML += "<v:stroke dashstyle='longdashdot' />"
  			    
  			    this.nZoomCenterX += (this.nZoomCenterWidth / 2);
  			    this.nZoomCenterY += (this.nZoomCenterHeight / 2);
   			    
			    ZeroMap.m_dBack.appendChild(rt);
			    ZeroMap.m_vZoomRect = rt
			    
			}
		}	

		if(ZeroMap.m_strMapMode == "length")
		{
			var nOffsetX = event.x;
			var nOffsetY = event.y; 
			
			var dpt = ScreenToWorld(nOffsetX , nOffsetY , ZeroMap);
			ZeroMap.m_ZeroMapLength.MouseMove(dpt);
		}
		return false;
	};
	
	ZeroMap.prototype.MouseUp = function (event) 
	{
		if (this.releaseCapture)this.releaseCapture();
		if(!event) event = window.event;
		
		var ZeroMap = this.m_ZeroMap;
		
		if(this.bd)
		{
			this.bd = false;
			if(ZeroMap.m_strMapMode == "move")
			{
				var dptSttart = ScreenToWorld(this.nx , this.ny , ZeroMap);
				var dptEnd = ScreenToWorld(event.clientX , event.clientY , ZeroMap);
				
				var dMoveX = dptSttart.x - dptEnd.x;
				var dMoveY = dptSttart.y - dptEnd.y;
				
				ZeroMap.m_dMapX += dMoveX;
				ZeroMap.m_dMapY += dMoveY;
				
				ZeroMap.m_dBack.style.left = 0;
				ZeroMap.m_dBack.style.top = 0;
					
				ZeroMap.SetGridData();
			}
			else if(ZeroMap.m_strMapMode == "boundary")
			{
			    if(ZeroMap.m_vZoomRect != null)
				{
					ZeroMap.m_dBack.removeChild(ZeroMap.m_vZoomRect);
					ZeroMap.m_vZoomRect = null;
				}
					
			    var dptCenter = ScreenToWorld(this.nZoomCenterX , this.nZoomCenterY,ZeroMap);
			    var dptRT = ScreenToWorld(this.nZoomCenterX + (this.nZoomCenterWidth / 2) , this.nZoomCenterY + (this.nZoomCenterHeight / 2),ZeroMap);
			    
			    var PiX = Math.abs(dptRT.x - dptCenter.x);
			    var PiY = Math.abs(dptRT.y - dptCenter.y);
			    
			    ZeroMap.m_ZeroMapArea.Set(dptCenter , PiX , PiY);
			    		    
			    document.getElementById("centerx").value = dptCenter.x;
			    document.getElementById("centery").value = dptCenter.y;
			    document.getElementById("pix").value = PiX;
			    document.getElementById("piy").value = PiY;
			    
			    ZeroMap.SetGridData(false);
						
			}
			else if(ZeroMap.m_strMapMode == "zoom_in" || ZeroMap.m_strMapMode == "zoom_out")
			{
				if(this.bMove)
				{
					this.bMove = false;
					if(ZeroMap.m_vZoomRect != null)
					{
						ZeroMap.m_dBack.removeChild(ZeroMap.m_vZoomRect);
						ZeroMap.m_vZoomRect = null;
					}
					
					if(ZeroMap.m_strMapMode == "zoom_in" && ZeroMap.m_nMapScale != 0)
					{
						var dptSttart = ScreenToWorld(this.nZoomCenterX , this.nZoomCenterY,ZeroMap);
						ZeroMap.SetCenter(dptSttart.x , dptSttart.y);
					}
					
					if(ZeroMap.m_strMapMode == "zoom_out" && ZeroMap.m_nMapScale != 18)
					{
						var dptSttart = ScreenToWorld(this.nZoomCenterX , this.nZoomCenterY,ZeroMap);
						ZeroMap.SetCenter(dptSttart.x , dptSttart.y);
					}
		
					var dScreen = Math.sqrt(Math.pow(ZeroMap.m_nScreenX , 2) + Math.pow(ZeroMap.m_nScreenY , 2));
					var dZoom = Math.sqrt(Math.pow(this.nZoomCenterWidth , 2) + Math.pow(this.nZoomCenterHeight , 2));
					
					var nAdd = Math.round(dZoom / dScreen) + 1;
					nAdd = 3 - nAdd;
					
					if(ZeroMap.m_strMapMode == "zoom_in" )ZeroMap.zoomIn(nAdd);
					else ZeroMap.zoomOut(nAdd);
					
					ZeroMap.SetGridData();
				}
			}
			else  if(ZeroMap.m_strMapMode == "length")
			{
				var nOffsetX = event.x;
				var nOffsetY = event.y;
			
				var dpt = ScreenToWorld(nOffsetX , nOffsetY , ZeroMap);
				
				ZeroMap.m_ZeroMapLength.AddPoint(dpt);
				ZeroMap.m_ZeroMapLength.Draw();
			}
			else  if(ZeroMap.m_strMapMode == "point")
			{
				var nOffsetX = event.x;
				var nOffsetY = event.y;
			
				var dpt = ScreenToWorld(nOffsetX , nOffsetY , ZeroMap);
				
				if(ZeroMap.m_cCallBack != null)
				{
					var strMessage = dpt.x + "@" + dpt.y + "@";
					ZeroMap.m_cCallBack("point" , strMessage);
				}
				
				ZeroMap.SetMode("move");
			}
		}
		if(ZeroMap.m_strMapMode == "length")
		{
			ZeroMap.m_ZeroMapLength.MouseUp();
		}
		else if(ZeroMap.m_strMapMode == "boundary")
		{
			ZeroMap.SetMode("move");
		}
		return false;
	};
	
	ZeroMap.prototype.zoomIn = function(add)
	{
	    this.ClosePopup();
		if(this.m_nMapScale - add <= 0)this.m_nMapScale = 0;
		else this.m_nMapScale -= add;
		
	};
	ZeroMap.prototype.zoomOut = function(add)
	{
	    this.ClosePopup();
		if(this.m_nMapScale + add >= 18)this.m_nMapScale = 18;
		else this.m_nMapScale += add;
	};
	
	ZeroMap.prototype.MouseClick = function(event)
	{
		var ZeroMap = this.m_ZeroMap;
		if(!event) event = window.event;
		if(event.ctrlKey)ZeroMap.zoomOut();
		else if(event.altKey)ZeroMap.zoomIn();
	};
   
   	ZeroMap.prototype.WheelStop = function()
	{
		var ZeroMap = this.m_ZeroMap;
		
		var nZoom = ZeroMap.m_aWheelMove.pop();
		if(ZeroMap.m_aWheelMove.length == 0)
		{
			ZeroMap.m_nMapScale = ZeroMap.m_nMapScale + ZeroMap.m_nWheelCount;
			ZeroMap.m_nWheelCount = 0;
			ZeroMap.m_fMapZoom = 1.0;
			ZeroMap.SetGridData();
		}
	};
	
    ZeroMap.prototype.MouseWheel = function(event)
	{
		if(!event) event = window.event;
		var ZeroMap = this.m_ZeroMap;
					
		if(event.wheelDelta > 0 )
		{
			if(ZeroMap.m_nMapScale + ZeroMap.m_nWheelCount < 18)
			{
				ZeroMap.m_nWheelCount++;
			
				ZeroMap.m_fMapZoom = GetOneGridSize(ZeroMap.m_nMapScale) / GetOneGridSize(ZeroMap.m_nMapScale + ZeroMap.m_nWheelCount);
				ZeroMap.SetGridData();
				
				window.m_ZeroMap = ZeroMap;
				ZeroMap.m_aWheelMove.push(ZeroMap.m_nWheelCount);
				setTimeout(ZeroMap.WheelStop , 500);
			}
			else
			{ 
				ZeroMap.m_nMapScale = 18;
				ZeroMap.m_nWheelCount = 0;
				ZeroMap.m_fMapZoom = 1.0;
				ZeroMap.SetGridData();
			}
		}
		else
		{
			if(ZeroMap.m_nMapScale + ZeroMap.m_nWheelCount > 0)
			{
				ZeroMap.m_nWheelCount--;
				ZeroMap.m_fMapZoom = GetOneGridSize(ZeroMap.m_nMapScale) / GetOneGridSize(ZeroMap.m_nMapScale + ZeroMap.m_nWheelCount);
				ZeroMap.SetGridData();
				
				window.m_ZeroMap = ZeroMap;	
				ZeroMap.m_aWheelMove.push(ZeroMap.m_nWheelCount);
				setTimeout(ZeroMap.WheelStop , 500);
			}
			else
			{ 
				ZeroMap.m_nMapScale = ZeroMap.m_nMapScale + ZeroMap.m_nWheelCount;
				ZeroMap.m_nWheelCount = 0;
				ZeroMap.m_fMapZoom = 1.0;
				ZeroMap.SetGridData();
			}
		}
		
	
		return false;
	};
	
	ZeroMap.prototype.SetPositionInfo = function()
	{
		var cPositionData = new ZeroMapPositionData();
		cPositionData.m_dx = this.m_dMapX;
		cPositionData.m_dy = this.m_dMapY;
		cPositionData.m_nScale = this.m_nMapScale;
			
		this.m_nPositionInx++;
		this.m_aPosition[this.m_nPositionInx] = cPositionData;
	};
	
	ZeroMap.prototype.SaveZeroMap = function()
	{
	    this.ClosePopup();
	    
		var strImageUrl = g_strServer+"GetMapImage.jsp?";
		//var strImageUrl = "http://local.maps.com:8080/"+"GetMapImage.jsp?";
		strImageUrl += "w=" + this.m_nScreenX;
		strImageUrl += "&h=" + this.m_nScreenY;
		strImageUrl += "&stx=" + this.m_dMapX;
		strImageUrl += "&sty=" + this.m_dMapY;
		strImageUrl += "&scale=" + this.m_nMapScale;
		strImageUrl += "&d=1";
		strImageUrl += "&pa=MAP_PATH_GRAY";
				
		var iFrame=document.createElement('iframe');
	    iFrame.setAttribute('id','iFrame');
    	iFrame.style.border='0px';
    	iFrame.style.left='0px';
    	iFrame.style.top='0px';
      	iFrame.style.width='0px';
      	iFrame.style.height='0px';
      	iFrame.style.position = "absolute";

        document.body.appendChild(iFrame);
       	iFrame.document.location.href=strImageUrl;
	};
	
	function CnsCallBack(jData)
	{
		if(jData.CNSDATA[0].Head.Result == 1)
		{
			this.m_ZeroMap.m_ZeroMapCns.SetData(jData);
		}
		else
		{
			alert(jData.CNSDATA[0].Head.ErrorMessage);
		}
	};
	
	ZeroMap.prototype.GetCns = function(stx , sty , edx , edy , most , highway)
	{
		window.m_ZeroMap = this;
		
		var hl = document.getElementsByTagName("head").item(0);
	    var now = new Date() 
		var noCacheIE = "&noCacheIE="+ now.getTime(); 
		var fullUrl = g_strServer + "GetCns_UTF8.jsp?stx=" + stx + "&sty=" + sty + "&edx=" + edx + "&edy=" + edy + "&most=" + most + "&high=" + highway + "&call=CnsCallBack";
		var scriptId = "YJscriptId";
	    var scriptObj = document.createElement("script");
		scriptObj.setAttribute("type", "text/javascript");
		scriptObj.setAttribute("src", fullUrl + noCacheIE);
	    scriptObj.setAttribute("id", scriptId);
		hl.appendChild(scriptObj);
	};
		
	ZeroMap.prototype.AutoScale = function(minx , miny , maxx , maxy)
	{
		var dScale = GetBoundaryToScale(minx , miny , maxx , maxy , this);
		var nScale = GetRealScale(dScale);
		
		this.SetCenter((minx + maxx) / 2 , (miny + maxy) / 2);
		this.SetScale(nScale);
		
		this.SetGridData()
	};
	ZeroMap.prototype.SetGridData = function(bPositionSetting)
	{
    	this.SetBasisInfo();
		
		var dpt1 = ScreenToWorld(0,0 , this);
		var dpt2 = ScreenToWorld(this.m_nScreenX,this.m_nScreenY , this);

		var bUpdate = false;
		if(this.m_dptLastLT == null || this.m_dptLastRB == null || this.m_nLastScale == null)
		{
			this.m_dptLastLT = dpt1;
			this.m_dptLastRB = dpt2;
			this.m_nLastScale = this.m_nMapScale;
			if(this.m_fMapZoom == 1.0)this.SetPositionInfo();
			
			bUpdate = true;	
		}
		else if( this.m_dptLastLT.x != dpt1.x ||this.m_dptLastLT.y != dpt1.y || this.m_dptLastRB.x != dpt2.x || this.m_dptLastRB.y != dpt2.y || this.m_nLastScale  != this.m_nMapScale)
		{
			this.m_dptLastLT = dpt1;
			this.m_dptLastRB = dpt2;
			this.m_nLastScale  = this.m_nMapScale;
			if(bPositionSetting != false && this.m_fMapZoom == 1.0)this.SetPositionInfo();
			
			bUpdate = true;
		}
		
		if(bUpdate)
		{
			if(this.m_cCallBack != null && this.m_fMapZoom == 1)
			{
				var strMessage = dpt1.x + "@" + dpt2.y + "@" + dpt2.x + "@" + dpt1.y + "@";
				this.m_cCallBack("boundary" , strMessage);
			}
					
			var dptStart = GetStartPos(this.m_nMapScale);
			var dOneGrid = GetOneGridSize(this.m_nMapScale);
			
			var ptStartGrid = new pp; 
			var ptEndGrid = new pp; 
			
			ptStartGrid.x = parseInt(((dpt1.x - dptStart.x) / dOneGrid) + 1.0 );
			ptStartGrid.y = parseInt(((dpt1.y - dptStart.y) / dOneGrid) + 1.0 );
			
			ptEndGrid.x = parseInt(((dpt2.x - dptStart.x) / dOneGrid) + 1.0 );
			ptEndGrid.y = parseInt(((dpt2.y - dptStart.y) / dOneGrid) + 1.0 );
			
			var dptStartGrid = new pp;
			dptStartGrid.x = dptStart.x + dOneGrid  * parseFloat(ptStartGrid.x - 1);
			dptStartGrid.y = dptStart.y + dOneGrid  * parseFloat(ptEndGrid.y - 1);
				
			var ptStart = WorldToScreen(dptStartGrid.x , dptStartGrid.y + dOneGrid , this);
			this.m_ZeroMapImage.Draw(ptStartGrid , ptEndGrid , ptStart);
			this.m_ZeroMapLayer.Draw();
		
		}
	};
	
	ZeroMap.prototype.OnMoveFirst = function()
	{
		this.m_dMapX = this.m_aPosition[0].m_dx;
		this.m_dMapY = this.m_aPosition[0].m_dy;
		this.m_nMapScale = this.m_aPosition[0].m_nScale;
		
		this.m_nPositionInx = 0;
		this.SetGridData(false);
	};
	ZeroMap.prototype.OnMovePrevious = function()
	{
		if(this.m_nPositionInx-1 > -1)
		{
			this.m_nPositionInx-=1;
			
			this.m_dMapX = this.m_aPosition[this.m_nPositionInx].m_dx;
			this.m_dMapY = this.m_aPosition[this.m_nPositionInx].m_dy;
			this.m_nMapScale = this.m_aPosition[this.m_nPositionInx].m_nScale;
									
			this.SetGridData(false);
		}
	};
	ZeroMap.prototype.OnMoveNext = function()
	{
		if(typeof(this.m_aPosition[this.m_nPositionInx + 1]) != "undefined")
		{
			this.m_nPositionInx++;
			
			this.m_dMapX = this.m_aPosition[this.m_nPositionInx].m_dx;
			this.m_dMapY = this.m_aPosition[this.m_nPositionInx].m_dy;
			this.m_nMapScale = this.m_aPosition[this.m_nPositionInx].m_nScale;
			
			this.SetGridData(false);
		}
	};
	
	ZeroMap.prototype.GetZeroMapArea = function()
	{
	    return this.m_ZeroMapArea;
	};
	
	ZeroMap.prototype.GetZeroMapCns = function()
	{
	    return this.m_ZeroMapCns;
	};
	
