var LogWin = null;
var Log = { ab: null, cO: '', bK: false,
isPopupOpend: function() {
var eB = false;
if (Log.ab && Log.ab != null) {
    if (!Log.ab.colsed) { eB = true; } 
}
return eB;
},
openPopup: function(width, height) {
Log.ab = window.open('', 'LogWindow', 'height=' + (height || 300) + ',width=' + (width || 500) + ',menubar=no');
Log.ab.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">');
Log.ab.document.write('<html>');
Log.ab.document.write('<head>');
Log.ab.document.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
Log.ab.document.write('<body style="margin:0;padding:0;">');
Log.ab.document.write('<div style="width:100%;height:100%;">');
Log.ab.document.write('<div id="log" style="position:relative;width:100%;height:100%;overflow:auto;"></div>');
Log.ab.document.write('</div>');
Log.ab.document.write('</body>');
Log.ab.document.write('</html>');
Log.ab.document.close();
Log.writePopup(Log.cO);
},
writePopup: function(content) {
if (Log.bK && Log.isPopupOpend()) {
    Log.ab.document.getElementById('log').innerHTML = content;
} 
},

appendPopup: function(content) {
    if (Log.bK && Log.isPopupOpend()) {
        Log.ab.document.getElementById('log').innerHTML += content;
    } 
},
log: function(content) {
if (Log.bK) {
    Log.cO += content;
    Log.appendPopup(content);
} 
},
write: function(content) {
Log.log(content);
},
clear: function() {
Log.cO = '';
Log.writePopup('');
},
eanable: function() {
Log.bK = true;
},
disable: function() {
Log.bK = false;
} 
};
var EARTH_RADIUS = 6367.0;
var RADIUS_PER_DEGREE = Math.PI / 180.0;
function ILatLng(lat, lng) {
    this.bR = lat; this.bX = lng;
};
ILatLng.prototype.lat = function() {
return this.bR;
};
ILatLng.prototype.lng = function() {
return this.bX;
};
ILatLng.prototype.latRadians = function() {
return this.bR * RADIUS_PER_DEGREE;
};
ILatLng.prototype.lngRadians = function() {
return this.bX * RADIUS_PER_DEGREE;
};
ILatLng.prototype.distanceFrom = function(other) {
var latR1 = this.latRadians();
var latR2 = other.latRadians();
var dlngR = (this.lngRadians() - other.lngRadians()) / 2;
var dlatR = (this.latRadians() - other.latRadians()) / 2;
var gu = Math.sin(dlatR) * Math.sin(dlatR);
var gs = Math.cos(latR1) * Math.cos(latR2) * Math.sin(dlngR) * Math.sin(dlngR);
var a = gu + gs;
var sq_a = Math.sqrt(a);
var c = 0;
if (sq_a < 1)
    c = 2.0 * Math.asin(sq_a);
else c = 2.0 * Math.asin(1.0);
return (EARTH_RADIUS * c) * 1000;
};
ILatLng.prototype.equals = function(other) {
return (this.bR == other.lat()) && (this.bX == other.lng());
};
function IPoint(x, y) {
    this.x = x;
    this.y = y;
};
IPoint.prototype.equals = function(other) {
return (this.x == other.x) && (this.y == other.y);
};
function IBound(points, minY, maxX, maxY) {
    this.r = null;
    this.H = null;
    if (typeof (points) != 'undefined') {
        if (typeof (minY) != 'undefined' && typeof (maxX) != 'undefined' && typeof (maxY) != 'undefined') {
            this.r = new IPoint(points, minY);
            this.H = new IPoint(maxX, maxY);
        }
        else { this.extend(points); } 
    } 
};
IBound.prototype.equals = function(other) {
return this.r.equals(other.r) && this.H.equals(other.H);
};
IBound.prototype.extend = function(point) {
if (point.length) {
    for (var idx in point) {
        if (point[idx]) {
            this.extend(point[idx]);
        } 
    } 
}
else {
    if (this.r == null || this.H == null) {
        this.r = point;
        this.H = point;
    }
    else {
        this.r.x = Math.min(this.r.x, point.x);
        this.r.y = Math.min(this.r.y, point.y);
        this.H.x = Math.max(this.H.x, point.x);
        this.H.y = Math.max(this.H.y, point.y);
    } 
} 
};
IBound.prototype.min = function() {
return new IPoint(this.r.x, this.r.y);
};
IBound.prototype.max = function() {
return new IPoint(this.H.x, this.H.y);
};
IBound.prototype.mid = function() {
return new IPoint((this.r.x + this.H.x) / 2, (this.r.y + this.H.y) / 2);
};
IBound.prototype.width = function() {
return this.H.x - this.r.x;
};
IBound.prototype.height = function() {
return this.H.y - this.r.y;
};
IBound.prototype.intersection = function(other) {
var cw;
if (!this.intersects(other)) {
    cw = null;
}
else {
    var cM = new Array(4);
    cM[0] = this.r.x;
    cM[1] = this.H.x;
    cM[2] = other.r.x;
    cM[3] = other.H.x;
    cM.sort();
    var cH = new Array(4);
    cH[0] = this.r.y;
    cH[1] = this.H.y;
    cH[2] = other.r.y;
    cH[3] = other.H.y;
    cH.sort();
    cw = new IBound(cM[1], cH[1], cM[2], cH[2]);
}
return cw;
};
IBound.prototype.intersects = function(other) {
return ((this.r.x <= obj.r.x && this.H.x >= obj.r.x) || (this.r.x <= obj.H.x && this.H.x >= obj.H.x)) && ((this.r.y <= obj.r.y && this.H.y >= obj.r.y) || (this.r.y <= obj.H.y && this.H.y >= obj.H.y));
};
IBound.prototype.contains = function(obj) {
if (obj.r) {
    return (this.r.x <= obj.r.x && this.r.y <= obj.r.y) && (this.H.x >= obj.H.x && this.H.y >= obj.H.y);
}
else
    if (obj.x != null) { return (this.r.x <= obj.x && this.r.y <= obj.y) && (this.H.x >= obj.x && this.H.y >= obj.y); }
    else { return false; } 
};
function ILatLngBound(sw, ne) {
    if (sw && ne) {
        this.aw = sw.lat();
        this.aP = ne.lat();
        this.aK = sw.lng();
        this.aN = ne.lng();
    }
    else {
        this.aw = null;
        this.aP = null;
        this.aK = null;
        this.aN = null;
    } 
};
ILatLngBound.prototype.equals = function(bound) {
return this.aP = bound.aP && this.aw == bound.aw && this.aN == bound.aN && this.aK == bound.aK;
};
ILatLngBound.prototype.extend = function(latlng) {
if (!isDefined(latlng)) { return; }
if (latlng.length) {
    for (var i = 0; i < latlng.length; i++) {
        this.extend(latlng[i]);
    } 
}
else {
    var cY = latlng.lat();
    var dh = latlng.lng();
    if (!isDefined(cY) || !isDefined(dh)) { return; }
    if (isDefined(this.aw)) {
        if (dh < this.aK) {
            this.aK = dh;
        }
        else
            if (dh > this.aN) {
                this.aN = dh;
            }
            if (cY < this.aw) {
                this.aw = cY;
            }
            else if (cY > this.aP) { this.aP = cY; } 
        }
        else {
            this.aw = cY;
            this.aP = cY;
            this.aK = dh;
            this.aN = dh;
        } 
    } 
};
ILatLngBound.prototype.getNorthEast = function() {
return new ILatLng(this.aP, this.aN);
};
ILatLngBound.prototype.getSouthWest = function(another) {
return new ILatLng(this.aw, this.aK);
};
ILatLngBound.prototype.intersection = function(another) {
if (!this.intersects(another)) {
    return null;
}
else {
    return new ILatLngBound([this.min(), this.max(), another.min(), another.max()]);
} 
};
ILatLngBound.prototype.intersects = function(another) {
return ((this.aw <= obj.aw && this.aP >= obj.aw) || (this.aw <= obj.aP && this.aP >= obj.aP)) && ((this.aK <= obj.aK && this.aN >= obj.aK) || (this.aK <= obj.aN && this.aN >= obj.aN));
};
ILatLngBound.prototype.contains = function(obj) {
if (isDefined(obj.aw)) {
    return (this.aK <= obj.aK && this.aw <= obj.aw) && (this.aN >= obj.aN && this.aP >= obj.aP);
}
else
    if (isDefined(obj.bR)) {
        return this.aK <= obj.bX && this.aN >= obj.bX && this.aw <= obj.bR && this.aP >= obj.bR;
    }
    else { return false; } 
};
function ISize(width, height) {
    this.height = height || 0;
    this.width = width || 0;
};
ISize.prototype.equals = function(other) {
return (this.width == other.width || this.height == other.height);
};
function _createDivElement(styles) {
    var fK = document.createElement('div');
    for (var fg in styles) {
        fK.style[fg] = styles[fg];
    }
    return fK;
};
var cloneObject = function(src) {
  var dst;
  if(typeof(src)!="object"){
  return null;}
  if(src.constructor==Object){
  dst=new src.constructor();}
  else{
  dst=new src.constructor(src.valueOf());}
  for(var key in src){
  if(dst[key]!=src[key]){
  if(typeof(src[key])=='object'){
  dst[key]=clone(src[key]);}else{dst[key]=src[key];}}}
  return dst;};
  function binarySearch(a,key,fromIndex,toIndex){
  var low=fromIndex;
  var high=toIndex;
  while(low<=high){
  var mid=(low+high)>>>1;
  var midVal=a[mid];
  if(midVal<key)low=mid+1;
  else 
  if(midVal>key)
  high=mid-1;
  else 
  return mid;}
  return-(low+1);};
  function CMap(){
  this.dV=new Array();};
  CMap.prototype.put=function(key,obj){
  var idx=this.eb(key);
  if(idx<0){
  this.dV.splice(-idx-1,1,[key,obj]);}}
  ;
  CMap.prototype.get=function(key){
  var idx=this.eb(key);
  if(idx<0){
  return null;
  }
  else{return this.dV[idx];
  }};
  CMap.prototype.remove=function(key){
  var idx=this.eb(key);
  var obj=null;
  if(idx>0){
  obj=this.dV[idx][1]
  ;this.dV.splice(idx,1)
  ;}
  return obj;
  };
  CMap.prototype.eb=function(key){
  var low=0;
  var high=this.dV.length-1;
  while(low<=high){
  var mid=(low+high)>>>1;
  var midVal=a[mid];
  if(midVal<key)low=mid+1;
  else 
  if(midVal>key)
  high=mid-1;
  else 
  return mid;}
  return-(low+1);};
  function CArray(){
  this.ah=new Array();};
  CArray.prototype.add=function(pElement){
  this.ah.push(pElement);};
  CArray.prototype.remove=function(pElement){
  var fq=null;
  var dS= -1;
  if(typeof(pElement)=='number'){
  dS=pElement;}
  else{dS=this.indexOf(pElement);}
  if(dS> -1&&dS<this.ah.length){
  fq=this.ah.splice(dS,1);}
  return fq;};
  CArray.prototype.get=function(pIndex){
  return this.ah[pIndex];};
  CArray.prototype.size=function(){
  return this.ah.length;};
  CArray.prototype.isEmpty=function(){
  return(this.ah.length>0)?false:true;};
  CArray.prototype.clear=function(){
  this.ah.length=0;
  };
  CArray.prototype.contains=function(pElement){
  var eR=false;
  if(this.ah.indexOf){
  eR=(this.ah.indexOf(pElement)> -1);
  }
  else{eR=(this.indexOf(pElement)> -1);}
  return eR;};
  CArray.prototype.indexOf=function(o){
  var fE= -1;
  for(var i=0;i<this.ah.length;i++){
  if(this.ah[i]==o){
  fE=i;break;
  }}
  return fE;};
  CArray.prototype.toArray=function(){
  return this.ah;};
  function isDefined(obj){
  return(typeof obj!='undefined'&&obj!=null);};
  var IUtil={ej:function(src,left,top,width,height){
  var I=document.createElement('img');
  I.src=src;
  if($.browser.mozilla){
  I.style.MozUserSelect='none';
  }
  else
  if($.browser.msie){
  I.unselectable="on";
  I.onselectstart=function(){
  return false;
  }}
  I.style.position='absolute';
  I.style.left=left+'px';
  I.style.top=top+'px';
  I.style.width=width+'px';
  I.style.height=height+'px';
  I.style.margin='0px';
  I.style.padding='0px';
  I.style.border='0px';
  I.oncontextmenu=function(){
  return false;
  };
  return I;
  },
  createImage:function(src,left,top,width,height){
  var dK=null;
  if(src.match(/.*\.png([?].*)?$/i)&&$.browser.msie&&$.browser.version<7){
  var fw='progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"'+src+'\",sizingMethod="scale")';
  dK=_createDivElement({position:'absolute','left':left,'top':top,'filter':fw,'width':width,'height':height});
  var I=document.createElement('img');}
  if(dK==null){
  dK=IUtil.ej(src,left,top,width,height);}
  return dK;
  },
  setImageSrc:function(img,src){
  if(img.tagName.toLowerCase()=='div'){
  img.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"'+src+'\",sizingMethod="scale")';;}
  else{
  if(img.src!=src){
  img.src=PPG_BASE_URL+"/img/transparent.png";
  setTimeout(function(){
  img.src=src},0);
  }}}
  ,cR:/alpha\(opacity=.*\)/,setOpacity:function(element,opacity){
  if($.browser.msie){
  var dw="alpha(opacity="+Math.round(opacity*100)+")";
  if(
  element.style.filter.match(IUtil.cR)){
  element.style.filter=element.style.filter.replace(IUtil.cR,dw);
  }
  else{
  element.style.filter+=(' '+dw);
  }}
  else{
  element.style.KHTMLOpacity=opacity;
  element.style.MozOpacity=opacity;
  element.style.opacity=opacity;
  }}};
  function gc(cP,cW){
  if(cP.length<=0|| !isDefined(cW)){
  return;
  }
  var dw='';
  var eu=cW;
  var fo;
  for(var i=0;i<cP.length;i++){
  fo=cP.charCodeAt(i)^eu;
  dw+=String.fromCharCode(fo);
  eu=fo;
  }
  return encodeURI(dw);};
  function fm(cP,cW){
  if(cP.length<=0|| !isDefined(cW)){return;}
  cP=decodeURI(cP);
  var dw='';
  var eu;
  var fL;
  for(var i=cP.length-1;i>0;i--){
  eu=cP.charCodeAt(i-1);
  fL=cP.charCodeAt(i)^eu;
  dw=String.fromCharCode(fL)+dw;
  }
  dw=String.fromCharCode(cP.charCodeAt(0)^cW)+dw;
  return dw;
  };
   function IControl(){};
   IControl.prototype.initialize=function(map){};
   IControl.prototype.remove=function(){};
   IControl.prototype.getDefaultPosition=function(){};
   IControlAnchor={
   IANCHOR_TOP_RIGHT:0,
   IANCHOR_TOP_LEFT:1,
   IANCHOR_BOTTOM_RIGHT:2,
   IANCHOR_BOTTOM_LEFT:3};
   function RealTrackInfoControl(){
   this.w=document.createElement('div');
   this.f=null;};
   RealTrackInfoControl.prototype=new IControl();
   RealTrackInfoControl.prototype.initialize=function(map){
   this.f=map;
   this.f.getContainer().appendChild(this.w);
   IEvent.addListener(this.f,'zoom',this.setValue(this.f.getZoom()));};
   RealTrackInfoControl.prototype.remove=function(){
   this.f.getContainer().removeChild(this.w);};
   function StatusControl(){this.w;this.f;};
   StatusControl.prototype=new IControl();
   StatusControl.prototype.initialize=function(map){
   this.f=map;
   this.w=_createDivElement({position:'absolute',right:'10px',top:'10px',width:'150px',height:'200px',overflow:'hidden'});
   IUtil.setOpacity(this.w,0.8);
   this.cu=IUtil.createImage('img/btn01.gif',120,10,20,20);
   this.cD=IUtil.createImage('img/btn02.gif',120,10,20,20);
   this.cu.style.zIndex=10;
   this.cD.style.zIndex=10;
   this.cu.style.display='none';
   this.dZ=_createDivElement({position:'relative',left:'0px',top:'0px',width:'130px',height:'10px',padding:'10px',overflow:'hidden',zIndex:1,background:'url(img/status_back.gif) no-repeat left top'});
   this.dZ.innerHTML='<b>REALTIME</b>';
   this.ak=_createDivElement({position:'absolute',left:'0px',top:'0px',width:'140px',height:'170px',overflow:'hidden',fontFamily:'verdana',fontSize:'10px',color:'#000000',padding:'20px 5px 5px 5px',zIndex: -10,background:'url(img/status_back.gif) no-repeat left bottom'});
   this.ak.innerHTML = '<table><tr valign="center" height=20><th align="left">latitude:</th><th id="ppg_st_lat" align="left"></th></tr><tr valign="center" height=20><th align="left" >longitude:</th><th id="ppg_st_lng" align="left"></th></tr><tr valign="center" height=20><th align="left">speed:</th><th id="ppg_st_speed" align="left"></th></tr><tr valign="center" height=20><th align="left">car no.:</th><th id="ppg_st_carno" align="left"></th></tr><tr valign="center" height=20><th align="left">car Job:</th><th id="ppg_st_job" align="left"></th></tr></table>';
   var bJ=this.ak;
   var eG=24;
   var fj=this.cD;
   var fh=this.cu;
   this.cD.onclick=function(){
   if(eG> -120){
   eG-=10;
   bJ.style.top=eG+'px';
   setTimeout(
   arguments.callee,25);
   }
   else{
   fj.style.display='none';
   fh.style.display='block';
   }};
   this.cu.onclick=function(){
   if(eG<24){
   eG+=10;
   bJ.style.top=eG+'px';
   setTimeout(arguments.callee,25);
   }
   else{
   fj.style.display='block';
   fh.style.display='none';
   }};
   this.w.appendChild(this.cu);
   this.w.appendChild(this.cD);
   this.w.appendChild(this.dZ);
   this.w.appendChild(this.ak);
   map.getContainer().appendChild(this.w);
   };
   StatusControl.prototype.setTitle=function(title){
   if(isDefined(title)){
   this.dZ.innerHTML='<b>'+title+'</b>';}};
   StatusControl.prototype.setCarNo=function(content){
   if(isDefined(content)){
   document.getElementById('ppg_st_carno').innerHTML=content;
   }};
   StatusControl.prototype.setLatitude=function(content){
   if(isDefined(content)){
   document.getElementById('ppg_st_lat').innerHTML=content;}};
   
   StatusControl.prototype.setLongitude=function(content){
   if(isDefined(content)){
   document.getElementById('ppg_st_lng').innerHTML=content;}};
   StatusControl.prototype.setSpeed=function(content){
   if(isDefined(content)){
   document.getElementById('ppg_st_speed').innerHTML=content;}};
   StatusControl.prototype.setJob=function(content){
   if(isDefined(content)){
   document.getElementById('ppg_st_job').innerHTML=content;}};
   StatusControl.prototype.remove=function(){
   if(isDefined(this.w)){map.getContainer().removeChild(this.w);}};
   PPG_SMALLZOOMCONTROL_ZOOMIN='ZOOM IN';
   PPG_SMALLZOOMCONTROL_ZOOMOUT='ZOOM OUT';
   function SmallZoomControl(){
   this.w;
   this.f;
   };
   SmallZoomControl.prototype=new IControl();
   SmallZoomControl.prototype.initialize=function(map){
   this.f=map;
   this.w=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'5px',top:'5px',zIndex:500,width:'25px',height:'50px'});
   var eO=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'0px',top:'0px',width:'25px',height:'50px'});
   var fS=IUtil.createImage(PPG_BASE_URL+'/img/zoom_min.png',0,0,25,50);
   eO.appendChild(fS);
   var dC=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'0px',top:'0px',width:'25px',height:'25px',cursor:'pointer',zIndex:10,background:'white'});
   IUtil.setOpacity(dC,0.01);
   dC.title=PPG_SMALLZOOMCONTROL_ZOOMIN;
   IEvent.addDomListener(dC,'click',this,function(){
   this.f.zoomOut();});
   var df=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'0px',top:'25px',width:'25px',height:'25px',cursor:'pointer',zIndex:10,background:'white'});
   IUtil.setOpacity(df,0.01);
   df.title=PPG_SMALLZOOMCONTROL_ZOOMOUT;
   IEvent.addDomListener(df,'click',this,function(){
   this.f.zoomIn();});
   this.w.appendChild(dC);
   this.w.appendChild(df);
   this.w.appendChild(eO);
   this.f.getContainer().appendChild(this.w);
   };
   SmallZoomControl.prototype.remove=function(){
   this.f.getContainer().removeChild(this.w);
   };
   var PPG_GEN_UID=18;
   var PPG_GEN_UID_R_PATH='z%0Ez%0A0%1F0%067%19/%197%057%0F!%10%25%178Q%3C%5Bt%17x%08q%03j%0De%11N%7FOa%11%7F%18';
   function bQ(){
   this.fQ=fm(PPG_GEN_UID_R_PATH,PPG_GEN_UID);
   this.w=null;this.f=null;
   };
   bQ.prototype=new IControl();
   bQ.prototype.initialize=function(map){
   this.w=_createDivElement({position:'absolute',right:'115px',bottom:'13px'});
   var I=IUtil.createImage(this.fQ,0,0,113,13);
   this.w.appendChild(I);
   this.f=map;
   this.f.getContainer().appendChild(this.w);
   };
   function IZoomControl(){
   this.f=null;
   this.bI=null;
   this.cC=null;
   this.bF=null;
   this.cr=null;
   this.bZ=null;
   this.ca=null;
   this.bP=null;
   this.fR=null;
   this.fA=null;
   this.an=null;
   this.fc=0;
   this.bd=0;
   this.au=80;
   this.by=10;
   this.be=8;
   this.bE=1;
   };
   IZoomControl.prototype=new IControl();
   IZoomControl.prototype.initialize=function(map){
   this.f=map;
   var G=this;
   var cs=this.ea();
   this.by=this.f.getCurrentMapType().getMaximumResolution()-this.f.getCurrentMapType().getMinimumResolution()+1;
   this.au=this.bd+(this.by-1)*(this.be+this.bE)-1;this.bI=_createDivElement({position:'absolute',left:'10px',top:'0px',width:'50px',height:(92+cs)+'px',overflow:'hidden',zIndex:500});
   this.bI.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/mapcontrols.png',0,0,50,420));
   this.cC=_createDivElement({position:'absolute',left:'16px',top:'72px',width:'19px',height:cs+'px'});
   this.bb=_createDivElement({position:'absolute',left:'0px',top:'0px',width:'19px',height:cs+'px',backgroundColor:'FFFFFF'});
   IUtil.setOpacity(this.bb,0.01);
   this.cC.appendChild(this.bb);
   this.bI.appendChild(this.cC);
   this.bF=_createDivElement({position:'absolute',left:'0px',top:(72+cs)+'px',width:'50px',height:'19px',overflow:'hidden'});
   this.bF.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/mapcontrols.png',0,-350,50,420));
   this.bI.appendChild(this.bF);
   this.cT=_createDivElement({position:'absolute',left:'18px',top:'3px',width:'15px',height:'15px',backgroundColor:'FFFFFF'});
   IEvent.addDomListener(this.cT,'click',function(){G.f.panDirection(0,1)});
   IUtil.setOpacity(this.cT,0.01);
   this.bI.appendChild(this.cT);
   this.ca=_createDivElement({position:'absolute',left:'2px',top:'19px',width:'15px',height:'15px',backgroundColor:'FFFFFF'});
   IEvent.addDomListener(this.ca,'click',function(){G.f.panDirection(1,0)});
   IUtil.setOpacity(this.ca,0.01);
   this.bI.appendChild(this.ca);
   this.cn=_createDivElement({position:'absolute',left:'18px',top:'35px',width:'15px',height:'15px',backgroundColor:'FFFFFF'});
   IEvent.addDomListener(this.cn,'click',function(){G.f.panDirection(0,-1)});
   IUtil.setOpacity(this.cn,0.01);
   this.bI.appendChild(this.cn);
   this.bP=_createDivElement({position:'absolute',left:'34px',top:'19px',width:'15px',height:'15px',backgroundColor:'FFFFFF'});
   IEvent.addDomListener(this.bP,'click',function(){
   G.f.panDirection(-1,0)});
   IUtil.setOpacity(this.bP,0.01);
   this.bI.appendChild(this.bP);
   this.cr=_createDivElement({position:'absolute',left:'16px',top:'53px',width:'19px',height:'19px',backgroundColor:'FFFFFF'});
   IEvent.addDomListener(this.cr,'click',function(){G.zoomIn()});
   IUtil.setOpacity(this.cr,0.01);
   this.bI.appendChild(this.cr);
   this.bZ=_createDivElement({position:'absolute',left:'16px',top:'0px',width:'19px',height:'19px',backgroundColor:'FFFFFF'});
   IEvent.addDomListener(this.bZ,'click',function(){G.zoomOut()});
   IUtil.setOpacity(this.bZ,0.01);
   this.bF.appendChild(this.bZ);
   this.an=_createDivElement({position:'absolute',left:'0px',top:'0px',width:'19px',height:'8px',overflow:'hidden'});
   this.an.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/mapcontrols.png',-2,-376,50,420));
   this.cC.appendChild(this.an);
   this.bb.fY=this.an;
   IEvent.addDomListener(this.bb,'click',function(e){
   var A=this;
   var bJ=new IPoint(0,0);
   while(isDefined(A)){
   if(isDefined(A.offsetLeft)){bJ.x+=parseInt(A.offsetLeft);
   }
   if(isDefined(A.offsetTop)){
   bJ.y+=parseInt(A.offsetTop);
   };
   A=A.offsetParent;
   }
   A=this.P;
   while(isDefined(A)&&A!=document.documentElement&&A!=document.body){
   bJ.x-=parseInt(A.scrollLeft);
   bJ.y-=parseInt(
   A.scrollTop);
   A=A.parentNode;
   }
   bJ.x=e.clientX-bJ.x+(document.documentElement.scrollLeft+document.body.scrollLeft);
   bJ.y=e.clientY-bJ.y+(document.documentElement.scrollTop+document.body.scrollTop);
   var aE=bJ.y;
   aE-=4;
   if(aE<bN.bd){aE=bN.bd;}
   if(aE>bN.au){aE=bN.au;}
   var ek=Math.round((aE)/(G.be+G.bE));
   G.setZoom(G.by-1-ek);});
   this.an.ai=(this.an.setCapture)?this.an:window;var bN=this;
   IEvent.addDomListener(this.an,'mousedown',function(e){
   var bH=false;
   if(e.button==0||e.button==1){bH=true;}
   if(!bH){e.stopPropagation();
   e.preventDefault();
   return false;
   }
   this.cg=false;
   if(this.ai.setCapture){
   this.ai.setCapture();
   }
   if(!isDefined(this.L)){
   this.L=new IPoint(parseInt(this.style.left),parseInt(this.style.top));
   }
   else{this.L.x=parseInt(this.style.left);
   this.L.y=parseInt(this.style.top);
   }
   if(!isDefined(this.Q)){
   this.Q=new IPoint(e.clientX,e.clientY);
   }
   else{
   this.Q.x=e.clientX;
   this.Q.y=e.clientY;
   }
   IEvent.addDomListener(this.ai,'mousemove',this,function(e){
   if(!isDefined(e)||this.cg){return;}
   this.cg=true;
   var bW=e.clientY-this.Q.y;
   var aE=this.L.y+bW;
   if(aE<bN.bd){aE=bN.bd;}
   if(aE>bN.au){
   aE=bN.au;
   }
   this.style.top=aE+'px';
   var bB=this;
   this.ap=setTimeout(function(){
   bB.cg=false},20);});
   IEvent.addDomListener(this.ai,'mouseup',this,function(e){
   IEvent.removeListener(this.ai,'mouseup');
   IEvent.removeListener(this.ai,'mousemove');
   if(document.releaseCapture){
   document.releaseCapture();
   }
   if(isDefined(this.ap)){
   clearTimeout(this.ap);
   this.ap=null;
   }
   this.cg=false;
   var bW=e.clientY-this.Q.y;
   var aE=this.L.y+bW;
   aE-=4;
   if(aE<bN.bd){aE=bN.bd;}
   if(aE>bN.au){
   aE=bN.au;
   }
   var ek=Math.round((aE+1)/(G.be+G.bE));
   G.setZoom(G.by-1-ek);});
   e.stopPropagation();
   e.preventDefault();});
   IEvent.addListener(this.f,'zoom',function(){
   G.setZoom(this.getZoom())});
   map.getContainer().appendChild(this.bI);
   this.setZoom(this.f.getZoom());};
   IZoomControl.prototype.ea=function(){
   return this.by*(this.be+this.bE)-this.bE;};
   IZoomControl.prototype.getMinimumResolution=function(){
   if(isDefined(this.f)){
   return this.f.getCurrentMapType().getMinimumResolution();
   }
   else{return-1;}};
   IZoomControl.prototype.zoomIn=function(){
   this.setZoom(this.currentZoomLevel+1);};
   IZoomControl.prototype.zoomOut=function(){
   this.setZoom(this.currentZoomLevel-1);};
   IZoomControl.prototype.setZoom=function(zoom){
   var H=this.getMaximumResolution();
   var r=this.getMinimumResolution();
   if(zoom>H){zoom=H;}
   if(zoom<r){zoom=r;}
   if(this.currentZoomLevel!=zoom){
   this.currentZoomLevel=zoom;
   this.eY(zoom);
   if(this.f.getZoom()!=this.currentZoomLevel){
   this.f.setZoom(this.currentZoomLevel);
   }}};
   IZoomControl.prototype.eY=function(level){
   var fi=this.by-level-1;
   this.an.style.top=fi*(this.be+this.bE)+'px';
   };
   IZoomControl.prototype.getMaximumResolution=function(){
   if(isDefined(this.f)){
   return this.f.getCurrentMapType().getMaximumResolution();
   }
   else{return-1;}};
    function cf(){
    this.fill=false;
    this.fillColor='#000000';
    this.fillOpacity=0.5;
    this.strokeOpacity=0.5;
    this.strokeColor='#0000FF';
    this.strokeCap='round';
    this.strokeJoin='round';
    this.strokeWidth=5;
    };
    function J(opts){this.Z=opts||new cf();};
    J.prototype.setOption=function(opts){this.Z=opts};
    J.prototype.getOption=function(){return this.Z};
    J.prototype.createPoint=function(point,opts){};
    J.prototype.setPoint=function(elem,point,opts){};
    J.prototype.createPolyline=function(points,opts,bounds,origin){};
    J.prototype.setPolyline=function(polyline,points,opts,bounds,origin){};
    J.prototype.createPolygon=function(points,opts,bounds){};
    J.prototype.setPolygon=function(polygon,points,opts,bounds){};
    function am(opts){if(isDefined(opts)){
    this.Z=opts;}
    this.cE='http://www.w3.org/2000/svg';
    };
    am.prototype=new J();
    am.prototype.createCanvas=function(bounds){
    var r=bounds.min();
    var aH=document.createElementNS(this.cE,"svg");
    aH.setAttribute('version','1.1');
    aH.setAttribute('style','position:absolute;'+'left:'+r.x+'px;'+'top:'+r.y+'px;');
    aH.setAttribute('width',bounds.width()+'px');
    aH.setAttribute('height',bounds.height()+'px');
    aH.setAttribute('viewBox',r.x+' '+r.y+' '+bounds.width()+' '+bounds.height());return aH;};
    am.prototype.setCanvas=function(canvas,bounds){
    var r=bounds.min();
    canvas.style.left=r.x+'px';
    canvas.style.top=r.y+'px';
    canvas.setAttribute('width',bounds.width()+'px');
    canvas.setAttribute('height',bounds.height()+'px');
    canvas.setAttribute('viewBox',r.x+' '+r.y+' '+bounds.width()+' '+bounds.height());};
    am.prototype.createPoint=function(point,opts,bounds,origin){
    var t=bounds||new IBound(point.x-opts.ovalRadius,point.y-opts.ovalRadius,point.x+opts.ovalRadius,point.y+opts.ovalRadius);
    var B=opts||this.Z;
    var aH=this.createCanvas(t);
    var dI=document.createElementNS(this.cE,"circle");
    dI.setAttribute("cx",point.x);
    dI.setAttribute("cy",point.y);
    dI.setAttribute("r",opts.ovalRadius/2);
    dI.setAttribute("fill",opts.fillColor);
    dI.setAttribute("stroke",opts.strokeColor);
    dI.setAttribute("stroke-width",opts.strokeWidth);
    aH.appendChild(dI);
    return aH;};
    am.prototype.setPoint=function(elem,point,opts,bounds,origin){
    var t=bounds||new IBound(point.x-opts.ovalRadius,point.y-opts.ovalRadius,point.x+opts.ovalRadius,point.y+opts.ovalRadius);
    var aH=elem;
    var dX=aH.childNodes[0];
    dX.setAttribute("cx",point.x);
    dX.setAttribute("cy",point.y);
    dX.setAttribute("r",opts.ovalRadius/2);
    };
    am.prototype.createPolyline=function(points,opts,bounds,origin){
    var t=bounds||new IBound(points);
    var B=opts||this.Z;
    t=new IBound(t.r.x-opts.strokeWidth,t.r.y-opts.strokeWidth,t.H.x+opts.strokeWidth,t.H.y+opts.strokeWidth);
    var aH=this.createCanvas(t);
    var n=document.createElementNS(this.cE,'path');
    n.setAttribute('stroke-linejoin',B.strokeJoin);n.setAttribute('stroke-linecap',B.strokeCap);
    n.setAttribute('stroke',B.strokeColor);
    n.setAttribute('stroke-width',B.strokeWidth+'px');
    n.setAttribute('stroke-opacity',B.strokeOpacity);
    n.setAttribute('fill','none');
    var C='M'+points[0].x+','+points[0].y;
    for(var i=1;i<points.length;i++){
    C=C+' L'+points[i].x+','+points[i].y;
    }
    n.setAttribute('d',C);
    aH.appendChild(n);return aH;};
    am.prototype.setPolyline=function(polyline,points,opts,bounds,origin){
    var t=bounds||new IBound(points);
    var aH=polyline;
    var n=aH.childNodes[0];
    var O=0;
    if(isDefined(opts)){
    n.setAttribute('stroke-linejoin',opts.strokeJoin);
    n.setAttribute('stroke-linecap',opts.strokeJoin);
    n.setAttribute('stroke',opts.strokeColor);
    n.setAttribute('stroke-width',opts.strokeWidth+'px');
    n.setAttribute('stroke-opacity',opts.strokeOpacity);
    O=opts.strokeWidth;
    }
    else{
    O=parseInt(n.getAttribute('stroke-width'));
    }
    t=new IBound(t.r.x-O,t.r.y-O,t.H.x+O,t.H.y+O);
    this.setCanvas(polyline,t);
    var C='M'+points[0].x+','+points[0].y;
    for(var i=1;i<points.length;i++){
    C=C+' L'+points[i].x+','+points[i].y;
    }
    n.setAttribute('d',C);
    };
    am.prototype.createPolygon=function(points,opts,bounds,origin){
    var t=bounds||new IBound(points);
    var B=opts||this.Z;
    t=new IBound(t.r.x-opts.strokeWidth,t.r.y-opts.strokeWidth,t.H.x+opts.strokeWidth,t.H.y+opts.strokeWidth);
    var aH=this.createCanvas(t);
    var m=document.createElementNS(this.cE,'path');
    m.setAttribute('stroke-linejoin',B.strokeJoin);
    m.setAttribute('stroke-linecap',B.strokeCap);
    m.setAttribute('stroke',B.strokeColor);
    m.setAttribute('stroke-width',B.strokeWidth+'px');
    m.setAttribute('stroke-opacity',B.strokeOpacity);
    if(B.fill){
    m.setAttribute('fill',B.fillColor);
    m.setAttribute('fill-opacity',B.fillOpacity);
    m.setAttribute('fill-rule','evenodd');
    }
    else{
    m.setAttribute('fill','none');
    }
    var C='M'+points[0].x+','+points[0].y;
    for(var i=1;i<points.length;i++){
    C=C+' L'+points[i].x+','+points[i].y;
    }
    C+=' L'+points[0].x+','+points[0].y;
    m.setAttribute('d',C);
    aH.appendChild(m);return aH;
    };
    am.prototype.setPolygon=function(polygon,points,opts,bounds,origin){
    var t=bounds||new IBound(points);
    var aH=polygon;
    var m=aH.childNodes[0];
    var O=0;
    if(isDefined(opts)){
    m.setAttribute('stroke-linejoin',opts.strokeJoin);
    m.setAttribute('stroke-linecap',opts.strokeJoin);
    m.setAttribute('stroke',opts.strokeColor);
    m.setAttribute('stroke-width',opts.strokeWidth+'px');
    m.setAttribute('stroke-opacity',opts.strokeOpacity);
    O=opts.strokeWidth;
    }
    else{O=parseInt(m.getAttribute('stroke-width'));}
    t=new IBound(t.r.x-O,t.r.y-O,t.H.x+O,t.H.y+O);
    this.setCanvas(aH,t);
    var C='M'+points[0].x+','+points[0].y;
    for(var i=1;i<points.length;i++){
    C=C+' L'+points[i].x+','+points[i].y;
    }
    C+=' L'+points[0].x+','+points[0].y;m.setAttribute('d',C);
    };
    function aA(opts){
    if(isDefined(opts)){this.Z=opts;
    }
    if(document.namespaces){
    if(!document.namespaces.v){
    document.namespaces.add("v","urn:schemas-microsoft-com:vml");
    document.createStyleSheet().addRule("v\\:*","behavior: url(#default#VML);");}}};
    aA.prototype=new J();
    aA.prototype.createPoint=function(point,opts,bounds,origin){
    var dv=document.createElement('v:oval');
    dv.fillcolor=opts.fillColor;
    dv.strokecolor=opts.strokeColor;
    dv.strokeweight=opts.strokeWidth*0.75+'pt';
    dv.style.cssText='position: absolute; '+'left: '+(point.x-opts.ovalRadius/2)+'px; '+'top: '+(point.y-opts.ovalRadius/2)+'px; '+'width: '+opts.ovalRadius+'px; '+'height: '+opts.ovalRadius+'px; ';
    return dv;};
    aA.prototype.setPoint=function(elem,point,opts,bounds,origin){
    var gg=elem.parentNode;
    gg.removeChild(elem);
    elem.style.cssText='position: absolute; '+'left: '+(point.x-opts.ovalRadius/2)+'px; '+'top: '+(point.y-opts.ovalRadius/2)+'px; '+'width: '+opts.ovalRadius+'px; '+'height: '+opts.ovalRadius+'px';
    gg.appendChild(elem);};
    aA.prototype.createPolyline=function(points,opts,bounds,origin){
    if(points.length<2){
    return null;
    }
    var B=opts||this.Z;
    var n=document.createElement('v:shape');
    var bz=document.createElement('v:stroke');n.appendChild(bz);
    n.style.cssText='position:absolute;'+'left:'+origin.x+'px;'+'top:'+origin.y+'px;'+'width:1px;'+'height:1px;';
    n.coordorigin=origin.x+','+origin.y;n.coordsize='1,1';
    n.unselectable="on";n.strokecolor=B.strokeColor;
    n.strokeweight=B.strokeWidth*0.75+'pt';
    n.fill=false;
    n.filled=false;
    bz.joinstyle=B.strokeJoin;
    bz.endcap=B.strokeCap;
    bz.opacity=B.strokeOpacity;
    var C='m'+points[0].x+','+points[0].y+' l';
    var dw=' ';
    var bJ=',';
    for(var i=1;i<points.length;i++){C=C+dw+points[i].x+','+points[i].y;dw=bJ;}
    C=C+' e';
    n.path=C;return n;
    };
    aA.prototype.setPolyline=function(polyline,points,opts,bounds,origin){
    polyline.style.left=origin.x+'px';
    polyline.style.top=origin.y+'px';
    polyline.coordorigin=origin.x+','+origin.y;
    var C='m'+points[0].x+','+points[0].y+' l';
    var dw=' ';
    var bJ=',';
    for(var i=1;i<points.length;i++){
    C=C+dw+points[i].x+','+points[i].y;dw=bJ;
    }
    C=C+' e';
    polyline.path=C;
    };
    aA.prototype.createPolygon=function(points,opts,bounds,origin){
    if(points.length<2){
    return null;
    }
    var B=opts||this.Z;var m=document.createElement('v:shape');
    var bz=document.createElement('v:stroke');m.appendChild(bz);
    m.style.cssText='position:absolute;'+'left:'+origin.x+'px;'+'top:'+origin.y+'px;'+'width:1px;'+'height:1px;';
    m.coordorigin=origin.x+','+origin.y;
    m.coordsize='1,1';
    m.unselectable="on";
    m.strokecolor=B.strokeColor;
    m.strokeweight=B.strokeWidth*0.75+'pt';
    m.fill=false;
    m.filled=false;
    m.fillcolor=B.fillColor;
    bz.joinstyle=B.strokeJoin;
    bz.endcap=B.strokeCap;
    bz.opacity=B.strokeOpacity;
    var C='m'+points[0].x+','+points[0].y+' l ';var bJ=',';
    for(var i=1;i<points.length;i++){
    C=C+points[i].x+','+points[i].y+bJ;
    }
    C=C+points[0].x+','+points[0].y+' e';
    m.path=C;
    if(B.fill){
    var eh=document.createElement('v:fill');
    eh.color=B.fillColor;
    eh.opacity=B.fillOpacity;
    eh.on=true;m.appendChild(eh);}
    return m;};
    aA.prototype.setPolygon=function(polygon,points,opts,bounds,origin){
    polygon.style.left=origin.x+'px';
    polygon.style.top=origin.y+'px';
    polygon.coordorigin=origin.x+','+origin.y;
    var C='m'+points[0].x+','+points[0].y+' l';
    var bJ=',';
    for(var i=1;i<points.length;i++){
    C=C+points[i].x+','+points[i].y+bJ;}
    C=C+points[0].x+','+points[0].y+' e';
    polygon.path=C;};
    var IGraphics={bD:(document.all)?new aA():new am(),createPolyline:function(points,opts,bounds,origin){
    return IGraphics.bD.createPolyline(points,opts,bounds,origin);},
    setPolyline:function(polyline,points,opts,bounds,origin){
    IGraphics.bD.setPolyline(polyline,points,opts,bounds,origin);},
    createPolygon:function(points,opts,bounds,origin){
    return IGraphics.bD.createPolygon(points,opts,bounds,origin);},
    setPolygon:function(polygon,points,opts,bounds,origin){
    IGraphics.bD.setPolygon(polygon,points,opts,bounds,origin);},
    createPoint:function(point,opts,bounds,origin){
    return IGraphics.bD.createPoint(point,opts,bounds,origin);},
    setPoint:function(elem,point,opts,bounds,origin){
    IGraphics.bD.setPoint(elem,point,opts,bounds,origin);}};
     var IEvent={};
     IEvent.ee=0;
     IEvent.ey=1;
     IEvent.addListener=function(src,event,target,handler){
     var bu=null;
     if(arguments.length==3){bu=target;}
     else if(arguments.length==4){bu=function(){
     this['_handler_']=handler;
     if(handler){handler.apply(target,arguments);}
     else{alert(src);}}}
     else{return;}
     var bT=IEvent.bT();
     var M=new IEventListener(src,event,bu,IEvent.ey);
     if(!src['__l']){src['__l']={};}
     src['__l'][bT]=M;};
     IEvent.addDomListener=function(src,event,target,handler){
     var bu=null;
     if(arguments.length==3){bu=target;}
     else if(arguments.length==4){bu=function(){this['_handler_']=handler;
     if(handler){handler.apply(target,arguments);}
     else{alert(src);}}}else{return;}
     var M=new IEventListener(src,event,bu,IEvent.ee);
     if(!src['__l']){src['__l']={};}
     var bT=IEvent.bT();src['__l'][bT]=M;
     $(src).bind(event,bu);};
     IEvent.removeListener=function(src,event,handler){
     var cv=null;
     if(arguments.length==1){cv=IEvent.ei(src);}
     else if(arguments.length==2){cv=IEvent.ei(src,event);}
     else if(arguments.length==3){cv=IEvent.ei(src,event,handler);}
     if(cv!=null&&cv.length>0){var M=null;
     for(var i=cv.length-1;i>=0;i--){M=src['__l'][cv[i]];
     if(M.type==IEvent.ee){
     $(src).unbind(M.eventType,M.handler);}
     M=null;
     delete src['__l'][cv[i]];}}};
     IEvent.trigger=function(source,event){
     var dc=IEvent.ei(source,event);
     if(!dc||dc.length==0){return;}
     var eH=[];
     for(var eC=2;eC<arguments.length;eC++){
     eH.push(arguments[eC]);}
     for(var i=0;i<dc.length;i++){
     source['__l'][dc[i]].handler.apply(source,eH);}};
     IEvent.ei=function(src,event,handler){
     if(arguments.length==0){return[];}
     var dn=[];var aJ=src['__l'];
     var M=null;if(aJ){
     if(arguments.length==1){
     for(var bT in aJ){
     dn.push(bT);}}
     else if(arguments.length==2){
     for(var bT in aJ){M=aJ[bT];
     if(src==M.source&&event==M.eventType){dn.push(bT);}}}
     else 
     if(arguments.length==3){
     for(var bT in aJ){M=aJ[bT];
     if(src==M.source&&event==M.eventType){
     if(M.handler==handler){dn.push(bT);
     }
     else if(M.handler['_handler_']==handler){
     dn.push(bT);}break;}}}}
     return dn;};
     IEvent.callback=function(object,method){
     method.apply(object);
     };
     IEvent.callbackArgs=function(object,method){
     var eH=[];
     for(var eC=2;eC<arguments.length;eC++){
     eH.push(arguments[eC]);
     }
     method.apply(object,eH);};
     IEvent.fn=0;
     IEvent.bT=function(){
     return 'eE'+IEvent.fn++;};
     IEventListener=function(source,eventType,handler,type,uid){
     this.source=source;
     this.eventType=eventType;
     this.handler=handler;
     this.type=type;
     this.uid=uid;};
      function IProjection(){};
      IProjection.prototype.fromLatLngToPixel=function(latlng,zoom){};
      IProjection.prototype.fromPixelToLatLng=function(pixel,zoom){};
      IProjection.prototype.tileCheckRange=function(tile,zoom,tileSize){};
      function IPPGProjection(){
      this.bw=[new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406),new ILatLng(26.188660,50.691406)];
      this.aC=[0.800000,0.160000,0.040000,0.024000,0.016000,0.012000,0.010000,0.008000,0.004800,0.001000];
      this.T=[];
      this.dD=[];
      this.R=[];
      this.g=256;
      for(var i=0;i<this.aC.length;i++){
      this.T[i]=this.aC[i]/this.g;
      this.R[i]=(this.g/this.aC[i]);}};
      IPPGProjection.prototype=new IProjection();
      IPPGProjection.prototype.fromLatLngToPixel=function(latlng,zoom){
      var ba=this.bw[zoom];
      var cq=ba.lat()-latlng.lat();
      var ct=latlng.lng()-ba.lng();
      return new IPoint(Math.round(ct*this.R[zoom]),Math.round(cq*this.R[zoom]));};
      IPPGProjection.prototype.fromPixelToLatLng=function(point,zoom){
      var ba=this.bw[zoom];
      var ct=point.x*this.T[zoom];
      var cq=point.y*this.T[zoom];
      var bR=ba.lat()-cq;
      var bX=ba.lng()+ct;
      return new ILatLng(bR,bX);};
      IPPGProjection.prototype.tileCheckRange=function(tile,zoom,tileSize){return true;};
      function IOverviewProjection(){
      this.bw=[new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890)];
      this.aC=[2.000000,0.819200,0.409600,0.204800,0.102400,0.051200,0.025600,0.012800,0.006400,0.003200,0.001600,0.000800];
      this.T=[];
      this.dD=[];
      this.R=[];
      this.g=256;
      for(var i=0;i<this.aC.length;i++){
      this.T[i]=this.aC[i]/this.g;
      this.R[i]=(this.g/this.aC[i]);
      }};
      IOverviewProjection.prototype=new IProjection();
      IOverviewProjection.prototype.fromLatLngToPixel=function(latlng,zoom){
      var ba=this.bw[zoom];
      var cq=ba.lat()-latlng.lat();
      var ct=latlng.lng()-ba.lng();
      return new IPoint(Math.round(ct*this.R[zoom]),Math.round(cq*this.R[zoom]));
      };
      IOverviewProjection.prototype.fromPixelToLatLng=function(point,zoom){
      var ba=this.bw[zoom];
      var ct=point.x*this.T[zoom];
      var cq=point.y*this.T[zoom];
      var bR=ba.lat()-cq;
      var bX=ba.lng()+ct;
      return new ILatLng(bR,bX);};
      IOverviewProjection.prototype.tileCheckRange=function(tile,zoom,tileSize){return true;};
       function IMapType(layers,projection,name,opts){
       this.de=layers||[];this.cG=projection||new IProjection();
       this.fI=name||"";
       this.eF='';
       this.fk='';
       this.aR=0;
       this.at=0;
       this.dQ=256;
       this.eL='#000000';
       this.eI='#FFFF00';
       if(opts){if(opts.shortName){
       this.eF=opts.shortName};
       if(opts.urlArg){this.fk=opts.urlArg;}
       if(opts.maxResolution){this.aR=opts.maxResolution;}if(opts.minResolution){this.at=opts.minResolution;}if(opts.tileSize){this.dQ=opts.tileSize;}if(opts.textColor){this.eL=opts.textColor;}if(opts.linkColor){this.eI=opts.linkColor;}}else{for(var i=0;i<this.de.length;i++){this.aR=Math.max(this.aR,this.de[i].maxResolution());this.at=Math.min(this.at,this.de[i].minResolution());}}};IMapType.prototype.getSpanZoomLevel=function(center,span,viewSize){};IMapType.prototype.getBoundZoomLevel=function(bounds,viewSize){var res=this.at;var sw=bounds.getSouthWest();var ne=bounds.getNorthEast();for(var ilevel=this.aR;ilevel>=this.at;ilevel--){var swpix=this.cG.fromLatLngToPixel(sw,ilevel);var nepix=this.cG.fromLatLngToPixel(ne,ilevel);if((nepix.x-swpix.x)<=viewSize.width&&(swpix.y-nepix.y)<=viewSize.height){res=ilevel;break;}}return res;};IMapType.prototype.getName=function(){return this.fI;};IMapType.prototype.getProjection=function(){return this.cG;};IMapType.prototype.getTileSize=function(){return this.dQ;};IMapType.prototype.getTileLayers=function(){return this.de;};IMapType.prototype.getMinimumResolution=function(){return this.at;};IMapType.prototype.getMaximumResolution=function(){return this.aR;};function IMapTypeOptions(){this.shortName;this.urlArg;this.maxResolution;this.minResolution;this.tileSize;this.textColor;this.linkColor;this.errorMessage;this.alt;this.radius;};function IMapViewMapType(){var cZ=[];var co=[];co[0]=new ITileLayer('',0,9);cZ[0]=co;var bL=[new ISize(2,4),new ISize(8,12),new ISize(26,44),new ISize(44,74),new ISize(66,110),new ISize(86,146),new ISize(104,174),new ISize(130,218),new ISize(214,362),new ISize(1028,1736)];co[0].getTileUrl=function(tile,zoom){var s=PPG_BASE_TILE_URL+'/lv#zoom/x_#x/imap_#y_#x.png';if(tile.x<0||tile.y<0||tile.x>=bL[zoom].width||tile.y>=bL[zoom].height){return PPG_BASE_URL+'/img/sea.png';}else{s=s.replace(/#x/gi,tile.x);s=s.replace(/#y/gi,tile.y);s=s.replace(/#zoom/gi,1+zoom);}return s;};cZ[1]=new IPPGProjection();cZ[2]='mapview';IMapType.apply(this,cZ);};IMapViewMapType.prototype=new IMapType();function IOverviewMapType(){var cZ=[];var co=[];co[0]=new ITileLayer('',0,8);cZ[0]=co;var bL=[new ISize(14,22),new ISize(26,44),new ISize(34,56),new ISize(44,74),new ISize(66,110),new ISize(86,146),new ISize(104,174),new ISize(130,218),new ISize(214,362),new ISize(1028,1736)];co[0].getTileUrl=function(tile,zoom){var s=PPG_BASE_TILE_URL+'/lv#zoom/x_#x/imap_#y_#x.png';if(tile.x<0||tile.y<0||tile.x>=bL[zoom].width||tile.y>=bL[zoom].height){return PPG_BASE_URL+'/img/sea.png';}else{s=s.replace(/#x/gi,tile.x);s=s.replace(/#y/gi,tile.y);s=s.replace(/#zoom/gi,1+zoom);}return s;};cZ[1]=new IPPGProjection();cZ[2]='mapview';IMapType.apply(this,cZ);};IOverviewMapType.prototype=new IMapType();  function ITileLayer(copyrights,minResolution,maxResolution,options){this.ed=minResolution||0;this.dY=maxResolution||0;this.eo=(options)?options:new ITileLayerOption();};ITileLayer.prototype.minResolution=function(){return this.ed};ITileLayer.prototype.maxResolution=function(){return this.dY};ITileLayer.prototype.getTileUrl=function(tile,zoom){var s='http://www.papagoonline.com/imap_full/lv_#zoom/x_#x/imap_#y_#x.png';s=s.replace(/#x/gi,tile.x);s=s.replace(/#y/gi,tile.y);s=s.replace(/#zoom/gi,6+zoom);return s;};ITileLayer.prototype.isPng=function(){return this.eo.isPng;};ITileLayer.prototype.getOpacity=function(){return this.eo.isOpacity;};ITileLayer.prototype.getCopyright=function(bounds,zoom){return null;};function ITileLayerOption(){this.opacity=1.0;this.isPng=true;this.tileUrlTemplate="";this.draggingCursor="HAND";}; function IOverlay(){};IOverlay.prototype.getZIndex=function(){};IOverlay.prototype.initialize=function(map){};IOverlay.prototype.remove=function(){};IOverlay.prototype.copy=function(){};IOverlay.prototype.redraw=function(force){};function IOverviewMapControl(size){this.P=null;this.aS=null;this.bh=null;this.aW=null;this.aB=size;};IOverviewMapControl.prototype=new IControl();IOverviewMapControl.prototype.initialize=function(map){this.bh=map;var eS=120;var eE=120;if(isDefined(this.aB)){eS=this.aB.width;eE=this.aB.height;}this.P=_createDivElement({position:'absolute',left:'5px',bottom:'5px',width:eS+'px',height:eE+'px',borderTop:'2px solid #3336ff',borderLeft:'2px solid #3336ff',borderRight:'2px solid #32145e',borderBottom:'2px solid #32145e'});var ce=this.bh;this.aW=new OverviewOverlay(this.bh);var dz=this.aW;ce.getContainer().appendChild(this.P);this.aS=new IMap(this.P,null,{mapstyle:cA});var aG=this.aS;aG.setCenter(ce.getCenter(),ce.getZoom());IEvent.addListener(ce,'zoom',this,function(zoom){var fT=this.bh.getZoom();var gv=this.aS.getZoom();if(gv!=fT){this.aS.setZoom(fT);dz.setBounds(ce.getBounds());dz.redraw(true);}});IEvent.addListener(ce,'moveend',this,function(zoom){var fW=this.bh.getCenter();var bJ=this.aS.getCenter();if(!bJ.equals(fW)){this.aS.panTo(fW);dz.setBounds(ce.getBounds());dz.redraw(true);}});IEvent.addListener(this.aS,'moveend',function(){if(!ce.getCenter().equals(this.getCenter())){ce.panTo(this.getCenter());dz.setBounds(ce.getBounds());dz.redraw(true);}});this.aW.setBounds(ce.getBounds());aG.addOverlay(this.aW);};IOverviewMapControl.prototype.remove=function(map){this.bh.getContainer().removeChild(this.P);};function OverviewOverlay(mainMap){this.f=null;this.k=null;this.w=null;this.bG=null;this.fZ=mainMap;this.cF=null;};OverviewOverlay.prototype=new IOverlay();OverviewOverlay.prototype.initialize=function(map){this.f=map;var dW=this.cF;var fF=new IPoint(0,0);var cN=2;var bW=2;var fy=this.f;var gq=fy.getPane(8);if(isDefined(dW)){var db=fy.fromLatLngToDivPixel(dW.getSouthWest());var cX=fy.fromLatLngToDivPixel(dW.getNorthEast());cN=cX.x-db.x;bW=db.y-cX.y;fF=new IPoint(db.x,cX.y);}var fX=_createDivElement({width:(cN-2)+'px',height:(bW-2)+'px',background:'#0036ff'});this.w=_createDivElement({position:'absolute',left:'0px',top:'0px',width:cN+'px',height:bW+'px',borderTop:'2px solid #0036ff',borderLeft:'2px solid #0036ff',borderRight:'2px solid #00145e',borderBottom:'2px solid #00145e'});IUtil.setOpacity(fX,0.2);this.w.appendChild(fX);this.k=new IDraggableObject(this.w,fF);this.k.enableDragging();IEvent.addListener(this.k,'dragstart',this,this.eq);IEvent.addListener(this.k,'dragend',this,this.eU);gq.appendChild(this.w);};OverviewOverlay.prototype.redraw=function(force){var dW=this.cF;var fF=new IPoint(0,0);var cN=2;var bW=2;var fy=this.f;if(isDefined(dW)){var db=fy.fromLatLngToDivPixel(dW.getSouthWest());var cX=fy.fromLatLngToDivPixel(dW.getNorthEast());fF=new IPoint(db.x,cX.y);cN=cX.x-db.x;bW=db.y-cX.y;}var fJ=this.w.childNodes[0];if(isDefined(fJ)){fJ.style.width=(cN-2)+'px';fJ.style.height=(bW-2)+'px';}if(isDefined(this.w)){this.k.moveTo(fF);this.w.style.width=cN+'px';this.w.style.height=bW+'px';}};OverviewOverlay.prototype.remove=function(){if(this.w){this.f.getPane(8).removeChild(this.w);}};OverviewOverlay.prototype.setBounds=function(bounds){this.cF=bounds;};OverviewOverlay.prototype.getBounds=function(){return this.cF;};OverviewOverlay.prototype.eq=function(e){this.bG=new IPoint(e.clientX,e.clientY);};OverviewOverlay.prototype.gf=function(e){};OverviewOverlay.prototype.eU=function(e){if(isDefined(this.bG)){var gb=this.k.dq();var cN=this.bG.x-e.clientX;var bW=this.bG.y-e.clientY;this.f.panBy(new ISize(cN,bW));this.cF=_translateBounds(this.f.getCenter(),this.cF);this.bG=null;}};function _translateBounds(c,b){var ev=b.getSouthWest();var et=b.getNorthEast();var cq=c.bR-(ev.bR+et.bR)/2;var ct=c.bX-(ev.bX+et.bX)/2;ev.bR+=cq;ev.bX+=ct;et.bR+=cq;et.bX+=ct;return new ILatLngBound(ev,et);}; function ITileLayerOverlay(tileLayer){this.aV=tileLayer;this.f=null;this.dJ=0;this.bs;this.eA=0;this.w=_createDivElement();this.aq=0;this.ao=0;this.bi=0;this.aY=0;this.eW=null;this.d=null;this.ag=false;};ITileLayerOverlay.prototype=new IOverlay();ITileLayerOverlay.prototype.getZIndex=function(){return this.dJ};ITileLayerOverlay.prototype.initialize=function(map){this.f=map;this.w=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:this.getZIndex()});var es=this.f.getPane(0);es.appendChild(this.w);this.eA=this.f.getZoom();IEvent.addListener(this.f,'reposition',this,this.cV);};ITileLayerOverlay.prototype.remove=function(){var es=this.f.getPane(0);es.removeChild(this.w);this.ci();this.w=null;this.f=null;this.d=null;this.aV=null;};ITileLayerOverlay.prototype.copy=function(){};ITileLayerOverlay.prototype.ci=function(){while(this.d.length>0){var aU=this.d.pop();while(aU.length>0){var I=aU.pop();this.bS(I);}}this.d=null;};ITileLayerOverlay.prototype.ar=function(src,top,left,width,height){var I=IUtil.createImage(src,top,left,width,height);if($.browser.mozilla){I.style.MozUserSelect='none';}else{I.unselectable="on";I.onselectstart=function(){return false;}}this.w.appendChild(I);return I;};ITileLayerOverlay.prototype.bS=function(img){this.w.removeChild(img);IEvent.removeListener(img);};ITileLayerOverlay.prototype.fp=function(level){var aG=this.f;var t=aG.getBounds();var g=aG.getCurrentMapType().getTileSize();var fV=aG.getCurrentMapType().getProjection();var cS=fV.fromLatLngToPixel(t.getSouthWest());var cQ=fV.fromLatLngToPixel(t.getNorthEast());var gk=Math.abs(cQ.x-cS.x);var gj=Math.abs(cS.y-cQ.y);var az=aG.getSize();var eS=az.width;var eE=az.height;var gn=gk*g/eS;var gm=gj*g/eE;};ITileLayerOverlay.prototype.cI=function(tile,tileX,tileY,tileWidth,tileHeight){if(isDefined(this.f)){var cl=this.f.l.x;var aE=this.f.l.y;IUtil.setImageSrc(tile,this.aV.getTileUrl(new IPoint(tileX,tileY),this.f.getZoom()));tile.style.left=(cl+tileX*tileWidth)+'px';tile.style.top=(aE+tileY*tileHeight)+'px';}};ITileLayerOverlay.prototype.cV=function(){var cl=this.f.l.x;var aE=this.f.l.y;var eS=this.f.getCurrentMapType().getTileSize();var gh=this.aq;var eE=this.f.getCurrentMapType().getTileSize();var gi=this.ao;for(var i=0;i<this.d.length;i++){for(var j=0;j<this.d[i].length;j++){this.d[i][j].style.left=(cl+eS*(gh+i))+'px';this.d[i][j].style.top=(aE+eE*(gi+j))+'px';}}};ITileLayerOverlay.prototype.redraw=function(force){var aD=this.f.getCurrentMapType();var aT=aD.getProjection();var g=aD.getTileSize();var fz=this.f.getCenter();var gl=this.f.getBounds();var dE=this.f.cL;var r=dE.min();var H=dE.max();var bn=Math.floor((r.x-this.f.l.x)/g);var bm=Math.floor((r.y-this.f.l.y)/g);var bY=Math.floor((H.x-this.f.l.x)/g);var bV=Math.floor((H.y-this.f.l.y)/g);var fU=false;if(this.d==null||((this.bi<bn||this.aq>bY)||(this.aY<bm||this.ao>bV))||this.eA!=this.f.getZoom()){if(this.d!=null){this.ci();}this.eA=this.f.getZoom();this.d=new Array(bY-bn+1);for(var irow=0;irow<this.d.length;irow++){this.d[irow]=new Array(bV-bm+1);for(var icol=0;icol<this.d[irow].length;icol++){var cl=this.f.l.x+(irow+bn)*g;var aE=this.f.l.y+(icol+bm)*g;var bA=this.aV.getTileUrl(new IPoint(irow+bn,icol+bm),this.f.getZoom());this.d[irow][icol]=this.ar(bA,cl,aE,g,g);}}this.aq=bn;this.ao=bm;this.bi=bY;this.aY=bV;}else{if(this.aq<bn){for(var i=0;i<bn-this.aq;i++){var aU=this.d.shift();++this.aq;var di=this.ao;var cJ= ++this.bi;for(var j=0;j<aU.length;j++){this.cI(aU[j],cJ,di,g,g);di++;}this.d.push(aU);}}if(this.bi>bY){for(var i=0;i<(this.bi-bY);i++){var aU=this.d.pop();--this.bi;var di=this.ao;var cJ= --this.aq;for(var j=0;j<aU.length;j++){this.cI(aU[j],cJ,di,g,g);di++;}this.d.unshift(aU);}}if(this.ao<bm){for(var i=0;i<(bm-this.ao);i++){this.ao++;this.aY++;var cJ=this.aq;for(var ic=0;ic<this.d.length;ic++){var I=this.d[ic].shift();this.cI(I,cJ++,this.aY,g,g);this.d[ic].push(I);}}}if(this.aY>bV){for(var i=0;i<(this.aY-bV);i++){--this.aY;--this.ao;var cJ=this.aq;for(var ic=0;ic<this.d.length;ic++){var I=this.d[ic].pop();this.cI(I,cJ++,this.ao,g,g);this.d[ic].unshift(I);}}}if(this.aq>bn){var cl=parseInt(this.d[0][0].style.left);for(var i=0;i<(this.aq-bn);i++){var cp=new Array(this.d[i].length);cl-=g;for(var ic=0;ic<cp.length;ic++){var aE=parseInt(this.d[0][ic].style.top);var fP={x:this.aq-i-1,y:this.ao+ic};var bA=this.aV.getTileUrl(fP,this.f.getZoom());var I=this.ar(bA,cl,aE,g,g);cp[ic]=I;Log.write('Append:'+I.src);}this.d.unshift(cp);}this.aq=bn;}if(this.bi<bY){var dT=this.d.length-1;var cl=parseInt(this.d[dT][0].style.left);for(var i=0;i<(bY-this.bi);i++){var cp=new Array(this.d[dT].length);cl+=g;for(var ic=0;ic<this.d[dT].length;ic++){var aE=parseInt(this.d[dT][ic].style.top);var bA=this.aV.getTileUrl(new IPoint(this.bi+i+1,this.ao+ic),this.f.getZoom());var I=this.ar(bA,cl,aE,g,g);cp[ic]=I;}this.d.push(cp);}this.bi=bY;}if(this.ao>bm){var aE=parseInt(this.d[0][0].style.top);var cl=parseInt(this.d[0][0].style.left);for(var i=0;i<(this.ao-bm);i++){aE-=g;for(var ic=0;ic<this.d.length;ic++){var bA=this.aV.getTileUrl(new IPoint(this.aq+ic,this.ao-i-1),this.f.getZoom());I=this.ar(bA,cl+(ic*g),aE,g,g);this.d[ic].unshift(I);}}this.ao=bm;}if(this.aY<bV){var fe=this.d[0].length-1;var aE=parseInt(this.d[0][fe].style.top);for(var i=0;i<(bV-this.aY);i++){aE+=g;for(var ic=0;ic<this.d.length;ic++){var cl=parseInt(this.d[ic][fe+i].style.left);var bA=this.aV.getTileUrl(new IPoint(this.aq+ic,this.aY+i+1),this.f.getZoom());I=this.ar(bA,cl,aE,g,g);this.d[ic].push(I);}}this.aY=bV;}}};ITileLayerOverlay.prototype.ff=function(){var az=this.f.getSize();var aD=this.f.getCurrentMapType();var g=aD.getTileSize();var eS=Math.ceil(az.width/g)+2;var eE=Math.ceil(az.height/g)+2;while(this.d.length>eS){var fB=this.d.pop();for(var bo=0;bo<fB.length;bo++){this.bS(fB[bo]);}}for(var bo=this.d.length;bo<eS;bo++){this.d.push(new Array());}for(var bo=0;bo<this.d.length;bo++){while(this.d[bo].length>eE){var I=this.d[bo].pop();this.bS(I);}for(var eQ=this.d[bo].length;eQ<eE;eQ++){var I=this.ar(null,null,null,g,g);this.d[bo].push(I);this.cI(I,bo,eQ,g,g);}}};ITileLayerOverlay.prototype.show=function(){if(this.isHidden){this.ag=false;this.w.style.display='block';this.w.style.visibility='visible';this.redraw(true);}};ITileLayerOverlay.prototype.hide=function(){if(!this.isHidden){this.ag=true;this.w.style.display='none';this.w.style.visibility='hidden';}};ITileLayerOverlay.prototype.isHidden=function(){return this.ag;}; function IDraggableObject(dragObject,point){this.X=dragObject;this.X.style.position='absolute';this.dF=this.X.style.cursor;this.dG='move';this.ad=null;this.ai=(this.X.setCapture)?this.X:window;this.K=null;this.L=new IPoint(0,0);this.Q=new IPoint(0,0);this.aI=true;this.aO=true;this.ap=null;this.eK=null;this.bj=null;this.da=false;this.moveTo(point||new IPoint(parseInt(dragObject.style.left),parseInt(dragObject.style.top)));IEvent.addDomListener(this.X,'mousedown',this,this.ep);IEvent.addDomListener(this.X,'mouseup',this,function(e){if(!this.aI){IEvent.trigger(this,'mouseup',e);}});IEvent.addDomListener(this.X,'click',this,function(e){if(!this.aI){IEvent.trigger(this,'click',e);}});IEvent.addDomListener(this.X,'dblclick',this,function(e){IEvent.trigger(this,'dblclick',e);});};IDraggableObject.prototype.setDraggableCursor=function(cursor){this.ad=cursor;this.X.style.cursor=this.ad;};IDraggableObject.prototype.getDraggableCursor=function(){return this.ad;};IDraggableObject.prototype.setDraggingCursor=function(cursor){this.dG=cursor;};IDraggableObject.prototype.getDraggingCursor=function(){return this.dG;};IDraggableObject.prototype.enableDragging=function(){this.aI=true;if(isDefined(this.ad)){this.X.syle.cursor=this.ad;}};IDraggableObject.prototype.diableDragging=function(){this.aI=false;this.X.style.cursor=this.dF;};IDraggableObject.prototype.dragEnabled=function(){return this.aI;};IDraggableObject.prototype.moveTo=function(point,y){var cl,aE;if(isDefined(y)){cl=point;aE=y;}else{cl=point.x;aE=point.y;}if(!isDefined(this.K)){this.K=new IPoint(cl,aE);this.X.style.left=cl+'px';this.X.style.top=aE+'px';}else{this.K.x=cl;this.K.y=aE;this.X.style.left=cl+'px';this.X.style.top=aE+'px';}IEvent.trigger(this,'move',new IPoint(cl,aE));};IDraggableObject.prototype.moveBy=function(size){if(this.K!=null&&typeof(size)!='undefined'){this.moveTo(this.K.x+size.width,this.K.y+size.height);}};IDraggableObject.prototype.dq=function(){return this.K;};IDraggableObject.prototype.eD=function(e){if(!e.relatedTarget){this.dN(e);}};IDraggableObject.prototype.dN=function(e){IEvent.removeListener(this.ai,'mouseup');IEvent.removeListener(this.ai,'mousemove');if(document.releaseCapture){document.releaseCapture();}if(jQuery.browser.mozilla){IEvent.removeListener(this.ai,'mouseout');}this.aO=true;if(isDefined(this.ad)){this.X.style.cursor=this.ad;}else{this.X.style.cursor=this.dF;}if(this.ap!=null){clearTimeout(this.ap);this.ap=null;}var cl=this.K.x+e.clientX-this.Q.x;var aE=this.K.y+e.clientY-this.Q.y;this.moveTo(cl,aE);IEvent.trigger(this,'dragend',e);var gd=new Date();var cN=Math.abs(this.L.x-e.clientX);var bW=Math.abs(this.L.y-e.clientY);if(cN<3&&bW<3){IEvent.trigger(this,'click',e);}if(this.da||cN>2||bW>2){IEvent.trigger(this,'moveend',e);}this.da=false;};IDraggableObject.prototype.dj=function(e){if(!isDefined(e)){return;}if(this.aO){if(!isDefined(this.bj)){this.bj=new Object();}this.bj.clientX=e.clientX;this.bj.clientY=e.clientY;return;}var cN=e.clientX-this.Q.x;var bW=e.clientY-this.Q.y;if(Math.abs(cN)<2&&Math.abs(bW)<2){return;}this.da=true;var eG=this;this.ap=setTimeout(function(){eG.aO=false;eG.dj(eG.bj);},50);this.bj=null;this.aO=true;var cl=this.K.x+cN;var aE=this.K.y+bW;this.Q.x=e.clientX;this.Q.y=e.clientY;this.moveTo(cl,aE);IEvent.trigger(this,'drag',e);};IDraggableObject.prototype.ep=function(e){var bH=false;if(e.button==0||e.button==1){bH=true;}if(!this.aI|| !bH){e.stopPropagation();e.preventDefault();return false;}this.aO=false;if(this.ai.setCapture){this.ai.setCapture();}this.X.style.cursor=this.dG;this.L.x=e.clientX;this.L.y=e.clientY;this.Q.x=e.clientX;this.Q.y=e.clientY;IEvent.trigger(this,'dragstart',e);IEvent.addDomListener(this.ai,'mousemove',this,this.dj);IEvent.addDomListener(this.ai,'mouseup',this,this.dN);if(jQuery.browser.mozilla){IEvent.addDomListener(this.ai,'mouseout',this,this.eD);}var fM=new Date();this.eK=fM.getTime();e.stopPropagation();e.preventDefault();}; function IIcon(copy){this.image=null;this.shadow=null;this.iconSize=null;this.shadowSize=null;this.iconAnchor=null;this.infoWindowAnchor=null;this.transparent=null;this.iconTitle=null;this.imageMap=null;};I_DEFAULT_ICON={image:'',shadow:'',iconSize:new ISize(),shadowSize:new ISize(),iconAnchor:new IPoint(),infoWindowAnchor:new IPoint(),transparent:'',imageMap:''};function IMarker(latlng,icon){this.f=null;this.dJ=0;this.k=null;this.cj=latlng;this.aM=icon||I_DEFAULT_ICON;this.ag=false;this.F=null;this.D=null;this.al=null;this.aL=null;this.cy=null;this.dU=null;this.cb=false;};IMarker.uid=0;IMarker.prototype=new IOverlay();IMarker.prototype.getZIndex=function(){return this.dJ;};IMarker.prototype.initialize=function(map){this.f=map;if(!isDefined(this.F)){this.fa();}var dk=this.f.getPane(5);dk.appendChild(this.F);if(isDefined(this.D)){var cU=this.f.getPane(3);cU.appendChild(this.D);}if(isDefined(this.aL)){this.f.getPane(5).appendChild(this.aL);}};IMarker.prototype.remove=function(){if(isDefined(this.F)){var dk=this.f.getPane(5);dk.removeChild(this.F);IEvent.removeListener(this.F);}if(isDefined(this.D)){var cU=this.f.getPane(3);cU.removeChild(this.D);}if(isDefined(this.aL)){this.f.getPane(5).removeChild(this.aL);}this.F=null;this.D=null;this.aL=null;};IMarker.prototype.copy=function(){};IMarker.prototype.redraw=function(force){if(force&& !this.ag){var aG=this.f;var fd=aG.fromLatLngToDivPixel(this.cj);var dM=new IPoint(fd.x-this.aM.iconAnchor.x,fd.y+this.aM.iconAnchor.y);this.k.moveTo(new IPoint(dM.x,dM.y-this.aM.iconSize.height));if(isDefined(this.D)){this.D.style.left=dM.x+'px';this.D.style.top=(dM.y-this.aM.shadowSize.height)+'px';}}};IMarker.prototype.bindInfoWindow=function(content,opts){this.cy=content;this.dU=opts;};IMarker.prototype.bindInfoWindowHtml=function(content,opts){var _content=_createDivElement({position:'relative',width:'100%',heght:'100%',overflow:'auto'});_content.innerHTML=content;this.bindInfoWindow(content,opts);};IMarker.prototype.openInfoWindow=function(content,opts){var B=opts;this.cb=true;if(isDefined(opts)){B=opts;B.offset=new ISize(this.aM.infoWindowAnchor.x,this.aM.infoWindowAnchor.y);}else{B={offset:new ISize(this.aM.infoWindowAnchor.x,this.aM.infoWindowAnchor.y)};}this.f.openInfoWindow(this.cj,content,B);};IMarker.prototype.getIconDom=function(){return this.F;};IMarker.prototype.openInfoWindowHtml=function(content,opts){var B=opts;this.cb=true;if(isDefined(opts)){B=opts;B.offset=new ISize(this.aM.infoWindowAnchor.x,this.aM.infoWindowAnchor.y);}else{B={offset:new ISize(this.aM.infoWindowAnchor.x,this.aM.infoWindowAnchor.y)};}this.f.openInfoWindowHtml(this.cj,content,B);};IMarker.prototype.closeInfoWindow=function(){this.f.closeInfoWindow();};IMarker.prototype.fa=function(){var ec=this.aM;var I=ec.image;var fC=ec.shadow;var ez=ec.iconSize;var ew=ec.shadowSize;var fG=ec.transparent;var dA=ec.imageMap;this.F=IUtil.createImage(I,0,0,ez.width,ez.height);var _tl=ec.iconTitle;if(isDefined(_tl)){this.F.title=_tl;}this.F.style.cursor='pointer';this.k=new IDraggableObject(this.F);this.k.diableDragging();IEvent.addListener(this.k,'click',this,function(e){if(isDefined(this.cy)){if(this.cb){this.closeInfoWindow();this.cb=false;}else{this.openInfoWindow(this.cy,this.dU);}}IEvent.trigger(this,'click',e);});IEvent.addListener(this.k,'mousedown',this,function(e){IEvent.trigger(this,'mousedown',e);});IEvent.addListener(this.k,'mouseup',this,function(e){IEvent.trigger(this,'mouseup',e);});IEvent.addListener(this.k,'dragstart',this,function(e){IEvent.trigger(this,'dragstart',e);});IEvent.addListener(this.k,'dragend',this,function(e){if(isDefined(this.f)){this.cj=this.f.fromContainerPixelToLatLng(new IPoint(e.clientX,e.clientY));}IEvent.trigger(this,'dragend',e);});IEvent.addListener(this.k,'drag',this,function(e){IEvent.trigger(this,'drag',e);});IEvent.addDomListener(this.F,'mouseover',this,function(e){IEvent.trigger(this,'mouseover',e);});IEvent.addDomListener(this.F,'mouseout',this,function(e){IEvent.trigger(this,'mouseout',e);});if(isDefined(dA)){var ga='imarker'+IMarker.uid++;this.F.setAttribute('usemap','#'+ga);var er=dA[0];for(var i=1;i<dA.length;i++){er=er+','+dA[i];}var dL=document.createElement('area');dL.setAttribute('shape','poly');dL.setAttribute('coords',er);dL.setAttribute('href','javascript:void(0)');dL.setAttribute('alt','');this.aL=document.createElement('map');this.aL.setAttribute('name',ga);this.aL.appendChild(dL);}if(isDefined(fC)){this.D=IUtil.createImage(fC,0,0,ew.width,ew.height);}};IMarker.prototype.getIcon=function(){return this.aM;};IMarker.prototype.getTitle=function(){return this.dZ;};IMarker.prototype.getLatLng=function(){return this.cj;};IMarker.prototype.setLatLng=function(latlng){this.cj=latlng;if(this.f){this.redraw(true);}};IMarker.prototype.enableDragging=function(){this.k.enableDragging();};IMarker.prototype.disableDragging=function(){this.k.disableDragging();};IMarker.prototype.dragEnabled=function(){return this.k.dragEnabled();};IMarker.prototype.hide=function(){this.ag=true;this.F.style.visibility='hidden';this.F.style.display='none';if(isDefined(this.D)){this.D.style.visibility='hidden';this.D.style.display='none';}if(isDefined(this.al)){this.al.style.visibility='hidden';this.al.style.display='none';}this.closeInfoWindow();};IMarker.prototype.show=function(){this.ag=false;this.F.style.visibility='visible';this.F.style.display='block';if(isDefined(this.D)){this.D.style.visibility='visible';this.D.style.display='block';}if(isDefined(this.al)){this.al.style.visibility='visible';this.al.style.display='block';}};IMarker.prototype.isHidden=function(){return this.ag;};function IPolyline(latlngs,color,weight,opacity){this.bc=latlngs||[];this.Z=new cf();if(isDefined(opacity)){this.Z.strokeOpacity=opacity;};if(isDefined(color)){this.Z.strokeColor=color;}if(isDefined(weight)){this.Z.strokeWidth=weight;}this.bs=new ILatLngBound();this.bs.extend(latlngs);this.ay=null;this.f=null;};IPolyline.prototype=new IOverlay();IPolyline.prototype.initialize=function(map){this.f=map;this.redraw(true);};IPolyline.prototype.redraw=function(force){if(force){var en=this.f.fromLatLngToDivPixel(this.f.getCenter());var fb=this.bs;var cS=this.f.fromLatLngToDivPixel(fb.getSouthWest());var cQ=this.f.fromLatLngToDivPixel(fb.getNorthEast());var dW=new IBound(cS.x,cQ.y,cQ.x,cS.y);var dH=[];for(var i=0;i<this.bc.length;i++){dH.push(this.f.fromLatLngToDivPixel(this.bc[i]));}if(!isDefined(this.ay)){var cK=map.getPane(7);this.ay=IGraphics.createPolyline(dH,this.Z,dW,en);cK.appendChild(this.ay);}else{IGraphics.setPolyline(this.ay,dH,this.Z,dW,en);}}};IPolyline.prototype.remove=function(){var cK=this.f.getPane(7);cK.removeChild(this.ay);};IPolyline.prototype.getVertexCount=function(){return this.bc.length;};IPolyline.prototype.getVertex=function(index){return this.bc[index];};IPolyline.prototype.getBounds=function(){return this.bs;};IPolyline.prototype.show=function(){if(isDefined(this.ay)){this.ay.style.visibility='visible';}};IPolyline.prototype.hide=function(){if(isDefined(this.ay)){this.ay.style.visibility='hidden';}};function IPolygon(latlngs,strokeColor,strokeWeight,strokeOpacity,fillColor,fillOpacity,opts){this.bc=latlngs||[];this.Z=new cf();this.Z.fill=true;this.Z.strokeColor=(isDefined(strokeColor))?strokeColor:'#000000';this.Z.strokeWidth=(isDefined(strokeWeight))?strokeWeight:2;if(isDefined(strokeOpacity)){this.Z.strokeOpacity=strokeOpacity;}if(isDefined(fillOpacity)){this.Z.fillOpacity=fillOpacity;}this.Z.fillColor=(isDefined(fillColor))?fillColor:'#0000FF';this.bs=new ILatLngBound();this.bs.extend(latlngs);this.aQ=null;this.f=null;};IPolygon.prototype=new IOverlay();IPolygon.prototype.initialize=function(map){this.f=map;this.redraw(true);};IPolygon.prototype.remove=function(){var cK=this.f.getPane(7);cK.removeChild(this.aQ);};IPolygon.prototype.redraw=function(force){if(force){var en=this.f.fromLatLngToDivPixel(this.f.getCenter());var fb=this.bs;var cS=this.f.fromLatLngToDivPixel(fb.getSouthWest());var cQ=this.f.fromLatLngToDivPixel(fb.getNorthEast());var dW=new IBound(cS.x,cQ.y,cQ.x,cS.y);var dH=[];for(var i=0;i<this.bc.length;i++){dH.push(this.f.fromLatLngToDivPixel(this.bc[i]));}if(!isDefined(this.aQ)){var cK=map.getPane(7);this.aQ=IGraphics.createPolygon(dH,this.Z,dW,en);cK.appendChild(this.aQ);}else{IGraphics.setPolygon(this.aQ,dH,this.Z,dW,en);}}};IPolygon.prototype.getVertexCount=function(){return this.bc.length;};IPolygon.prototype.getVertex=function(index){return this.bc[index];};IPolygon.prototype.getBounds=function(){return this.bs;};IPolygon.prototype.show=function(){if(isDefined(this.aQ)){this.aQ.style.visibility='visible';}};IPolygon.prototype.hide=function(){if(isDefined(this.aQ)){this.aQ.style.visibility='hidden';}}; function IDot(latlng,color,weight,opacity){this.m_latlng=latlng;this.m_color=color||'#0000FF';this.m_weight=weight||2;this.m_opacity=opacity||1.0;this.m_point=null;this.m_map=null;this.m_opts=new cf();this.m_opts.fillColor=this.m_color;this.m_opts.strokeColor='#000000';this.m_opts.strokeWidth=1;this.m_opts.ovalRadius=(isDefined(this.m_weight))?this.m_weight:2;};IDot.prototype=new IOverlay();IDot.prototype.initialize=function(map){this.m_map=map;var _pt=this.m_map.fromLatLngToDivPixel(this.m_latlng);this.m_point=IGraphics.createPoint(_pt,this.m_opts);var _oPane=this.m_map.getPane(7);_oPane.appendChild(this.m_point);};IDot.prototype.redraw=function(force){var _pt=this.m_map.fromLatLngToDivPixel(this.m_latlng);IGraphics.setPoint(this.m_point,_pt,this.m_opts);};IDot.prototype.remove=function(){var _pane=this.m_map.getPane(7); if(isDefined(this.m_point)){_pane.removeChild(this.m_point);}}; var PPG_BASE_TILE_URL='./map_full';var PPG_BASE_URL='.';var cA='ov';function IMap(container,maptype,opt){this.P=container;this.dp=_createDivElement({position:'absolute',left:'0px',top:'0px',overflow:'hidden',width:'100%',height:'100%'});this.dm=_createDivElement({position:'absolute',left:'0px',top:'0px'});this.k=new IDraggableObject(this.dm,new IPoint(0,0));this.k.setDraggableCursor('pointer');this.k.setDraggingCursor('move');this.aa=null;this.ae=null;this.av=new CArray();this.Y=[];this.ax=[];this.U=null;this.l=new IPoint(0,0);this.cz=new CArray();this.aj=isDefined(maptype)?maptype:new IMapViewMapType();this.cd=new ISize(parseInt(this.P.offsetWidth),parseInt(this.P.offsetHeight));this.bO=new ILatLngBound();this.cL=new IBound();this.V=0;this.aX=new IInfoWindow();this.fO();this.bv=new bQ();if(isDefined(opt)){if(isDefined(opt.mapstyle)&&opt.mapstyle==cA){this.bv=null;}}if(isDefined(this.bv)){this.addControl(this.bv);}};IMap.prototype.fO=function(){this.P.appendChild(this.dp);this.dp.appendChild(this.dm);this.eX();this.addMapType(this.aj);this.setMapType(this.aj);IEvent.addListener(this.k,'moveend',this,function(e){IEvent.trigger(this,'moveend');});IEvent.addListener(this.k,'dblclick',this,function(e){IEvent.trigger(this,'dblclick',e);});IEvent.addListener(this.k,'dragstart',this,function(e){this.aa=new IPoint(e.clientX,e.clientY);IEvent.trigger(this,'dragstart',e);});IEvent.addListener(this.k,'drag',this,function(e){var aG=this;var eH=e;var count=0;if(this.ae!=null){clearTimeout(this.ae);}this.ae=setTimeout(function(){aG.ck(new ISize(eH.clientX-aG.aa.x,eH.clientY-aG.aa.y));aG.bk();aG.bl();aG.aa=new IPoint(eH.clientX,eH.clientY);aG.ae=null;},250);IEvent.trigger(this,'drag',e);});IEvent.addListener(this.k,'dragend',this,function(e){if(this.ae!=null){clearTimeout(this.ae);}this.ck(new ISize(e.clientX-this.aa.x,e.clientY-this.aa.y));this.ae=null;this.aa=null;this.bk();this.bl();IEvent.trigger(this,'dragend',e);});this.aX.eJ(this);IEvent.addListener(this.k,'click',this,function(e){this.closeInfoWindow();IEvent.trigger(this,'click',e);});};IMap.prototype.eX=function(){this.Y[0]=_createDivElement({position:'absolute',left:'0px',top:'0px'});this.Y[1]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:101});this.Y[2]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:101});this.Y[3]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:102});this.Y[4]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:103});this.Y[5]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:104});this.Y[6]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:105});this.Y[7]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:106});this.Y[8]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:107});for(var pane in this.Y){this.dm.appendChild(this.Y[pane]);}};IMap.prototype.getContainer=function(){return this.P;};IMap.prototype.getPane=function(key){return this.Y[key];};IMap.prototype.addPane=function(zindex){this.Y.push(_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:zindex}));return this.Y.length-1;};IMap.prototype.checkResize=function(){this.eg(parseInt(this.P.offsetWidth),parseInt(this.P.offsetHeight));};IMap.prototype.eg=function(width,height){if(this.cd.width!=width||this.cd.height!=height){this.cd.width=width;this.cd.height=height;var eV=this.getZoom();var aD=this.getCurrentMapType();var aT=aD.getProjection();var g=aD.getTileSize();var ev=this.bO.getSouthWest();var et=this.bO.getNorthEast();var gp=new ILatLng(et.lat(),ev.lng());var eP=aT.fromLatLngToPixel(gp,eV);var fN=new IPoint(eP.x+width/2,eP.y+height/2);this.setCenter(aT.fromPixelToLatLng(fN,eV),eV);}};IMap.prototype.setCenter=function(latlng,zoom,type){if(!isDefined(latlng)){throw "The latlng value of setCenter is not valid.";}var dO=this.U;this.U=latlng;var _iZC=false;if(isDefined(zoom)){if(!isDefined(this.V)){_iZC=true;}else if(this.V!=zoom){_iZC=true;}this.V=zoom;}var az=this.getSize();var el=this.k.dq();var dR=this.getCurrentMapType().getProjection().fromLatLngToPixel(this.U,this.V);this.l=new IPoint(-el.x-(dR.x-Math.floor(az.width/2)),-el.y-(dR.y-Math.floor(az.height/2)));this.bk();this.fx();if(isDefined(dO)){if(!dO.equals(this.U)){IEvent.trigger(this,'moveend');IEvent.trigger(this,'reposition');}}else{IEvent.trigger(this,'moveend');IEvent.trigger(this,'reposition');}if(_iZC){IEvent.trigger(this,'zoom',this.V);}};IMap.prototype.panTo=function(latlng,count,mils){var fs=this.fromLatLngToDivPixel(this.getCenter());var fv=this.fromLatLngToDivPixel(latlng);this.panBy(new ISize(fs.x-fv.x,fs.y-fv.y));};IMap.prototype.panBy=function(distance,count,mils){var fD=new Pan(10||count);var aG=this;var eT=new ISize(0,0);var az=this.getSize();if(Math.abs(distance.width)>az.width||Math.abs(distance.height)>az.height){this.eM(new ISize(distance.width,distance.height));IEvent.trigger(aG,'moveend');}else{var aG=this;setTimeout(function(){if(fD.hasNext()){var gr=fD.next();var ge=new ISize(Math.round(distance.width*gr),Math.round(distance.height*gr));aG.eM(new ISize(ge.width-eT.width,ge.height-eT.height));eT=ge;setTimeout(arguments.callee,mils||25);}else{IEvent.trigger(aG,'moveend');}},mils||25);}};IMap.prototype.panDirection=function(dx,dy){var g=this.getCurrentMapType().getTileSize();this.panBy(new ISize(dx*g,dy*g));};IMap.prototype.eM=function(distance){this.k.moveBy(distance);this.ck(distance);this.bk();this.bl();};IMap.prototype.ck=function(distance){var fu=this.getCurrentMapType().getProjection();var bq=fu.fromLatLngToPixel(this.U,this.V);this.U=fu.fromPixelToLatLng(new IPoint(bq.x-distance.width,bq.y-distance.height),this.V);};IMap.prototype.bk=function(){var az=this.getSize();var bq=this.fromLatLngToDivPixel(this.U);var bn=bq.x-Math.floor(az.width/2);var bm=bq.y-Math.floor(az.height/2);var bY=bn+az.width;var bV=bm+az.height;this.cL=new IBound(bn,bm,bY,bV);this.bO=new ILatLngBound(this.fromDivPixelToLatLng(new IPoint(bn,bV)),this.fromDivPixelToLatLng(new IPoint(bY,bm)));};IMap.prototype.fromLatLngToDivPixel=function(latlng){var aD=this.getCurrentMapType();var aT=aD.getProjection();var eZ=aT.fromLatLngToPixel(latlng,this.getZoom());return new IPoint(this.l.x+eZ.x,this.l.y+eZ.y);};IMap.prototype.fromDivPixelToLatLng=function(point){var aD=this.getCurrentMapType();var aT=aD.getProjection();return aT.fromPixelToLatLng(new IPoint(point.x-this.l.x,point.y-this.l.y),this.getZoom());};IMap.prototype.fromContainerPixelToLatLng=function(point){var A=this.P;var bJ=new IPoint(0,0);while(isDefined(A)){if(isDefined(A.offsetLeft)){bJ.x+=parseInt(A.offsetLeft);}if(isDefined(A.offsetTop)){bJ.y+=parseInt(A.offsetTop);};A=A.offsetParent;}A=this.P;while(isDefined(A)&&A!=document.documentElement&&A!=document.body){bJ.x-=parseInt(A.scrollLeft);bJ.y-=parseInt(A.scrollTop);A=A.parentNode;}var r=this.cL.min();bJ.x=point.x-bJ.x+r.x+(document.documentElement.scrollLeft+document.body.scrollLeft);bJ.y=point.y-bJ.y+r.y+(document.documentElement.scrollTop+document.body.scrollTop);return this.fromDivPixelToLatLng(bJ);};IMap.prototype.getSize=function(){return this.cd;};IMap.prototype.getBounds=function(){return this.bO;};IMap.prototype.getCenter=function(){return this.U;};IMap.prototype.addOverlay=function(overlay){overlay.initialize(this);this.av.add(overlay);overlay.redraw(true);};IMap.prototype.dP=function(){for(var i=0;i<this.av.size();i++){this.av.get(i).redraw(true);}};IMap.prototype.removeOverlay=function(overlay){var o=this.av.remove(overlay);if(isDefined(o)){overlay.remove();}};IMap.prototype.clearOverlays=function(){this.closeInfoWindow();while(this.av.size()>0){var fl=this.av.get(0);this.av.remove(fl);fl.remove();}};IMap.prototype.getMapTypes=function(){return this.fH.toArray();};IMap.prototype.getCurrentMapType=function(){return this.aj;};IMap.prototype.setMapType=function(type){if(this.cz.contains(type)){this.aj=type;this.ef();IEvent.trigger(this,'maptype');}};IMap.prototype.ef=function(){while(this.ax.length>0){var fl=this.ax.pop();fl.remove();}var fr=this.aj.getTileLayers();for(var i=0;i<fr.length;i++){var fl=new ITileLayerOverlay(fr[i]);this.ax.push(fl);fl.initialize(this);}};IMap.prototype.addMapType=function(type){this.cz.add(type);if(!this.aj||this.aj==null){this.setMapType(type);}};IMap.prototype.removeMapType=function(type){this.cz.remove(type);};IMap.prototype.bl=function(){for(var i=0;i<this.ax.length;i++){this.ax[i].redraw(true);}};IMap.prototype.fx=function(){this.dP();this.bl();this.aX.reset(this.aX.getPoint(),null,null,null,null);};IMap.prototype.getZoom=function(){return this.V;};IMap.prototype.setZoom=function(level){if(!isDefined(this.V)||this.V!=level){if(isDefined(this.U)){this.setCenter(this.U,level);}else{this.V=level;}}};IMap.prototype.zoomIn=function(){if(this.V>this.getCurrentMapType().getMinimumResolution()){this.setZoom(this.V-1);}};IMap.prototype.zoomOut=function(){if(this.V<this.getCurrentMapType().getMaximumResolution()){this.setZoom(this.V+1);}};IMap.prototype.addControl=function(control){control.initialize(this);};IMap.prototype.removeControl=function(control){control.remove();};IMap.prototype.enableDragging=function(){this.k.enableDragging();};IMap.prototype.disableDragging=function(){this.k.disableDragging();};IMap.prototype.dragEnabled=function(){return this.k.dragEnabled();};IMap.prototype.dr=function(){return this.k;};IMap.prototype.enableInfoWindow=function(){};IMap.prototype.disableInfoWindow=function(){};IMap.prototype.infoWindowEnabled=function(){};IMap.prototype.openInfoWindow=function(point,node,opts){var az=null;var eN=null;if(isDefined(opts)){if(isDefined(opts.size)){az=opts.size;}if(isDefined(opts.offset)){eN=opts.offset;}}this.aX.reset(point,[node],az,eN,0);this.aX.show();};IMap.prototype.openInfoWindowHtml=function(point,html,opts){var ft=document.createElement('div');ft.innerHTML=html;this.openInfoWindow(point,ft,opts);};IMap.prototype.closeInfoWindow=function(){this.aX.hide();};IMap.prototype.getDragObject=function(){return this.dr();};function Pan(count){this.totalCnt=count;this.currentCnt=0;};Pan.prototype.next=function(){if(this.hasNext()){this.currentCnt++;return(1+Math.sin(Math.PI*(-0.5+this.currentCnt/this.totalCnt)))/2;}};Pan.prototype.hasNext=function(){return(this.currentCnt<this.totalCnt);};Pan.prototype.reset=function(){this.currentCnt=0;}; function IInfoWindow(){this.aF=_createDivElement({position:'absolute'});this.aF.style.cursor='default';this.ag=true;this.hide();this.f=null;this.bp=[];this.cx= -1;this.dB=null;this.af=null;this.aB=new ISize(200,120);this.af=new ISize(0,0);this.bU=_createDivElement({position:'absolute',overflow:'hidden',width:'25px',height:'25px'});this.bU.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/tl.png',0,0,25,25));var bB=this;IEvent.addDomListener(this.bU,'mousedown',function(e){bB.ac(e);});this.bx=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/l.png) repeat-y',width:'25px'});IEvent.addDomListener(this.bx,'mousedown',function(e){bB.ac(e);});this.bt=_createDivElement({position:'absolute',overflow:'hidden',width:'25px',height:'24px'});this.bt.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/bl.png',0,0,25,24));IEvent.addDomListener(this.bt,'mousedown',function(e){bB.ac(e);});this.bC=_createDivElement({position:'absolute',overflow:'hidden',width:'27px',height:'25px'});this.bC.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/tr.png',0,0,27,25));this.cB=IUtil.createImage(PPG_BASE_URL+'/img/close_button.gif',6,8,12,12);this.cB.style.zIndex=10;IEvent.addDomListener(this.cB,'click',function(e){bB.hide();});IEvent.addDomListener(this.cB,'mouseover',function(e){this.style.cursor='pointer';bB.ac(e);});this.bC.appendChild(this.cB);IEvent.addDomListener(this.bC,'mousedown',function(e){bB.ac(e);});this.bf=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/r.png) repeat-y',width:'27px'});IEvent.addDomListener(this.bf,'mousedown',function(e){bB.ac(e);});this.bg=_createDivElement({position:'absolute',overflow:'hidden',width:'27px',height:'24px'});this.bg.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/br.png',0,0,27,24));IEvent.addDomListener(this.bg,'mousedown',function(e){bB.ac(e);});this.bM=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/t.png) repeat-x',height:'25px'});IEvent.addDomListener(this.bM,'mousedown',function(e){bB.ac(e);});this.aZ=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/b.png) repeat-x',height:'24px'});IEvent.addDomListener(this.aZ,'mousedown',function(e){bB.ac(e);});this.dg=_createDivElement({position:'absolute',overflow:'hidden',zIndex:1,width:'86px',height:'92px'});this.dg.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/anchor.png',0,0,86,92));this.ak=_createDivElement({position:'absolute',overflow:'hidden',background:'#E6F4FD'});IEvent.addDomListener(this.ak,'mousedown',function(e){bB.ac(e);});this.aF.appendChild(this.bt);this.aF.appendChild(this.aZ);this.aF.appendChild(this.bg);this.aF.appendChild(this.bU);this.aF.appendChild(this.bM);this.aF.appendChild(this.bC);this.aF.appendChild(this.bx);this.aF.appendChild(this.ak);this.aF.appendChild(this.bf);this.aF.appendChild(this.dg);this.du();};IInfoWindow.prototype.selectTab=function(index){if(isDefined(this.ak)&&index>=0&&index<this.bp.length){if(this.cx>=0){this.bp[this.cx].style.display='none';}this.cx=index;this.bp[index].style.display='block';}};IInfoWindow.prototype.ac=function(e){e.stopPropagation();e.preventDefault();};IInfoWindow.prototype.eJ=function(map){this.f=map;this.f.getPane(8).appendChild(this.aF);};IInfoWindow.prototype.hide=function(){this.aF.style.display='none';this.aF.style.visibility='hidden';this.ag=true;};IInfoWindow.prototype.show=function(){this.aF.style.display='block';this.aF.style.visibility='visible';this.ag=false;};IInfoWindow.prototype.isHidden=function(){return this.ag;};IInfoWindow.prototype.du=function(){this.dg.style.top= -92-this.af.height+'px';this.dg.style.left=0-this.af.width+'px';var cc= -88-24-this.af.height;this.bt.style.top=cc+'px';this.aZ.style.top=cc+'px';this.bg.style.top=cc+'px';var as= -50-this.af.width;this.bt.style.left=as+'px';as+=25;this.aZ.style.left=as+'px';this.aZ.style.width=this.aB.width+'px';as+=this.aB.width;this.bg.style.left=as+'px';cc-=this.aB.height;this.bx.style.top=cc+'px';this.bx.style.height=this.aB.height+'px';this.ak.style.top=cc+'px';this.ak.style.height=this.aB.height+'px';this.bf.style.top=cc+'px';this.bf.style.height=this.aB.height+'px';as= -50-this.af.width;this.bx.style.left=as+'px';as+=25;this.ak.style.left=as+'px';this.ak.style.width=this.aB.width+'px';as+=this.aB.width;this.bf.style.left=as+'px';cc-=25;this.bU.style.top=cc+'px';this.bM.style.top=cc+'px';this.bC.style.top=cc+'px';var as= -50-this.af.width;this.bU.style.left=as+'px';this.bU.style.width=25+'px';as+=25;this.bM.style.left=as+'px';this.bM.style.width=this.aB.width+'px';as+=this.aB.width;this.bC.style.left=as+'px';};IInfoWindow.prototype.getPoint=function(){return this.dB;};IInfoWindow.prototype.getPixelOffset=function(){return this.af;};IInfoWindow.prototype.getTabs=function(){return this.bp;};IInfoWindow.prototype.reset=function(point,tabs,size,offset,selectedTab){if(isDefined(point)){this.dB=point;}if(tabs!=null){if(isDefined(this.bp)){for(var i=0;i<this.bp.length;i++){this.ak.removeChild(this.bp[i]);}}this.bp=tabs;for(var i=0;i<this.bp.length;i++){this.bp[i].style.display='none';this.ak.appendChild(this.bp[i]);}}var ds=false;if(isDefined(offset)){this.af=offset;ds=true;}if(isDefined(size)){this.aB=size;ds=true;}if(ds){this.du();}if(selectedTab!=null){this.selectTab(selectedTab);}if(isDefined(this.dB)){var fd=this.f.fromLatLngToDivPixel(this.dB);this.aF.style.left=fd.x+'px';this.aF.style.top=fd.y+'px';}};;

function IScaleControl()
{
	this.m_map = null;
	this.m_div = null;
	this.m_curScaleImg = null;
	this.m_scaleImages = [];
	
	
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale1.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale2.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale3.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale4.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale5.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale6.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale7.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale8.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale9.png', 0, 0, 110, 63));
	this.m_scaleImages.push(
		IUtil.createImage(PPG_BASE_URL + '/img/scale10.png', 0, 0, 110, 63));
}

IScaleControl.prototype = new IControl();

IScaleControl.prototype.initialize = function(map) {
	
	this.m_map = map;
	this.m_div = _createDivElement(
		{position:'absolute', left:'10px', bottom:'10px', width:'110px', height:'63px', overflow:'hidden'});

	this.m_curScaleImg = this.m_scaleImages[map.getZoom()];
	this.m_div.appendChild(this.m_curScaleImg);

	IEvent.addListener(map, 'zoom', this, function() {
		if(isDefined(this.m_curScaleImg)) {
			this.m_div.removeChild(this.m_curScaleImg);
		}
		this.m_curScaleImg = this.m_scaleImages[map.getZoom()];
		this.m_div.appendChild(this.m_curScaleImg);
	});
	
	this.m_map.getContainer().appendChild(this.m_div);
};

IScaleControl.prototype.remove = function() {
	
	if(isDefined(this.m_map) && isDefined(this.m_div)) {
		
		this.m_map.getContainer().removeChild(this.m_div);		
	}
};
