function City(fo)
{var divCity=document.createElement("div");divCity.width=200;divCity.height=23;divCity.id='divCity';divCity.style.position="absolute";divCity.style.right=500;divCity.style.top=500;divCity.style.zIndex=1000;fo.appendChild(divCity);this.Location=function(l,t)
{divCity.style.right=l;divCity.style.top=t;}
this.GetCityName=function(px,py)
{var hr=new XMLHttpRequest;var query='cx='+px+'&cy='+py;hr.onreadystatechange=function()
{if(hr.readyState==4)
{divCity.innerHTML=hr.responseText;}}
hr.open("GET",'aspx/city.aspx?'+query,true);hr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");hr.send(null);}}
function MapLevel(o,le,px,py)
{var divMapLevel=document.createElement("div");divMapLevel.style.position="absolute";divMapLevel.style.left=px;divMapLevel.style.top=py;divMapLevel.style.zIndex=5;divMapLevel.id="MapLevel";var style1="#FFFF99";var style2="#FFFFFF";var style3="#FFCC00";this.MoveLevel=function(l)
{gMapBase.putMapLevel(l);gMapBase.RefreshMap(true,true);CreateTrafficPoi();GetDrive();CreateSEPoi();}
this.PutLevel=function(bo)
{gMapBase.putMapLevel((bo)?parseInt(gMapBase.getMapLevel())+1:parseInt(gMapBase.getMapLevel())-1);gMapBase.RefreshMap(true,true);}
this.ShowLevel=function()
{var l=gMapBase.getMapLevel();var result="";result="<table border=\"0\" bgcolor=\""+style1+"\" style=\"\">"+"<tbody>"+"<tr>"+"<td onclick=\"myMapLevel.PutLevel(true)\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\" valign=\"middle\" align=\"center\">"+"+"+"</td>"+"</tr>";for(var i=le;i>=1;i--)
{result+="<tr>";if(i==l)
{result+="<td bgcolor="+style3+" onmouseout=\"this.style.background='"+style3+"'\" onmouseover=\"this.style.background='"+style2+"'\" valign=\"middle\" align=\"center\">";}
else
{result+="<td onclick=\"myMapLevel.MoveLevel("+i+")\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\" valign=\"middle\" align=\"center\">";}
result+=i;result+="</td>";result+="</tr>";}
result+="<tr>"+"<td onclick=\"myMapLevel.PutLevel(false)\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\" valign=\"middle\" align=\"center\">"+"-"+"</td>"+"</tr>"+"</tbody>"+"</table>";divMapLevel.innerHTML=result;l=null;result=null;}
this.ShowLevel();o.appendChild(divMapLevel);}
function MapTool(px,py)
{var divMapTool=document.createElement("div");var myDocument=document.all.oGlobal;divMapTool.style.position="absolute";divMapTool.style.left=px;divMapTool.style.top=py;divMapTool.style.zIndex=5;divMapTool.id="MapTool";var style1="#FFFF99";var style2="#FFFFFF";var style3="#FFCC00";this.ShowTool=function(i)
{var result="";result="<table border=\"0\" bgcolor=\""+style1+"\" style=\"\">";result+="<tr>";if(i==1)
{result+="<td bgcolor="+style3+">"+"j"+"</td>";gMapBase.SelectMapTool(new MapZoom(0));}
else
{result+="<td onclick=\"myMapTool.ShowTool(1)\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\">"+"j"+"</td>";}
if(i==2)
{result+="<td bgcolor="+style3+">"+"Yp"+"</td>";gMapBase.SelectMapTool(new MapZoom(1));}
else
{result+="<td onclick=\"myMapTool.ShowTool(2)\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\">"+"Yp"+"</td>";}
if(i==3)
{result+="<td bgcolor="+style3+">"+""+"</td>";gMapBase.SelectMapTool(new MapMove);}
else
{result+="<td onclick=\"myMapTool.ShowTool(3)\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\">"+""+"</td>";}
result+="<td onclick=\"MovePosition(165768,2544522,7)\" onmouseout=\"this.style.background='"+style1+"'\" onmouseover=\"this.style.background='"+style2+"'\">"+"I"+"</td>";result+="</tr>";result+="<table>";divMapTool.innerHTML=result;}
this.ShowTool(3);myDocument.appendChild(divMapTool);}
