function Class_StaticMethods()
{
	window.imgs=128;
	window.alts="双击定位到中心，键盘方向键控制地图";
	window.getPic_Point=function(physics_x,physics_y,Scale)
	{
		var poi_x=parseInt(physics_x);
		var poi_y=parseInt(physics_y);
		var scale=parseInt(Scale);
		var bx1=poi_x>>scale+8;
		var by1=poi_y>>scale+8;
		var x1=bx1<<scale+8;
		var y1=by1<<scale+8;
		var x2=(bx1+1)<<scale+8;
		var y2=(by1+1)<<scale+8;
		var piccenty=y1+(y2-y1)/2;
		var piccentx=x1+(x2-x1)/2;
		return[bx1,by1,piccentx,piccenty];
	}
	;
	window.getScale_Units=function(level)
	{
		var str=new Array(2,4,8,16,32,64,128,256,512,1024,2048,4096,8192);
		return str[parseInt(level)];
	}
	;
	window.getC_scale_Units=function(level)
	{
		var str=new Array("25m","50m","100m","250m","500m","1km","2.5km","5km","10km","25km","50km","100km","500km");
		return str[parseInt(level)];
	}
	;
	window.getScreen_Point=function(x,y,Scale)
	{
		var x=x;
		var y=y;
		var scale=Scale;
		var point=window.getPic_Point(x,y,scale);
		var l=window.imgs/2+(x-point[2])/window.getScale_Units(scale);
		var t=window.imgs/2+(point[3]-y)/window.getScale_Units(scale);
		return[l,t];
	}
	;
	window.sav_RAM=function(obj,names)
	{
		if(window.Img_obj.length>500)
		{
			for(var i=0;
					i<100;
					i++)
			{
				delete window.Img_obj[window.Img_obj[0]];
				window.Img_obj.shift();
			}
			;
		}
		else
		{
if(window.isIE && window.isIE6)
			window.Img_obj.push(names);
else
			window.Img_obj [window.Img_obj.length]=names;
			window.Img_obj[names]=obj;
		}
		;
	}
	;
	window.getPhysics_poi=function(x_x,y_y,lev)
	{
		var x=parseInt(x_x);
		var y=parseInt(y_y);
		var level=parseInt(lev);
		var x_1=x<<(level+8);
		var y_1=y<<(level+8);
		var x_2=(x+1)<<(level+8);
		var y_2=(y+1)<<(level+8);
		x=parseInt(x_1)+(x_2-x_1)/2;
		y=parseInt(y_1)+(y_2-y_1)/2;
		return[x_1,y_1,x_2,y_2,x,y];
	}
	;
	window.getUser_Point=function(Evt)
	{
		var user_x=isIE?Evt.clientX+document.body.scrollLeft:Evt.pageX;
		var user_y=isIE?Evt.clientY+document.body.scrollTop:Evt.pageY;
		var TD_id=(Evt.target)?Evt.target:Evt.srcElement;
		TD_id=(TD_id.tagName.toUpperCase()=="TD")?TD_id:TD_id.parentNode;
		var td_x=parseInt(window.Lay.style.left)+TD_id.offsetLeft+TD_id.offsetWidth/2;
		var td_y=parseInt(window.Lay.style.top)+TD_id.offsetTop+TD_id.offsetHeight/2;
		var physics_x=(user_x-td_x)*window.getScale_Units(window.inf[2]);
		var physics_y=(td_y-user_y)*window.getScale_Units(window.inf[2]);
		TD_id=TD_id.id.split("&");
		TD_id=window.getPhysics_poi(TD_id[0],TD_id[1],TD_id[2]);
		physics_x=physics_x+TD_id[4];
		physics_y=physics_y+TD_id[5];
		return[physics_x,physics_y];
	}
	;
	window.pushString=function(content,count)
	{
		var result;
		var d=parseInt(count)>0?parseInt(count):20;
		if(content.length>d)result=content.substring(0,d)+"...";
		else result=content;
		return result;
	}
	;
}
;
function Class_StaticVariable()
{
	window.parifr=parent.document.getElementById("ifr");
	window.center_physics_poiX=(parent.parent.center_poi_x)?parent.parent.center_poi_x:parent.center_poi_x;
	window.center_physics_poiY=(parent.parent.center_poi_y)?parent.parent.center_poi_y:parent.center_poi_y;
	window.center_scale=(parent.parent.center_scale)?parent.parent.center_scale:parent.center_scale;
	window.new_x=window.center_physics_poiX;
	window.new_y=window.center_physics_poiY;
	var temps=window.getPic_Point(window.new_x,window.new_y,window.center_scale);
	window.jspid=temps[0]+"&"+temps[1]+"&"+center_scale;
	window.inf=window.jspid.split("&");
	window.Img_obj=new Array();
	window.Lay="";
	window.subTab="";
	window.rowsNum="";
	window.cellsNum="";
	window.defL="";
	window.defT="";
	window.Mx="";
	window.My="";
	window.l="";
	window.t="";
	window.Buttons=new Array(false,false,false,false);
	window.physics=null;
	window.points_objs=new Array(0);
	window.edition=navigator.userAgent.split(String.fromCharCode(32));
	window.isIE=navigator.appName.indexOf("Microsoft Internet Explorer")!=-1?1:0;
	if(window.isIE)
		window.isIE6=navigator.appVersion.indexOf("MSIE 6.0")!=-1?1:0;
	window.isNN=edition[edition.length-1].indexOf("Netscape")!=-1?1:0;
	window.isFF=edition[edition.length-1].indexOf("Firefox")!=-1?1:0;
	window.poiWidth=518;
	window.poiHeight=380;
	window.mesWidth=518;
	window.mesHeight=310;
	window.errWidth=421;
	window.errHeight=200;
	window.win=false;
}
;
new Class_StaticMethods();
new Class_StaticVariable();
function Class_Maps(Center_URL)
{
	this.Center_URL=Center_URL?Center_URL:"/images/point.gif";
	window.Lay=document.createElement("DIV");
	window.Lay.id="Maps";
	window.Lay.style.position="absolute";
	window.Lay.style.left="0px";
	window.Lay.style.top="0px";
	window.Lay.style.zIndex="0";
	window.Lay.style.cursor="move";
	window.Lay.visibility="visible";
	var center="<div id='centers' style='position:absolute;visibility:visible;left:0px;top:0px;width:17px;height:17px;z-index:2;'><img src='"+this.Center_URL+"' onclick='return false;'></div>";
	   center=document.createElement("DIV");
	   center.id="centers";
	   center.style.position="absolute";
	   center.style.zIndex="10";
	   center.style.visibility="visible";
	   center.innerHTML="<img src='"+this.Center_URL+"' onclick='return false;'>";
	   document.body.appendChild(window.Lay);
	   document.body.appendChild(center);
	   window.Lay=document.getElementById("Maps");
	   var LRwebmap=document.createElement("DIV");
	   LRwebmap.style.position="absolute";
	   LRwebmap.style.left="3%";
	   LRwebmap.style.top="93%";
	   LRwebmap.style.fontSize="12px";
	   //LRwebmap.innerHTML="Copyright &copy; 2004-2006 Lingran Info";
	   LRwebmap.innerHTML='<table  border="0" cellpadding="0" cellspacing="0" style="font-size:12px;"><tr valign=center><td><IMG src=/images/logo_trans.gif height=36></td><td>Copyright &copy; 2004-2008 Lingran Info</td></tr>';
	   var LRscale=document.createElement("DIV");
	   LRscale.style.position="absolute";
	   LRscale.style.left="85%";
	   LRscale.style.top="91%";
	   LRscale.innerHTML='<table  border="0" cellpadding="0" cellspacing="0" style="font-size:12px;"><tr><td rowspan="2" align="center" valign="bottom"><img src="/images/scale_B.JPG" width="1" height="10"></td><td align="center" id="c_scale" style="font-size:12px;color:#e97575">'+window.getC_scale_Units(window.inf[2])+'</td><td rowspan="2" align="center" valign="bottom"><img src="/images/scale_B.JPG" width="1" height="10"></td></tr><tr><td><img src="/images/scale_A.JPG" width="58" height="6"></td></tr></table>';
	   var LRbutton=document.createElement("DIV");
	   LRbutton.style.position="absolute";
		 var table=document.createElement("TABLE");
		 LRbutton.style.left="50%";// table.offsetWidth-250+"px";
	   LRbutton.style.top="3%";
	   LRbutton.innerHTML='<table border="0" width=100% cellpadding="0" cellspacing="4" style="font-size:12px;"><tr align=right><td onclick=dragEnable(0);><img src="/images/pan.gif" width=45 height=22></td><td onclick=dragZoomIn("/images/izi.cur"); width=45><img src="/images/zi.gif" width=45 height=22></td><td onclick=dragZoomOut("/images/izo.cur"); width=45><img src="/images/zo.gif" width=45 height=22></td><td onclick=dragRegion(); width=45><img src="/images/rgn.gif" width=45 height=22></td><td width=20></td></tr></table>';
	  document.body.appendChild(LRwebmap);
	  document.body.appendChild(LRscale);
	  document.body.appendChild(LRbutton);
	  window.get_TableNum=function()
	  {
		  window.rowsNum=Math.ceil(window.parifr.offsetHeight/imgs);
		  window.cellsNum=Math.ceil(window.parifr.offsetWidth/imgs);
		  if(window.rowsNum%2)window.rowsNum+=2;
		  else window.rowsNum+=1;
		  if(window.cellsNum%2)window.cellsNum+=2;
		  else window.cellsNum+=1;
	  }
	  ;
	  window.init_MapTable=function()
	  {
		  window.get_TableNum();
		  var rowsCenNum=(window.rowsNum-1)/2,cellsCenNum=(window.cellsNum-1)/2;
		  window.subTab=document.createElement("TABLE");
// --------------
		  window.subTab.border=0;
		  window.subTab.cellPadding=0;
		  window.subTab.cellSpacing=0;
		  for(var i=0;
				  i<window.rowsNum;
				  i++)
		  {
			  var newTR=subTab.insertRow(i);
			  for(var loop=0;
					  loop<window.cellsNum;
					  loop++)var newTD=newTR.insertCell(loop);
		  }
		  ;
		  window.Lay.appendChild(window.subTab);
		  window.subTab.rows[rowsCenNum].cells[cellsCenNum].id=window.jspid;
		  if(!window.Img_obj[window.jspid])
			window.subTab.rows[rowsCenNum].cells[cellsCenNum].innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+window.inf[0]+"&by="+window.inf[1]+"&level="+window.inf[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+window.subTab.rows[rowsCenNum].cells[cellsCenNum].id+"\"); ' onerror='this.src=\"\"'>";
		  else 
			window.subTab.rows[rowsCenNum].cells[cellsCenNum].appendChild(window.Img_obj[window.jspid]);
		  for(var i=1;
				  i<cellsCenNum+1;
				  i++)
		  {
			  var tdL=window.subTab.rows[rowsCenNum].cells[cellsCenNum-i+1].id.split("&");
			  var tdR=window.subTab.rows[rowsCenNum].cells[cellsCenNum+i-1].id.split("&");
			  window.subTab.rows[rowsCenNum].cells[cellsCenNum-i].id=(tdL[0]-1)+"&"+tdL[1]+"&"+tdL[2];
			  if(!window.Img_obj[window.subTab.rows[rowsCenNum].cells[cellsCenNum-i].id])window.subTab.rows[rowsCenNum].cells[cellsCenNum-i].innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(tdL[0]-1)+"&by="+tdL[1]+"&level="+tdL[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+window.subTab.rows[rowsCenNum].cells[cellsCenNum-i].id+"\");' onerror='this.src=\"\"'>";
			  else window.subTab.rows[rowsCenNum].cells[cellsCenNum-i].appendChild(window.Img_obj[window.subTab.rows[rowsCenNum].cells[cellsCenNum-i].id]);
			  window.subTab.rows[rowsCenNum].cells[cellsCenNum+i].id=(parseInt(tdR[0])+1)+"&"+tdR[1]+"&"+tdR[2];
			  if(!window.Img_obj[window.subTab.rows[rowsCenNum].cells[cellsCenNum+i].id])window.subTab.rows[rowsCenNum].cells[cellsCenNum+i].innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(parseInt(tdR[0])+1)+"&by="+tdR[1]+"&level="+tdR[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+window.subTab.rows[rowsCenNum].cells[cellsCenNum+i].id+"\");' onerror='this.src=\"\"'>";
			  else window.subTab.rows[rowsCenNum].cells[cellsCenNum+i].appendChild(window.Img_obj[window.subTab.rows[rowsCenNum].cells[cellsCenNum+i].id]);
		  }
		  ;
		  for(var i=1;
				  i<rowsCenNum+1;
				  i++)
		  {
			  for(var loop=0;
					  loop<window.cellsNum;
					  loop++)
			  {
				  var tdU=window.subTab.rows[rowsCenNum-i+1].cells[loop].id.split("&");
				  var tdD=window.subTab.rows[rowsCenNum+i-1].cells[loop].id.split("&");
				  window.subTab.rows[rowsCenNum-i].cells[loop].id=tdU[0]+"&"+(parseInt(tdU[1])+1)+"&"+tdU[2];
				  if(!window.Img_obj[window.subTab.rows[rowsCenNum-i].cells[loop].id])window.subTab.rows[rowsCenNum-i].cells[loop].innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+tdU[0]+"&by="+(parseInt(tdU[1])+1)+"&level="+tdU[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+window.subTab.rows[rowsCenNum-i].cells[loop].id+"\"); ' onerror='this.src=\"\"'>";
				  else window.subTab.rows[rowsCenNum-i].cells[loop].appendChild(window.Img_obj[window.subTab.rows[rowsCenNum-i].cells[loop].id]);
				  window.subTab.rows[rowsCenNum+i].cells[loop].id=tdD[0]+"&"+(tdD[1]-1)+"&"+tdD[2];
				  if(!window.Img_obj[window.subTab.rows[rowsCenNum+i].cells[loop].id])window.subTab.rows[rowsCenNum+i].cells[loop].innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+tdD[0]+"&by="+(tdD[1]-1)+"&level="+tdD[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+window.subTab.rows[rowsCenNum+i].cells[loop].id+"\"); ' onerror='this.src=\"\"'>";
				  else window.subTab.rows[rowsCenNum+i].cells[loop].appendChild(window.Img_obj[window.subTab.rows[rowsCenNum+i].cells[loop].id]);
			  }
			  ;
		  }
		  ;
		  window.Lay.style.width=window.subTab.offsetWidth+"px";
		  window.Lay.style.height=window.subTab.offsetHeight+"px";
		  window.defL=window.parifr.offsetWidth/2-window.subTab.offsetWidth/2;
		  window.defT=window.parifr.offsetHeight/2-window.subTab.offsetHeight/2;
		  window.Lay.style.left=window.defL;
		  window.Lay.style.top=window.defT;
	  }
	  ;
	  window.init_MapTable();
	  window.set_Center=function()
	  {
		  var obj=document.getElementById("centers");
		  obj.style.width=obj.firstChild.width;
		  obj.style.height=obj.firstChild.height;
		  var l=window.parifr.offsetWidth/2-parseInt(obj.style.width)/2;
		  var t=window.parifr.offsetHeight/2-parseInt(obj.style.height)/2;
		  obj.style.left=l;
		  obj.style.top=t;
	  }
	  ;
	  window.set_Center();
	  window.Lay.Lay_StartDrag=function(evnt)
	  {
		  if(window.isIE)
		  {
			  if(event.button==1)
			  {
				  window.Mx=event.clientX;
				  window.My=event.clientY;
				  window.l=parseInt(window.Lay.style.left);
				  window.t=parseInt(window.Lay.style.top);
				  window.pressing=true;
			  }
			  ;
		  }
		  else
		  {
			  if(evnt.button==0)
			  {
				  window.focus();
				  evnt.preventDefault();
				  window.Mx=evnt.clientX;
				  window.My=evnt.clientY;
				  window.l=parseInt(window.Lay.style.left);
				  window.t=parseInt(window.Lay.style.top);
				  window.pressing=true;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.Lay.Lay_MoveStart=function(evnt)
	  {
		  if(window.isIE&&window.pressing)
		  {
			  if(event.button==1)
			  {
				  event.returnValue=false;
				  var nowMx=event.clientX;
				  var nowMy=event.clientY;
				  try
				  {
					  window.Lay.style.left=window.l+nowMx-window.Mx;
					  window.Lay.style.top=window.t+nowMy-window.My;
				  }
				  catch(e)
				  {
				  }
				  ;
			  }
			  ;
		  }
		  else
		  {
			  if(window.pressing)
			  {
				  var nowMx=evnt.clientX;
				  var nowMy=evnt.clientY;
				  try
				  {
					  window.Lay.style.left=window.l+nowMx-window.Mx;
					  window.Lay.style.top=window.t+nowMy-window.My;
				  }
				  catch(e)
				  {
				  }
				  ;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.Lay.onmousedown=function(Evnt)
	  {
		  this.Lay_StartDrag(Evnt);
	  }
	  ;
	  window.Lay.onmousemove=function(Evnt)
	  {
		  this.Lay_MoveStart(Evnt);
		  window.TAB_insert();
	  }
	  ;
	  window.Lay.onmouseup=function()
	  {
if(window.pressing==true)
{
	if(window.points_objs.length!=0)
		window.set_AllPoiWithInfo(window.points_objs);
}
		  window.pressing=false;
	  }
	  ;
	  window.TAB_insert=function()
	  {
		  this.TAB_insertUp();
		  this.TAB_insertDown();
		  this.TAB_insertLeft();
		  this.TAB_insertRight();
	  }
	  ;
	  window.TAB_insertUp=function()
	  {
		  while(parseInt(window.Lay.style.top)>0)
		  {
			  window.Lay.style.top=parseInt(window.Lay.style.top)-window.imgs;
			  window.t-=window.imgs;
			  var newTR=window.subTab.insertRow(0);
			  for(var i=0;
					  i<window.cellsNum;
					  i++)
			  {
				  var newTD=newTR.insertCell(i);
				  var beforeID=window.subTab.rows[1].cells[i].id.split("&");
				  newTD.id=beforeID[0]+"&"+(parseInt(beforeID[1])+1)+"&"+beforeID[2];
				  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(parseInt(beforeID[1])+1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
				  else newTD.appendChild(window.Img_obj[newTD.id]);
			  }
			  ;
			  window.subTab.deleteRow(window.subTab.rows.length-1);
		  }
		  ;
	  }
	  ;
	  window.TAB_insertDown=function()
	  {
		  while(parseInt(window.Lay.style.top)+window.subTab.offsetHeight<window.parifr.offsetHeight)
		  {
			  window.Lay.style.top=parseInt(window.Lay.style.top)+window.imgs;
			  window.t+=window.imgs;
			  var newTR=window.subTab.insertRow(window.subTab.rows.length);
			  for(var i=0;
					  i<window.cellsNum;
					  i++)
			  {
				  var newTD=newTR.insertCell(i);
				  var beforeID=window.subTab.rows[window.subTab.rows.length-2].cells[i].id.split("&");
				  newTD.id=beforeID[0]+"&"+(beforeID[1]-1)+"&"+beforeID[2];
				  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(beforeID[1]-1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
				  else newTD.appendChild(window.Img_obj[newTD.id]);
			  }
			  ;
			  window.subTab.deleteRow(0);
		  }
		  ;
	  }
	  ;
	  window.TAB_insertLeft=function()
	  {
		  while(parseInt(window.Lay.style.left)>0)
		  {
			  window.l-=window.imgs;
			  window.Lay.style.left=parseInt(window.Lay.style.left)-window.imgs;
			  for(var i=0;
					  i<window.rowsNum;
					  i++)
			  {
				  var beforeID=window.subTab.rows[i].cells[0].id.split("&");
				  var newTD=window.subTab.rows[i].insertCell(0);
				  newTD.id=(beforeID[0]-1)+"&"+beforeID[1]+"&"+beforeID[2];
				  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(beforeID[0]-1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
				  else newTD.appendChild(window.Img_obj[newTD.id]);
				  window.subTab.rows[i].deleteCell(window.subTab.rows[i].cells.length-1);
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.TAB_insertRight=function()
	  {
		  while(parseInt(window.Lay.style.left)+window.subTab.offsetWidth<window.parifr.offsetWidth)
		  {
			  window.l+=window.imgs;
			  window.Lay.style.left=parseInt(window.Lay.style.left)+window.imgs;
			  for(var i=0;
					  i<window.rowsNum;
					  i++)
			  {
				  var beforeID=window.subTab.rows[i].cells[window.subTab.rows[i].cells.length-1].id.split("&");
				  var newTD=window.subTab.rows[i].insertCell(window.subTab.rows[i].cells.length);
				  newTD.id=(parseInt(beforeID[0])+1)+"&"+beforeID[1]+"&"+beforeID[2];
				  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(parseInt(beforeID[0])+1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
				  else newTD.appendChild(window.Img_obj[newTD.id]);
				  window.subTab.rows[i].deleteCell(0);
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.setPoingtoCenter=function(X,Y,Scale)
	  {
		  if(X&&Y)
		  {
			  var pos=window.getScreen_Point(X,Y,Scale);
			  window.Lay.style.left=parseInt(window.Lay.style.left)+window.imgs/2-parseInt(pos[0]);
			  window.Lay.style.top=parseInt(window.Lay.style.top)+window.imgs/2-parseInt(pos[1]);
		  }
		  ;
		  window.TAB_insert();
	  }
	  ;
	  window.setPoingtoCenter(window.new_x,window.new_y,window.inf[2]);
	  this.NN_SetParifr=function()
	  {
		  if(isNN)parifr.height=partab.offsetHeight-10;
	  }
	  ;
	  this.NN_SetParifr();
	  window.setWindow=function()
	  {
		  try
		  {
			  window.set_Center();
			  var OLD_rowsNum=window.subTab.rows.length;
			  var OLD_cellsNum=window.subTab.rows[0].cells.length;
			  window.get_TableNum();
			  if(parseInt(window.Lay.style.top)<(-window.imgs))
			  {
				  while(parseInt(window.Lay.style.top)<(-window.imgs))
				  {
					  newTR=window.subTab.insertRow(window.subTab.rows.length);
					  for(var i=0;
							  i<OLD_cellsNum;
							  i++)
					  {
						  var beforeID=window.subTab.rows[window.subTab.rows.length-2].cells[i].id.split("&");
						  var newTD=newTR.insertCell(i);
						  newTD.id=beforeID[0]+"&"+(beforeID[1]-1)+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(beforeID[1]-1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\");  ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
					  window.subTab.deleteRow(0);
					  window.Lay.style.top=parseInt(window.Lay.style.top)+window.imgs;
				  }
				  ;
			  }
			  ;
			  if(parseInt(window.Lay.style.left)<(-window.imgs))
			  {
				  while(parseInt(window.Lay.style.left)<(-window.imgs))
				  {
					  for(var i=0;
							  i<OLD_rowsNum;
							  i++)
					  {
						  var beforeID=window.subTab.rows[i].cells[OLD_cellsNum-1].id.split("&");
						  var newTD=window.subTab.rows[i].insertCell(window.subTab.rows[i].cells.length);
						  newTD.id=parseInt(beforeID[0]+1)+"&"+beforeID[1]+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(parseInt(beforeID[0])+1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
						  window.subTab.rows[i].deleteCell(0);
					  }
					  ;
					  window.Lay.style.left=parseInt(window.Lay.style.left)+window.imgs;
				  }
				  ;
			  }
			  ;
			  if(OLD_rowsNum<window.rowsNum)
			  {
				  for(var i=0;
						  i<window.rowsNum-OLD_rowsNum;
						  i++)
				  {
					  var newTR=window.subTab.insertRow(window.subTab.rows.length);
					  for(var loop=0;
							  loop<OLD_cellsNum;
							  loop++)
					  {
						  var beforeID=window.subTab.rows[window.subTab.rows.length-2].cells[loop].id.split("&");
						  var newTD=newTR.insertCell(loop);
						  newTD.id=beforeID[0]+"&"+(beforeID[1]-1)+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(beforeID[1]-1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
				  }
				  ;
			  }
			  else if(OLD_rowsNum>window.rowsNum)
			  {
				  for(var i=0;
						  i<OLD_rowsNum-window.rowsNum;
						  i++)window.subTab.deleteRow(window.subTab.rows.length-1);
			  }
			  ;
			  if(OLD_cellsNum<window.cellsNum)
			  {
				  for(var i=0;
						  i<window.subTab.rows.length;
						  i++)
				  {
					  for(var loop=0;
							  loop<window.cellsNum-OLD_cellsNum;
							  loop++)
					  {
						  var beforeID=window.subTab.rows[i].cells[window.subTab.rows[i].cells.length-1].id.split("&");
						  var newTD=window.subTab.rows[i].insertCell(window.subTab.rows[i].cells.length);
						  newTD.id=(parseInt(beforeID[0])+1)+"&"+beforeID[1]+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(parseInt(beforeID[0])+1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
				  }
				  ;
			  }
			  else if(OLD_cellsNum>window.cellsNum)
			  {
				  for(var i=0;
						  i<window.subTab.rows.length;
						  i++)
				  {
					  for(var loop=0;
							  loop<OLD_cellsNum-window.cellsNum;
							  loop++)window.subTab.rows[i].deleteCell(window.subTab.rows[i].cells.length-1);
				  }
				  ;
			  }
			  ;
		  }
		  catch(e)
		  {
		  }
		  ;
	  }
	  ;
	  window.onresize=window.setWindow;
	  window.Key_Down=function(evnt)
	  {
		  var e=isIE?event:evnt;
		  isIE?e.returnValue=false:e.preventDefault();
		  if(e.keyCode>36&&e.keyCode<41)
		  {
			  window.Buttons[e.keyCode-37]=true;
			  window.Key_Press();
		  }
		  ;
	  }
	  ;
	  window.Key_Press=function()
	  {
		  var speed=10;
		  if(window.Buttons[0]&&window.Buttons[1]&&!window.Buttons[2]&&!window.Buttons[3])
		  {
			  window.Lay.style.left=parseInt(window.Lay.style.left)+speed;
			  window.Lay.style.top=parseInt(window.Lay.style.top)+speed;
		  }
		  else if(window.Buttons[1]&&window.Buttons[2]&&!window.Buttons[0]&&!window.Buttons[3])
		  {
			  window.Lay.style.left=parseInt(window.Lay.style.left)-speed;
			  window.Lay.style.top=parseInt(window.Lay.style.top)+speed;
		  }
		  else if(window.Buttons[2]&&window.Buttons[3]&&!window.Buttons[0]&&!window.Buttons[1])
		  {
			  window.Lay.style.left=parseInt(window.Lay.style.left)-speed;
			  window.Lay.style.top=parseInt(window.Lay.style.top)-speed;
		  }
		  else if(window.Buttons[3]&&window.Buttons[0]&&!window.Buttons[1]&&!window.Buttons[2])
		  {
			  window.Lay.style.left=parseInt(window.Lay.style.left)+speed;
			  window.Lay.style.top=parseInt(window.Lay.style.top)-speed;
		  }
		  else
		  {
			  if(window.Buttons[0]&&!window.Buttons[1]&&!window.Buttons[2]&&!window.Buttons[3])window.Lay.style.left=parseInt(window.Lay.style.left)+speed;
			  else if(window.Buttons[1]&&!window.Buttons[2]&&!window.Buttons[3]&&!window.Buttons[0])window.Lay.style.top=parseInt(window.Lay.style.top)+speed;
			  else if(window.Buttons[2]&&!window.Buttons[3]&&!window.Buttons[0]&&!window.Buttons[1])window.Lay.style.left=parseInt(window.Lay.style.left)-speed;
			  else if(window.Buttons[3]&&!window.Buttons[0]&&!window.Buttons[1]&&!window.Buttons[2])window.Lay.style.top=parseInt(window.Lay.style.top)-speed;
		  }
		  ;
		  window.TAB_insert();
	  }
	  ;
	  window.Key_Up=function(evnt)
	  {
		  var e=window.isIE?event:evnt;
		  if(e.keyCode>36&&e.keyCode<41)window.Buttons[e.keyCode-37]=false;
	  }
	  ;
	  window.isIE?document.onkeydown=window.Key_Down:document.onkeypress=window.Key_Down;
	  document.onkeyup=window.Key_Up;
	  window.MV_ToCenter=function(Evnt)
	  {
		  var e=Evnt?Evnt:event;
		  var Mx=window.isIE?e.clientX+document.body.scrollLeft:e.pageX;
		  var My=window.isIE?e.clientY+document.body.scrollTop:e.pageY;
		  window.MV_ToCenter_Interface0(Mx,My);
	  }
	  ;
	  window.MV_ToCenter_Interface0=function(Mx,My)
	  {
		  var AREA_X=(Mx>=window.parifr.offsetWidth/2)?1:-1;
		  var AREA_Y=(My>=window.parifr.offsetHeight/2)?-1:1;
		  if(AREA_Y==1)
		  {
			  window.createRow_Num=My-parseInt(window.Lay.style.top);
			  window.createRow_Num=window.parifr.offsetHeight/2-window.createRow_Num;
			  window.createRow_Num=(window.createRow_Num>0)?Math.ceil(window.createRow_Num/window.imgs):0;
			  var cellsNum=window.subTab.rows[0].cells.length;
			  for(var i=0;
					  i<window.createRow_Num;
					  i++)
			  {
				  var newTR=window.subTab.insertRow(0);
				  for(var loop=0;
						  loop<cellsNum;
						  loop++)
				  {
					  var newTD=newTR.insertCell(loop);
					  var beforeID=window.subTab.rows[1].cells[loop].id.split("&");
					  newTD.id=beforeID[0]+"&"+(parseInt(beforeID[1])+1)+"&"+beforeID[2];
					  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(parseInt(beforeID[1])+1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
					  else newTD.appendChild(window.Img_obj[newTD.id]);
				  }
				  ;
			  }
			  ;
			  window.Lay.style.top=parseInt(window.Lay.style.top)-window.imgs*window.createRow_Num;
			  window.createRow_Num=[window.createRow_Num,1];
		  }
		  else if(AREA_Y==-1)
		  {
			  window.createRow_Num=window.subTab.offsetHeight-My+parseInt(window.Lay.style.top);
			  window.createRow_Num=window.parifr.offsetHeight/2-window.createRow_Num;
			  window.createRow_Num=(window.createRow_Num>0)?Math.ceil(window.createRow_Num/window.imgs):0;
			  var cellsNum=window.subTab.rows[0].cells.length;
			  for(var i=0;
					  i<window.createRow_Num;
					  i++)
			  {
				  var newTR=window.subTab.insertRow(window.subTab.rows.length);
				  for(var loop=0;
						  loop<cellsNum;
						  loop++)
				  {
					  var newTD=newTR.insertCell(loop);
					  var beforeID=window.subTab.rows[window.subTab.rows.length-2].cells[loop].id.split("&");
					  newTD.id=beforeID[0]+"&"+(beforeID[1]-1)+"&"+beforeID[2];
					  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(beforeID[1]-1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\");  ' onerror='this.src=\"\"'>";
					  else newTD.appendChild(window.Img_obj[newTD.id]);
				  }
				  ;
			  }
			  ;
			  window.createRow_Num=[window.createRow_Num,-1];
		  }
		  ;
		  if(AREA_X==1)
		  {
			  window.createCol_Num=window.subTab.offsetWidth-Mx+parseInt(window.Lay.style.left);
			  window.createCol_Num=window.parifr.offsetWidth/2-window.createCol_Num;
			  window.createCol_Num=(window.createCol_Num>0)?Math.ceil(window.createCol_Num/window.imgs):0;
			  var rowsNum=window.subTab.rows.length;
			  for(var i=0;
					  i<window.createCol_Num;
					  i++)
			  {
				  for(var loop=0;
						  loop<rowsNum;
						  loop++)
				  {
					  var beforeID=window.subTab.rows[loop].cells[window.subTab.rows[loop].cells.length-1].id.split("&");
					  var newTD=window.subTab.rows[loop].insertCell(window.subTab.rows[loop].cells.length);
					  newTD.id=(parseInt(beforeID[0])+1)+"&"+beforeID[1]+"&"+beforeID[2];
					  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(parseInt(beforeID[0])+1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\");' onerror='this.src=\"\"'>";
					  else newTD.appendChild(window.Img_obj[newTD.id]);
				  }
				  ;
			  }
			  ;
			  window.createCol_Num=[window.createCol_Num,1];
		  }
		  else if(AREA_X==-1)
		  {
			  window.createCol_Num=Mx-parseInt(window.Lay.style.left);
			  window.createCol_Num=window.parifr.offsetWidth/2-window.createCol_Num;
			  window.createCol_Num=(window.createCol_Num>0)?Math.ceil(window.createCol_Num/window.imgs):0;
			  var rowsNum=window.subTab.rows.length;
			  for(var i=0;
					  i<window.createCol_Num;
					  i++)
			  {
				  for(var loop=0;
						  loop<rowsNum;
						  loop++)
				  {
					  var beforeID=window.subTab.rows[loop].cells[0].id.split("&");
					  var newTD=window.subTab.rows[loop].insertCell(0);
					  newTD.id=(beforeID[0]-1)+"&"+beforeID[1]+"&"+beforeID[2];
					  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(beforeID[0]-1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
					  else newTD.appendChild(window.Img_obj[newTD.id]);
				  }
				  ;
			  }
			  ;
			  window.Lay.style.left=parseInt(window.Lay.style.left)-window.imgs*window.createCol_Num;
			  window.createCol_Num=[window.createCol_Num,-1];
		  }
		  ;
		  window.MV_ToCenter_Interface1(Mx,My);
	  }
	  ;
	  window.MV_ToCenter_Interface1=function(Mx,My)
	  {
		  var road=Math.sqrt(Math.pow((Mx-window.parifr.offsetWidth/2),2)+Math.pow((window.parifr.offsetHeight/2),2));
		  var speed=40;
		  var time=road/speed;
		  xPosi=Mx>=parifr.offsetWidth/2?1:-1;
		  yPosi=My>=parifr.offsetHeight/2?1:-1;
		  perX=-(Mx-parifr.offsetWidth/2)/time;
		  perY=-(My-parifr.offsetHeight/2)/time;
		  if(perX>-1&&perX<0)perX=-1;
		  if(perY>-1&&perY<0)perY=-1;
		  newMove_X=parseInt(window.Lay.style.left)+(window.parifr.offsetWidth/2-Mx);
		  newMove_Y=parseInt(window.Lay.style.top)+(window.parifr.offsetHeight/2-My);
		  window.mov=true;
		  window.MV_StartMove();
	  }
	  ;
	  window.MV_StartMove=function()
	  {
		  if(xPosi*(parseInt(window.Lay.style.left)-newMove_X)>Math.abs(perX)||yPosi*(parseInt(window.Lay.style.top)-newMove_Y)>Math.abs(perX))
		  {
			  window.Lay.style.left=(xPosi*(parseInt(window.Lay.style.left)-newMove_X)>Math.abs(perX))?parseInt(window.Lay.style.left)+perX:newMove_X;
			  window.Lay.style.top=(yPosi*(parseInt(window.Lay.style.top)-newMove_Y)>Math.abs(perY))?parseInt(window.Lay.style.top)+perY:newMove_Y;
		  }
		  else
		  {
			  window.Lay.style.left=newMove_X;
			  window.Lay.style.top=newMove_Y;
			  window.mov=false;
			  window.MV_delTable();
		  }
		  ;
		  if(window.mov)setTimeout("window.MV_StartMove()",1);
	  }
	  ;
	  window.MV_delTable=function()
	  {
		  if(window.createRow_Num[1]==1)
		  {
			  for(var i=0;
					  i<window.createRow_Num[0];
					  i++)window.subTab.deleteRow(window.subTab.rows.length-1);
		  }
		  else if(window.createRow_Num[1]==-1)
		  {
			  for(var i=0;
					  i<window.createRow_Num[0];
					  i++)
			  {
				  window.subTab.deleteRow(0);
				  window.Lay.style.top=parseInt(window.Lay.style.top)+window.imgs;
			  }
			  ;
		  }
		  ;
		  if(window.createCol_Num[1]==1)
		  {
			  var num=window.subTab.rows.length;
			  for(var i=0;
					  i<window.createCol_Num[0];
					  i++)
			  {
				  for(var loop=0;
						  loop<num;
						  loop++)window.subTab.rows[loop].deleteCell(0);
						  window.Lay.style.left=parseInt(window.Lay.style.left)+window.imgs;
			  }
			  ;
		  }
		  else if(window.createCol_Num[1]==-1)
		  {
			  var num=window.subTab.rows.length;
			  for(var i=0;
					  i<window.createCol_Num[0];
					  i++)
			  {
				  for(var loop=0;
						  loop<num;
						  loop++)
				  {
					  window.subTab.rows[loop].deleteCell(window.subTab.rows[loop].cells.length-1);
				  }
				  ;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.Lay.ondblclick=window.MV_ToCenter;
}
;
function Class_Point()
{
	window.public_PoiMethodWithInfo=function(obj)
	{
		var poi=window.getPic_Point(obj.getPhysics_x(),obj.getPhysics_y(),window.inf[2]);
		try
		{
			var TD_obj=document.getElementById(poi[0]+"&"+poi[1]+"&"+window.inf[2]);
			if(TD_obj.firstChild.tagName.toUpperCase()!="DIV")
			{
				var new_DIV=document.createElement("DIV");
				new_DIV.style.position="relative";
				new_DIV.style.zIndex="0";
				TD_obj.insertBefore(new_DIV,TD_obj.firstChild);
				var sub_div=TD_obj.firstChild;
				var poi_div=document.createElement("DIV");
				poi_div.id=obj.getPhysics_x()+"&"+obj.getPhysics_y()+"&"+window.inf[2];
				poi_div.style.position="absolute";
				poi_div.style.zIndex="0";
				poi_div.innerHTML="<IMG src='"+obj.getURL()+"' onmousemove='window.show_Info(this);' style='cursor:hand;'>";
				var poi_screen=window.getScreen_Point(obj.getPhysics_x(),obj.getPhysics_y(),window.inf[2]);
				sub_div.appendChild(poi_div);
				poi_div.firstChild.POI_OBJ=obj;
				poi_div.style.width=poi_div.firstChild.width+"px";
				poi_div.style.height=poi_div.firstChild.height+"px";
				poi_div.style.left=poi_screen[0]-parseInt(poi_div.style.width)/2;
				poi_div.style.top=poi_screen[1]-parseInt(poi_div.style.height)-2;
				window.show_UserName(obj,poi_div);
			}
			else if(!document.getElementById(obj.getPhysics_x()+"&"+obj.getPhysics_y()+"&"+window.inf[2]))
			{
				var sub_div=TD_obj.firstChild;
				var poi_div=document.createElement("DIV");
				poi_div.id=obj.getPhysics_x()+"&"+obj.getPhysics_y()+"&"+window.inf[2];
				poi_div.style.position="absolute";
				poi_div.style.zIndex="0";
				poi_div.innerHTML="<IMG src='"+obj.getURL()+"' onmousemove='window.show_Info(this);' style='cursor:hand;'>";
				var poi_screen=window.getScreen_Point(obj.getPhysics_x(),obj.getPhysics_y(),window.inf[2]);
				sub_div.appendChild(poi_div);
				poi_div.firstChild.POI_OBJ=obj;
				poi_div.style.width=poi_div.firstChild.width+"px";
				poi_div.style.height=poi_div.firstChild.height+"px";
				poi_div.style.left=poi_screen[0]-parseInt(poi_div.style.width)/2;
				poi_div.style.top=poi_screen[1]-parseInt(poi_div.style.height)-2;
				window.show_UserName(obj,poi_div);
			}
			;
		}
		catch(e)
		{
		}
		;
	}
	;
	window.show_UserName=function(obj,div_obj)
	{
		if(obj.getUserName())
		{
			var info_obj=document.createElement("DIV");
			info_obj.id="own"+obj.getID();
			info_obj.style.position="absolute";
			info_obj.style.left=parseInt(div_obj.style.left)+div_obj.firstChild.width;
			info_obj.style.top=div_obj.style.top;
			info_obj.style.border="black solid 1px";
			info_obj.innerHTML="<table cellpadding='0' cellspacing='2' border='0' bgcolor='#FFFFE7'><tr><td align='left' style='font-size:12px;color:black; ' nowrap>"+obj.getUserName()+"</td></tr></table>";
	  div_obj.parentNode.appendChild(info_obj);
	  var shdow_obj=document.createElement("DIV");
	  shdow_obj.id="s_own"+obj.getID();
	  shdow_obj.style.position="absolute";
	  shdow_obj.style.zIndex=info_obj.style.zIndex-1;
	  shdow_obj.style.left=parseInt(info_obj.style.left)+2;
	  shdow_obj.style.top=parseInt(info_obj.style.top)+2;
	  shdow_obj.style.width=info_obj.offsetWidth;
	  shdow_obj.style.height=info_obj.offsetHeight;
	  shdow_obj.style.backgroundColor="black";
	  window.isIE?shdow_obj.style.filter="alpha(opacity=50)":shdow_obj.style.MozOpacity=0.5;
	  div_obj.parentNode.appendChild(shdow_obj);
		}
		;
	}
	;
	window.show_singleInfo=function(poi_obj)
	{
		var poi_obj=document.getElementById(poi_obj.getPhysics_x()+"&"+poi_obj.getPhysics_y()+"&"+window.inf[2]).firstChild;
		var num=poi_obj.POI_OBJ.getID();
		if(!window.BEFORE_OBJ)window.BEFORE_OBJ=poi_obj.parentNode.parentNode;
		try
		{
			window.BEFORE_OBJ.style.zIndex="0";
		}
		catch(e)
		{
		}
		;
		window.BEFORE_OBJ=poi_obj.parentNode.parentNode;
		poi_obj.parentNode.parentNode.style.zIndex="1";
		var info="";
		for(var i=1;
				i<poi_obj.POI_OBJ.getArr_info().length;
				i++)info+="<tr><td>"+poi_obj.POI_OBJ.getArr_info()[i]+"</td></tr>";
				var htmls=["<input id='button_1' type='button' value='回复' style='display:none;'>",
				"<input id='button_2' type='button' value='修改信息' style='display:none;'>",
				"<input id='button_3' type='button' value='删除标点' style='display:none;'>",
				"<input id='button_4' type='button' value='重新标点' style='display:none;'>",
				"<input type='button' id='button_5' value='修改' style='display:none;'>"];
				var num=poi_obj.POI_OBJ.getButtonType();
				if(num.toString().indexOf(",")!=-1)
				{
					num=num.split(",");
					for(var i=0;
							i<num.length;
							i++)htmls[num[i]-1]=htmls[num[i]-1].replace("style='display:none;'>",">");
				}
				else if(num)
				{
					htmls[num-1]=htmls[num-1].replace("style='display:none;'>",">");
				}
				;
				htmls=htmls.join("&nbsp;");
				htmls="<table  border='0' cellpadding='2' cellspacing='1' bgcolor='#666666' width='250'><tr><td bgcolor='#9DAFC5'><table width='100%'  border='0' align='center' cellpadding='0' cellspacing='0' style='font-size:14px;color:#FFFFFF;	  font-weight:bold;	  '><tr><td id='head_txt'>"+poi_obj.POI_OBJ.getArr_info()[0]+"</td><td width='30'>&nbsp;	  </td><td width='20' align='center' valign='top'><a href='javascript:void(0)' style='text-decoration:none;color:#FFFFFF;	  ' onclick='window.close_singleInfo()'>⊙</a></td></tr></table></td></tr><tr><td valign='top' bgcolor='#FFFFFF'><table id='Users_info' width='100%'  border='0' align='center' cellpadding='2' cellspacing='0' style='font-size:12px;	  '>"+info+"</table><table width='100%' cellpadding='0' cellspacing='2' border='0'><tr><td align='center'>"+htmls+"</td></tr></table></td></tr></table>";	  
		if(document.getElementById("show_singleInfo"))
	  {
		  var temp=document.getElementById("show_singleInfo");
		  temp.parentNode.removeChild(temp);
		  for(var i=0;
				  i<4;
				  i++)
		  {
			  var temp=document.getElementById("shadow_single"+i);
			  temp.parentNode.removeChild(temp);
		  }
		  ;
	  }
	  ;
	  var show_obj=document.createElement("DIV");
	  show_obj.id="show_singleInfo";
	  show_obj.style.position="absolute";
	  show_obj.style.zIndex="2";
	  show_obj.innerHTML=htmls;
	  show_obj.style.visibility="visible";
	  poi_obj.parentNode.parentNode.appendChild(show_obj);
	  show_obj.style.width=show_obj.style.width=show_obj.firstChild.offsetWidth;
	  show_obj.style.height=show_obj.style.height=show_obj.firstChild.offsetHeight;
	  document.getElementById("button_1").onclick=function()
	  {
		  var url;
		  if(parent.parent.KIND=="poi")url="/blog/mvnforum/addreplypoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else if(parent.parent.KIND=="info")url="/blog/mvnforum/addreplythreads?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else if(parent.parent.KIND=="user")url="/blog/mvnforum/addreplypoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else url="/blog/mvnforum/addreplypoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  var re=window.open(url,"newWin");
		  re.sign=parent.parent.KIND;
	  }
	  ;
	  document.getElementById("button_3").onclick=function()
	  {
		  if(window.confirm("真的要删除这个标点？你确定？？\n删了可就没了哦！"))window.del_singlePoi(poi_obj.POI_OBJ);
	  }
	  ;
	  document.getElementById("button_2").onclick=function(Evnt)
	  {
		  var url;
		  if(poi_obj.POI_OBJ.getKinds()==1)
		  {
			  url="/blog/mvnforum/editpoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  }
		  else if(poi_obj.POI_OBJ.getKinds()==2)
		  {
			  url="/blog/mvnforum/editthreads?pointid="+poi_obj.POI_OBJ.getPoiid();
		  }
		  else if(poi_obj.POI_OBJ.getKinds()==3)
		  {
			  url="/blog/mvnforum/editpoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  }
		  ;
		  show_ParentInfo(Evnt,"修改信息",url,window.poiWidth,window.poiHeight,2);
		  window.win.ModifyObj=poi_obj;
		  window.close_Info();
	  }
	  ;
	  document.getElementById("button_4").onclick=function()
	  {
		  var old_obj=poi_obj.POI_OBJ;
		  window.del_singlePoi(poi_obj.POI_OBJ);
		  user_poiURL=old_obj.getURL();
	  }
	  ;
	  document.getElementById("button_5").onclick=function(Evnt)
	  {
		  var url;
		  if(parent.parent.KIND=="poi")url="/blog/mvnforum/editpoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else if(parent.parent.KIND=="info")url="/blog/mvnforum/editthreads?pointid="+poi_obj.POI_OBJ.getPoiid();
		  show_ParentInfo(Evnt,"修改信息",url,window.poiWidth,window.poiHeight,parent.parent.KIND);
		  window.win.ModifyObj=poi_obj;
	  }
	  ;
	  var l=parseInt(poi_obj.parentNode.style.left);
	  var t=parseInt(poi_obj.parentNode.style.top)+poi_obj.height;
	  var current_id=poi_obj.parentNode.id.split("&");
	  var current_id=window.getPic_Point(current_id[0],current_id[1],current_id[2]);
	  var vParent=document.getElementById(current_id[0]+"&"+current_id[1]+"&"+window.inf[2]);
	  while(vParent.tagName.toUpperCase()!="BODY")
	  {
		  l+=vParent.offsetLeft;
		  t+=vParent.offsetTop;
		  vParent=vParent.offsetParent;
	  }
	  ;
	  l+=poi_obj.width/2;
	  t-=poi_obj.height/2;
	  if(l<=window.parifr.offsetWidth/2&&t<=window.parifr.offsetHeight/2)
	  {
		  show_obj.style.left=poi_obj.parentNode.style.left;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)+poi_obj.height+"px";
		  window.upordown=true;
	  }
	  else if(l>window.parifr.offsetWidth/2&&t<=window.parifr.offsetHeight/2)
	  {
		  show_obj.style.left=parseInt(poi_obj.parentNode.style.left)-parseInt(show_obj.style.width)+poi_obj.width;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)+poi_obj.height+"px";
		  window.upordown=true;
	  }
	  else if(l<=window.parifr.offsetWidth/2&&t>=window.parifr.offsetHeight/2)
	  {
		  show_obj.style.left=poi_obj.parentNode.style.left;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)-parseInt(show_obj.style.height)+"px";
		  window.upordown=false;
	  }
	  else
	  {
		  show_obj.style.left=parseInt(poi_obj.parentNode.style.left)-parseInt(show_obj.style.width)+poi_obj.width;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)-parseInt(show_obj.style.height)+"px";
		  window.upordown=false;
	  }
	  ;
	  for(var i=0;
			  i<4;
			  i++)
	  {
		  var shadow_obj=document.createElement("DIV");
		  shadow_obj.id="shadow_single"+i;
		  shadow_obj.style.position="absolute";
		  shadow_obj.style.zIndex="1";
		  shadow_obj.style.left=parseInt(show_obj.style.left)+(i+1);
		  shadow_obj.style.top=parseInt(show_obj.style.top)+(i+1);
		  shadow_obj.style.width=show_obj.firstChild.offsetWidth;
		  shadow_obj.style.height=show_obj.firstChild.offsetHeight;
		  shadow_obj.style.backgroundColor="black";
		  shadow_obj.style.visibility="visible";
		  var num=(4-i)*10;
		  window.isIE?shadow_obj.style.filter="alpha(opacity="+num+")":shadow_obj.style.MozOpacity=num/100;
		  poi_obj.parentNode.parentNode.appendChild(shadow_obj);
	  }
	  ;
	}
	;
	window.close_singleInfo=function()
	{
		try
		{
			var obj=document.getElementById("show_singleInfo");
			obj.parentNode.zIndex="0";
			obj.parentNode.removeChild(obj);
			for(var i=0;
					i<4;
					i++)
			{
				var temp=document.getElementById("shadow_single"+i);
				temp.parentNode.removeChild(temp);
			}
			;
		}
		catch(e)
		{
		}
		;
	}
	;
	window.show_Info=function(poi_obj)
	{
		if(document.getElementById("show_singleInfo"))window.close_singleInfo();
		var num=poi_obj.POI_OBJ.getID();
		if(!window.BEFORE_OBJ)window.BEFORE_OBJ=poi_obj.parentNode.parentNode;
		try
		{
			window.BEFORE_OBJ.style.zIndex="0";
		}
		catch(e)
		{
		}
		;
		window.BEFORE_OBJ=poi_obj.parentNode.parentNode;
		poi_obj.parentNode.parentNode.style.zIndex="1";
		var info="";
		for(var i=1;
				i<poi_obj.POI_OBJ.getArr_info().length;
				i++)info+="<tr><td>"+poi_obj.POI_OBJ.getArr_info()[i]+"</td></tr>";
				var htmls=["<input id='button_1' type='button' value='回复' style='display:none;				'>","<input id='button_2' type='button' value='修改信息' style='display:none;				'>","<input id='button_3' type='button' value='删除标点' style='display:none;				'>","<input id='button_4' type='button' value='重新标点' style='display:none;				'>","<input type='button' id='button_5' value='修改' style='display:none;				'>"];
				var num=poi_obj.POI_OBJ.getButtonType();
				if(num.toString().indexOf(",")!=-1)
				{
					num=num.split(",");
					for(var i=0;
							i<num.length;
							i++)htmls[num[i]-1]=htmls[num[i]-1].replace("style='display:none;'>",">");
				}
				else if(num)
				{
					htmls[num-1]=htmls[num-1].replace("style='display:none;'>",">");
				}
				;
				htmls=htmls.join("&nbsp;");
				htmls="<table  border='0' cellpadding='2' cellspacing='1' bgcolor='#666666' width='250'><tr><td bgcolor='#9DAFC5'><table width='100%'  border='0' align='center' cellpadding='0' cellspacing='0' style='font-size:14px;color:#FFFFFF;	  font-weight:bold;	  '><tr><td id='head_txt'>"+poi_obj.POI_OBJ.getArr_info()[0]+"</td><td width='30'>&nbsp;	  </td><td width='20' align='center' valign='top'><a href='javascript:void(0)' style='text-decoration:none;color:#FFFFFF;	  ' onclick='window.close_Info()'>⊙</a></td></tr></table></td></tr><tr><td valign='top' bgcolor='#FFFFFF'><table id='Users_info' width='100%'  border='0' align='center' cellpadding='2' cellspacing='0' style='font-size:12px;	  '>"+info+"</table><table width='100%' cellpadding='0' cellspacing='2' border='0'><tr><td align='center'>"+htmls+"</td></tr></table></td></tr></table>";
	  if(document.getElementById("show_info"))
	  {
		  var temp=document.getElementById("show_info");
		  temp.parentNode.removeChild(temp);
		  for(var i=0;
				  i<4;
				  i++)
		  {
			  var temp=document.getElementById("shadow_"+i);
			  temp.parentNode.removeChild(temp);
		  }
		  ;
	  }
	  ;
	  var show_obj=document.createElement("DIV");
	  show_obj.id="show_info";
	  show_obj.style.position="absolute";
	  show_obj.style.zIndex="2";
	  show_obj.innerHTML=htmls;
	  show_obj.style.visibility="visible";
	  poi_obj.parentNode.parentNode.appendChild(show_obj);
	  show_obj.style.width=show_obj.style.width=show_obj.firstChild.offsetWidth;
	  show_obj.style.height=show_obj.style.height=show_obj.firstChild.offsetHeight;
	  document.getElementById("button_1").onclick=function()
	  {
		  var url;
		  if(parent.parent.KIND=="poi")url="/blog/mvnforum/addreplypoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else if(parent.parent.KIND=="info")url="/blog/mvnforum/addreplythreads?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else if(parent.parent.KIND=="user")url="/blog/mvnforum/addreplypoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else url="/blog/mvnforum/addreplypoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  var re=window.open(url,"newWin");
		  re.sign=parent.parent.KIND;
	  }
	  ;
	  document.getElementById("button_3").onclick=function()
	  {
		  if(window.confirm("真的要删除这个标点？你确定？？\n删了可就没了哦！"))window.del_singlePoi(poi_obj.POI_OBJ);
	  }
	  ;
	  document.getElementById("button_2").onclick=function(Evnt)
	  {
		  var url;
		  if(poi_obj.POI_OBJ.getKinds()==1)
		  {
			  url="/blog/mvnforum/editpoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  }
		  else if(poi_obj.POI_OBJ.getKinds()==2)
		  {
			  url="/blog/mvnforum/editthreads?pointid="+poi_obj.POI_OBJ.getPoiid();
		  }
		  else if(poi_obj.POI_OBJ.getKinds()==3)
		  {
			  url="/blog/mvnforum/editpoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  }
		  ;
		  show_ParentInfo(Evnt,"修改信息",url,window.poiWidth,window.poiHeight,2);
		  window.win.ModifyObj=poi_obj;
		  window.close_Info();
	  }
	  ;
	  document.getElementById("button_4").onclick=function()
	  {
		  var old_obj=poi_obj.POI_OBJ;
		  window.del_singlePoi(poi_obj.POI_OBJ);
		  user_poiURL=old_obj.getURL();
	  }
	  ;
	  document.getElementById("button_5").onclick=function(Evnt)
	  {
		  var url;
		  if(parent.parent.KIND=="poi")url="/blog/mvnforum/editpoint?pointid="+poi_obj.POI_OBJ.getPoiid();
		  else if(parent.parent.KIND=="info")url="/blog/mvnforum/editthreads?pointid="+poi_obj.POI_OBJ.getPoiid();
		  show_ParentInfo(Evnt,"修改信息",url,window.poiWidth,window.poiHeight,parent.parent.KIND);
		  window.win.ModifyObj=poi_obj;
	  }
	  ;
	  var l=parseInt(poi_obj.parentNode.style.left);
	  var t=parseInt(poi_obj.parentNode.style.top)+poi_obj.height;
	  var current_id=poi_obj.parentNode.id.split("&");
	  var current_id=window.getPic_Point(current_id[0],current_id[1],current_id[2]);
	  var vParent=document.getElementById(current_id[0]+"&"+current_id[1]+"&"+window.inf[2]);
	  while(vParent.tagName.toUpperCase()!="BODY")
	  {
		  l+=vParent.offsetLeft;
		  t+=vParent.offsetTop;
		  vParent=vParent.offsetParent;
	  }
	  ;
	  l+=poi_obj.width/2;
	  t-=poi_obj.height/2;
	  if(l<=window.parifr.offsetWidth/2&&t<=window.parifr.offsetHeight/2)
	  {
		  show_obj.style.left=poi_obj.parentNode.style.left;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)+poi_obj.height+"px";
		  window.upordown=true;
	  }
	  else if(l>window.parifr.offsetWidth/2&&t<=window.parifr.offsetHeight/2)
	  {
		  show_obj.style.left=parseInt(poi_obj.parentNode.style.left)-parseInt(show_obj.style.width)+poi_obj.width;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)+poi_obj.height+"px";
		  window.upordown=true;
	  }
	  else if(l<=window.parifr.offsetWidth/2&&t>=window.parifr.offsetHeight/2)
	  {
		  show_obj.style.left=poi_obj.parentNode.style.left;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)-parseInt(show_obj.style.height)+"px";
		  window.upordown=false;
	  }
	  else
	  {
		  show_obj.style.left=parseInt(poi_obj.parentNode.style.left)-parseInt(show_obj.style.width)+poi_obj.width;
		  show_obj.style.top=parseInt(poi_obj.parentNode.style.top)-parseInt(show_obj.style.height)+"px";
		  window.upordown=false;
	  }
	  ;
	  for(var i=0;
			  i<4;
			  i++)
	  {
		  var shadow_obj=document.createElement("DIV");
		  shadow_obj.id="shadow_"+i;
		  shadow_obj.style.position="absolute";
		  shadow_obj.style.zIndex="1";
		  shadow_obj.style.left=parseInt(show_obj.style.left)+(i+1);
		  shadow_obj.style.top=parseInt(show_obj.style.top)+(i+1);
		  shadow_obj.style.width=show_obj.firstChild.offsetWidth;
		  shadow_obj.style.height=show_obj.firstChild.offsetHeight;
		  shadow_obj.style.backgroundColor="black";
		  shadow_obj.style.visibility="visible";
		  var num=(4-i)*10;
		  window.isIE?shadow_obj.style.filter="alpha(opacity="+num+")":shadow_obj.style.MozOpacity=num/100;
		  poi_obj.parentNode.parentNode.appendChild(shadow_obj);
	  }
	  ;
	}
	;
	window.close_Info=function()
	{
		try
		{
			var obj=document.getElementById("show_info");
			obj.parentNode.zIndex="0";
			obj.parentNode.removeChild(obj);
			for(var i=0;
					i<4;
					i++)
			{
				var temp=document.getElementById("shadow_"+i);
				temp.parentNode.removeChild(temp);
			}
			;
		}
		catch(e)
		{
		}
		;
	}
	;
	window.close_InfoWidthMouse=function(Evnt)
	{
		if(document.getElementById("show_info"))
		{
			var e=(Evnt)?Evnt:event;
			var obj=document.getElementById("show_info");
			var l=parseInt(obj.style.left)+parseInt(window.Lay.style.left)+obj.offsetParent.parentNode.offsetLeft;
			var t=parseInt(obj.style.top)+parseInt(window.Lay.style.top)+obj.offsetParent.parentNode.offsetTop;
			var w=parseInt(obj.style.width);
			var h=parseInt(obj.style.height);
			var t_top=window.upordown?t-obj.parentNode.firstChild.offsetHeight:t;
			var t_height=window.upordown?t+h:t+h+obj.parentNode.firstChild.offsetHeight;
			var Mx=(isIE)?e.clientX+document.body.scrollLeft:e.pageX;
			var My=(isIE)?e.clientY+document.body.scrollTop:e.pageY;
			if(Mx<l||Mx>l+w||My>t_height||My<t_top)window.close_Info();
		}
		;
	}
	;
	document.onmousemove=window.close_InfoWidthMouse;
	this.set_SinglePoiWithInfo=function(obj)
	{
		window.public_PoiMethodWithInfo(obj);
		if(window.isIE)
		{
			document.onkeydown=function()
			{
				window.set_AllPoiWithInfo(window.points_objs);
				window.Key_Down();
			}
			;
		}
		else
		{
			document.onkeypress=function(Evnt)
			{
				window.set_AllPoiWithInfo(window.points_objs);
				window.Key_Down(Evnt);
			}
			;
		}
		;
		window.Lay.onmousemove=function(Evnt)
		{
			// if(Evnt&&Evnt.button==0)window.set_AllPoiWithInfo(window.points_objs);
			// else if(event.button==1)window.set_AllPoiWithInfo(window.points_objs);
			this.Lay_MoveStart(Evnt);
			window.TAB_insert();
		}
		;
		document.UP.onclick=function()
		{
			if(!window.moving)
			{
				window.set_AllPoiWithInfo(window.points_objs);
				window.moving=true;
				window.layPosition_MoveUP();
			}
			;
		}
		;
		document.DOWN.onclick=function()
		{
			if(!window.moving)
			{
				window.set_AllPoiWithInfo(window.points_objs);
				window.moving=true;
				window.layPosition_MoveDOWN();
			}
			;
		}
		;
		document.LEFT.onclick=function()
		{
			if(!window.moving)
			{
				window.set_AllPoiWithInfo(window.points_objs);
				window.moving=true;
				window.layPosition_MoveLEFT();
			}
			;
		}
		;
		document.RIGHT.onclick=function()
		{
			if(!window.moving)
			{
				window.set_AllPoiWithInfo(window.points_objs);
				window.moving=true;
				window.layPosition_MoveRIGHT();
			}
			;
		}
		;
		document.zoom_in.onclick=function()
		{
			window.setScale(true);
			if(this.booleans)window.setMyCursor();
			window.set_AllPoiWithInfo(window.points_objs);
		}
		;
		document.zoom_out.onclick=function()
		{
			window.setScale(false);
			if(this.booleans)window.setMyCursor();
			window.set_AllPoiWithInfo(window.points_objs);
		}
		;
		document.REFURBISH.onclick=function()
		{
			window.setToDefaultScale();
			window.set_AllPoiWithInfo(window.points_objs);
		}
		;
		if(document.getElementById("myscale"))
		{
			var objs=document.getElementById("myscale").getElementsByTagName("TD");
			var MyCursor=document.getElementById("mycursor");
			window.afterSetPoi=function()
			{
				window.set_AllPoiWithInfo(window.points_objs);
			}
			;
			for(var i=0;
					i<objs.length;
					i++)window.isIE?objs[i].attachEvent("onclick",window.afterSetPoi):objs[i].addEventListener("click",window.afterSetPoi,false);
					window.isIE?MyCursor.attachEvent("onmouseup",window.afterSetPoi):MyCursor.addEventListener("mouseup",window.afterSetPoi,false);
		}
		;
	}
	;
	window.set_AllPoiWithInfo=function(Arr_obj)
	{
		for(var i=0;
				i<Arr_obj.length;
				i++)window.public_PoiMethodWithInfo(Arr_obj[i]);
	}
	;
	window.del_singlePoi=function(obj)
	{
		var count=obj.getID();
		var del_obj=document.getElementById(obj.getPhysics_x()+"&"+obj.getPhysics_y()+"&"+window.inf[2]);
		if(del_obj.parentNode.childNodes.length==1)
		{
			del_obj.parentNode.parentNode.removeChild(del_obj.parentNode);
			if(document.getElementById("own"+obj.getID()))
			{
				document.getElementById("own"+obj.getID()).parentNode.removeChild(document.getElementById("own"+obj.getID()));
				document.getElementById("s_own"+obj.getID()).parentNode.removeChild(document.getElementById("s_own"+obj.getID()));
			}
			;
		}
		else
		{
			del_obj.parentNode.removeChild(del_obj);
			if(document.getElementById("own"+obj.getID()))document.getElementById("own"+obj.getID()).parentNode.removeChild(document.getElementById("own"+obj.getID()));
			document.getElementById("s_own"+obj.getID()).parentNode.removeChild(document.getElementById("s_own"+obj.getID()));
			window.close_Info();
		}
		;
		window.points_objs.splice(count,1);
		for(var i=count;
				i<window.points_objs.length;
				i++)window.points_objs[i].setID(i);
	}
	;
	window.poiMovetoCenter=function(physics_x,physics_y)
	{
		var box=window.getPic_Point(physics_x,physics_y,window.inf[2]);
		var currentTD=document.getElementById(box[0]+"&"+box[1]+"&"+window.inf[2]);
		if(currentTD)
		{
			var screenPos=window.getScreen_Point(physics_x,physics_y,window.inf[2]);
			var mx=currentTD.offsetLeft+parseInt(window.Lay.style.left)+screenPos[0];
			var my=currentTD.offsetTop+parseInt(window.Lay.style.top)+screenPos[1];
			window.MV_ToCenter_Interface0(mx,my);
		}
		else
		{
			window.setUser_scale(physics_x,physics_y,window.inf[2]);
			window.set_AllPoiWithInfo(window.points_objs);
		}
		;
	}
	;
}
;
function AddNewPoint(physics_x,physics_y,url,count,Arr_info,buttonTypes,kinds,poiid,userName)
{
	this.PHYSICS_X=physics_x;
	this.PHYSICS_Y=physics_y;
	this.URL=url?url:alert("系统未设定默认图标");
	this.ARR_INFO="";
	this.ID=count;
	this.BUTTON_TYPE=buttonTypes?buttonTypes:0;
	this.KINDS=kinds;
	this.POIID=poiid;
	this.setArr_info=function(Arr)
	{
		try
		{
			if(Arr[0]||Arr[0]=="")
			{
				for(var i=0;
						i<Arr.length;
						i++)
				{
					if(Arr[i])
					{
						this.ARR_INFO=Arr;
						break;
					}
					else this.ARR_INFO=["没有信息"];
				}
				;
			}
			else if(Arr)this.ARR_INFO=[Arr];
			else this.ARR_INFO=["没有信息"];
		}
		catch(e)
		{
			this.ARR_INFO=["没有信息"];
		}
		;
	}
	;
	this.userName=userName?userName:false;
	this.setArr_info(Arr_info);
	this.getPhysics_x=function()
	{
		return this.PHYSICS_X;
	}
	;
	this.getPhysics_y=function()
	{
		return this.PHYSICS_Y;
	}
	;
	this.getURL=function()
	{
		return this.URL;
	}
	;
	this.setURL=function(newurl)
	{
		this.URL=newurl;
	}
	;
	this.getArr_info=function()
	{
		return this.ARR_INFO;
	}
	;
	this.getID=function()
	{
		return this.ID;
	}
	;
	this.setID=function(num)
	{
		this.ID=num;
	}
	;
	this.getButtonType=function()
	{
		return this.BUTTON_TYPE;
	}
	;
	this.getKinds=function()
	{
		return this.KINDS;
	}
	;
	this.getPoiid=function()
	{
		return this.POIID;
	}
	;
	this.getUserName=function()
	{
		return this.userName;
	}
	;
	this.setUserName=function(newName)
	{
		this.userName=newName;
	}
	;
}
;
function Class_Scale(up_url,right_url,down_url,left_url,refurbish_url,zoom_in_url,zoom_out_url,Scale_url)
{
	this.up_url=up_url?up_url:"/images/up.gif";
	this.right_url=right_url?right_url:"/images/right.gif";
	this.down_url=down_url?down_url:"/images/down.gif";
	this.left_url=left_url?left_url:"/images/left.gif";
	this.refurbish_url=refurbish_url?refurbish_url:"/images/refresh.gif";
	this.zoom_in_url=zoom_in_url?zoom_in_url:"/images/add.gif";
	this.zoom_out_url=zoom_out_url?zoom_out_url:"/images/sub.gif";
	this.Scale_url=Scale_url?Scale_url:"/images/up.gif";
	window.current_scale=inf[2];
	window.getScaleNum=function()
	{
		var obj=document.getElementById("c_scale");
		obj.innerHTML=window.getC_scale_Units(window.inf[2]);
	}
	;
	this.get_InterfaceModel=function(booleans,screen_x,screen_y,speed)
	{
		var patrn=/^\d+$/;
		var l=patrn.exec(parseInt(screen_x))?parseInt(screen_x):"10px";
		var t=patrn.exec(parseInt(screen_y))?parseInt(screen_y):"10px";
		var scaleHtml
="<div id='mycursor' style='position:absolute;left:0px;top:0px;'><IMG src='/images/a_f.gif' style='cursor:hand;	'></div><table width='20'  border='0' cellpadding='0' cellspacing='0' id='myscale'><tr><td width='20'><img name='first' src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img src='/images/a_t.gif'></td></tr><tr><td><img name='last' src='/images/a_t.gif'></td></tr></table>";

		var Htmls0
="<table  border='0' cellspacing='0' cellpadding='1'><tr><td>&nbsp;	</td><td align='center'><img alt='上移' name='UP' style='cursor:hand;	' src='/images/up.gif'></td><td>&nbsp;	</td></tr><tr><td align='center'><img alt='左移' name='LEFT' style='cursor:hand;	' src='/images/left.gif'></td><td align='center'><img alt='刷新' name='REFURBISH' style='cursor:hand;	' src='/images/refresh.gif'></td><td align='center'><img alt='右移' name='RIGHT' style='cursor:hand;	'  src='/images/right.gif'></td></tr><tr><td>&nbsp;	</td><td align='center'><img alt='下移' name='DOWN' style='cursor:hand;	'  src='/images/down.gif'></td><td>&nbsp;	</td></tr><tr><td>&nbsp;	</td><td><table  border='0' cellspacing='0' cellpadding='0'><tr><td><img alt='放大' name='zoom_in' style='cursor:hand;	' src='/images/add.gif'></td></tr><tr><td><div style='position:relative;width:20px;	  '>"+scaleHtml+"</div></td></tr><tr><td><img alt='缩小' name='zoom_out' style='cursor:hand;	  ' src='/images/sub.gif'></td></tr></table></td><td>&nbsp;	  </td></tr></table>";	  

		var Htmls1
="<table  border='0' cellspacing='0' cellpadding='1'><tr><td>&nbsp;	  </td><td align='center'><img alt='上移' name='UP' style='cursor:hand;	  ' src='/images/up.gif'></td><td>&nbsp;	  </td></tr><tr><td align='center'><img alt='左移' name='LEFT' style='cursor:hand;	  ' src='/images/left.gif'></td><td align='center'><img alt='刷新' name='REFURBISH' style='cursor:hand;	  ' src='/images/refresh.gif'></td><td align='center'><img alt='右移' name='RIGHT' style='cursor:hand;	  '  src='/images/right.gif'></td></tr><tr><td>&nbsp;	  </td><td align='center'><img alt='下移' name='DOWN' style='cursor:hand;	  '  src='/images/down.gif'></td><td>&nbsp;	  </td></tr><tr><td>&nbsp;	  </td><td><table  border='0' cellspacing='0' cellpadding='0'><tr><td><img alt='放大' name='zoom_in' style='cursor:hand;	  ' src='/images/add.gif'></td></tr><tr><td height='2'></td></tr><tr><td><img alt='缩小' name='zoom_out' style='cursor:hand;	  ' src='/images/sub.gif'></td></tr></table></td><td>&nbsp;	  </td></tr></table>";	  

	var pos_obj=document.createElement("DIV");
	  pos_obj.style.position="absolute";
	  pos_obj.style.zIndex="1";
	  pos_obj.style.left=l;
	  pos_obj.style.top=t;
	  pos_obj.visibility="visible";
	  pos_obj.innerHTML=(booleans)?Htmls0:Htmls1;
	  document.body.appendChild(pos_obj);
	  if(booleans)
	  {
		  window.enabledCursor=false;
		  this.mycursor_obj=document.getElementById("mycursor");
		  window.t=null;
		  window.My=null;
		  window.off_Y=null;
		  this.mycursor_obj.startDrag=function(Evnt)
		  {
			  var e=Evnt?Evnt:event;
			  if(e.button==1&&window.isIE)
			  {
				  var obj=document.getElementById("mycursor");
				  window.t=parseInt(obj.style.top);
				  window.My=e.clientY+document.body.scrollTop;
				  window.off_Y=e.offsetY;
			  }
			  ;
			  if(e.button==0&&!window.isIE)
			  {
				  e.preventDefault();
				  var obj=document.getElementById("mycursor");
				  window.t=parseInt(obj.style.top);
				  window.My=e.pageY;
				  var t=obj.offsetTop;
				  var vParent=obj.offsetParent;
				  while(vParent.tagName.toUpperCase()!="BODY")
				  {
					  t+=vParent.offsetTop;
					  vParent=vParent.offsetParent;
				  }
				  ;
				  window.off_Y=e.pageY-t-document.body.offsetTop;
			  }
			  ;
			  window.enabledCursor=true;
		  }
		  ;
		  this.mycursor_obj.startMove=function(Evnt)
		  {
			  if(window.enabledCursor)
			  {
				  Evnt?Evnt.preventDefault():event.returnValue=false;
				  var e=Evnt?Evnt:event;
				  var obj=document.getElementById("mycursor");
				  var my=Evnt?e.pageY:e.clientY+document.body.scrollTop;
				  var ZOOM_IN=document.first;
				  var ZOOM_OUT=document.last;
				  var tIn=ZOOM_IN.offsetTop;
				  var tOut=ZOOM_OUT.offsetTop;
				  var iParent=ZOOM_IN.offsetParent;
				  var oParent=ZOOM_OUT.offsetParent;
				  while(iParent.tagName.toUpperCase()!="BODY")
				  {
					  tIn+=iParent.offsetTop;
					  tOut+=oParent.offsetTop;
					  iParent=iParent.offsetParent;
					  oParent=oParent.offsetParent;
				  }
				  ;
				  window.isIE?tIn+=(window.off_Y+1):tIn+=window.off_Y;
				  window.isIE?tOut+=(window.off_Y+3):tOut+=window.off_Y;
				  if(my>tIn&&my<tOut)obj.style.top=window.t+my-My;
			  }
			  ;
		  }
		  ;
		  this.mycursor_obj.startUp=function()
		  {
			  var Arr_scale=document.getElementById("myscale").getElementsByTagName("TD");
			  var obj=document.getElementById("mycursor");
			  for(var i=0;
					  i<Arr_scale.length;
					  i++)
			  {
				  if(parseInt(obj.style.top)+obj.offsetHeight/2>=Arr_scale[i].offsetTop&&parseInt(obj.style.top)+obj.offsetHeight/2<=Arr_scale[i].offsetTop+Arr_scale[i].offsetHeight&&i!=parseInt(window.inf[2]))
				  {
					  window.setSingleScale(i);
					  break;
				  }
				  ;
			  }
			  ;
		  }
		  ;
		  this.mycursor_obj.onmousedown=this.mycursor_obj.startDrag;
		  this.mycursor_obj.onmousemove=this.mycursor_obj.startMove;
		  this.mycursor_obj.onmouseup=this.mycursor_obj.startUp;
		  window.setMyCursor=function()
		  {
			  var mycur=document.getElementById("mycursor");
			  var scaletab=document.getElementById("myscale").getElementsByTagName("TD");
			  mycur.style.top=scaletab[parseInt(window.inf[2])].offsetTop;
		  }
		  ;
		  window.setMyCursor();
		  this.setSingleScale=function()
		  {
			  var objs=document.getElementById("myscale").getElementsByTagName("TD");
			  for(var i=0;
					  i<objs.length;
					  i++)
			  {
				  objs[i].num=i;
				  objs[i].onclick=function()
				  {
					  window.setSingleScale(this.num);
					  window.setMyCursor();
				  }
				  ;
			  }
			  ;
		  }
		  ;
		  this.setSingleScale();
		  window.disabledCursor=function()
		  {
			  window.enabledCursor=false;
		  }
		  ;
		  window.isIE?document.attachEvent("onmouseup",window.disabledCursor):document.addEventListener("mouseup",disabledCursor,false);
	  }
	  ;
	  var UP_obj=document.UP;
	  var DOWN_obj=document.DOWN;
	  var RIGHT_obj=document.RIGHT;
	  var LEFT_obj=document.LEFT;
	  var REFURBISH_obj=document.REFURBISH;
	  var ZOOM_IN=document.zoom_in;
	  var ZOOM_OUT=document.zoom_out;
	  window.moving=false;
	  UP_obj.onclick=function()
	  {
		  if(!window.moving)
		  {
			  window.moving=true;
			  window.layPosition_MoveUP();
		  }
		  ;
	  }
	  ;
	  DOWN_obj.onclick=function()
	  {
		  if(!window.moving)
		  {
			  window.moving=true;
			  window.layPosition_MoveDOWN();
		  }
		  ;
	  }
	  ;
	  LEFT_obj.onclick=function()
	  {
		  if(!window.moving)
		  {
			  window.moving=true;
			  window.layPosition_MoveLEFT();
		  }
		  ;
	  }
	  ;
	  RIGHT_obj.onclick=function()
	  {
		  if(!window.moving)
		  {
			  window.moving=true;
			  window.layPosition_MoveRIGHT();
		  }
		  ;
	  }
	  ;
	  ZOOM_IN.booleans=booleans;
	  ZOOM_OUT.booleans=booleans;
	  ZOOM_IN.onclick=function()
	  {
		  window.setScale(true);
		  if(this.booleans)window.setMyCursor();
	  }
	  ;
	  ZOOM_OUT.onclick=function()
	  {
		  window.setScale(false);
		  if(this.booleans)window.setMyCursor();
	  }
	  ;
	  REFURBISH_obj.onclick=window.setToDefaultScale;
	  window.defPos=false;
	  window.rownum=2;
	  window.colnum=2;
	  window.speed=patrn.exec(parseInt(speed))?speed:32;
	  window.layPosition_MoveUP=function()
	  {
		  if(window.moving)
		  {
			  if(!window.defPos)
			  {
				  window.defPos=window.Lay.style.top;
				  var cellsNum=window.subTab.rows[0].cells.length;
				  for(var i=0;
						  i<window.rownum;
						  i++)
				  {
					  var newTR=window.subTab.insertRow(0);
					  for(var loop=0;
							  loop<cellsNum;
							  loop++)
					  {
						  var newTD=newTR.insertCell(loop);
						  var beforeID=window.subTab.rows[1].cells[loop].id.split("&");
						  newTD.id=beforeID[0]+"&"+(parseInt(beforeID[1])+1)+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(parseInt(beforeID[1])+1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
				  }
				  ;
				  window.Lay.style.top=parseInt(window.Lay.style.top)-window.imgs*window.rownum;
			  }
			  ;
			  if(parseInt(window.Lay.style.top)<parseInt(window.defPos))
			  {
				  window.Lay.style.top=parseInt(window.Lay.style.top)+window.speed;
				  setTimeout("window.layPosition_MoveUP()",10);
			  }
			  else
			  {
				  window.Lay.style.top=parseInt(window.defPos);
				  for(var i=0;
						  i<window.rownum;
						  i++)window.subTab.deleteRow(window.subTab.rows.length-1);
						  window.defPos=false;
						  window.moving=false;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.layPosition_MoveDOWN=function()
	  {
		  if(window.moving)
		  {
			  if(!window.defPos)
			  {
				  window.defPos=window.Lay.style.top;
				  var cellsNum=window.subTab.rows[0].cells.length;
				  for(var i=0;
						  i<window.rownum;
						  i++)
				  {
					  var newTR=window.subTab.insertRow(window.subTab.rows.length);
					  for(var loop=0;
							  loop<cellsNum;
							  loop++)
					  {
						  var newTD=newTR.insertCell(loop);
						  var beforeID=window.subTab.rows[window.subTab.rows.length-2].cells[loop].id.split("&");
						  newTD.id=beforeID[0]+"&"+(beforeID[1]-1)+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+beforeID[0]+"&by="+(beforeID[1]-1)+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
				  }
				  ;
			  }
			  ;
			  if(parseInt(window.Lay.style.top)>parseInt(window.defPos)-window.imgs*window.rownum)
			  {
				  window.Lay.style.top=parseInt(window.Lay.style.top)-window.speed;
				  setTimeout("window.layPosition_MoveDOWN()",10);
			  }
			  else
			  {
				  window.Lay.style.top=parseInt(window.defPos);
				  for(var i=0;
						  i<window.rownum;
						  i++)window.subTab.deleteRow(0);
						  window.defPos=false;
						  window.moving=false;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.layPosition_MoveLEFT=function()
	  {
		  if(window.moving)
		  {
			  if(!window.defPos)
			  {
				  window.defPos=window.Lay.style.left;
				  var rowsNum=window.subTab.rows.length;
				  for(var i=0;
						  i<window.colnum;
						  i++)
				  {
					  for(var loop=0;
							  loop<rowsNum;
							  loop++)
					  {
						  var beforeID=window.subTab.rows[loop].cells[0].id.split("&");
						  var newTD=window.subTab.rows[loop].insertCell(0);
						  newTD.id=(beforeID[0]-1)+"&"+beforeID[1]+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(beforeID[0]-1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\");  ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
				  }
				  ;
				  window.Lay.style.left=parseInt(window.Lay.style.left)-window.imgs*window.colnum;
			  }
			  ;
			  if(parseInt(window.Lay.style.left)<parseInt(window.defPos))
			  {
				  window.Lay.style.left=parseInt(window.Lay.style.left)+window.speed;
				  setTimeout("window.layPosition_MoveLEFT()",10);
			  }
			  else
			  {
				  window.Lay.style.left=parseInt(window.defPos);
				  var rowsNum=window.subTab.rows.length;
				  for(var i=0;
						  i<window.colnum;
						  i++)for(var loop=0;
							  loop<rowsNum;
							  loop++)window.subTab.rows[loop].deleteCell(window.subTab.rows[loop].cells.length-1);
							  window.defPos=false;
							  window.moving=false;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	  window.layPosition_MoveRIGHT=function()
	  {
		  if(window.moving)
		  {
			  if(!window.defPos)
			  {
				  window.defPos=window.Lay.style.left;
				  var rowsNum=window.subTab.rows.length;
				  for(var i=0;
						  i<window.colnum;
						  i++)
				  {
					  for(var loop=0;
							  loop<rowsNum;
							  loop++)
					  {
						  var beforeID=window.subTab.rows[loop].cells[window.subTab.rows[loop].cells.length-1].id.split("&");
						  var newTD=window.subTab.rows[loop].insertCell(window.subTab.rows[loop].cells.length);
						  newTD.id=(parseInt(beforeID[0])+1)+"&"+beforeID[1]+"&"+beforeID[2];
						  if(!window.Img_obj[newTD.id])newTD.innerHTML="<IMG alt='"+window.alts+"' src='/mb?bx="+(parseInt(beforeID[0])+1)+"&by="+beforeID[1]+"&level="+beforeID[2]+"' width='"+window.imgs+"' height='"+window.imgs+"' onload='window.sav_RAM(this,\""+newTD.id+"\"); ' onerror='this.src=\"\"'>";
						  else newTD.appendChild(window.Img_obj[newTD.id]);
					  }
					  ;
				  }
				  ;
			  }
			  ;
			  if(parseInt(window.Lay.style.left)>parseInt(window.defPos)-window.imgs*window.colnum)
			  {
				  window.Lay.style.left=parseInt(window.Lay.style.left)-window.speed;
				  setTimeout("window.layPosition_MoveRIGHT()",10);
			  }
			  else
			  {
				  window.Lay.style.left=parseInt(window.defPos);
				  var rowsNum=window.subTab.rows.length;
				  for(var i=0;
						  i<window.colnum;
						  i++)for(var loop=0;
							  loop<rowsNum;
							  loop++)window.subTab.rows[loop].deleteCell(0);
							  window.defPos=false;
							  window.moving=false;
			  }
			  ;
		  }
		  ;
	  }
	  ;
	}
	;
	window.setScale=function(estate)
	{
		if(window.inf[2]==0&&estate)alert("已到最大比例尺");
		else if(window.inf[2]==12&&!estate)alert("已到最小比例尺");
		else
		{
			estate?window.inf[2]=parseInt(window.inf[2])-1:window.inf[2]=parseInt(window.inf[2])+1;
			window.getScaleNum();
			var Arr_center=window.getPhysics_centerPoint();
			window.new_x=Arr_center[0];
			window.new_y=Arr_center[1];
			var Arr_box=window.getPic_Point(Arr_center[0],Arr_center[1],inf[2]);
			window.jspid=Arr_box[0]+"&"+Arr_box[1]+"&"+inf[2];
			window.inf=jspid.split("&");
			window.Lay.removeChild(window.subTab);
			window.init_MapTable();
			window.setPoingtoCenter(window.new_x,window.new_y,window.inf[2]);
		}
		;
	}
	;
	window.setSingleScale=function(count)
	{
		window.inf[2]=parseInt(count);
		window.getScaleNum();
		var Arr_center=window.getPhysics_centerPoint();
		window.new_x=Arr_center[0];
		window.new_y=Arr_center[1];
		var Arr_box=window.getPic_Point(Arr_center[0],Arr_center[1],inf[2]);
		window.jspid=Arr_box[0]+"&"+Arr_box[1]+"&"+inf[2];
		window.inf=jspid.split("&");
		window.Lay.removeChild(window.subTab);
		window.init_MapTable();
		window.setPoingtoCenter (window.new_x,window.new_y,window.inf[2]);

		if(window.points_objs.length!=0)
			window.set_AllPoiWithInfo(window.points_objs);
	}
	;
	window.setToDefaultScale=function()
	{
		window.inf[2]=parseInt(window.center_scale);
		window.new_x=window.center_physics_poiX;
		window.new_y=window.center_physics_poiY;
		var Arr_box=window.getPic_Point(new_x,new_y,inf[2]);
		window.jspid=Arr_box[0]+"&"+Arr_box[1]+"&"+inf[2];
		window.inf=jspid.split("&");
		window.Lay.removeChild(window.subTab);
		window.init_MapTable();
		window.setPoingtoCenter(window.new_x,window.new_y,window.inf[2]);

		if(window.points_objs.length!=0)
			window.set_AllPoiWithInfo(window.points_objs);
	}
	;
	this.get_DefaultScale=function(screen_x,screen_y)
	{
		var patrn=/^\d+$/;
		var l=patrn.exec(parseInt(screen_x))?parseInt(screen_x):"10px";
		var t=patrn.exec(parseInt(screen_y))?parseInt(screen_y):"10px";
	}
	;
	window.getPhysics_centerPoint=function()
	{
		var screen_center_x=window.parifr.offsetWidth/2;
		var screen_center_y=window.parifr.offsetHeight/2;
		var distent_x=parseInt(window.Lay.style.left);
		var distent_y=parseInt(window.Lay.style.top)+window.imgs;
		distent_x=screen_center_x-distent_x;
		distent_y=screen_center_y-distent_y;
		var TD_ID=window.subTab.getElementsByTagName("TD")[0].id.split("&");
		distent_x*=window.getScale_Units(TD_ID[2]);
		distent_y*=-window.getScale_Units(TD_ID[2]);
		var boxs=window.getPhysics_poi(TD_ID[0],TD_ID[1],TD_ID[2]);
		distent_x+=boxs[0];
		distent_y+=boxs[1];
		return[distent_x,distent_y];
	}
	;
	window.setUser_scale=function(xPhysics,yPhysics,scales)
	{
		window.inf[2]=parseInt(scales);
		window.getScaleNum();
		window.new_x=xPhysics;
		window.new_y=yPhysics;
		var Arr_box=window.getPic_Point(xPhysics,yPhysics,window.inf[2]);
		window.jspid=Arr_box[0]+"&"+Arr_box[1]+"&"+window.inf[2];
		window.inf=jspid.split("&");
		window.Lay.removeChild(window.subTab);
		window.init_MapTable();
		window.setPoingtoCenter(window.new_x,window.new_y,window.inf[2]);
		window.setMyCursor();
	}
	;
	this.getMapsBtn=function()
	{
		window.dragZoomIn=function(icon)
		{
			if(icon)window.Lay.style.cursor="url( "+icon+" )";
			window.Lay.onmousedown=function(Evnt)
			{
				window.Lay.mouseDownCreateRect(Evnt);
			}
			;
			document.onmousemove=function(Evnt)
			{
				window.Lay.startDrawRect(Evnt);
			}
			;
			document.onmouseup=function()
			{
				if(window.enableCreate)
				{
					window.enableCreate=false;
					window.scaleZoomIn();
				}
				;
			}
			;
		}
		;
		window.dragZoomOut=function(icon)
		{
			if(icon)window.Lay.style.cursor="url( "+icon+" )";
			window.Lay.onmousedown=function(Evnt)
			{
				window.Lay.mouseDownCreateRect(Evnt);
			}
			;
			document.onmousemove=function(Evnt)
			{
				window.Lay.startDrawRect(Evnt);
			}
			;
			document.onmouseup=function()
			{
				if(window.enableCreate)
				{
					window.enableCreate=false;
					window.scaleZoomOut();
				}
				;
			}
			;
		}
		;
		window.dragEnable=function(count)
		{
			if(count)window.Lay.style.cursor="hand";
			else window.Lay.style.cursor="move";
			window.Lay.onmousedown=function(Evnt)
			{
				this.Lay_StartDrag(Evnt);
			}
			;
		}
		;
		window.dragRegion=function(icon)
		{
			if(icon)window.Lay.style.cursor="url( "+icon+" )";
			else window.Lay.style.cursor="pointer";
			window.Lay.onmousedown=function(Evnt)
			{
				window.Lay.mouseDownCreateRect(Evnt);
			}
			;
			document.onmousemove=function(Evnt)
			{
				window.Lay.startDrawRect(Evnt);
			}
			;
			document.onmouseup=function()
			{
				if(window.enableCreate)
				{
					window.enableCreate=false;

				var obj=document.getElementById("rect");
				document.body.removeChild(obj);
				}
				;
			}
			;
		}
		;
		window.Lay.mouseDownCreateRect=function(Evnt)
		{
			var e=Evnt?Evnt:event;
			window.isIE?e.returnValue=false:e.preventDefault();
			if(window.isIE&&e.button==1&&!document.getElementById("rect"))
			{
				window.Lay.createRect(e);
				window.enableCreate=true;
			}
			else if(!window.isIE&&e.button==0&&!document.getElementById("rect"))
			{
				window.Lay.createRect(e);
				window.enableCreate=true;
			}
			;
		}
		;
		window.Lay.createRect=function(Evnt)
		{
			var obj=document.createElement("DIV");
			obj.id="rect";
			obj.style.position="absolute";
			obj.style.fontSize="0px";
			obj.style.zIndex=0;
			obj.style.border="#003366 solid 1px";
			obj.style.backgroundColor="#CCFFCC";
			window.isIE?obj.style.filter="alpha(opacity=50)":obj.style.MozOpacity=0.5;
			obj.style.left=window.isIE?Evnt.clientX+document.body.scrollLeft:Evnt.pageX;
			obj.style.top=window.isIE?Evnt.clientY+document.body.scrollTop:Evnt.pageY;
			obj.style.width="0px";
			obj.style.height="0px";
			window.Mx=parseInt(obj.style.left);
			window.My=parseInt(obj.style.top);
			document.body.appendChild(obj);
		}
		;
		window.Lay.startDrawRect=function(Evnt)
		{
			if(window.enableCreate)
			{
				var e=Evnt?Evnt:event;
				window.isIE?e.returnValue=false:e.preventDefault();
				var obj=document.getElementById("rect");
				var mx=window.isIE?e.clientX+document.body.scrollLeft:e.pageX;
				var my=window.isIE?e.clientY+document.body.scrollTop:e.pageY;
				if(mx>window.Mx&&my>window.My)
				{
					obj.style.width=mx-parseInt(obj.style.left);
					obj.style.height=my-parseInt(obj.style.top);
				}
				else if(mx>window.Mx&&my<window.My)
				{
					obj.style.top=my;
					obj.style.width=mx-parseInt(obj.style.left);
					obj.style.height=window.My-parseInt(obj.style.top);
				}
				else if(mx<window.Mx&&my<window.My)
				{
					obj.style.left=mx;
					obj.style.top=my;
					obj.style.width=window.Mx-parseInt(obj.style.left);
					obj.style.height=window.My-parseInt(obj.style.top);
				}
				else if(mx<window.Mx&&my>window.My)
				{
					obj.style.left=mx;
					obj.style.width=window.Mx-parseInt(obj.style.left);
					obj.style.height=my-window.My;
				}
				;
			}
			;
		}
		;
		window.scaleZoomIn=function()
		{
			var obj=document.getElementById("rect");
			if(window.inf[2]>0)
			{
				var firstTD_ID=window.subTab.getElementsByTagName("TD")[0].id.split("&");
				var physics_x=parseInt(obj.style.left)+parseInt(obj.style.width)/2-parseInt(window.Lay.style.left);
				var physics_y=parseInt(obj.style.top)+parseInt(obj.style.height)/2-parseInt(window.Lay.style.top)-window.imgs;
				document.body.removeChild(obj);
				physics_x*=window.getScale_Units(window.inf[2]);
				physics_y*=-window.getScale_Units(window.inf[2]);
				firstTD_ID=window.getPhysics_poi(firstTD_ID[0],firstTD_ID[1],firstTD_ID[2]);
				physics_x+=firstTD_ID[0];
				physics_y+=firstTD_ID[1];
				window.inf[2]-=1;
				window.getScaleNum();
				window.new_x=physics_x;
				window.new_y=physics_y;
				var Arr_box=window.getPic_Point(physics_x,physics_y,window.inf[2]);
				window.jspid=Arr_box[0]+"&"+Arr_box[1]+"&"+inf[2];
				window.inf=jspid.split("&");
				window.Lay.removeChild(window.subTab);
				window.init_MapTable();
				window.setPoingtoCenter(window.new_x,window.new_y,window.inf[2]);
				window.setMyCursor();
				if(window.points_objs.length!=0)
					window.set_AllPoiWithInfo(window.points_objs);
			}
			else
			{
				document.body.removeChild(obj);
				alert("已到最大比例尺");
			}
			;
		}
		;
		window.scaleZoomOut=function()
		{
			var obj=document.getElementById("rect");
			if(parseInt(window.inf[2])<12)
			{
				var firstTD_ID=window.subTab.getElementsByTagName("TD")[0].id.split("&");
				var physics_x=parseInt(obj.style.left)+parseInt(obj.style.width)/2-parseInt(window.Lay.style.left);
				var physics_y=parseInt(obj.style.top)+parseInt(obj.style.height)/2-parseInt(window.Lay.style.top)-window.imgs;
				document.body.removeChild(obj);
				physics_x*=window.getScale_Units(window.inf[2]);
				physics_y*=-window.getScale_Units(window.inf[2]);
				firstTD_ID=window.getPhysics_poi(firstTD_ID[0],firstTD_ID[1],firstTD_ID[2]);
				physics_x+=firstTD_ID[0];
				physics_y+=firstTD_ID[1];
				window.inf[2]=parseInt(window.inf[2])+1;
				window.getScaleNum();
				window.new_x=physics_x;
				window.new_y=physics_y;
				var Arr_box=window.getPic_Point(physics_x,physics_y,window.inf[2]);
				window.jspid=Arr_box[0]+"&"+Arr_box[1]+"&"+inf[2];
				window.inf=jspid.split("&");
				window.Lay.removeChild(window.subTab);
				window.init_MapTable();
				window.setPoingtoCenter(window.new_x,window.new_y,window.inf[2]);
				window.setMyCursor();
				if(window.points_objs.length!=0)
					window.set_AllPoiWithInfo(window.points_objs);
			}
			else
			{
				document.body.removeChild(obj);
				alert("已到最小比例尺");
			}
			;
		}
		;
	}
	;
}
;
