
var API_HOST_URL="http://mapserver.thegrid.co.za/msjsapi20018/";document.write("<script language='javascript' src='"+API_HOST_URL+"js/jquery-1.2.6.pack.js"+"'></script>");document.write("<script language='javascript' src='"+API_HOST_URL+"js/jquery.mousewheel.pack.js"+"'></script>");var meta=document.createElement('meta');meta.httpEquiv="X-UA-Compatible";meta.content="IE=EmulateIE7";if(document.getElementsByTagName('head').length>0){document.getElementsByTagName('head')[0].appendChild(meta);}
else {var tempHead=document.createElement('head');tempHead.appendChild(meta);document.appendChild(tempHead);}


function _f1(shortcut,callback,opt){var default_options={'type':'keydown','propagate':false,'target':document
	};if(!opt) opt=default_options;else {for(var dfo in default_options){if(typeof opt[dfo]=='undefined') opt[dfo]=default_options[dfo];}}

	var ele=opt.target;if(typeof opt.target=='string') ele=document.getElementById(opt.target);var ths=this;var _jM=function(e){e=e||window.event;if(e.keyCode) code=e.keyCode;else if(e.which) code=e.which;var character=String.fromCharCode(code).toLowerCase();var keys=shortcut.toLowerCase().split("+");var kp=0;var shift_nums={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",".":">","/":"?","\\":"|"
 };var special_keys={'esc':27,'escape':27,'tab':9,'space':32,'return':13,'enter':13,'backspace':8,'scrolllock':145,'scroll_lock':145,'scroll':145,'capslock':20,'caps_lock':20,'caps':20,'numlock':144,'num_lock':144,'num':144,'pause':19,'break':19,'insert':45,'home':36,'delete':46,'end':35,'pageup':33,'page_up':33,'pu':33,'pagedown':34,'page_down':34,'pd':34,'left':37,'up':38,'right':39,'down':40,'f1':112,'f2':113,'f3':114,'f4':115,'f5':116,'f6':117,'f7':118,'f8':119,'f9':120,'f10':121,'f11':122,'f12':123
 };for(var i=0;k=keys[i],i<keys.length;i++){if(k=='ctrl'||k=='_hI'){if(e.ctrlKey) kp++;} else if(k=='shift'){if(e.shiftKey) kp++;} else if(k=='alt'){if(e.altKey) kp++;} else if(k.length>1){if(special_keys[k]==code) kp++;} else {if(character==k) kp++;else {if(shift_nums[character]&&e.shiftKey){character=shift_nums[character];if(character==k) kp++;}}
 }}

 if(kp==keys.length){callback(e);if(!opt['propagate']){e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault();}
 return false;}}
	}

	
	if(ele.addEventListener) ele.addEventListener(opt['type'],_jM,false);else if(ele.attachEvent) ele.attachEvent('on'+opt['type'],_jM);else ele['on'+opt['type']]=_jM;}


function _gg(){}
_gg.insidePixelRegion=function(_gG,_qO){if(!(_qO instanceof _fM)||_gG==null||typeof _gG=="undefined"||typeof _gG!="object")
return "Invalid argument";var _mM=_gG.length;var _hc=false;var j=_mM-1;for(var i=0;i<_mM;i++){var _qT=_gG[i];var _qU=_gG[j];if(_qT.x<_qO.x&&_qU.x>=_qO.x||_qU.x<_qO.x&&_qT.x>=_qO.x){if(-_qT.y+(_qO.x-_qT.x) /(_qU.x-_qT.x)*(-_qU.y+_qT.y)<-_qO.y){_hc=!_hc;}}
j=i;}
return _hc;};_gg.getRegionAroundLines=function(_gG,strokeWidth){if(typeof _gG=="undefined"||_gG==null||typeof _gG!="object")
return;if(typeof strokeWidth=="undefined"||strokeWidth==null||typeof strokeWidth!="number")
return;_gG=_gg.removeRedandentPoints(_gG);var _gH=new Array();var _gF=new Array();var _rk=_fg.getStraightLineFromPoints(_gG[0],_gG[1]);var _rl=_fg.getPerpendicularLine(_rk,_gG[0]);var _rm=_fg.getPerpendicularLine(_rk,_gG[1]);var _gM=_fg.getLinesFromDistance(_rk,strokeWidth/2);var _qS=_fg.getIntersection(_gM[0],_rl);var _qu=_fg.getIntersection(_gM[1],_rl);if(_qS!=null)
_gH.push(_qS);if(_qu!=null)
_gF.push(_qu);for(var i=1;i<_gG.length-1;i++){_rk=_fg.getStraightLineFromPoints(_gG[i],_gG[i+1]);var _gK=_fg.getLinesFromDistance(_rk,strokeWidth/2);_qS=_fg.getIntersection(_gM[0],_gK[0]);_qu=_fg.getIntersection(_gM[1],_gK[1]);if(_qS!=null)
_gH.push(_qS);if(_qu!=null)
_gF.push(_qu);_gM=_gK;}
_rk=_fg.getStraightLineFromPoints(_gG[i],_gG[i-1]);var _rn=_fg.getPerpendicularLine(_rk,_gG[i]);var _gL=_fg.getLinesFromDistance(_rk,strokeWidth/2);_qS=_fg.getIntersection(_gL[1],_rn);_qu=_fg.getIntersection(_gL[0],_rn);if(_qS!=null)
_gH.push(_qS);if(_qu!=null)
_gF.push(_qu);_gF=_gF.reverse();var _gz=_gH.concat(_gF);return _gz;};_gg.getNavigationRouteRequest=function(_to,_gR,_m0,_tW,_ua){var _us="";_us+="LATLONG,"+_gR[0].longitude()+","+_gR[0]._nP();for(var i=1;i<_gR.length;i++){_us+="^LATLONG,"+_gR[i].longitude()+","+_gR[i]._nP();}
var _un=AG_NAVIGATION_GATEWAY_URL;_un+="?";_un+="Request=GetDDPoints";_un+="&RouningLayer="+_tW;_un+="&routingParam="+_ua;_un+="&jsonp="+_to;_un+="&waypoints="+_us;_un+="&requestNo="+_m0;_un+="&key="+_eS.key;_un+="&rnd="+Math.random();return _un;};_gg.removeRedandentPoints=function(_gG){var _gn=new Array(_gG[0]);for(var i=1;i<_gG.length;i++){if(!(_gG[i-1]._jh(_gG[i])))
_gn.push(_gG[i]);}
return _gn;};_gg.getPolygonFromCircle=function(oPointCentre,radious,_angle){var angle=5;if(_angle!=null&&typeof _angle!="undefiened"&&typeof _angle=="number")
angle=_angle;var accumulateAngle=0;var _gG=new Array();for(var i=0;i<360/angle;i++){_gG.push(new _fM(oPointCentre.x+radious*Math.cos(accumulateAngle*0.0174532925),oPointCentre.y-radious*Math.sin(accumulateAngle*0.0174532925)));accumulateAngle+=angle;}
_gG.push(_gG[0]);return _gG;}
_gg.getCopyright=function(strBBox,strlavel,bImagery,_tx,_tq){var url=AG_COPYRIGHT_HANDLER_URL+"?BoundingBox="+strBBox+"&Level="+strlavel+"&ImageryVisible="+bImagery+"&DataSet="+_tx+"&Callback="+_tq;var script=document.createElement("script");script.setAttribute("src",url);script.setAttribute("type","text/javascript");document.body.appendChild(script);}


function _fg(){}
_fg.getIntersection=function(_ri,_rj){if(!(_ri instanceof _f4)||!(_rj instanceof _f4))
return;var _hS=_ri._jT()*_rj._jY()-_rj._jT()*_ri._jY();if(_hS==0)
return null;var x=(-_ri._j1()*_rj._jY()+_rj._j1()*_ri._jY()) / _hS;var y=(-_ri._jT()*_rj._j1()+_rj._jT()*_ri._j1()) / _hS;return new _fM(x,y);};_fg.getStraightLineFromPoints=function(_ql,_qm){if(!(_ql instanceof _fM)||!(_qm instanceof _fM))
return null;var a=_ql.y-_qm.y;var b=_qm.x-_ql.x;var c=_ql.x*a+_ql.y*b;c=-c;return new _f4(a,b,c);};_fg.getPerpendicularLine=function(_rh,_qn){if(_rh instanceof _f4){var c_=_rh._jT()*_qn.y-_rh._jY()*_qn.x;return new _f4(_rh._jY(),-_rh._jT(),c_);}
return null;};_fg.getLinesFromDistance=function(_rh,_jn){if(_rh instanceof _f4&&typeof _jn!="undefined"&&_jn!=null&&typeof _jn=="number"){var a=_rh._jT();var b=_rh._jY();var _hA=_rh._j1()-(_jn*Math.sqrt(Math.pow(a,2)+Math.pow(b,2)));var _hK=_rh._j1()+(_jn*Math.sqrt(Math.pow(a,2)+Math.pow(b,2)));var s1=new _f4(a,b,_hK);var s2=new _f4(a,b,_hA);return new Array(s1,s2);}
return null;};function _f4(fA,fB,fC){if(typeof fA!="undefined"&&fA!=null&&typeof fA=="number")
this._bb=fA;else throw "Invalied argument";if(typeof fB!="undefined"&&fB!=null&&typeof fB=="number")
this._bc=fB;else throw "Invalied argument";if(typeof fC!="undefined"&&fC!=null&&typeof fC=="number")
this._bd=fC;else throw "Invalied argument";this._jT=function(){return this._bb;};this._jY=function(){return this._bc;};this._j1=function(){return this._bd;};}


function _fh(){this._bO=new Array();this._kw=function(_tU){return this._bO[_tU];};this._d5=function(_tU,value){if(typeof(value)!='undefined'){if(typeof(this._bO[_tU])=='undefined'){this._bO[_tU]=new Array();}
this._bO[_tU].push(value);}};this._rY=function(_tU,value){if(typeof(value)!='undefined'){if(typeof(this._bO[_tU])!='undefined'){var _my=this._ju(this._bO[_tU],value);if(_my>=0)
this._bO[_tU].splice(_my,1);if(this._bO[_tU].length==0)
delete this._bO[_tU];}}
};this._rZ=function(_tU){if(typeof(this._bO[_tU])!='undefined'){delete this._bO[_tU];}};this._lu=function(_tU){return typeof(this._bO[_tU])!='undefined';};this.clear=function(){delete this._bO;this._bO=new Array();};this._ju=function(_gn,value){for(var i=0;i<_gn.length;i++)
if(_gn[i]==value)
return i;return-1;};}


function _fi(){}
_fi.rowSpan=50;_fi.colSpan=50;_fi.noOfRows=50;_fi.noOfCols=50;_fi._sm="x";_fi.getClickMappingKeyForPosition=function(_qk){var x=Math.floor(_qk.y/_fi.rowSpan) % _fi.noOfRows;x=x<0? x+_fi.noOfRows : x;var y=Math.floor(_qk.x/_fi.colSpan) % _fi.noOfCols;y=y<0 ? y+_fi.noOfCols : y;return x+_fi._sm+y;};_fi.getBoundingBoxFromPoints=function(_gG){if(typeof _gG=="undefined"||_gG.length<=0)
throw "Array's lenght must be at least 1.";var _oe=_gG[0].x;var _n8=_gG[0].x;var _of=_gG[0].y;var _n9=_gG[0].y;for(var i=1;i<_gG.length;i++){_oe=(_gG[i].x<_oe) ? _gG[i].x : _oe;_n8=(_gG[i].x>_n8) ? _gG[i].x : _n8;_of=(_gG[i].y<_of) ? _gG[i].y : _of;_n9=(_gG[i].y>_n9) ? _gG[i].y : _n9;}
return new _fT(new _fM(_oe,_of),new _fM(_n8,_n9));};_fi.getKeysForRegion=function(_gG){var _oX=_fi.getBoundingBoxFromPoints(_gG);var _qD=_oX.min();var _qC=_oX.max();var _nE=_qC.x-_qD.x;var _l3=_qC.y-_qD.y;var _nx=0;var _lJ=0;var _mf=0;var _m2=0;if(_l3>=_fi.rowSpan*_fi.noOfRows){_nx=0;_lJ=_fi.noOfRows-1;}
else {_nx=Math.floor(_qD.y/_fi.rowSpan) % _fi.noOfRows;_nx=_nx<0 ? _nx+_fi.noOfCols : _nx;_lJ=Math.floor(_qC.y/_fi.rowSpan) % _fi.noOfRows;_lJ=_lJ<0 ? _lJ+_fi.noOfCols : _lJ;}
if(_nE>=_fi.colSpan*_fi.noOfCols){_mf=0;_m2=_fi.noOfCols-1;}
else {_mf=Math.floor(_qD.x/_fi.colSpan) % _fi.noOfCols;_mf=_mf<0 ? _mf+_fi.noOfCols : _mf;_m2=Math.floor(_qC.x/_fi.colSpan) % _fi.noOfCols;_m2=_m2<0 ? _m2+_fi.noOfCols : _m2;}
var _gB=new Array();for(var x=_nx;;x++){var _gX=false;if(x%_fi.noOfRows==_lJ)
_gX=true;for(var y=_mf;;y++){var _gY=false;if(y%_fi.noOfCols==_m2)
_gY=true;_gB[_gB.length]=(x%_fi.noOfRows)+_fi._sm+(y%_fi.noOfCols);if(_gY)
break;}
if(_gX)
break;}
return _gB;};

var _eU={init: function(){this._hg=this._sj(this._hT)||"An unknown _hg";this.VERSION=this._sk(navigator.userAgent)||this._sk(navigator.appVersion)||"an unknown VERSION";this._q2=this._sj(this._hU)||"an unknown _q2";},_sj: function(data){for(var i=0;i<data.length;i++){var _hX=data[i].string;var _hV=data[i].prop;this._uI=data[i].versionSearch||data[i].identity;if(_hX){if(_hX.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(_hV)
return data[i].identity;}},_sk: function(_hX){var _my=_hX.indexOf(this._uI);if(_my==-1) return;return parseFloat(_hX.substring(_my+this._uI.length+1));},_hT: [
{string: navigator.userAgent,subString: "OmniWeb",versionSearch: "OmniWeb/",identity: "OmniWeb"
},{string: navigator.vendor,subString: "Apple",identity: "Safari"
},{prop: window.opera,identity: "Opera"
},{string: navigator.vendor,subString: "iCab",identity: "iCab"
},{string: navigator.vendor,subString: "KDE",identity: "Konqueror"
},{string: navigator.userAgent,subString: "Firefox",identity: "Firefox"
},{string: navigator.vendor,subString: "Camino",identity: "Camino"
},{string: navigator.userAgent,subString: "Netscape",identity: "Netscape"
},{string: navigator.userAgent,subString: "MSIE",identity: "Explorer",versionSearch: "MSIE"
},{string: navigator.userAgent,subString: "Gecko",identity: "Mozilla",versionSearch: "rv"
},{string: navigator.userAgent,subString: "Mozilla",identity: "Netscape",versionSearch: "Mozilla"
}
],_hU : [
{string: navigator.platform,subString: "Win",identity: "Windows"
},{string: navigator.platform,subString: "Mac",identity: "Mac"
},{string: navigator.platform,subString: "Linux",identity: "Linux"
}
]
};_eU.init();if(_eU._hg=="Explorer")
document.write("<script language='javascript' src='"+API_HOST_URL+"js/AGPainterVML.js"+"'></script>");else document.write("<script language='javascript' src='"+API_HOST_URL+"js/AGPainterSVG.js"+"'></script>");

function _f2(_jP,_js){if(typeof _jP!="number"||typeof _js!="number")
throw "Invalid input";this.width=_jP;this.height=_js;this._jh=function(_p6){if(_p6==null||!(_p6 instanceof _f2))
throw "Invalid Size";if(this.width==_p6.width&&this.height==_p6.height)
return true;else return false;};this._uD=function(){var _uf=this.width+","+this.height;return _uf;};this.copy=function(){return new _f2(this.width,this.height);};this.equals=this._jh;this.toString=this._uD;}
var AGSize=_f2;

function _fE(){this.initialize=function(_pQ){throw "You must implement this";};this.copy=function(){throw "You must implement this";};this.redraw=function(_mP){throw "You must implement this";};this.remove=function(){throw "You must implement this";};this._j5=function(){return null;};}
var AGOverlay=_fE;

function _fT(_ql,_qm){if( _ql==null||!(_ql instanceof _fM))
throw "Invalid input for point";if(_qm==null||!(_qm instanceof _fM))
throw "Invalid input for point";this._bB=-1;this._bC=-1;this._bv=-1;this._bw=-1;var _nG=parseInt(_ql.x,10);var _nH=parseInt(_qm.x,10);var _nJ=parseInt(_ql.y,10);var _nK=parseInt(_qm.y,10);this._bB=(_nG<_nH) ? _nG : _nH;this._bv=(_nG>_nH) ? _nG : _nH;this._bC=(_nJ<_nK) ? _nJ : _nK;this._bw=(_nJ>_nK) ? _nJ : _nK;this._uD=function(){var _tn=new _fM(this._bB,this._bC)+","+new _fM(this._bv,this._bw);return _tn;};this._jh=function(_p4){if(_p4==null||!(_p4 instanceof _fT))
throw "Invalid Size";if(this._bB==_p4._bB&&this._bC==_p4._bC&&this._bv==_p4._bv&&this._bw==_p4._bw)
return true;else return false;};this._oc=function(){return new _fM((this._bB+this._bv)/2,(this._bC+this._bw)/2);};this.min=function(){return new _fM(this._bB,this._bC);};this.max=function(){return new _fM(this._bv,this._bw);};this._hE=function(_p5){if( _p5==null||!(_p5 instanceof _fT))
throw "Invalid Area";if(this._bB<=_p5._bB&&this._bC<=_p5._bC&&this._bv>=_p5._bv&&this._bw>=_p5._bw)
return true;else return false;};this._hD=function(_p3){if(_p3==null||!(_p3 instanceof _fM))
throw "Invalid Point";if(this._bB<=_p3.x&&this._bv>=_p3.x&&this._bC<=_p3.y&&this._bw>=_p3.y)
return true;else return false;};this._jl=function(_qk){if(_qk==null||!(_qk instanceof _fM))
throw "Invalid Point";if(_qk.x<this._bB)
this._bB=_qk.x;if(_qk.x>this._bv)
this._bv=_qk.x;if(_qk.y<this._bC)
this._bC=_qk.y;if(_qk.y>this._bw)
this._bw=_qk.y;};this.copy=function(){return new _fT(new _fM(this._bB,this._bC),new _fM(this._bv,this._bw));};this.toString=this._uD;this.equals=this._jh;this.mid=this._oc;this.min=this.min;this.max=this.max;this.containsRectangle=this._hE;this.containsPoint=this._hD;this.extend=this._jl;}
var AGRectangle=_fT;

function _fM(_nF,_nI){if(typeof _nF!="number"||typeof _nI!="number")
throw "Invalid input";this.x=_nF;this.y=_nI;this._jh=function(_p3){if(_p3==null||!(_p3 instanceof _fM))
throw "Invalid Point";if(this.x==_p3.x&&this.y==_p3.y)
return true;else return false;};this._uD=function(){var _t1=this.x+","+this.y;return _t1;};this.copy=function(){return new _fM(this.x,this.y);};this.equals=this._jh;this.toString=this._uD;}
var AGPoint=_fM;

function _fl(_hJ,image){if(typeof image!="string")
this.image=AG_DEFAULT_ICON.image;else this.image=image;this.shadow="";this.iconSize=new _f2(0,0);this.shadowSize=new _f2(0,0);this.iconAnchor=new _fM(0,0);this.infoDisplayAnchor=new _fM(0,0);this.printImage="";this.mozPrintImage="";this.printShadow="";this.transparent="";this.imageMap=null;this.maxHeight=0;this.dragCrossImage="";this.dragCrossSize=new _f2(10,10);this.dragCrossAnchor=new _fM(10,10);this.copy=function(){var _hL=new _fl();_hL.image=this.image;_hL.shadow=this.shadow;if(this.iconSize instanceof _f2)
_hL.iconSize=this.iconSize.copy();if(this.shadowSize instanceof _f2)
_hL.shadowSize=this.shadowSize.copy();if(this.iconAnchor instanceof _fM)
_hL.iconAnchor=this.iconAnchor.copy();if(this.infoDisplayAnchor instanceof _fM)
_hL.infoDisplayAnchor=this.infoDisplayAnchor.copy();_hL.printImage=this.printImage;_hL.mozPrintImage=this.mozPrintImage;_hL.printShadow=this.printShadow;_hL.transparent=this.transparent;_hL.imageMap=this.imageMap;_hL.maxHeight=this.maxHeight;_hL.dragCrossImage=this.dragCrossImage;_hL.dragCrossSize=this.dragCrossSize;_hL.dragCrossAnchor=this.dragCrossAnchor;return _hL;};}
var AGIcon=_fl;

_fQ.prototype=new _fE;function _fQ(_gv,_ry,_qV){var FILL_COLOUR='none';this._b1=null;this._cH=null;if(typeof _gv==null||typeof _gv=='undefined')
throw 'Invalid Coord';this._arrAGCoord=_gv;this._dA=_ry instanceof _gh ? _ry: AG_DEFAULT_VECTOR_OPTIONS.copy();if(_qV instanceof _fR)
this._c7=_qV;else this._c7=new _fR();this._5=true;this._4=false;this._dJ=null;this._b3=new _fS();this._M=false;this.initialize=function(_ox){this._b1=_ox;this._cH=this._b1._kK(_fK.OVERLAY_PANE);this._iL();this._so();};this.copy=function(){};this.redraw=function(_mP){if(_fD.ZOOM==_mP){var _gr=this.getPointFromCoord(this._arrAGCoord);this._b3.redraw(_gr);this._so();}};this.remove=function(){this._cH.removeChild(this._dJ);this._rS();this._b1=null;_fd.trigger(this,"onremove");};this._iL=function(){var _gr=this.getPointFromCoord(this._arrAGCoord);this._dJ=this._b3.polyline(_gr,this._dA);this._cH.appendChild(this._dJ);this._M=true;};this.getPointFromCoord=function(_gv){var _gp=new Array();for(var i=0;i<_gv.length;i++){_gp.push(this._b1._kP(_gv[i]));}
return _gp;};this._h3=function(_mc){if(typeof _mc!='number')
throw 'Index out of bound';if(this._arrAGCoord.length<3)
throw 'At least two vertex are need.'
if(_mc>=0&&_mc<this._arrAGCoord.length){this._arrAGCoord.splice(_mc,1);if(this._dJ){var _gG=this.getPointFromCoord(this._arrAGCoord);this._b3.redraw(_gG);this._so();_fd.trigger(this,"onlineupdated");}}
};this._lh=function(){return this._arrAGCoord.length;};this._lg=function(_mc){if(typeof _mc!="number") 
throw "Index must be a number";if(_mc!=Math.round(_mc))
throw "Index must be an integer";if(_mc>=0&&_mc<this._arrAGCoord.length)
return this._arrAGCoord[_mc];};this._kz=function(){};this._jZ=function(){var _oX=new _eT(this._arrAGCoord[0],this._arrAGCoord[1]);for(var i=2;i<this._arrAGCoord.length;i++){_oX._jl(this._arrAGCoord[i]);}
return _oX;};this.hide=function(){if(!this._ni())
return;if(!this._nd()){this._M=false;this._dJ.style.visibility='hidden';this._rS();_fd.trigger(this,"onvisibilitychanged",false);}};this._nd=function(){return !this._M;};this._np=function(){return ! this._nd();};this.show=function(){if(!this._ni())
return;if(this._nd()){this._M=true;this._dJ.style.visibility='visible';this._so();_fd.trigger(this,"onvisibilitychanged",true);}};this._eb=function(_o9){this._mK(this._arrAGCoord.length,_o9);};this._mK=function(_mc,_o9){if(typeof _mc!='number'||_mc<0||_mc>this._arrAGCoord.length||!(_o9 instanceof _e2))
throw 'Invalid argument';this._arrAGCoord.splice(_mc,0,_o9);if(this._dJ){var _gG=this.getPointFromCoord(this._arrAGCoord);this._b3.redraw(_gG);this._so();_fd.trigger(this,"onlineupdated");}};this._sP=function(_oJ){if(_oJ!=null&&_oJ instanceof _gh){this._dA=_oJ.copy();this._b3._sH(this._dA);_fd.trigger(this,"onlineupdated");}};this._ni=function(){return this._b1!=null;};this._j5=function(){if(this._c7.clickable){return this._p;}
return null;};this._so=function(){if(this._p!=null)
this._rS();this._p=new Array();for(var i=0;i<this._arrAGCoord.length;i++)
this._p.push(this._b1._kP(this._arrAGCoord[i]));this._p=_gg.getRegionAroundLines(this._p,this._dA.strokeWidth);this._b1._d9(this);return this._p;};this._rS=function(){this._b1._r3(this);this._p=null;};this.enableOnClick=function(){this._c7.clickable=true;}
this.disableOnClick=function(){this._c7.clickable=false;}
this.moveVertex=function(_mc,_o9){if(typeof _mc!='number'||_mc<0||_mc>this._arrAGCoord.length||!(_o9 instanceof _e2))
throw 'Invalid argument';if(this._dJ){this._arrAGCoord[_mc]=_o9;var _gG=this.getPointFromCoord(this._arrAGCoord);this._b3.redraw(_gG);this._so();_fd.trigger(this,"onlineupdated");}}
this.onClickEnabled=function(){return this._c7.clickable;}
this.enableOnClick=this.enableOnClick;this.disableOnClick=this.disableOnClick;this.onClickEnabled=this.onClickEnabled;this.deleteVertex=this._h3;this.getVertexCount=this._lh;this.getVertex=this._lg;this.hide=this.hide;this.getBoundingBox=this._jZ;this.addVertex=this._eb;this.insertVertex=this._mK;this.isVisible=this._np;this.show=this.show;this.setStyle=this._sP;this.moveVertex=this.moveVertex;}
var AGPolyline=_fQ;

function _fR(_g2){if(typeof _g2!="boolean")
this.clickable=false;else this.clickable=_g2;this.copy=function(){return new _fR(this.clickable);};}
var AGPolylineOptions=_fR;

function _gh(_ug,_no,_jL,_tG,_jq){if(typeof _ug=='string')
this.strokeColour=_ug;else this.strokeColour=AG_DEFAULT_VECTOR_OPTIONS.strokeColour;if(typeof _no=='number')
this.strokeWidth=_no;else this.strokeWidth=AG_DEFAULT_VECTOR_OPTIONS.strokeWidth;if(typeof _jL=='number')
this.strokeOpacity=_jL;else this.strokeOpacity=AG_DEFAULT_VECTOR_OPTIONS.strokeOpacity;if(typeof _tG=='string')
this.fillColour=_tG;else this.fillColour=AG_DEFAULT_VECTOR_OPTIONS.fillColour;if(typeof _jq=='number')
this.fillOpacity=_jq;else this.fillOpacity=AG_DEFAULT_VECTOR_OPTIONS.fillOpacity;this.copy=function(){return new _gh(this.strokeColour,this.strokeWidth,this.strokeOpacity,this.fillColour,this.fillOpacity);};}
var AGVectorStyleOptions=_gh;

_fN.prototype=new _fE;function _fN(_gv,_ry,_oD){this._b1=null;this._cH=null;if(typeof _gv==null||typeof _gv=='undefined')
throw 'Invalid Coord';if(_gv.length<=2)
throw 'At least two Coord required';this._arrAGCoord=_gv;if(_oD instanceof _fO)
this._cX=_oD.copy();else this._cX=new _fO();this._p=null;this._dA=_ry instanceof _gh ? _ry: AG_DEFAULT_VECTOR_OPTIONS.copy();this._dI=null;this._b2=new _fP();this._L=false;this.initialize=function(_ox){this._b1=_ox;this._cH=this._b1._kK(_fK.OVERLAY_PANE);this._iL();this._so();};this.copy=function(){};this.redraw=function(_mP){if(_fD.ZOOM==_mP){var _gr=this.getPointFromCoord(this._arrAGCoord);this._b2.redraw(_gr,this._dA);this._so();}};this.remove=function(){this._cH.removeChild(this._dI);this._rS();this._b1=null;_fd.trigger(this,"onremove");};this._iL=function(){var _gr=this.getPointFromCoord(this._arrAGCoord);this._dI=this._b2.polygon(_gr,this._dA);this._cH.appendChild(this._dI);this._L=true;};this.getPointFromCoord=function(_gv){var _gp=new Array();for(var i=0;i<_gv.length;i++){_gp.push(this._b1._kP(_gv[i]));}
return _gp;};this._h3=function(_mc){if(typeof _mc!='number')
throw 'Index out of bound';if(this._arrAGCoord.length<3)
throw 'At least two vertex are need.'
if(_mc>=0&&_mc<this._arrAGCoord.length){this._arrAGCoord.splice(_mc,1);if(this._dI){var _gG=this.getPointFromCoord(this._arrAGCoord);this._b2.redraw(_gG);this._so();_fd.trigger(this,"onlineupdated");}}
};this._lh=function(){return this._arrAGCoord.length;};this._lg=function(_mc){if(typeof _mc!="number") 
throw "Index must be a number";if(_mc!=Math.round(_mc))
throw "Index must be an integer";if(_mc>=0&&_mc<this._arrAGCoord.length)
return this._arrAGCoord[_mc];};this._jZ=function(){var _oX=new _eT(this._arrAGCoord[0],this._arrAGCoord[1]);for(var i=2;i<this._arrAGCoord.length;i++){_oX._jl(this._arrAGCoord[i]);}
return _oX;};this.hide=function(){if(!this._ni())
return;if(!this._nd()){this._dI.style.visibility='hidden';this._L=false;this._rS();_fd.trigger(this,"onvisibilitychanged",false);}};this._eb=function(_o9){this._mK(this._arrAGCoord.length,_o9);};this._mK=function(_mc,_o9){if(typeof _mc!='number'||_mc<0||_mc>this._arrAGCoord.length||!(_o9 instanceof _e2))
throw 'Invalid argument';this._arrAGCoord.splice(_mc,0,_o9);if(this._dI){var _gG=this.getPointFromCoord(this._arrAGCoord);this._b2.redraw(_gG);this._so();_fd.trigger(this,"onlineupdated");}};this._nd=function(){return !this._L;};this._np=function(){return !this._nd();};this.show=function(){if(!this._ni())
return;if(this._nd()){this._dI.style.visibility='visible';this._L=true;this._so();_fd.trigger(this,"onvisibilitychanged",true);}};this._sP=function(_oJ){if(_oJ!=null&&_oJ instanceof _gh){this._dA=_oJ.copy();this._b2._sQ(this._dA);_fd.trigger(this,"onlineupdated");}};this._ni=function(){return this._b1!=null;};this._j5=function(){if(this._cX.clickable){return this._p;}
return null;};this._so=function(){if(this._p!=null)
this._rS();this._p=new Array();for(var i=0;i<this._arrAGCoord.length;i++)
this._p.push(this._b1._kP(this._arrAGCoord[i]));this._b1._d9(this);return this._p;};this._rS=function(){this._b1._r3(this);this._p=null;};this.insidePolygon=function(_o9){if(_o9==null||!(_o9 instanceof _e2))
throw "Co-ordinates are not defined";var points=this.getPointFromCoord(this._arrAGCoord);return _gg.insidePixelRegion(points,this._b1._kP(_o9));}
this.enableOnClick=function(){this._cX.clickable=true;}
this.disableOnClick=function(){this._cX.clickable=false;}
this.moveVertex=function(_mc,_o9){if(typeof _mc!='number'||_mc<0||_mc>this._arrAGCoord.length||!(_o9 instanceof _e2))
throw 'Invalid argument';if(this._dI){this._arrAGCoord[_mc]=_o9;var _gG=this.getPointFromCoord(this._arrAGCoord);this._b2.redraw(_gG);this._so();_fd.trigger(this,"onlineupdated");}}
this.onClickEnabled=function(){return this._cX.clickable;}
this.deleteVertex=this._h3;this.getVertexCount=this._lh;this.getVertex=this._lg;this.hide=this.hide;this.getBoundingBox=this._jZ;this.addVertex=this._eb;this.insertVertex=this._mK;this.isVisible=this._np;this.show=this.show;this.setStyle=this._sP;this.insidePolygon=this.insidePolygon;this.moveVertex=this.moveVertex;}
var AGPolygon=_fN;

function _fO(_g2){if(typeof _g2!="boolean")
this.clickable=false;else this.clickable=_g2;this.copy=function(){return new _fO(this.clickable);};}
var AGPolygonOptions=_fO;

function _e5(){}
_e5._sE=function(_pQ,_qp){var _ph=_pQ._kb(_qp);if(_pQ._cT instanceof _fy){_pQ._cT._sq(_ph);}
else {var _h2=new _fz();var _h1=new _fl(null,API_HOST_URL+"Images/routeStart.png");_h1.iconAnchor=new _fM(-15,-30);_h2.icon=_h1;_pQ._cT=new _fy(_ph,_h2);_pQ._d8(_pQ._cT);}
_pQ._sL(_ph);_e5.showRoute(_pQ);};_e5._ss=function(_pQ,_qp){var _pe=_pQ._kb(_qp);if(_pQ._cQ instanceof _fy){_pQ._cQ._sq(_pe);}
else {var _h2=new _fz();var _h1=new _fl(null,API_HOST_URL+"/Images/routeStop.png");_h1.iconAnchor=new _fM(-12,-30);_h2.icon=_h1;_pQ._cQ=new _fy(_pe,_h2);_pQ._d8(_pQ._cQ);}
_pQ._sK(_pe);_e5.showRoute(_pQ);};_e5.showRoute=function(_pQ){if(_pQ._dc._oCoordOrigin&&_pQ._dc._oCoordDestination)
_pQ._iO();};_e5.showCoord=function(_pQ,_qp){var oClickedCoord=_pQ._kb(_qp);alert("Latitude: "+oClickedCoord._nP()+" \nLongitude: "+oClickedCoord.longitude());};_e5.removeRoute=function(_pQ){_pQ._hx();};

function _ff(_rg,_tB,_jr){this._dl=_rg;this._dO=_tB;this._bf=_jr;this._k1=function(){return this._dl;};this._kj=function(){return this._dO;};this._kl=function(){return this._bf;};}
var AGEventListener=_ff;

function _fd(){}
_fd.addListener=function(_s5,_jj,_ls){if(typeof _jj!="string")
throw "Invalid event";_jj=_jj.toLowerCase();if(typeof _s5._hEvents=="undefined")
_s5._hEvents=new _fh();_s5._hEvents._d5(_jj,_ls);return new _ff(_s5,_jj,_ls);};_fd.addDomListener=function(_s5,_jj,_ls){if(_s5.nodeType!=null&&typeof _s5.nodeType!="undefined"&&typeof _s5.nodeType=="number"&&_s5.nodeType>0&&_s5.nodeType<13)
return _fd.addListener(_s5,_jj,_ls);else return null;};_fd.removeListener=function(_lp){if(!_lp instanceof _ff)
return;var _rg=_lp._k1();var _tB=_lp._kj();var _jr=_lp._kl();if(typeof _rg._hEvents=="undefined")
return;_rg._hEvents._rY(_tB,_jr);};_fd.clearListeners=function(_s5,_jj){if(typeof _s5._hEvents=="undefined")
return;if(typeof _jj!="string")
throw "Invalid event";_jj=_jj.toLowerCase();_s5._hEvents._rZ(_jj);};_fd.clearInstanceListeners=function(_s5){if(typeof _s5._hEvents=="undefined")
return;_s5._hEvents.clear();};_fd.clearNode=function(_s5){while(_s5.hasChildNodes&&_s5.childNodes.length>0){for(var i=0;i<_s5.childNodes.length;i++)
_fd.clearNode(_s5.childNodes[i]);}
_fd.clearInstanceListeners(_s5);};_fd.trigger=function(_s5,_jj){if(typeof _jj!="string")
throw "Invalid event";_jj=_jj.toLowerCase();if(typeof _s5._hEvents=="undefined")
return;if(!_s5._hEvents._lu(_jj))
return;var _te="";for(var i=2;i<arguments.length;i++)
_te+="arguments["+i+"],";if(_te.length>0)
_te=_te.substring(0,_te.length-1);var _lt=_s5._hEvents._kw(_jj);for(var i=0;i<_lt.length;i++){try
{var h=_lt[i];if(_te.length>0){if(h instanceof _fe){var _oV=h._b6;var f=h._bl;_oV.AgeVe5436nTbrtiND=f;eval("_oV.AgeVe5436nTbrtiND("+_te+");");}
else eval("_lt[i]("+_te+");");}
else {if(h instanceof _fe){var o=h._b6;var f=h._bl;o.AgeVe5436nTbrtiND=f;o.AgeVe5436nTbrtiND();}
else _lt[i]();}}
catch(err){}}
};_fd.bind=function(_s5,_jj,object,_ob){var _uv=new _fe(object,_ob);_fd.addListener(_s5,_jj,_uv);return new _ff(_s5,_jj,_uv);};_fd.bindDom=function(_s5,_jj,object,_ob){var _uv=new _fe(object,_ob);if(_s5.nodeType!=null&&typeof _s5.nodeType!="undefined"&&typeof _s5.nodeType=="number"&&_s5.nodeType>0&&_s5.nodeType<13)
return _fd.addListener(_s5,_jj,_uv);else return null;};_fd.callback=function(object,_ob){};_fd.callbackArgs=function(object,_ob){};function _fe(_oV,_jM){this._b6=_oV;this._bl=_jM;}
var AGEvent=_fd;

_fn.prototype=new _fE;function _fn(){this._b1=null;this._dB=null;this._dw=null;this._dv=null;this._ds=null;this._dt=null;this._du=null;this._ce=null;this._oMaximizePane=null;this._ci=null;this._cg=null;this._cc=null;this._ch=null;this._cb=null;this._b8=null;this._b9=null;this._ca=null;this._cm=null;this._oCoord=null;this._c3=null;this._iSelectedPanel=null;this._iPreSelectedPanel=null;this._oInnerPanel=new Array();this._arrPanels=null;this._arrContents=null;this._I=false;this._bMaximize=false;this._E=true;this._co=null;this._cG=null;this._df=null;this._cy=null;this._cx=null;this._oInfoDisplayOpenEventListener=null;this._oInfoDisplayCloseEventListener=null;this._oInfoDisplayPanelOptions=null;this._e=null;this._oInfoDisplaySize=new _f2(AG_DEFAULT_INFO_DISPLAY_SIZE.width,AG_DEFAULT_INFO_DISPLAY_SIZE.height);this.initialize=function(_ox){this._b1=_ox;this._cx=_ox._kK(_fK.FLOAT_PANE);this._co=this._b1._kd();var _iF=AG_DEFAULT_INFO_DISPLAY_OPACITY;if(this._co!=null&&this._co instanceof _fp){if(typeof this._co.width=="number")
this._oInfoDisplaySize.width=this._co.width;if(typeof this._co.height=="number")
this._oInfoDisplaySize.height=this._co.height;if(typeof this._co.opacity=="number")
_iF=this._co.opacity;}
this._dB=document.createElement('div');this._dB.style.position="absolute";this._dB.style.height="auto";this._dB.innerHTML="";this._dB.style.display="none";this._dB.style.zIndex=1000000;this._dw=document.createElement('div');this._dw.style.height="auto";this._dw.style.left="0px";this._dw.style.zIndex="10";this._dw.style.MozOpacity=_iF;this._dw.style.filter="alpha(opacity="+(_iF*100)+")";this._dw.style.opacity=_iF;this._dv=document.createElement('div');this._dv.style.position="absolute";this._dv.style.width=parseInt(this._oInfoDisplaySize.width+2*_ed)+"px";this._dv.style.height=_ed+"px";this._dv.style.left="0px";this._dv.style.top="0px";this._dv.style.zIndex="10";this._ds=document.createElement('div');this._ds.style.width=_ed+"px";this._ds.style.height=_ed+"px";this._ds.style.backgroundImage="url("+AG_INFO_DISPLAY_BACKGROUND_IMG+")";this._ds.style.backgroundRepeat="no-repeat";this._ds.style.styleFloat="left";this._ds.style.cssFloat="left";this._ds.style.zIndex="10";this._ds.style.MozOpacity=_iF;this._ds.style.filter="alpha(opacity="+(_iF*100)+")";this._ds.style.opacity=_iF;this._dv.appendChild(this._ds);this._dt=document.createElement('div');this._dt.style.width=this._oInfoDisplaySize.width+"px";this._dt.style.height=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._dt.style.backgroundColor="#FFFFFF";this._dt.style.borderTopWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._dt.style.borderTopStyle="solid";this._dt.style.borderTopColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._dt.style.left=_ed+"px";this._dt.style.styleFloat="left";this._dt.style.cssFloat="left";this._dt.style.top="0px";this._dt.style.zIndex="10";this._dt.style.MozOpacity=_iF;this._dt.style.filter="alpha(opacity="+(_iF*100)+")";this._dt.style.opacity=_iF;this._dv.appendChild(this._dt);this._du=document.createElement('div');this._du.style.width=_ed+"px";this._du.style.height=_ed+"px";this._du.style.styleFloat="left";this._du.style.cssFloat="left";this._du.style.backgroundImage="url("+AG_INFO_DISPLAY_BACKGROUND_IMG+")";this._du.style.backgroundRepeat="no-repeat";this._du.style.backgroundPosition="-"+_ed+"px 0px";this._du.style.left=_ed+this._oInfoDisplaySize.width+"px";this._du.style.top="0px";this._du.style.zIndex="10";this._du.style.MozOpacity=_iF;this._du.style.filter="alpha(opacity="+(_iF*100)+")";this._du.style.opacity=_iF;this._ce=document.createElement('div');this._ce.style.width="12px";this._ce.style.height="12px";this._ce.style.backgroundColor="#FFFFFF";this._ce.style.position="absolute";this._ce.style.backgroundImage="url("+AG_CLOSE_IMG_URL+")";this._ce.style.zIndex="30";this._ce.style.top="8px";var _oV=new Object();_oV.infoDisplay=this;$(this._ce).bind("click",_oV,_fo.closeBtnClickHandler);this._du.appendChild(this._ce);this._dv.appendChild(this._du);this._dw.appendChild(this._dv);this._oPanelRowPane=document.createElement('div');this._oPanelRowPane.style.position="absolute";this._oPanelRowPane.style.width=(this._oInfoDisplaySize.width+_ed+_ed)+"px";this._oPanelRowPane.style.left="0px";this._oPanelRowPane.style.top=_ed+"px";this._oPanelRowPane.style.zIndex="10";this._oPanelLeftPane=document.createElement('div');this._oPanelLeftPane.style.width=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._oPanelLeftPane.style.styleFloat="left";this._oPanelLeftPane.style.cssFloat="left";this._oPanelLeftPane.style.backgroundColor="#FFFFFF";this._oPanelLeftPane.style.borderLeftWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._oPanelLeftPane.style.borderLeftStyle="solid";this._oPanelLeftPane.style.borderLeftColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._oPanelLeftPane.style.zIndex="10";this._oPanelLeftPane.style.left="0px";this._oPanelLeftPane.style.top="0px";this._oPanelLeftPane.style.MozOpacity=_iF;this._oPanelLeftPane.style.filter="alpha(opacity="+(_iF*100)+")";this._oPanelLeftPane.style.opacity=_iF;this._oPanelRowPane.appendChild(this._oPanelLeftPane);this._oPanelDiv=document.createElement('div');this._oPanelDiv.style.width=(this._oInfoDisplaySize.width )+"px";this._oPanelDiv.style.styleFloat="left";this._oPanelDiv.style.cssFloat="left";this._oPanelDiv.style.left=(_ed)+"px";this._oPanelDiv.style.top="0px";this._oPanelDiv.style.backgroundColor="#FFFFFF";this._oPanelDiv.style.zIndex="40";this._oPanelRowPane.appendChild(this._oPanelDiv);this._oPanelRightPane=document.createElement('div');this._oPanelRightPane.style.cssFloat="left";this._oPanelRightPane.style.styleFloat="left";this._oPanelRightPane.style.width=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._oPanelRightPane.style.backgroundColor="#FFFFFF";this._oPanelRightPane.style.borderRightWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._oPanelRightPane.style.borderRightStyle="solid";this._oPanelRightPane.style.borderRightColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._oPanelRightPane.style.left=_ed+this._oInfoDisplaySize.width+"px";this._oPanelRightPane.style.top="0px";this._oPanelRightPane.style.zIndex="10";this._oPanelRightPane.style.MozOpacity=_iF;this._oPanelRightPane.style.filter="alpha(opacity="+(_iF*100)+")";this._oPanelRightPane.style.opacity=_iF;this._oPanelRowPane.appendChild(this._oPanelRightPane);this._dw.appendChild(this._oPanelRowPane);this._ci=document.createElement('div');this._ci.style.position="absolute";this._ci.style.width=(this._oInfoDisplaySize.width+_ed+_ed)+"px";this._ci.style.height=this._oInfoDisplaySize.height+"px";this._ci.style.left="0px";this._ci.style.top="0px";this._ci.style.zIndex="10";this._cg=document.createElement('div');this._cg.style.width=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._cg.style.height=this._oInfoDisplaySize.height+"px";this._cg.style.styleFloat="left";this._cg.style.cssFloat="left";this._cg.style.backgroundColor="#FFFFFF";this._cg.style.borderLeftWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._cg.style.borderLeftStyle="solid";this._cg.style.borderLeftColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._cg.style.zIndex="10";this._cg.style.MozOpacity=_iF;this._cg.style.filter="alpha(opacity="+(_iF*100)+")";this._cg.style.opacity=_iF;this._ci.appendChild(this._cg);this._cc=document.createElement('div');this._cc.style.width=this._oInfoDisplaySize.width+"px";this._cc.style.height=this._oInfoDisplaySize.height+"px";this._cc.style.backgroundColor="#FFFFFF";this._cc.style.left=(_ed)+"px";this._cc.style.styleFloat="left";this._cc.style.cssFloat="left";this._cc.style.zIndex="10";this._cc.style.overflow="auto";this._cc.style.MozOpacity=_iF;this._cc.style.filter="alpha(opacity="+(_iF*100)+")";this._cc.style.opacity=_iF;this._cc.innerHTML="";this._ci.appendChild(this._cc);this._ch=document.createElement('div');this._ch.style.width=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._ch.style.height=this._oInfoDisplaySize.height+"px";this._ch.style.styleFloat="left";this._ch.style.cssFloat="left";this._ch.style.backgroundColor="#FFFFFF";this._ch.style.borderRightWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._ch.style.borderRightStyle="solid";this._ch.style.borderRightColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._ch.style.left=_ed+this._oInfoDisplaySize.width+"px";this._ch.style.top="0px";this._ch.style.zIndex="10";this._ch.style.MozOpacity=_iF;this._ch.style.filter="alpha(opacity="+(_iF*100)+")";this._ch.style.opacity=_iF;this._ci.appendChild(this._ch);this._dw.appendChild(this._ci);this._cb=document.createElement('div');this._cb.style.position="absolute";this._cb.style.width=this._oInfoDisplaySize.width+2*_ed+"px";this._cb.style.height=_ed+"px";this._cb.style.Float="left";this._cb.style.clear="both";this._cb.style.left="0px";this._cb.style.top="0px";this._cb.style.zIndex="10";this._b8=document.createElement('div');this._b8.style.width=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._b8.style.height=(_ed )+"px";this._b8.style.styleFloat="left";this._b8.style.cssFloat="left";this._b8.style.backgroundColor="#FFFFFF";this._b8.style.borderLeftWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._b8.style.borderLeftStyle="solid";this._b8.style.borderLeftColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._b8.style.zIndex="10";this._b8.style.MozOpacity=_iF;this._b8.style.filter="alpha(opacity="+(_iF*100)+")";this._b8.style.opacity=_iF;this._cb.appendChild(this._b8);this._b9=document.createElement('div');this._b9.style.styleFloat="left";this._b9.style.cssFloat="left";this._b9.style.width=this._oInfoDisplaySize.width+"px";this._b9.style.height=(_ed-AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH)+"px";this._b9.style.backgroundColor="#FFFFFF";this._b9.style.borderBottomWidth=AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH+"px";this._b9.style.borderBottomStyle="solid";this._b9.style.borderBottomColor=AG_DEFAULT_BUBBLE_BORDER_COLOUR;this._b9.style.left=_ed+"px";this._b9.style.zIndex="10";this._b9.style.MozOpacity=_iF;this._b9.style.filter="alpha(opacity="+(_iF*100)+")";this._b9.style.opacity=_iF;this._cb.appendChild(this._b9);this._ca=document.createElement('div');this._ca.style.width=_ed+"px";this._ca.style.height=_ed+"px";this._ca.style.styleFloat="left";this._ca.style.cssFloat="left";this._ca.style.backgroundImage="url("+AG_INFO_DISPLAY_BACKGROUND_IMG+")";this._ca.style.backgroundRepeat="no-repeat";this._ca.style.backgroundPosition="-"+_ed+"px "+"-"+_ed+"px";this._ca.style.left=parseInt(_ed+this._oInfoDisplaySize.width)+"px";this._ca.style.zIndex="10";this._ca.style.MozOpacity=_iF;this._ca.style.filter="alpha(opacity="+(_iF*100)+")";this._ca.style.opacity=_iF;this._cb.appendChild(this._ca);this._dw.appendChild(this._cb);this._cm=document.createElement('div');this._cm.style.position="absolute";this._cm.style.width=_ed+"px";this._cm.style.height=_ed+"px";this._cm.style.clear="left";this._cm.style.backgroundImage="url("+AG_INFO_DISPLAY_BACKGROUND_IMG+")";this._cm.style.backgroundRepeat="no-repeat";this._cm.style.backgroundPosition="0px "+"-"+_ed+"px";this._cm.style.left="0px";this._cm.style.top="0px";this._cm.style.zIndex="10";this._cm.style.MozOpacity=_iF;this._cm.style.filter="alpha(opacity="+(_iF*100)+")";this._cm.style.opacity=_iF;this._dw.appendChild(this._cm);this._dB.appendChild(this._dw);this._cx.appendChild(this._dB);if(_eU._hg=="Explorer"){this._df=document.createElement("div");this._df.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+AG_INFO_DISPLAY_SHADOW_IMG+"',sizingMethod='scale')";}
else {this._df=document.createElement("img");this._df.src=AG_INFO_DISPLAY_SHADOW_IMG;}
this._df.style.position="absolute";this._cy=this._b1._kK(_fK.FLOAT_SHADOW_PANE);this._cy.appendChild(this._df);this._df.style.display="none";};this.redraw=function(_mP){switch(_mP){case _fD.ZOOM:
var _nd=this._nd();if(_nd)
this.hide();else {this._uG(this._oCoord);this.show();}
break;case _fD.PAN:
if(this._co.stationary&&this._b1._mS==_fL.DEFAULT){var iMaxInfoDisplayPanelHeight=0;if(this._oMaximizePane!=null&&!this.maximizeEnabled()){iMaxInfoDisplayPanelHeight=0;} 
else iMaxInfoDisplayPanelHeight=this._oPanelDiv.offsetHeight;var _pR=this._b1._kB();var _op=new _fM(this._c3.x,(-this._oInfoDisplaySize.height-3*_ed-iMaxInfoDisplayPanelHeight+this._c3.y) );this._dB.style.left=(-_pR.x+this._cG.x+_op.x)+"px";this._dB.style.top=(-_pR.y+this._cG.y+_op.y)+"px";if(this._co.shadow){this._df.style.top=(-_pR.y+this._cG.y+_op.y)+65+"px";this._df.style.left=(-_pR.x+this._cG.x+_op.x)+"px";}
var _pu=new _fM((-_pR.x+this._cG.x),(-_pR.y+this._cG.y));this._oCoord=this._b1._ka(_pu);this._so(new _fM(parseInt(this._dB.style.left),parseInt(this._dB.style.top)));}
else if(this._co.stationary&&this._b1._mS==_fL.DRAG){this._cG=this._b1._kQ(this._oCoord);}
break;}};this.copy=function(){};this.remove=function(){var _pE=this._b1._kK(_fK.FLOAT_PANE);_pE.removeChild(this._dB);var oFloatShadowPane=this._b1._kK(_fK.FLOAT_SHADOW_PANE);oFloatShadowPane.removeChild(this._df);this._b1=null;};this.selectPanel=function(_mc){if(typeof _mc!="number")
throw "Tab _my should be a integer number";this._iSelectedPanel=_mc;if(_eU._hg=="Explorer")
this.initializeInfoDisplay(this._arrPanels);else this._r7(this._arrPanels);};this.hide=function(){if(!this._ni())
return;if(!this._E){_fd.trigger(this._b1,"oninfodisplayclosing");this._E=true;this._dB.style.display="none";this._df.style.display="none";var _po=this._b1._kd();if(typeof _po.onCloseFn=="function"&&this._oInfoDisplayCloseEventListener==null){this._oInfoDisplayCloseEventListener=_fd.addListener(this._b1,'oninfodisplayclosed',_po.onCloseFn);}
if(this._oInfoDisplayOpenEventListener!=null){_fd.removeListener(this._oInfoDisplayOpenEventListener);this._oInfoDisplayOpenEventListener=null;} 
_fd.trigger(this._b1,"oninfodisplayclosed");}};this.show=function(){if(!this._ni())
return;this._E=false;this._dB.style.display="";if(this._co.shadow)
this._df.style.display="";};this._nd=function(){return this._E;};this._np=function(){return !this._nd();};this._kO=function(){return this._oCoord;};this._kN=function(){return this._c3;};this._kX=function(){return this._iSelectedPanel;};this._kL=function(){return this._arrPanels;};this._kY=function(){return this._oInfoDisplaySize;};this._j7=function(){return this._arrContents;};this._i7=function(){this._I=true;};this._id=function(){this._I=false;};this.maximizeEnabled=function(){return this._I;};this._n7=function(){var _mc=this._b1._br;if(this.maximizeEnabled()&&this._np()&&!this._bMaximize&&(typeof this._co.maxContent=="string"&&this._co.maxContent!="")){this._bMaximize=true;this._oMaximizePane.style.backgroundImage="url("+_eF+")";if(this._co!=null&&this._co instanceof _fp)
var oInfoDisplayMaxSize=new _f2(this._co.maxWidth,this._co.maxHeight);AGInfoDisplayMaxMin.loadingMaximizeInfoDisplay(oInfoDisplayMaxSize.width,oInfoDisplayMaxSize.height,this._kY().width,this._kY().height,_mc);_fd.trigger(this,"onmaximizeclick");}
else {this._sa();}};this._sa=function(){var _mc=this._b1._br;if(this._np()&&this._bMaximize&&(typeof this._co.maxContent=="string"&&this._co.maxContent!="")){this._bMaximize=false;this._oMaximizePane.style.backgroundImage="url("+_eE+")";if(this._co!=null&&this._co instanceof _fp)
var oInfoDisplayMaxSize=new _f2(this._co.maxWidth,this._co.maxHeight);AGInfoDisplayMaxMin.loadingMinimizeInfoDisplay(this._co.width,this._co.height,oInfoDisplayMaxSize.width,oInfoDisplayMaxSize.height,_mc);_fd.trigger(this,"onrestoreclick");}
else {}};this.initializeInfoDisplay=function(_gE){while(this._cc.hasChildNodes()) 
this._cc.removeChild(this._cc.firstChild);this._arrContents=new Array();if(_gE.length>1){this._oPanelDiv.innerHTML="";for(var i=0;i<_gE.length;i++){this._oInnerPanel[i]=document.createElement('div');this._oInnerPanel[i].style.styleFloat="left";this._oInnerPanel[i].style.cssFloat="left";this._oInnerPanel[i].style.cursor="pointer";if(i==this._iSelectedPanel)
$(this._oInnerPanel[i]).css(this._oInfoDisplayPanelOptions.activePanelStyle);else $(this._oInnerPanel[i]).css(this._oInfoDisplayPanelOptions.inactivePanelStyle);this._oInnerPanel[i].innerHTML=_gE[i].label;var _oV=new Object();_oV.infoDisplay=this;_oV.clickIndex=i;$(this._oInnerPanel[i]).bind("click",_oV,_fo.panelClickHandler);this._oPanelDiv.appendChild(this._oInnerPanel[i]);this._arrContents.push(_gE[i].content);}
this._cc.style.backgroundColor=this._oInfoDisplayPanelOptions.selectionBackgroundColour;var _hF=document.createElement('div');if(typeof _gE[this._iSelectedPanel].content=="string")
_hF.innerHTML=_gE[this._iSelectedPanel].content;else _hF.appendChild(_gE[this._iSelectedPanel].content);this._cc.appendChild(_hF);}
else {this._oPanelDiv.innerHTML="";if(typeof _gE[this._iSelectedPanel].content=="string")
this._cc.innerHTML+=_gE[this._iSelectedPanel].content;else this._cc.appendChild(_gE[this._iSelectedPanel].content);this._arrContents.push(_gE[this._iSelectedPanel].content);}
this._oPanelRowPane.style.width=2*_ed+this._oInfoDisplaySize.width+"px";this._oPanelDiv.style.width=this._oInfoDisplaySize.width+"px";this._oPanelDiv.style.top=_ed+"px";this._ci.style.top=_ed+this._oPanelDiv.offsetHeight+"px";this._cb.style.top=_ed+this._oPanelDiv.offsetHeight+this._oInfoDisplaySize.height+"px";this._oPanelLeftPane.style.height=this._oPanelDiv.offsetHeight+"px";this._oPanelRightPane.style.height=this._oPanelDiv.offsetHeight+"px";this._cm.style.top=_ed+this._oPanelDiv.offsetHeight+this._oInfoDisplaySize.height+_ed+"px";}
this.setPosition=function(){var _o9=this._oCoord;var _qk=this._b1._kP(_o9);var _op=new _fM(this._c3.x,(-this._oInfoDisplaySize.height-3*_ed-this._oPanelDiv.offsetHeight+this._c3.y) );_qk=new _fM(_qk.x+_op.x,_qk.y+_op.y);_qk=new _fM(_qk.x,_qk.y);this._dB.style.position="absolute";this._dB.style.top=_qk.y+"px";this._dB.style.left=_qk.x+"px";this._co=this._b1._kd();if(this._co.shadow){this._df.style.width=(2*this._oInfoDisplaySize.width+20+this._oPanelDiv.offsetHeight)+"px";this._df.style.height=this._oInfoDisplaySize.height+this._oPanelDiv.offsetHeight+"px";this._df.style.top=_qk.y+65+"px";this._df.style.left=_qk.x+"px";this._df.style.display="";} 
else this._df.style.display="none";if(this._co.stationary)
this._n2();}
this.updateDisplayContent=function(_gE){if(!this._nd()){if(_gE!=null) 
this._arrPanels=_gE;else throw "Invalid _hG.";if(this._iSelectedPanel>=_gE.length)
this._iSelectedPanel=0;this.initializeInfoDisplay(_gE);this.setPosition();}};this._r7=function(_gE){if(_gE!=null) 
this._arrPanels=_gE;else throw "Invalid _hG.";while(this._cc.hasChildNodes()) 
this._cc.removeChild(this._cc.firstChild);$(this._oInnerPanel[this._iPreSelectedPanel]).css(this._oInfoDisplayPanelOptions.inactivePanelStyle);$(this._oInnerPanel[this._iSelectedPanel]).css(this._oInfoDisplayPanelOptions.activePanelStyle);this._iPreSelectedPanel=this._iSelectedPanel;if(typeof _gE[this._iSelectedPanel].content=="string")
this._cc.innerHTML=_gE[this._iSelectedPanel].content;else this._cc.appendChild(_gE[this._iSelectedPanel].content);};this._uG=function(_o9){if( _o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";var _gE=this._kL();var _pN=this._kY();if(_pN==null||!(_pN instanceof _f2)) 
throw "Invalid Size of info display";var _qj=this._kN();if(_qj==null||!(_qj instanceof _fM))
throw "Offset is not set";var _m9=this._kX();if(_gE.length>1)
this.selectPanel(_m9);this._oCoord=_o9;this.setPosition();};this.reset=function(_o9,_gE,_q5,_qj,_na){if( _o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";else this._oCoord=_o9;while(this._dt.hasChildNodes()) 
this._dt.removeChild(this._dt.firstChild);this._oInfoDisplayPanelOptions=this._b1.getInfoDisplayPanelOptions();if(typeof _na=="number")
this._iSelectedPanel=_na;if(typeof _na=="undefined")
this._iSelectedPanel=0;this._iPreSelectedPanel=this._iSelectedPanel;if(_gE!=null)
this._arrPanels=_gE;else throw "Invalid _hG.";if(_q5!=null&&_q5 instanceof _f2) 
this._oInfoDisplaySize=_q5;else this._oInfoDisplaySize=new _f2(AG_DEFAULT_INFO_DISPLAY_SIZE.width,AG_DEFAULT_INFO_DISPLAY_SIZE.height)
var _pO=this._b1._kK(_fK.FLOAT_PANE);if(_qj!="undefined"&&_qj instanceof _fM)
this._c3=_qj;else this._c3=new _fM(0,0);this._dB.style.position="absolute";this.show();if(this._oInfoDisplaySize.width!=parseInt(this._cc.style.width)||this._oInfoDisplaySize.height!=parseInt(this._cc.style.height)){this._dv.style.width=this._oInfoDisplaySize.width+(2*_ed)+"px";this._dt.style.width=this._oInfoDisplaySize.width+"px";this._dt.style.left=_ed+"px";this._du.style.left=parseInt(_ed+this._oInfoDisplaySize.width)+"px";this._ci.style.width=(this._oInfoDisplaySize.width+2*_ed )+"px";this._ci.style.height=this._oInfoDisplaySize.height+"px";this._cg.style.height=this._oInfoDisplaySize.height+"px";this._cc.style.width=this._oInfoDisplaySize.width+"px";this._cc.style.height=this._oInfoDisplaySize.height+"px";this._ch.style.height=this._oInfoDisplaySize.height+"px";this._ch.style.left=_ed+this._oInfoDisplaySize.width+"px";this._cb.style.width=this._oInfoDisplaySize.width+(2*_ed)+"px";this._b9.style.width=this._oInfoDisplaySize.width+"px";this._b9.style.left=_ed+"px";this._ca.style.left=parseInt(_ed+this._oInfoDisplaySize.width)+"px";}
this.initializeInfoDisplay(_gE);this.setPosition();if(typeof this._co.maxContent=="string"&&this._co.maxContent!=""){this._bMaximize=false;this._i7();this._oMaximizePane=document.createElement('div');this._oMaximizePane.style.width="12px";this._oMaximizePane.style.height="12px";this._oMaximizePane.style.backgroundColor="#FFFFFF";this._oMaximizePane.style.position="absolute";this._oMaximizePane.style.right=_ed+2+"px";this._oMaximizePane.style.backgroundImage="url("+API_HOST_URL+"Images/btn_maximize.png)";this._oMaximizePane.style.zIndex="30";this._oMaximizePane.style.top="8px";var _oV=new Object();_oV.infoDisplay=this;$(this._oMaximizePane).bind("click",_oV,_fo.maximizeBtnClickHandler);this._dt.appendChild(this._oMaximizePane);} 
var _iF=this._co.opacity;if(_eU._hg=="Explorer"){this._ds.style.MozOpacity=_iF;this._ds.style.filter="alpha(opacity="+(_iF*100)+")";this._ds.style.opacity=_iF;this._dt.style.MozOpacity=_iF;this._dt.style.filter="alpha(opacity="+(_iF*100)+")";this._dt.style.opacity=_iF;}
else {this._dv.style.MozOpacity=_iF;this._dv.style.filter="alpha(opacity="+(_iF*100)+")";this._dv.style.opacity=_iF;}
this._oPanelLeftPane.style.MozOpacity=_iF;this._oPanelLeftPane.style.filter="alpha(opacity="+(_iF*100)+")";this._oPanelLeftPane.style.opacity=_iF;this._oPanelRightPane.style.MozOpacity=_iF;this._oPanelRightPane.style.filter="alpha(opacity="+(_iF*100)+")";this._oPanelRightPane.style.opacity=_iF;this._cg.style.MozOpacity=_iF;this._cg.style.filter="alpha(opacity="+(_iF*100)+")";this._cg.style.opacity=_iF;this._ch.style.MozOpacity=_iF;this._ch.style.filter="alpha(opacity="+(_iF*100)+")";this._ch.style.opacity=_iF;this._b8.style.MozOpacity=_iF;this._b8.style.filter="alpha(opacity="+(_iF*100)+")";this._b8.style.opacity=_iF;this._b9.style.MozOpacity=_iF;this._b9.style.filter="alpha(opacity="+(_iF*100)+")";this._b9.style.opacity=_iF;this._ca.style.MozOpacity=_iF;this._ca.style.filter="alpha(opacity="+(_iF*100)+")";this._ca.style.opacity=_iF;this._cm.style.MozOpacity=_iF;this._cm.style.filter="alpha(opacity="+(_iF*100)+")";this._cm.style.opacity=_iF;this._df.style.MozOpacity=_iF;this._df.style.opacity=_iF;var infoDisplayHeight=_ed+this._oPanelDiv.offsetHeight+this._oInfoDisplaySize.height+2*_ed;var infoDisplayWidth=_ed+this._oInfoDisplaySize.width+_ed;var _hk=new _f2(infoDisplayWidth,infoDisplayHeight);this._s4(_o9,this._c3,_hk);if(this._oInfoDisplayOpenEventListener!=null){_fd.removeListener(this._oInfoDisplayOpenEventListener);this._oInfoDisplayOpenEventListener=null;} 
if(typeof this._b1._kd().onOpenFn=="function"&&this._oInfoDisplayOpenEventListener==null){this._oInfoDisplayOpenEventListener=_fd.addListener(this._b1,'oninfodisplayopen',this._co.onOpenFn);}
if(this._oInfoDisplayCloseEventListener!=null){_fd.removeListener(this._oInfoDisplayCloseEventListener);this._oInfoDisplayCloseEventListener=null;}
_fd.trigger(this._b1,"oninfodisplayopen");_fd.bind(this._b1,"onclick",this,this.mouseClick);};this._s4=function(_o9,_qj,_hk){var _rJ=0,_rK=0;var _qk=this._b1._kQ(_o9);_qk=new _fM(_qk.x+_qj.x,_qk.y+_qj.y);var _n6=this._b1._kY().width;var _n4=this._b1._kY().height;if((_qk.x+_hk.width)>_n6)
_rJ=_n6-(_qk.x+_hk.width);if(_qk.y<_hk.height)
_rK=_hk.height-_qk.y;if((_qk.y)>_n4)
_rK=_n4-_qk.y;if(_qk.x<0)
_rJ=-(_qk.x);if(_rJ==0&&_rK==0)
return;if(_rJ>0)
_rJ+=AG_PAN_MARGIN.x;else if(_rJ<0)
_rJ-=AG_PAN_MARGIN.x;if(_rK>0)
_rK+=AG_PAN_MARGIN.y;else if(_rK<0)
_rK-=AG_PAN_MARGIN.y;var _qa=new _fM(_rJ,_rK);this._b1._sF(_fL.DRAG);this._b1._rF(_qa.x,_qa.y);};this._n2=function(){this._co.stationary=true;var oInitialCoord=this._kO();this._cG=this._b1._kQ(oInitialCoord);};this._ni=function(){return this._b1!=null;};this.getInfoDisplayContentPane=function(){return this._cc;};this.mouseClick=function(){if(!this._co.noCloseOnClick){if(!this._co.isMarkerOpen)
this.hide();}}
this.hide=this.hide;this.show=this.show;this.isVisible=this._np;this.getPoint=this._kO;this.getPixelOffset=this._kN;this.getSelectedPanel=this._kX;this.getPanels=this._kL;this.getContentContainers=this._j7;this.enableMaximize=this._i7;this.disableMaximize=this._id;this.maximizeEnabled=this.maximizeEnabled;this.maximize=this._n7;this.restore=this._sa;this.reset=this.reset;}	
var AGInfoDisplay=_fn;

function _fp(_nE,_l3,_iF,_oC,_na,_he,_jI,_jH,_nN,_hj,_hh,iMaxWidth,iMaxHeight,strMaxTitle,strMaxContent){if(typeof _na!="number")
this.selectedPanel=0;else this.selectedPanel=parseInt(_na);if(typeof _nE!="number")
this.width=AG_DEFAULT_INFO_DISPLAY_SIZE.width;else this.width=parseInt(_nE);if(typeof _l3!="number")
this.height=AG_DEFAULT_INFO_DISPLAY_SIZE.height;else this.height=parseInt(_l3);if(typeof _iF!="number")
this.opacity=AG_DEFAULT_INFO_DISPLAY_OPACITY;else this.opacity=parseFloat(_iF);if(typeof _he!="boolean")
this.noCloseOnClick=false;else this.noCloseOnClick=_he;if(typeof _jI=="function")
this.onOpenFn=_jI;else this.onOpenFn=null;if(typeof _jH=="function") 
this.onCloseFn=_jH;else this.onCloseFn=null;if(typeof _nN=="number")
this.zoomLevel=parseInt(_nN);else this.zoomLevel=AG_DEFAULT_BLOWUP_ZOOM_LEVEL;if(_oC!=null&&_oC instanceof _fM)
this.pixelOffset=_oC;else this.pixelOffset=new _fM(0,0);if(typeof _hj!="boolean")
this.stationary=false;else this.stationary=_hj;if(typeof _hh!="boolean")
this.shadow=true;else this.shadow=_hh;if(typeof iMaxWidth!="number")
this.maxWidth=AG_DEFAULT_INFO_DISPLAY_MAX_SIZE.width;else this.maxWidth=parseInt(iMaxWidth);if(typeof iMaxHeight!="number")
this.maxHeight=AG_DEFAULT_INFO_DISPLAY_MAX_SIZE.height;else this.maxHeight=parseInt(iMaxHeight);if(typeof strMaxTitle!="string")
this.maxTitle="";else this.maxTitle=strMaxTitle;if(typeof strMaxContent!="string")
this.maxContent="";else this.maxContent=strMaxContent;this.isMarkerOpen=false;this.copy=function(){return new _fp(this.width,this.height,this.opacity,this.pixelOffset,this.selectedPanel,this.noCloseOnClick,this.onOpenFn,this.onCloseFn,this.zoomLevel,this.stationary,this.shadow,this.maxWidth,this.maxHeight,this.maxTitle,this.maxContent);};}
var AGInfoDisplayOptions=_fp;

function _fq(_tV,_hG){if(_hG==null )
_hG="";this.label=_tV;this.content=_hG;}
var AGInfoDisplayPanel=_fq;

function AGInfoDisplayPanelOptions(oActivePanelStyle,oInactivePanelStyle){if(typeof oActivePanelStyle=="object"&&oActivePanelStyle!="")
this.activePanelStyle=oActivePanelStyle;else this.activePanelStyle=AG_DEFAULT_PANEL_ACTIVE_STYLE;if(typeof oInactivePanelStyle=="object"&&oInactivePanelStyle!="")
this.inactivePanelStyle=oInactivePanelStyle;else this.inactivePanelStyle=AG_DEFAULT_PANEL_INACTIVE_STYLE;}


function _fo(){}
_fo.closeBtnClickHandler=function(e){var _pL=e.data.infoDisplay;var oInfoDisplayOpts=_pL._co;_fd.trigger(_pL,"oncloseclick");_pL.hide();return false;};_fo.maximizeBtnClickHandler=function(e){var _pL=e.data.infoDisplay;_fd.trigger(_pL,"onmaximizeclick");_pL._n7();return false;};_fo.panelClickHandler=function(e){e=e||window.event;if(!e)
return false;oAGInfoDisplay=e.data.infoDisplay;var _sl=e.data.clickIndex;oAGInfoDisplay.selectPanel(_sl);_fd.trigger(oAGInfoDisplay,"onpanelchange",_sl);return false;};

function _e2(_jv,_jy){if( typeof _jv!="number"||typeof _jy!="number" )
throw "Invalid input for _nP-longitude.";this._bh=parseFloat(_jv.toFixed(AG_COORD_PRECISION_AMOUNT));this._bi=parseFloat(_jy.toFixed(AG_COORD_PRECISION_AMOUNT));this._nP=function(){return this._bh;};this.longitude=function(){return this._bi;};this._jh=function(_pi){if(_pi==null||!(_pi instanceof _e2))
throw "Invalid Coord";if(this._bh==_pi._nP()&&this._bi==_pi.longitude())
return true;return false;};this.copy=function(){return new _e2(this._bh,this._bi);}
this._uD=function(){return this._bh+","+this._bi;}
this.latitudeRadians=function(){return this._bh/180;};this.longitudeRadians=function(){return this._bi/180;};this.distanceFrom=function(_pi){if(_pi==null||!(_pi instanceof _e2))
throw "Invalid Coord";var oldCoord=new _e2(this._bh,this._bi);var dKm=_f8.getDistanceBetweenCoords(_pi,oldCoord);var dMeter=(dKm*1000);return dMeter;};this.latitude=this._nP;this.longitude=this.longitude;this.equals=this._jh;this.toString=this._uD;this.latitudeRadians=this.latitudeRadians;this.longitudeRadians=this.longitudeRadians;this.distanceFrom=this.distanceFrom;}
var AGCoord=_e2;

function _eT(_pa,_pb){if(_pa==null||!(_pa instanceof _e2)||_pb==null||!(_pb instanceof _e2))
throw "Invalid _nP-longitude.";var _jw=parseFloat(_pa._nP());var _jx=parseFloat(_pb._nP());var _jz=parseFloat(_pa.longitude());var _jA=parseFloat(_pb.longitude());var _jE=(_jw<_jx) ? _jw : _jx;var _jC=(_jw>_jx) ? _jw : _jx;var _jF=(_jz<_jA) ? _jz : _jA;var _jD=(_jz>_jA) ? _jz : _jA;this._dk=new _e2(_jE,_jF);this._cW=new _e2(_jC,_jD);this._jh=function(_oY){if( _oY==null||!(_oY instanceof _eT))
throw "Invalid Rectangle";if(_oY._dk._jh(this._dk)||_oY._cW._jh(this._cW))
return true;else return false;};this._hC=function(_o9){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalid Coord";if(_o9._nP()<=this._cW._nP()&&_o9._nP()>=this._dk._nP()&&_o9.longitude()<=this._cW.longitude()&&_o9.longitude()>=this._dk.longitude())
return true;else return false;};this._mL=function(_oY){if(_oY==null||!(_oY instanceof _eT))
throw "Invalid Rectangle";if(_oY._dk.longitude()>this._cW.longitude()||_oY._dk._nP()>this._cW._nP()||_oY._cW.longitude()<this._dk.longitude()||_oY._cW._nP()<this._dk._nP())
return false;else return true;};this._hB=function(_oY){if( _oY==null||!(_oY instanceof _eT))
throw "Invalid Rectangle";if(_oY._cW.longitude()<=this._cW.longitude()&&_oY._cW._nP()<=this._cW._nP()&&_oY._dk.longitude()>=this._dk.longitude()&&_oY._dk._nP()>=this._dk._nP())
return true;else return false;};this._jl=function(_o9){if( _o9==null||!(_o9 instanceof _e2))
throw "Invalid Coord";if(this._cW._nP()<_o9._nP())
this._cW._bh=_o9._nP();if(this._dk._nP()>_o9._nP())
this._dk._bh=_o9._nP();if(this._cW.longitude()<_o9.longitude())
this._cW._bi=_o9.longitude();if(this._dk.longitude()>_o9.longitude())
this._dk._bi=_o9.longitude();};this._k0=function(){return this._dk;};this._kG=function(){return this._cW;};this._kZ=function(){return new _e2(this._dk._nP(),this._cW.longitude());};this._kH=function(){return new _e2(this._cW._nP(),this._dk.longitude());};this._uC=function(){return new _e2(Math.abs(this._dk._nP()-this._cW._nP()),Math.abs(this._dk.longitude()-this._cW.longitude()));};this._uD=function(){return this._cW._uD()+","+this._dk._uD();};this._nb=function(){if(this._dk._nP()==this._cW._nP()&&this._cW.longitude()==this._dk.longitude())
return true;else return false;};this._j3=function(){return new _e2((this._dk._nP()+this._cW._nP())/2,(this._cW.longitude()+this._dk.longitude())/2);};this.isFullLatitude=function(){if(this._dk._nP()==-90&&this._cW._nP()==90)
return true;return false;};this.isFullLongitude=function(){if(this._dk.longitude()==-180&&this._cW.longitude()==180)
return true;return false;};this.copy=function(){return new _eT(this._cW.copy(),this._dk.copy());};this.equals=this._jh;this.containsCoord=this._hC;this.intersects=this._mL;this.containsBoundingBox=this._hB;this.extend=this._jl;this.getSouthWest=this._k0;this.getNorthEast=this._kG;this.getSouthEast=this._kZ;this.getNorthWest=this._kH;this.toSpan=this._uC;this.toString=this._uD;this.isEmpty=this._nb;this.getCentre=this._j3;this.isFullLatitude=this.isFullLatitude;this.isFullLongitude=this.isFullLongitude;}
var AGBoundingBox=_eT;

function _fB(){}
_fB.doubleClickCount=0;_fB.mouseDownEvent=null;_fB.iMouseMoveCount=0;var _p8=null;_fB.getMouseCoords=function(e){e=e||window.event;if(e.pageX||e.pageY){if(e.type=="DOMMouseScroll"){if(_eU._hg=="Firefox"&&_eU.VERSION<3)
return new _fM(e.pageX/15,e.pageY/15);else return new _fM(e.pageX,e.pageY);}
else return new _fM(e.pageX,e.pageY);}
else if(e.clientX||e.clientY){var _rN=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;var _rO=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return new _fM(_rN,_rO);}
return new _fM(0,0);};_fB.isRightButton=function(e){var _se=false;e=e||window.event;if(e.which) 
_se=(e.which==3);else if(e.button) 
_se=(e.button==2);return _se;};_fB.handleRightButtonClick=function(){var _ox=_fB.mouseDownEvent.data;if(_fB.doubleClickCount>=2 ){} 
else if( _fB.doubleClickCount % 2==1 ){if(_ox._hH()){var _im=_ox._j6();var _qw=_fB.getMouseOffset(_fB.mouseDownEvent,_im);_eY.showContextMenu(_ox,_qw);}}
_fB.doubleClickCount=0;return false;};_fB.getMouseOffset=function(e,_pH){e=e||window.event;var _iE=_fB.getPosition(_pH);var _oh=_fB.getMouseCoords(e);return new _fM((_oh.x-_iE.x),(_oh.y-_iE.y));};_fB.getPosition=function(e){var _me=0;var _nw=0;while(e.offsetParent){_me+=e.offsetLeft;_nw+=e.offsetTop;e=e.offsetParent;}
_me+=e.offsetLeft;_nw+=e.offsetTop;return new _fM(_me,_nw);};_fB.doubleClickHandler=function(e){var _ox=e.data;_eY.hideContextMenu(_ox);var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var _o0=_ox._j4(_qB);var oClickedCoord=_ox._ka(_qB);_fd.trigger(_ox,"ondblclick",_o0,oClickedCoord);if(_o0!=null&&_o0 instanceof AGCircle||_o0 instanceof _fQ||_o0 instanceof _fN){_fd.trigger(_o0,"ondblclick",oClickedCoord);}
if(_o0!=null&&_o0 instanceof _fy){_fd.trigger(_o0,"ondblclick",oClickedCoord);return false;}
if(_ox._uS()){var _lP=_ox._lm();var _gS=_ox._j6();var _qp=_fB.getMouseOffset(e,_gS);var oCoordClicked=_ox._kb(_qp);if(_lP<_ox._kE())
_ox._hr(oCoordClicked,_lP+1);else _ox._hr(oCoordClicked,_lP);}
return false;};_fB.bDrag=false;_fB.oPointLastMousePosition=null;_fB._pA=null;_fB.oPointDragStart=null;_fB.oPointDragStop=null;_fB.mouseDownHandler=function(e){var _ox=e.data;_ox._ih();_fB.mouseDownEvent=e;if(_fB.isRightButton(e)){_fB.doubleClickCount++;setTimeout("_fB.handleRightButtonClick();",250);var _im=_ox._j6();var _qw=_fB.getMouseOffset(e,_im);var oRightClickedOverlay=_ox._j4(_qw);_fd.trigger(_ox,"onrightclick",oRightClickedOverlay,_qw);return false;}
_eY.hideContextMenu(_ox);var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var _o0=_ox._j4(_qB);if(_o0!=null&&_o0 instanceof AGCircle||_o0 instanceof _fQ||_o0 instanceof _fN){var oClickedCoord=_ox._ka(_qB);_fd.trigger(_o0,"onmousedown",oClickedCoord);}
if(_o0!=null&&_o0 instanceof _fy){var oClickedCoord=_ox._ka(_qB);_fd.trigger(_o0,"onmousedown",oClickedCoord);return false;}
if(_ox._iK()){_fB.bDrag=true;_ox.setCursor();var _im=_ox._j6();_fB.oPointDragStart=_fB.getMouseOffset(e,_im);_fB._pA=_ox._kg();return false;}
if(_ox._cO instanceof _fu){if(_ox._iJ()){var oMouseTargetPane=_ox._kK(_fK.MOUSE_TARGET_PANE);oMouseTargetPane.style.cursor=_ox._cO.draggingCursor;}}
if(_ox._iJ()){_fB.bDrag=true;_fB.oPointLastMousePosition=_fB.getMouseCoords(e);_fB.iMouseMoveCount=0;}
return false;};_fB.mouseMoveHandler=function(e){var _ox=e.data;var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var _o0=_ox._j4(_qB);var oClickedCoord=_ox._ka(_qB);if(_o0!=null&&!_fB.bDrag&&_o0 instanceof AGCircle||_o0 instanceof _fQ||_o0 instanceof _fN)
_fd.trigger(_o0,"onmousemove",oClickedCoord);if(_o0!=null&&_p8==null){_fd.trigger(_o0,"onmouseover",oClickedCoord);}
if(_p8!=null&&_o0!=_p8){var oTempOverlayBelowMouse=_p8;_p8=null;_fd.trigger(oTempOverlayBelowMouse,"onmouseout",oClickedCoord);}
else {_p8=_o0;}
_fd.trigger(_ox,"onmousemove",oClickedCoord);if(_fB.bDrag){if(_ox._iK()){var _im=_ox._j6();var _qv=_fB.getMouseOffset(e,_im);var _nE=Math.abs(_fB.oPointDragStart.x-_qv.x);var _l3=Math.abs(_fB.oPointDragStart.y-_qv.y);var _me=(_fB.oPointDragStart.x<=_qv.x) ? _fB.oPointDragStart.x : _qv.x;var _nw=(_fB.oPointDragStart.y<=_qv.y) ? _fB.oPointDragStart.y : _qv.y;var oCoordTopLeft=_ox._kb(new _fM(_me,_nw));_fB._pA.reset(oCoordTopLeft,new _f2(_nE,_l3));return false;}
var _qr=_fB.getMouseCoords(e);var _rJ=_qr.x-_fB.oPointLastMousePosition.x;var _rK=_qr.y-_fB.oPointLastMousePosition.y;_fB.oPointLastMousePosition=_qr;_fB.iMouseMoveCount++;if(_fB.iMouseMoveCount==1){_fd.trigger(_ox,"ondragstart");_fd.trigger(_ox,"onmovestart");_ox._ku().getInfoDisplayContentPane().style.overflow="hidden";}
_ox._oj(new _fM(_rJ,_rK));_fd.trigger(_ox,"ondrag");return false;}
if(_o0!=null&&_o0 instanceof _fy ){_fd.trigger(_o0,"onmousemove",oClickedCoord);return false;}
return false;};_fB.mouseUpHandler=function(e,_g0){if(typeof _g0!="boolean")
_g0=false;var _ox=e.data;var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var _o0=_ox._j4(_qB);var oClickedCoord=_ox._ka(_qB);if(_o0!=null&&_o0 instanceof AGCircle||_o0 instanceof _fQ||_o0 instanceof _fN)
_fd.trigger(_o0,"onmouseup",oClickedCoord);if(_fB.bDrag){_fB.bDrag=false;if(_ox._iK()){_ox.setCursor();_fB._pA.hide();if(_g0) 
 return;var _im=_ox._j6();_fB.oPointDragStop=_fB.getMouseOffset(e,_im);if(_fB.oPointDragStart._jh(_fB.oPointDragStop))
return false;var _pm=_ox._kb(_fB.oPointDragStart);var _pn=_ox._kb(_fB.oPointDragStop);var oBoundingBoxSelected=new _eT(_pm,_pn);var _nN=_ox._j0(oBoundingBoxSelected);_nN=(_nN>_ox._lm() ) ? _nN : _ox._lm();_ox._hr(oBoundingBoxSelected._j3(),_nN);return false;}
_ox.setCursor();var _qr=_fB.getMouseCoords(e);var _rJ=_qr.x-_fB.oPointLastMousePosition.x;var _rK=_qr.y-_fB.oPointLastMousePosition.y;if(_rJ!=0||_rK!=0)
_ox._oj(new _fM(_rJ,_rK));_ox._sF(_fL.DRAG);_ox._lr(_fD.PAN);_ox._lq(_fD.PAN);_ox._sF(_fL.DEFAULT);if(_fB.iMouseMoveCount>0){_fB.iMouseMoveCount=0;_fd.trigger(_ox,"ondragend");_fd.trigger(_ox,"onmoveend");_ox.requestCopyright(_ox._jZ());_ox._ku().getInfoDisplayContentPane().style.overflow="auto";}
return false;}
var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var _o0=_ox._j4(_qB);if(_o0!=null&&_o0 instanceof _fy){var oClickedCoord=_ox._ka(_qB);_fd.trigger(_o0,"onmouseup",oClickedCoord);return false;}
return false;};_fB.mouseOutHandler=function(e){var _ox=e.data;var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var oClickedCoord=_ox._ka(_qB);if(_p8!=null){_fd.trigger(_p8,"onmouseout",oClickedCoord);_p8=null;}
_fd.trigger(_ox,"onmouseout",oClickedCoord);_fB.mouseUpHandler(e,true);return false;};_fB.mouseScrollHandler=function(e){e=e||window.event;var _m5=0;var _ox=e.data;_eY.hideContextMenu(_ox);if(_ox._oi()){if(e.wheelDelta){_m5=e.wheelDelta/120;var _hf=_eU._hg=="Opera"&&_eU.VERSION<=9.02;if(_hf)
_m5=-_m5;}
else if(e.detail) 
_m5=-e.detail/3;var _lP=_ox._lm();var _im=_ox._j6();var _qP;if(_eU._hg=="Firefox"&&_eU.VERSION<3)
_qP=_fB.getMouseCoords(e);else _qP=_fB.getMouseOffset(e,_im);var oCoordToBeScrolled=_ox._kb(_qP);var _oH=_ox._kY();var _mT=parseInt( _qP.x-_oH.width/2);var _mU=parseInt( _qP.y-_oH.height/2);var _qN=new _fM(_mT,_mU);if(_m5<0){if(_lP>_ox._kF()){var oBoundingBoxCurrent=_e3.getBoundingBoxForZoomAtPoint(oCoordToBeScrolled,_lP-1,_oH,_qN);_gi.zoomOnRedDisplayAnimation(_ox,_qP,0);_ox._hr(oBoundingBoxCurrent._j3(),_lP-1);return false;}
else {return false;}}
else {if(_lP<_ox._kE()){var oBoundingBoxCurrent=_e3.getBoundingBoxForZoomAtPoint(oCoordToBeScrolled,_lP+1,_oH,_qN);_gi.zoomOnRedDisplayAnimation(_ox,_qP,1);_ox._hr(oBoundingBoxCurrent._j3(),_lP+1);return false;}
else {return false;}}
}
else {return false;}
return false;};_fB.clickHandler=function(e){var _ox=e.data;if(_fB.isRightButton(e)&&_ox._hH()){var _im=_ox._j6();var _qw=_fB.getMouseOffset(e,_im);_eY.showContextMenu(_ox,_qw);return false;}
_eY.hideContextMenu(_ox);var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var _o0=_ox._j4(_qB);var oClickedCoord=_ox._ka(_qB);_fd.trigger(_ox,"onclick",_o0,oClickedCoord);if(_o0!=null){_fd.trigger(_o0,"onclick",oClickedCoord);return false;}};_fB.mouseOverHandler=function(e){var _ox=e.data;var _ip=_ox._kK(_fK.MAP_CONTAINER);var _qB=_fB.getMouseOffset(e,_ip);var oClickedCoord=_ox._ka(_qB);var _o0=_ox._j4(_qB);if(_o0!=null&&_p8==null){_fd.trigger(_o0,"onmouseover",oClickedCoord);}
else if(_p8!=null&&_o0!=_p8){_fd.trigger(_p8,"onmouseout",oClickedCoord);}
_p8=_o0;_fd.trigger(_ox,"onmouseover",oClickedCoord);return false;};

function _e3(){}
_e3.getBoundingBoxForZoom=function(_pc,_nN,_q7){var _l2=parseInt(_q7.width/2);var _l1=parseInt(_q7.height/2);var _oI=_f8.getTMSTileInfo(_nN,_pc);var _oK=_oI._jZ();var _nR=_oK._kH();var _sb=_oK._kZ();var _iz=parseFloat( Math.abs( parseFloat(_nR._nP()-_sb._nP())));var _iC=parseFloat( Math.abs( parseFloat(_sb.longitude()-_nR.longitude())));var _nv=AG_TILE_SIZE.width;var _nt=AG_TILE_SIZE.height;var _nS=_pc._nP()+parseFloat(_iz*_l1 / _nt);var _sc=_pc._nP()-parseFloat(_iz*_l1 / _nt);var _nT=_pc.longitude()-parseFloat(_iC*_l2 / _nv);var _sd=_pc.longitude()+parseFloat(_iC*_l2 / _nv);var _p1=new _e2(_nS,_sd);var _rf=new _e2(_sc,_nT);return new _eT(_rf,_p1);};_e3.getBoundingBoxForPan=function(_oM,_q7,_qN){var _ml=_q7.width;var _mi=_q7.height;var _ne=_qN.x;var _nf=_qN.y;var _pP=_oM._kH();var _q0=_oM._kZ();var _iz=parseFloat(_pP._nP()-_q0._nP());var _iC=parseFloat(_q0.longitude()-_pP.longitude());var _iU=parseFloat((_ne*_iC) / _ml);var _iT=parseFloat((_nf*_iz) / _mi);var _iA=_pP._nP()+_iT;var _iB=_pP.longitude()-_iU;var _iP=_q0._nP()+_iT;var _iQ=_q0.longitude()-_iU;var _p1=new _e2(_iA,_iQ);var _rf=new _e2(_iP,_iB);return new _eT(_rf,_p1);};_e3.getBoundingBoxForZoomAtPoint=function(_pd,_nN,_q7,_qN){var _oP=_e3.getBoundingBoxForZoom(_pd,_nN,_q7);var _oO=_e3.getBoundingBoxForPan(_oP,_q7,_qN);return _oO;};_e3.getBoundingBoxForResize=function(_oS,_rc,_ra){var _l9=_ra.width-_rc.width;var _l8=_ra.height-_rc.height;var oCoordSpan=_oS._uC();var oCoordOldBottomRight=_oS._kZ();var _h6=oCoordSpan.longitude()*_l9 / _rc.width;var _iS=oCoordOldBottomRight.longitude()+_h6;var _hY=oCoordSpan._nP()*_l8 / _rc.height;var _iR=oCoordOldBottomRight._nP()-_hY;var oCoordNewTopLeft=_oS._kH();var oCoordNewBottomRight=new _e2(_iR,_iS);return new _eT(oCoordNewTopLeft,oCoordNewBottomRight);};_e3.getScaleForBoundingBox=function(_oR,_q7){var _iG=0.1;var oCoordSpan=_oR._uC();var dLat=oCoordSpan._nP();var dLong=oCoordSpan.longitude();var _h5=_q7.width / dLong;var _iY=_q7.height / dLat;var _iD=(_h5>_iY) ? _h5 : _iY;return 111322222.0 /(_iG*_iD);};

function _fU(){this._le=function(_rp){throw "You must implement _le function.";};}
var AGRequestManager=_fU;

function _f9(_t0,_tx){if(typeof _t0!="string"||_t0.length==0)
_t0="*";if(typeof _tx!="string"||_tx.length==0)
_tx=AG_TMS_DEFAULT_DATA_SET;this.mapServerUrl=_t0;this.dataSet=_tx;this._hW=AG_TMS_DATASET_TAG;this.ZOOMLEVEL_TAG=AG_TMS_ZOOM_LEVEL_TAG;this._uN=AG_TMS_X_TAG;this._uQ=AG_TMS_Y_TAG;this.CL_TAG=AG_TMS_CL_TAG;this._bs=-1;this.getMSUrl=function(){if(this.mapServerUrl=="*"){var iMSIndex=_jR._ht();this._bs=iMSIndex;return AG_AVAILABLE_TMS_URLS[iMSIndex];}
else {this._bs=-1;return this.mapServerUrl;}};this._kx=function(){return this._bs;};this.copy=function(){return new _f9(this.mapServerUrl,this.dataSet);};}
var AGTMSOptions=_f9;

_ga.prototype=new _fU;function _ga(_ru){if(typeof _ru=="undefined"||_ru==null)
_ru=AG_DEFAULT_TMS_OPTIONS;if(!(_ru instanceof _f9))
throw "Invalid MapServerOptions in _ga.";this._da=_ru.copy();this._bt="";this._le=function(_rp){var _nN=_rp._lm();var _nF=_rp._lj();var _nI=_rp._lk();var _t6=this._da.getMSUrl();var _md=this._da._kx();if(_md>=0)
this._bt=AG_TMS_MARKER_PREFIX+_md;else this._bt="";_t6+="?"+"REQUEST"+"="+"GetTileAG";_t6+="&"+this._da._hW+"="+this._da.dataSet;_t6+="&"+this._da.ZOOMLEVEL_TAG+"="+_nN;_t6+="&"+this._da._uN+"="+_nF;_t6+="&"+this._da._uQ+"="+_nI;_t6+="&"+this._da.CL_TAG+"="+AG_TMS_CLIENT;_t6+="&key="+_eS.key;return _t6;};this._ky=function(){return this._bt;};}
var AGTMSRequestManager=_ga;

function _e8(_t0,_tX,_uh,_nA,_tK,_up,_tv,_tF){if(typeof _t0!="string"||_t0.length==0)
_t0="*";if(typeof _tX!="string"||_tX.length==0)
_tX=AG_DMS_DEFAULT_LAYERS;if(typeof _uh!="string"||_uh.length==0)
_uh=AG_DMS_DEFAULT_STYLES;if(typeof _nA!="number")
_nA=AG_DMS_DEFAULT_TRANSPARENCY;if(typeof _tK!="string"||_tK.length==0)
_tK=AG_DMS_FORMAT;if(typeof _up!="string"||_up.length==0)
_up=AG_DMS_VERSION;if(typeof _tv!="string"||_tv.length==0)
_tv=AG_DMS_CRS;if(typeof _tF!="string"||_tF.length==0)
_tF=AG_DMS_DEFAULT_EXCEPTIONS;this._r8="REQUEST";this._uH="VERSION";this._hP="CRS";this._gW="BBOX";this._uK="WIDTH";this._lv="HEIGHT";this._jK="FORMAT";this._nQ="LAYERS";this._ut="STYLES";this._uF="TRANSPERANCY";this._jk="EXCEPTIONS";this._jp="OPTIONS";this.FEATURESELECTION_TAG="";this.mapServerUrl=_t0;this.format=_tK;this.layers=_tX;this.styles=_uh;this.transparency=parseInt(_nA);this.version=_up;this.crs=_tv;this.exceptions=_tF;this._bs=-1;this.getMSUrl=function(){if(this.mapServerUrl=="*"){var iMSIndex=_jQ._ht();this._bs=iMSIndex;return AG_AVAILABLE_DMS_URLS[iMSIndex];}
else {this._bs=-1;return this.mapServerUrl;}};this._kx=function(){return this._bs;};this.copy=function(){return new _e8(this.mapServerUrl,this.layers,this.styles,this.transparency,this.format,this.version,this.crs,this.exceptions);};}
var AGDMSOptions=_e8;

_e9.prototype=new _fU;function _e9(_pz){if(typeof _pz=="undefined"||_pz==null)
_pz=AG_DEFAULT_DMS_OPTION;if(!(_pz instanceof _e8))
throw "Invalid MapServerOptions in _e9.";this._da=_pz.copy();this._strFeatureInfoParam="";this._bt="";this._le=function(_rp){var _lZ=Math.ceil((_rp._lj()+1) / AG_DMS_TILE_GROUP_COLS );var _l0=Math.ceil((_rp._lk()+1) / AG_DMS_TILE_GROUP_ROWS );var _mo=_lZ*AG_DMS_TILE_GROUP_COLS-1;var _ms=(_lZ-1)*AG_DMS_TILE_GROUP_COLS;var _mp=_l0*AG_DMS_TILE_GROUP_ROWS-1;var _mt=(_l0-1)*AG_DMS_TILE_GROUP_ROWS;var _lQ=_rp._lj()-_ms;var _lR=_rp._lk()-_mt;var _oQ=_f8.getBBoxOfTile(_rp._lm(),_ms,_mt);var _oT=_f8.getBBoxOfTile(_rp._lm(),_mo,_mp);var _pf=_oQ._kH();var _oe=_pf.longitude();var _n9=_pf._nP();var _pl=_oT._kZ();var _n8=_pl.longitude();var _of=_pl._nP();var _tg=_oe+","+_of+","+_n8+","+_n9;var tW=AG_TILE_SIZE.width*AG_DMS_TILE_GROUP_COLS;var tH=AG_TILE_SIZE.height*AG_DMS_TILE_GROUP_ROWS;var _t6=this._da.getMSUrl();var _md=this._da._kx();if(_md>=0)
this._bt=AG_DMS_MARKER_PREFIX+_md;else this._bt="";_t6+="?"+this._da._r8+"="+"GetTiledMap2AG";_t6+="&"+this._da._uH+"="+this._da.version;_t6+="&"+this._da._hP+"="+this._da.crs;_t6+="&"+this._da._gW+"="+"TILE:TOTALEXTENT:"+_tg+",TOTALTILES:"+AG_DMS_TILE_GROUP_COLS+","+AG_DMS_TILE_GROUP_ROWS+",CURRENTTILE:"+_lR+","+_lQ;_t6+="&"+this._da._uK+"="+tW;_t6+="&"+this._da._lv+"="+tH;_t6+="&"+this._da._jK+"="+this._da.format;_t6+="&"+this._da._nQ+"="+this._da.layers;_t6+="&"+this._da._ut+"="+this._da.styles;_t6+="&"+this._da._uF+"="+this._da.transparency;if(typeof this._strFeatureInfoParam=="string"&&this._strFeatureInfoParam.length>0)
_t6+="&"+this._da.FEATURESELECTION_TAG+"="+this._strFeatureInfoParam;_t6+="&key="+_eS.key;return _t6;};this._ky=function(){return this._bt;};this.setFeatureSelectionParam=function(strParams){if(typeof strParams=="string"&&strParams.length>0)
this._strFeatureInfoParam=strParams;};this.getFeatureSelectionParam=function(){return this._strFeatureInfoParam;};this.clearFeatureSelectionParam=function(){this._strFeatureInfoParam="";};this.setFeatureSelectionParam=this.setFeatureSelectionParam;this.getFeatureSelectionParam=this.getFeatureSelectionParam;this.clearFeatureSelectionParam=this.clearFeatureSelectionParam;}
var AGDMSRequestManager=_e9;

function _fA(){this.initialize=function(_ox){throw "You must implement this";};this.remove=function(){throw "You must implement this";};this.show=function(_o1){throw "You must implement this";};this.hide=function(){throw "You must implement this";};}
var AGMenu=_fA;

function _eZ(_o6,_tj,_tk,_uj,_ul,_tH,_lX,_tI,_tJ,_lI,_tm,_tl,_tQ,_uk,_l5,_mg,_ny){if( _o6!=null&&_o6 instanceof _f2)
this.contextSize=_o6;else this.contextSize=_eo.contextSize.copy();if(typeof _tj=="string")
this.backgroundColour=_tj;else this.backgroundColour=_eo.backgroundColour;if(typeof _tk=="string")
this.selectionBackgroundColour=_tk;else this.selectionBackgroundColour=_eo.selectionBackgroundColour;if(typeof _uj=="string")
this.textColour=_uj;else this.textColour=_eo.textColour;if(typeof _ul=="string") 
this.selectionTextColour=_ul;else this.selectionTextColour=_eo.selectionTextColour;if(typeof _tH=="string")
this.fontFamily=_tH;else this.fontFamily=_eo.fontFamily;if(typeof _lX=="number")
this.fontSize=_lX;else this.fontSize=_eo.fontSize;if(typeof _tI=="string")
this.fontStyle=_tI;else this.fontStyle=_eo.fontStyle;if(typeof _tJ=="string")
this.fontWeight=_tJ;else this.fontWeight=_eo.fontWeight;if(typeof _lI=="number")
this.borderWidth=_lI;else this.borderWidth=_eo.borderWidth;if(typeof _tm=="string")
this.borderStyle=_tm;else this.borderStyle=_eo.borderStyle;if(typeof _tl=="string")
this.borderColour=_tl;else this.borderColour=_eo.borderColour;if(typeof _tQ=="string")
this.iconBackgroundColour=_tQ;else this.iconBackgroundColour=_eo.iconBackgroundColour;if(typeof _uk=="string")
this.disabledTextColour=_uk;else this.disabledTextColour=_eo.disabledTextColour;if(typeof _l5=="number") 
this.iconWidth=_l5;else this.iconWidth=_eo.iconWidth;if(typeof _mg=="number") 
this.leftMargin=_mg;else this.leftMargin=_eo.leftMargin;if(typeof _ny=="number") 
this.topMargin=_ny;else this.topMargin=_eo.topMargin;this.copy=function(){return new _eZ(this.contextSize,this.backgroundColour,this.selectionBackgroundColour,this.textColour,this.selectionTextColour,this.fontFamily,this.fontSize,this.fontStyle,this.fontWeight,this.borderWidth,this.borderStyle,this.borderColour,this.iconBackgroundColour,this.disabledTextColour,this.iconWidth,this.leftMargin,this.topMargin);};}
var AGContextMenuOptions=_eZ;

function _eX(_ui,_ls,_tR,_g4){if(typeof _ui!="string")
throw "invalid text";if(typeof _ls=="undefined")
throw "invalid _ls";if(typeof _g4!="boolean")
_g4=true;this._dX=_ui;this._bf=_ls;this._C=_g4;if(typeof _ui=="string"&&_ui.length>0)
this._dX=_ui;else this._dQ=null;if(typeof _tR=="string"&&_tR.length>0)
this._dQ=_tR;else this._dQ=null;this._la=function(){return this._dX;};this._kl=function(){return this._bf;};this._kp=function(){return this._dQ;};this._i1=function(){this._C=true;};this._h7=function(){this._C=false;};this._nc=function(){return this._C;};this.getText=this._la;this.getHandler=this._kl;this.getIconUrl=this._kp;}
var AGContextMenuItem=_eX;

function _eY(){}
_eY.clicked=function(e){var _ps=e.data.map;var _jN=e.data._ls;var _o2=e.data.contextMenu;_o2.hide();try
{_jN(_ps,_o2._kU());}
catch(err){}
return false;};_eY.mouseOverHandler=function(e){var _pp=e.data.oCurrentMenuItem;var _pq=e.data.oCurrentMenuItemIcon;var _pr=e.data.oCurrentMenuItemText;var _pt=e.data.oAGContextMenuOption;_pp.style.backgroundColor=_pt.selectionBackgroundColour;_pq.style.backgroundColor=_pt.selectionBackgroundColour;_pr.style.backgroundColor=_pt.selectionBackgroundColour;if(e.data.oCurrentArrMenuItem._nc())
_pr.style.color=_pt.selectionTextColour;else _pr.style.color=_pt.disabledTextColour;return false;};_eY.mouseOutHandler=function(e){var _pp=e.data.oCurrentMenuItem;var _pq=e.data.oCurrentMenuItemIcon;var _pr=e.data.oCurrentMenuItemText;var _pt=e.data.oAGContextMenuOption;_pp.style.backgroundColor=_pt.backgroundColour;_pq.style.backgroundColor=_pt.iconBackgroundColour;_pr.style.backgroundColor=_pt.backgroundColour;if(e.data.oCurrentArrMenuItem._nc())
_pr.style.color=_pt.textColour;else _pr.style.color=_pt.disabledTextColour;return false;};_eY.showContextMenu=function(_ox,_rM){var _o2=_ox._j8();if(_o2!=null){_o2.show(_rM);}};_eY.hideContextMenu=function(_ox){var _o2=_ox._j8();if(_o2!=null){_o2.hide();}};_eY.dummyFunction=function(e){return false;};

_eW.prototype=new _fA;function _eW(_go,_pW){if( _pW!=null&&_pW instanceof _eZ)
this._cU=_pW;else this._cU=_eo.copy();if(_go!=null)
this._b=_go;else this._b=new Array();this._S=null;this._T=document.createElement('div');this._T.style.position="absolute";this._T.style.zIndex="270";this._b1=null;this._c6=null;this.initialize=function(_ox){this._b1=_ox;this._S=_ox._j6();this._T.style.cursor="default";this._T.style.textAlign="left";this._T.style.visibility="hidden";var _iu=this._b1._kK(_fK.MOUSE_TARGET_PANE);this._hM();this._S.appendChild(this._T);};this.redraw=function(){this._S.removeChild(this._T);this._T.innerHTML="";this._hM();this._S.appendChild(this._T);};this.remove=function(){if(this._ni()){this._S.removeChild(this._T);this._T.innerHTML="";}
this._b1=null;};this._hM=function(){this._P=new Array(this._b.length);this._Q=new Array(this._b.length);this._R=new Array(this._b.length);this._T.style.height=(this._cU.contextSize.height*this._b.length)+"px";this._T.style.width=this._cU.contextSize.width+"px";var _ns=0;for(var i=0;i<this._b.length;i++){this._P[i]=document.createElement('div');this._P[i].style.position="absolute";this._P[i].style.zIndex="270";this._P[i].style.left="0px";this._P[i].style.top=_ns+"px";if(_eU._hg=="Explorer")
this._P[i].style.height=(this._cU.contextSize.height+this._cU.borderWidth)+"px";else this._P[i].style.height=this._cU.contextSize.height+"px";this._P[i].style.width=this._cU.contextSize.width+"px";this._P[i].style.backgroundColor=this._cU.backgroundColour;this._P[i].style.fontFamily=this._cU.fontFamily;this._P[i].style.fontSize=this._cU.fontSize+"pt";this._P[i].style.fontStyle=this._cU.fontStyle;this._P[i].style.fontWeight=this._cU.fontWeight;this._P[i].style.borderWidth=this._cU.borderWidth+"px";this._P[i].style.borderStyle=this._cU.borderStyle;this._P[i].style.borderColor=this._cU.borderColour;this._Q[i]=document.createElement('div');this._Q[i].style.position="absolute";this._Q[i].style.zIndex="270";this._Q[i].style.left="0px";this._Q[i].style.top="0px";if(_eU._hg=="Explorer")
this._Q[i].style.height=(this._cU.contextSize.height-this._cU.borderWidth)+"px";else this._Q[i].style.height=this._cU.contextSize.height+"px";this._Q[i].style.width=this._cU.iconWidth+"px";this._Q[i].style.backgroundColor=this._cU.iconBackgroundColour;if(typeof this._b[i]._kp()=="string"){var _o4=document.createElement("img");_o4.setAttribute("src",this._b[i]._kp());this._Q[i].appendChild(_o4);}
this._R[i]=document.createElement('div');this._R[i].style.position="absolute";this._R[i].style.zIndex="270";this._R[i].style.left=parseInt(this._Q[i].style.width)+"px";this._R[i].style.paddingLeft=this._cU.leftMargin+"px";this._R[i].style.top="0px";if(_eU._hg=="Explorer")
this._R[i].style.height=(this._cU.contextSize.height-this._cU.borderWidth)+"px";else this._R[i].style.height=this._cU.contextSize.height+"px";this._R[i].style.width=parseInt(this._cU.contextSize.width)-this._cU.iconWidth-this._cU.leftMargin+"px";this._R[i].style.backgroundColor=this._cU.backgroundColour;if(this._b[i]._nc())
this._R[i].style.color=this._cU.textColour;else this._R[i].style.color=this._cU.disabledTextColour;this._R[i].innerHTML=this._b[i]._la();_ns+=this._cU.contextSize.height;this._P[i].appendChild(this._Q[i]);this._P[i].appendChild(this._R[i]);this._T.appendChild(this._P[i]);var _o5=new Object();_o5.oAGContextMenuOption=this._cU;_o5.oCurrentMenuItem=this._P[i];_o5.oCurrentMenuItemIcon=this._Q[i];_o5.oCurrentMenuItemText=this._R[i];_o5.oCurrentArrMenuItem=this._b[i];$(this._P[i]).bind("mouseover",_o5,_eY.mouseOverHandler);$(this._P[i]).bind("mouseout",_o5,_eY.mouseOutHandler);var _o3=new Object();_o3.map=this._b1;_o3._ls=this._b[i]._kl();_o3.contextMenu=this;if(this._b[i]._nc()){$(this._P[i]).bind("click",_o3,_eY.clicked);}
else {$(this._P[i]).bind("click",_o3,_eY.dummyFunction);}} 
};this.show=function(_pX){if(this._ni()){this._c6=_pX;var _q7=this._b1._kY();var _q6=this._kY();var _me=_pX.x;var _nw=_pX.y;if(_pX.x+_q6.width>_q7.width)
_me-=_q6.width;if(_pX.y+_q6.height>_q7.height)
_nw-=_q6.height;this._T.style.left=_me+"px";this._T.style.top=_nw+"px";this._T.style.visibility="visible";}};this.hide=function(){if(this._ni()){this._T.style.visibility="hidden";}};this._d7=function(_pY){if(_pY!=null&&_pY instanceof _eX)
this._b.push(_pY);else throw "Invalid ContextMenuItem";if(this._b1!=null){this.redraw();}};this._mJ=function(_pY,_mc){if(_pY!=null&&_pY instanceof _eX){if(typeof _mc=="number"){_mc=Math.floor(_mc);if(_mc>=0&&_mc<this._b.length){this._b.splice(_mc,0,_pY);if(this._b1!=null)
this.redraw();}
else throw "Index out of exception in ContextMenuItem";}
else throw "Invalid Number";}
else throw "Invalid ContextMenuItem";};this._r0=function(_o5){if(_o5!=null&&_o5 instanceof _eX){var _pV=-1;if(!Array.indexOf){for(var i=0;i<this._b.length;i++){if(this._b[i]._dX==_o5._dX){_pV=i;break;}
else _pV=-1;}}
else _pV=this._b.indexOf(_o5);if(_pV!=-1) 
this._r1(_pV);}
else throw "Invalid ContextMenuItem";};this._r1=function(_mc){if(typeof _mc=="number"){if(_mc>=0&&_mc<this._b.length){this._b.splice(_mc,1);if(this._b1!=null)
this.redraw();}
else throw "Index out of exception in ContextMenuItem";}
else throw "Invalid Number";};this._ie=function(_o5){if(_o5!=null&&_o5 instanceof _eX){var _pV=-1;if(!Array.indexOf){for(var i=0;i<this._b.length;i++){if(this._b[i]._dX==_o5._dX){_pV=i;break;}
else _pV=-1;}}
else _pV=this._b.indexOf(_o5);if(_pV!=-1)
this._b[_pV]._h7();if(this._b1!=null)
this.redraw();}
else throw "Invalid ContextMenuItem";};this._i8=function(_o5){if(_o5==null||!(_o5 instanceof _eX))
throw "Invalid ContextMenuItem";var _pV=-1;if(!Array.indexOf){for(var i=0;i<this._b.length;i++){if(this._b[i]._dX==_o5._dX){_pV=i;break;}
else _pV=-1;}}
else _pV=this._b.indexOf(_o5);if(_pV!=-1)
this._b[_pV]._i1();if(this._b1!=null)
this.redraw();};this._kU=function(){return this._c6;};this._kY=function(){return new _f2(Math.round(this._T.offsetWidth),Math.round(this._T.offsetHeight));};this._ni=function(){return this._b1!=null;};this.getMenuItems=function(){return this._b;};this.addMenuItem=this._d7;this.insertMenuItem=this._mJ;this.removeMenuItem=this._r0;this.removeMenuItemAtIndex=this._r1;this.disableMenuItem=this._ie;this.enableMenuItem=this._i8;this.getSize=this._kY;this.getMenuItems=this.getMenuItems;}
var AGContextMenu=_eW;

function _fb(borderWidth,borderColour,borderStyle,backgroundColour,opacity){if(typeof borderWidth=="string")
this.borderWidth=borderWidth;else this.borderWidth=_er;if(typeof borderColour=="string")
this.borderColour=borderColour;else this.borderColour=AG_DEFAULT_DRAG_ZOOM_MARKER_BORDER_COLOUR;if(typeof borderStyle=="string")
this.borderStyle=borderStyle;else this.borderStyle=_eq;if(typeof backgroundColour=="string")
this.backgroundColour=backgroundColour;else this.backgroundColour=AG_DEFAULT_DRAG_ZOOM_MARKER_BG_COLOUR;if(typeof opacity=="string")
this.opacity=opacity;else this.opacity=_es;}


_fa.prototype=new _fE;function _fa(_pB){this._cJ=null;this._3=null;this._E=true;if(typeof _pB!="undefined"&&_pB!=null&&_pB instanceof DragZoomAreaMarkerOptions)
this._cv=_pB;else this._cv=_et;this.initialize=function(_pQ){this._cJ=_pQ;this._3=document.createElement("div");this._3.style.position="absolute";this._3.style.borderWidth=this._cv.borderWidth;this._3.style.borderColor=this._cv.borderColour;this._3.style.borderStyle=this._cv.borderStyle;this._3.style.backgroundColor=this._cv.backgroundColour;this._3.style.opacity=this._cv.opacity+"";this._3.style.filter="alpha(opacity="+this._cv.opacity*100+")";this._3.style.mozOpacity=this._cv.opacity+"";this._3.style.visibility="hidden";var _ir=this._cJ._kK(_fK.MARKER_PANE);_ir.appendChild(this._3);};this.copy=function(){};this.redraw=function(_mP){};this.remove=function(){var _ir=this._cJ._kK(_fK.MARKER_PANE);_ir.removeChild(this._3);};this.reset=function(_pg,_q5){var _qR=this._cJ._kP(_pg);this._3.style.left=_qR.x+"px";this._3.style.top=_qR.y+"px";this._3.style.width=_q5.width+"px";this._3.style.height=_q5.height+"px";this.show();};this.show=function(){this._E=false;this._3.style.visibility="visible";};this.hide=function(){this._E=true;this._3.style.visibility="hidden";};this._nd=function(){return this._E;};this._np=function(){return !this._nd();};}


function _f3(_pm,_pn,_h0,_ty,_tT){this._dN=null;this._O=null;this._dR=null;if(_pm==null||!(_pm instanceof _e2)||_pn==null||!(_pn instanceof _e2))
throw 'Invalid Coord';this._dN=_ty;this._O=_h0;this._dR=_tT;this._oCoordStart=_pm;this._oCoordStop=_pn;this._k3=function(){return this._oCoordStart;};this._k7=function(){return this._oCoordStop;};this._ke=function(){return this._dN;};this._kf=function(){return this._O;};this._kv=function(){return this._dR;};}


function _fV(_gt){if(typeof _gt!='object')
throw 'Invalid _f3';this._d=_gt;this._kc=function(){var _gv=new Array();_gv.push(this._d[0]._k3());for(var i=0;i<this._d.length;i++){_gv.push(this._d[i]._k7());}
return _gv;};this._kJ=function(){return this._d.length;};this._k5=function(_mc){if(_mc<this._d.length)
return this._d[_mc];throw "Index out of bounds";};this._k6=function(){return this._d;};this._k2=function(){};this._ki=function(){};this._k3=function(){return this._d[0]._k3();};this._k7=function(){return this._d[this._d.length-1]._k7();};this._kf=function(){var _iW=0;for(var i=0;i<oAGRouteImplement._d.length;i++){_iW+=oAGRouteImplement._d[i]._kf();}
return _iW;};}


var _ey=-1;var _ex=new Array();function _fX(){this._c=new Array();this._b7=++_ey;_ex[this._b7]=this;this._cJ=null;this._oCoordOrigin=null;this._oCoordDestination=null;this._arrCoordViaPoints=null;var _ts=AG_DEFAULT_DD_COLOR;var _nD=AG_DEFAULT_DD_WEIGHT;var _iF=AG_DEFAULT_DD_OPACITY;this._c8=new _gh(_ts,_nD,_iF);this._bX=new Array();this._K=false;this._v=null;this._dm=null;this._cw=null;this._dy=null;this._dM=_ep;this._b5=null;this._bL=0;this._sE=function(_o9){if(_o9 instanceof _e2)
this._oCoordOrigin=_o9;};this._ss=function(_o9){if(_o9 instanceof _e2)
this._oCoordDestination=_o9;};this._sR=function(_gv){if(typeof _gv=="object"&&typeof _gv.length=="number") 
 this._arrCoordViaPoints=_gv;};this._iO=function(_pQ){this._cJ=_pQ;var _gQ=new Array();if(this._oCoordOrigin==null||this._oCoordDestination==null)
throw "Origin and Destination has not been set yet.";_gQ.push(this._oCoordOrigin);if(this._arrCoordViaPoints!=null){for(var i=0;i<this._arrCoordViaPoints.length;i++)
_gQ.push(this._arrCoordViaPoints[i]);}
_gQ.push(this._oCoordDestination);this._hy();this._K=true;this._v=_gQ;_fd.trigger(this._cJ,"onrouterequested",_gQ);this._nY(_gQ);this._oCoordOrigin=null;this._oCoordDestination=null;};this.clear=function(){this._oCoordOrigin=null;this._oCoordDestination=null;this._arrCoordViaPoints=null;this._K=false;if(this._cJ!=null) 
 this._hy();};this._hy=function(){for(var i=0;i<this._bX.length;i++){this._cJ._r2(this._bX[i]);}
this._r5();this._rV();};this._nY=function(arrCoordWaypoints){var _tq="_ex["+this._b7+"]._sg";var _ub="";if(this._cp!=null&&this._cp instanceof _e7)
_ub=(this._cp.routePreference==_fW.FASTEST)? "TRAVELTIME" : "LENGTH";else _ub=AG_ROUTE_PARAM;var _un=_gg.getNavigationRouteRequest(_tq,arrCoordWaypoints,++this._bL,AG_ROUTE_LAYER,_ub);var script=document.createElement("script");script.setAttribute("src",_un);script.setAttribute("type","text/javascript");document.body.appendChild(script);};this._kI=function(){return this._c.length;};this._kV=function(_mc){if(_mc<this._c.length)
return this._c[_mc];throw 'Index out of bound';};this._kf=function(){var _uE=0;var _oG=new _fV();for(var i=0;i<this._q.length;i++){_oG=this._q[i];_uE+=_oG._kf();}
return _uE;};this._sg=function(_qZ,_t7){if(!this._K)
return;if(_qZ=="error")
return;if(parseInt(_t7)!=this._bL)
return;this._c=new Array();this._hy();var _gv=new Array();var _qM=_qZ.RoutingPoints.split('|');var _gm;var _uJ=0;for(var i=0;i<_qM.length;i++){_gm=_qM[i].split(',');_gv.push(new _e2(parseFloat(_gm[1]),parseFloat(_gm[0])));}
this._sJ(_gv);this._sO(this._c[0]._k3());this._sy(this._c[this._c.length-1]._k7());this._iN(this._c);_fd.trigger(this._cJ,"onroutedrawn",this._v);};this._sO=function(_o9){if(this._dm)
this._dm._sq(_o9);else {this._dm=this._kD( API_HOST_URL+"Images/routeStart.png",_o9);_fd.addListener(this._dm,"ondragend",this.newStartPosition);this._cJ._d8(this._dm);}};this._sy=function(_o9){if(this._cw)
this._cw._sq(_o9);else {this._cw=this._kD(API_HOST_URL+"Images/routeStop.png",_o9);var _ls=eval("_ex["+this._b7+"].newEndPosition");_fd.addListener(this._cw,"ondragend",_ls);this._cJ._d8(this._cw);}};this.newStartPosition=function(_o9,_pQ){if(_o9 instanceof _e2&&_pQ instanceof _fs){_pQ._dc._v[0]=_o9;_pQ._dc._nY(_pQ._dc._v);}}
this.newEndPosition=function(_o9,_pQ){if(_o9 instanceof _e2&&_pQ instanceof _fs){var _nU=_pQ._dc._v.length;_pQ._dc._v[_nU-1]=_o9;_pQ._dc._nY(_pQ._dc._v);}}
this._r5=function(){this._cJ._r2(this._dm);this._dm=null;};this._rV=function(){this._cJ._r2(this._cw);this._cw=null;};this._kD=function(_tZ,_o9){var oCoordMarker=new _e2(_o9._nP(),_o9.longitude());var _h1=new _fl(null,_tZ);_h1.iconSize=new _f2(32,32);_h1.iconAnchor=new _fM(-15,-30);var _h2=new _fz();_h2.icon=_h1;if(this._cJ.enabledDraggingRoute())
_h2.draggable=true;var _pU=new _fy(oCoordMarker,_h2);return _pU;};this._iN=function(_gJ){this._bX=new Array();for(var i=0;i<_gJ.length;i++){var _o9=_gJ[i]._kc();this._bX.push(new _fQ(_o9,this._c8));this._iM(i);}};this._iM=function(_my){this._cJ._d8(this._bX[_my]);};this._sJ=function(_gv){var _nn=null;var _pm=null;var _pn=null;var _gs=new Array();for(var i=0;i<_gv.length-1;i++){_pm=_gv[i];_pn=_gv[i+1];oAgStep=new _f3(_pm,_pn);_gs.push(oAgStep);}
_oG=new _fV(_gs);this._c.push(_oG);};this.setDirectionOptions=function(oDirectionOptions){if(oDirectionOptions!=null&&oDirectionOptions instanceof _e7)
this._cp=oDirectionOptions;}}


var _eA=new Array();var _ez=-1;function _e6(_pQ,_qb){this._dM=_ep;this._b5=null;this._cF=++_ez;_eA[this._cF]=this;this._bL=-1;if(_pQ instanceof _fs)
this._cJ=_pQ;else this._cJ=null;this._bj=null;this._sw=function(_rx){if(typeof _rx=="object")
this._c2=_rx;else return;this._b5=document.createElement('iframe');this._b5.setAttribute('src',"");this._b5.style.width="100%";this._b5.style.height="100%";this._b5.style.border='0px solid #000000';this._b5.style.overflow="auto";this._b5.style.visibility="hidden";this._c2.appendChild(this._b5);return true;};if(typeof _qb!="undefined"&&_qb!=null&&typeof _qb=="object" ){this._c2=_qb;this._c2.innerHTML="";this._sw(this._c2);}
else this._c2=null;this._g=new Array();this._cp=AG_DEFAULT_DIRECTION_OPTIONS.copy();this._nW=function(_ph,_pe,_pv){if(_pv instanceof _e7)
this._cp=_pv;else this._cp=AG_DEFAULT_DIRECTION_OPTIONS.copy();if(!(_pe instanceof _e2)||!(_ph instanceof _e2))
throw "Invalid argument";var _gv=new Array(_ph,_pe);this._nZ(_gv,this._cp);};this._nZ=function(_gy,_pv){if(_pv instanceof _e7)
this._cp=_pv;else this._cp=AG_DEFAULT_DIRECTION_OPTIONS.copy();if(typeof _gy!="object")
throw "Invalid argument";if(this._cJ instanceof _fs){var iLength=_gy.length;var _q1=this._cJ._kW();_q1._sE(_gy[0]);_q1._ss(_gy[iLength-1]);var _gw=new Array();if(iLength>2){for(var i=1;i<iLength-1;i++){_gw.push(_gy[i]);}
_q1._sR(_gw);}
_q1.setDirectionOptions(this._cp);_q1._iO(this._cJ);}
if(this._c2!=null){var _ub=(this._cp.routePreference==_fW.FASTEST)? "TRAVELTIME" : "LENGTH";this._nX(_gy,_ub);}};this._ho=function(_qZ,_m0){if(_m0!=this._bL)
return;var _t9=_qZ.RoutingPoints;var _gn=_t9.split('|');this._g=new Array();for(var i=0;i<_gn.length;i++){var _gu=_gn[i].split(',');this._g.push(new _e2(parseFloat(_gu[1]),parseFloat(_gu[0])));}
_fd.trigger(this,"onload");};this._li=function(){return this._g;};this.callbackDD=function(_qZ){eval("this._bj("+_qZ+");");};this._su=function(_un){if(typeof _un=='string')
this._dM=_un;};this.clear=function(){if(this._cJ instanceof _fs){var _q1=this._cJ._kW();_q1._hy();}
if(this._c2!=null){this._c2.innerHTML="";}};this.getJSONDirections=function(_gw,_jG){if(_gw==null||typeof _gw=="undefined"||_gw.length<2)
throw "invalied argument";if(typeof _jG=="function")
this._bj=_jG;var _ur="";_ur+=_gw[0]._nP()+"|"+_gw[0].longitude();for(var i=1;i<_gw.length;i++)
_ur+="$"+_gw[i]._nP()+"|"+_gw[i].longitude();var _ub=(this._cp.routePreference==_fW.FASTEST)? "TRAVELTIME" : "LENGTH";var _un=this._kh("_eA["+this._cF+"].callbackDD",_ur,_ub);var script=document.createElement("script");script.setAttribute("src",_un);script.setAttribute("type","text/javascript");document.body.appendChild(script);};this._kh=function(_tp,_ur,_uc){var _t6=AG_JSON_DRIVING_DIRECTION_URL;_t6+="?";_t6+="op=GetDirectionsJSONSet1";_t6+="&jsonp="+_tp;_t6+="&waypoints="+_ur;_t6+="&RouteLayer="+AG_ROUTE_LAYER;_t6+="&RouteParameter="+_uc;_t6+="&key="+_eS.key;_t6+="&rnd="+Math.random();return _t6;};this._nX=function(_gx,_ub){if( typeof this._c2!='object')
throw "User div has not been set yet.";if(typeof _gx!="object")
throw "Invalid argument";var _un="";_un+=_ew;_un+="?";_un+="Waypoints="+_gx[0]._nP()+"|"+_gx[0].longitude();for(var i=1;i<_gx.length;i++)
_un+="$"+_gx[i]._nP()+"|"+_gx[i].longitude();_un+="&RouteParameter="+_ub;_un+="&RouteLayer="+AG_ROUTE_LAYER;_un+="&CSS="+this._dM;this._b5.setAttribute('src',_un);this._b5.style.visibility="visible";return true;};this._st=function(_pv){if(_pv instanceof _e7)
this._cp=_pv;};this._kR=function(){if(this._g.length>0)
return new _fQ(this._g);else throw "Direction has not been loaded";};this._kf=function(){var unit=this._cp.unit;if(this._g.length>0){var _jn=0;for(var i=0;i<this._g.length-1;i++){var _iV=_f8.getDistanceBetweenCoords(this._g[i],this._g[i+1],unit);_jn+=(!isNaN(_iV))?_iV:0;}
return _jn;}
else throw "Direction has not been loaded";};this._jZ=function(){if(this._g.length>0){var _oX=new _eT(this._g[0],this._g[1]);for(var i=2;i<this._g.length;i++){_oX._jl(this._g[i]);}
return _oX;}
else throw "Direction has not been loaded";};this.load=this._nW;this.loadFromWayPoints=this._nZ;this.setDirectionsPanelStyle=this._su;this.clear=this.clear;this.getJSONDirections=this.getJSONDirections;this.getBoundingBox=this._jZ;this.getDistance=this._kf;this.getVertices=this._li;this.getPolyline=this._kR;}
var AGDirections=_e6;

function _e7(_jf,_jg,_je,_gU,_gV,_gT){if(typeof _jf=="number")
this.travelMothod=_jf;else this.travelMothod=_ge.DRIVE;if(typeof _jg=="number")
this.unit=_jg;else this.unit=_gf.KILOMETERS;if(typeof _je=="string")
this.routePreference=_je;else this.routePreference=_fW.FASTEST;this.avoidHighway=false;this.avoidToolRoads=false;this.avoidGravelRoads=false;if(typeof _gU=="boolean")
this.avoidHighway=_gU;if(typeof _gV=="boolean")
this.avoidToolRoads=_gV;if(typeof _gT=="boolean")
this.avoidGravelRoads=_gT;this.copy=function(){return new _e7(this.travelMothod,this.unit,this.routePreference,this.avoidHighway,this.avoidToolRoads,this.avoidGravelRoads);};}
var AGDirectionsOptions=_e7;

//Configuration

var API_GATEWAY_URL=API_HOST_URL+"gateways/";
var _eH=100;
var AG_API_VERSION="2.0.0.18";
var AGInitialMapType={DEFAULT:0,DEFAULT_WITH_IMAGERY:1 
};
var AGMapServerType={TMS:0,DMS:1 
};
var AG_INITIAL_MAP_TYPE=AGInitialMapType.DEFAULT;
var AG_DEFAULT_MS_TYPE=AGMapServerType.TMS;
var AG_DEFAULT_MS_TYPE_FOR_IMAGERY=AGMapServerType.TMS;
var AG_TMS_URL="http://mt1.afrigis.co.za/getTile";
var AG_TMS_DATASET_TAG="dataset";
var AG_TMS_DEFAULT_DATA_SET="ag.vbase.256";
var AG_TMS_ZOOM_LEVEL_TAG="level";
var AG_TMS_X_TAG="x";
var AG_TMS_Y_TAG="y";
var AG_TMS_CL_TAG="Cl";
var AG_TMS_CLIENT="qyz123rt";
var AG_AVAILABLE_TMS_URLS=new Array();
AG_AVAILABLE_TMS_URLS.push("http://mt1.afrigis.co.za/getTile");
AG_AVAILABLE_TMS_URLS.push("http://mt0.afrigis.co.za/getTile");
var AG_DEFAULT_TMS_OPTIONS=new _f9("*",AG_TMS_DEFAULT_DATA_SET);
var AG_TMS_DEFAULT_DATA_SET_FOR_IMAGERY="ag.vovr.256";
var AG_DEFAULT_TMS_OPTIONS_FOR_IMAGERY=new _f9("*",AG_TMS_DEFAULT_DATA_SET_FOR_IMAGERY);
var AG_IMAGERY_URL="http://mt1.afrigis.co.za/getTile";
var AG_IMAGERY_DATA_SET="ag.ibase.256";
var AG_IMAGERY_TMS_OPTIONS=new _f9("*",AG_IMAGERY_DATA_SET);
var AG_DMS_URL="http://ms1.afrigis.co.za/mapserver/im.aspx";
var AG_DMS_VERSION="1.0.0";
var AG_DMS_CRS="EPSG:4326";
var AG_DMS_FORMAT="image/png";
var AG_DMS_DEFAULT_LAYERS="AG_CONTINENTS,AG_WORLD_COUNTRIES,AG_AFRICAN_COUNTRIES,AG_SADECS,AG_PROVINCES,AG_BUILTUP_AREAS,AG_CAD_PARKS,AG_DAMS,AG_RIVERS,AG_STREETS,AG_NATIONALROAD_LABELS,AG_TOWNS_CENTROID,AG_SUBURBS_CENTROID,AG_WORLD_CAPITALS";
var AG_DMS_DEFAULT_STYLES="Polygon_SCHEME,Polygon_SCHEME,Polygon_SCHEME,Polygon_SCHEME,Theme4,Polygon_SCHEME,Theme4,Theme4,Theme4,Theme4,Point_SCHEME,Point_SCHEME,Theme4,Point_SCHEME";
var AG_DMS_DEFAULT_TRANSPARENCY=0;
var AG_DMS_DEFAULT_EXCEPTIONS="INIMAGE";
var AG_AVAILABLE_DMS_URLS=new Array();
AG_AVAILABLE_DMS_URLS.push("http://ms1.afrigis.co.za/mapserver/im.aspx");
var AG_DEFAULT_DMS_OPTION=new _e8(AG_DMS_URL,AG_DMS_DEFAULT_LAYERS,AG_DMS_DEFAULT_STYLES,AG_DMS_DEFAULT_TRANSPARENCY,AG_DMS_FORMAT);
var AG_DMS_DEFAULT_LAYERS_FOR_IMAGERY="AG_WORLD_COUNTRIES,AG_PROVINCES,AG_TOWNS_CENTROID,AG_SUBURBS_CENTROID,AG_STREETS";
var AG_DMS_DEFAULT_STYLES_FOR_IMAGERY="Imagery,Imagery,Imagery,Theme4,Imagery";
var AG_DMS_DEFAULT_TRANSPARENCY_FOR_IMAGERY=100;
var AG_DEFAULT_DMS_OPTIONS_FOR_IMAGERY=new _e8(AG_DMS_URL,AG_DMS_DEFAULT_LAYERS_FOR_IMAGERY,AG_DMS_DEFAULT_STYLES_FOR_IMAGERY,AG_DMS_DEFAULT_TRANSPARENCY_FOR_IMAGERY,AG_DMS_FORMAT);
var AG_CLIENT_GEOCODER_GATEWAY=API_GATEWAY_URL+"Search.aspx";
var AG_KEY_VALIDATION_GATEWAY=API_GATEWAY_URL+"AGKeyValidationGateway.aspx";
var _ew="http://maps.afrigis.co.za/services/MapServerUtils/DDHTMLGateway.aspx";
var AG_JSON_DRIVING_DIRECTION_URL=API_GATEWAY_URL+"DrivingDirectionJSON.aspx";
var AG_NAVIGATION_GATEWAY_URL=API_GATEWAY_URL+"navgw.aspx";
var AG_ROUTE_LAYER="AG_STREETS";
var AG_ROUTE_PARAM="TRAVELTIME";
var _ep=API_HOST_URL+"css/DefaultDDStyle.css";
var AG_DEFAULT_DD_COLOR="red";
var AG_DEFAULT_DD_WEIGHT=10;
var AG_DEFAULT_DD_OPACITY=0.5;
var AG_MARBIL_GATEWAY=API_GATEWAY_URL+"MarbilGateway.aspx";
var AG_ADVERTISING_SIZE=new _f2(0,0);
var AG_SHOW_ADVERTISING=null;
var AG_ADVERTISE_DURATION=20;
var AG_DMS_TILE_GROUP_ROWS=4;
var AG_DMS_TILE_GROUP_COLS=4;
var AG_TILE_SIZE=new _f2(256,256);
var _eQ=new Array(524288000,262144000,131072000,65536000,32768000,16384000,8192000,4096000,2048000,1024000,512000,256000,128000,64000,32000,16000,8000,4000,2000,1000);
var _eI=_eQ.length;
var _eG=20;
var _fK={IMAGERY_PANE:0,MAP_PANE:1,OVERLAY_PANE:2,MARKER_SHADOW_PANE:3,MARKER_PANE:4,FLOAT_SHADOW_PANE:5,MOUSE_TARGET_PANE:6,FLOAT_PANE:7,MAP_CONTAINER:8,STATIC_PANE:9
};
var _ge={DRIVE:0,WALK:1,PUBLIC_TRANSPORT:2
};
var _gf={KILOMETERS:0,MILES:1
};
var _fW={FASTEST:0,SHORTEST:1
};
var _fD={ZOOM:0,PAN:1
};
var AG_DEFAULT_ICON=new _fl(null,API_HOST_URL+"Images/red-flag.png");
AG_DEFAULT_ICON.iconSize=new _f2(30,35);
AG_DEFAULT_ICON.shadow=API_HOST_URL+"Images/MarkerShadow.png";
AG_DEFAULT_ICON.shadowSize=new _f2(50,35);
AG_DEFAULT_ICON.iconAnchor=new _fM(-14,-35);
AG_DEFAULT_ICON.infoDisplayAnchor=new _fM(7,-35);
var SVG_NS='http://www.w3.org/2000/svg';
var AG_DEFAULT_LINE_COLOUR='blue';
var _ev=2;
var _eu=1;
var AG_DEFAULT_FILL_COLOUR='red';
var AG_DEFAULT_FILL_OPACITY=.5;
var AG_DEFAULT_VECTOR_OPTIONS=new _gh(AG_DEFAULT_LINE_COLOUR,_ev,_eu,AG_DEFAULT_FILL_COLOUR,AG_DEFAULT_FILL_OPACITY);
var _uu=20;
var AG_DEFAULT_ZOOMBAR_NO=1;
var AG_TOTAL_NO_OF_ZOOMBAR=8;
var _eR={TOP_RIGHT:0,TOP_LEFT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3
};
var _el=new _f2(150,20);
var AG_DEFAULT_CONTEXT_MENU_ITEM_BG_COLOUR="#C6C68C";
var AG_DEFAULT_CONTEXT_MENU_ITEM_SELECTION_BG_COLOUR="white";
var AG_DEFAULT_CONTEXT_MENU_ITEM_TEXT_COLOUR="black";
var AG_DEFAULT_CONTEXT_MENU_ITEM_SELECTION_TEXT_COLOUR="red";
var _eg="arial";
var _eh=10;
var _ei="normal";
var _ej="normal";
var _ef=2;
var _ee="solid";
var AG_DEFAULT_CONTEXT_MENU_ITEM_BORDER_COLOUR="#6A6A36";
var AG_DEFAULT_CONTEXT_MENU_ITEM_ICON_COLOUR="#E0E0E0";
var AG_DEFAULT_DISABLE_MENU_ITEM_TEXT_COLOUR="gray";
var _ek=20;
var _em=5;
var _en=0;
var _eo=new _eZ(
_el,AG_DEFAULT_CONTEXT_MENU_ITEM_BG_COLOUR,AG_DEFAULT_CONTEXT_MENU_ITEM_SELECTION_BG_COLOUR,AG_DEFAULT_CONTEXT_MENU_ITEM_TEXT_COLOUR,AG_DEFAULT_CONTEXT_MENU_ITEM_SELECTION_TEXT_COLOUR,_eg,_eh,_ei,_ej,_ef,_ee,AG_DEFAULT_CONTEXT_MENU_ITEM_BORDER_COLOUR,AG_DEFAULT_CONTEXT_MENU_ITEM_ICON_COLOUR,AG_DEFAULT_DISABLE_MENU_ITEM_TEXT_COLOUR,_ek,_em,_en);
var _er=2;
var AG_DEFAULT_DRAG_ZOOM_MARKER_BORDER_COLOUR="blue";
var _eq="dotted";
var AG_DEFAULT_DRAG_ZOOM_MARKER_BG_COLOUR="#00C3F5";
var _es=0.5;
var _et=new _fb();
var AG_DEFAULT_INFO_DISPLAY_SIZE=new _f2(150,150);
var AG_DEFAULT_INFO_DISPLAY_OPACITY=1;
var _ed=20;
var AG_DEFAULT_INFO_DISPLAY_BORDER_WIDTH=1;
var AG_DEFAULT_BUBBLE_BORDER_COLOUR="#9F9F9F";
var AG_INFO_DISPLAY_BACKGROUND_IMG=API_HOST_URL+"Images/bubbleSprite.gif";
var AG_INFO_DISPLAY_SHADOW_IMG=API_HOST_URL+"Images/shadow.png";
var AG_DEFAULT_INFO_DISPLAY_MAX_SIZE=new _f2(350,350);
var AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT=new _f2(20,20);
var AG_DEFAULT_PANEL_ACTIVE_STYLE={'background-color' : '#F8F8F8','color' : 'black','border-width' : '1px','border-style' : 'solid','border-color' : '#6A6A36','padding' : '1px','font-weight' : 'bold','fontStyle' : 'normal','font-size' : '10pt'
};
var AG_DEFAULT_PANEL_INACTIVE_STYLE={'background-color' : '#E4E6E5','color' : 'black','border-width' : '1px','border-style' : 'solid','border-color' : '#6A6A36','padding' : '0px','font-weight' : 'normal','fontStyle' : 'italic','font-size' : '10pt'
};
var AG_COORD_PRECISION_AMOUNT=6;
var AG_DEFAULT_BLOWUP_SIZE=new _f2(150,150);
var AG_DEFAULT_BLOWUP_ZOOM_LEVEL=5;
var _fL={DEFAULT:0,DRAG:1
};
var _eL=new _f2(128,128);
var _eM=3;
var AG_CLOSE_IMG_URL=API_HOST_URL+"Images/btn_close.png";
var _eE=API_HOST_URL+"Images/btn_maximize.png";
var _eB=API_HOST_URL+"Images/btn_disabled_maximize.JPG";
var _eF=API_HOST_URL+"Images/btn_minimize.png";
var _eC=API_HOST_URL+"Images/btn_disabled_minimize.JPG";
var _eO=new _f2(40,40);
var _eP=40;
var _eD=API_HOST_URL+"Images/dummy3.png";
var AG_PAN_ANIMATION_DURATION=1;
var AG_PAN_ANIMATION_DISTANCE_AMOUNT=new _fM(5,5);
var AG_PAN_ANIMATION_UNIT_CALLING=10;
var AG_PAN_MARGIN=new _fM(10,10);
var AG_CROSS_HAIR_IMAGE=API_HOST_URL+"/Images/crossHair.GIF";
var AG_CROSS_HAIR_SIZE=new _f2(14,14);
var _fv={MAIN_MAP:0,OVERVIEW_MAP:1,ENLARGED_MAP:2,IMAGERY_MAP:3,NORMAL_MAP:4
};
var AG_DRAGGABLE_CURSOR="pointer";
var AG_DRAGGING_CURSOR="pointer";
var AG_STATIC_CURSOR="default";
var AG_DRAG_ZOOM_CURSOR="crosshair";
var AG_OVERVIEW_MAP_CURSOR="default";
var AG_OVERVIEW_VIEWPORT_CURSOR="pointer";
var AG_DEFAULT_BOUNCE_GRAVITY=1;
var AG_BOUNCE_AMOUNT=15;
var AG_BOUNCE_DURATION=15 

var AG_DEFAULT_DIRECTION_OPTIONS=new _e7(_ge.DRIVE,_gf.KILOMETERS,_fW.FASTEST,false,false,false);
var AGPanes=_fK;
var AGOperations=_fD;
var AGAnchor=_eR;
var AGTravelMethods=_ge;
var AGUnits=_gf;
var AGRoutePreferences=_fW;
var AG_COPYRIGHT_HANDLER_URL=API_GATEWAY_URL+"Copyright.ashx";
var AG_BG_COLOUR="White";
var AG_BG_SELECTED_COLUOR="Yellow";
var AG_MS_REFRESH_RATE=50;
var AG_TMS_MARKER_PREFIX="TMS";
var AG_DMS_MARKER_PREFIX="DMS";
var AG_SUCCESS_REQ_LOG_COUNT=10;
var AG_TRAFFIC_RATE_LOG_COUNT=50;


//End Configuration

var AG_MAP_OBJECTS=new Array();var AG_MAP_INDEX=-1;function _fs(_px,_pT){if(typeof _px=="undefined"||_px==null)
throw "Invalid Map Container.";_px.innerHTML="";this._br=++AG_MAP_INDEX;AG_MAP_OBJECTS[this._br]=this;if(this._br==0){_eS.validate();_fx._nW(_eS.key);_f1('Alt+Ctrl+Shift+J',_fc.show);}
if(_pT instanceof _fu){this._cO=_pT;if(_pT.backgroundColour!=null)
_px.style.backgroundColor=_pT.backgroundColour;}
else this._cO=new _fu();this._ct=_px;this._cK=null;this._o=new Array();this._f=new Array();this._oCrossHairControl=null;this._ck=null;this._dd=null;this._cA=new _fh();this._dh=null;this._oBoundingBoxMap=null;this._c5=new _fM(0,0);this._G=false;this._y=true;this._A=true;this._B=false;this._bContiniousZoomEnabled=false;this._J=true;this._x=true;this._b0=null;this._dc=new _fX();this._D=false;this._cT=null;this._cQ=null;this._bEnableDraggingRoute=false;this._cu=null;this._bPanAnimationEnabled=false;this._bx=_eI;this._bD=1;this._oInfoDisplay=null;this._oCurrentInfoDisplayOptions=null;this._bInfoDisplayEnabled=true;this._oInfoDisplayPanelOptions=null;this.oCoordSavedCenter=null;this._q3=null;this._bu=_fv.MAIN_MAP;this._dp=null;this._dq=null;this._cD=null;this._F=false;this._U=null;this._strFeatureInfoParam="";this._oDMSRegusteManager=null;this._dataSetCopyRightManager=null;this._i4=function(){this._A=true;this.setCursor();};this._ia=function(){this._A=false;this.setCursor();};this._iJ=function(){if(!this._iK())
return this._A;return false;};this._i5=function(){this._B=true;};this._ib=function(){this._B=false;};this._iK=function(){return this._B;};this.enableContinuousZoom=function(){this._bContiniousZoomEnabled=true;};this.disableContinuousZoom=function(){this._bContiniousZoomEnabled=false;};this.continuousZoomEnabled=function(){return this._bContiniousZoomEnabled;};this._jc=function(){this._y=true;};this._ij=function(){this._y=false;};this._uS=function(){return this._y;};this._ja=function(){this._J=true;};this._ig=function(){this._J=false;};this._oi=function(){return this._J;};this._i2=function(){this._x=true;};this._h8=function(){this._x=false;};this._hH=function(){return this._x;};this._d3=function(_o7,_o8){if(typeof _o7=="undefined"||_o7==null)
throw "Invalid _hI input.";if(!(_o8 instanceof _e1))
_o8=_o7.getDefaultPosition();if(this._ks(_o7)>=0)
this._rT(_o7);_o7.initialize(this,_o8);this._f.push(_o7);};this._rT=function(_hI){if(_hI==null||typeof _hI=="undefined")
throw "Invalid _hI input";var _mh=this._f.length;for(var i=0;i<_mh;i++)
if(this._f[i]==_hI){this._f.splice(i,1);_hI.remove();}};this._j6=function(){return this._cK._cf;};this._nk=function(){return this._G;};this._kY=function(){return this._dh;};this._j3=function(){return this._jZ()._j3();};this._jZ=function(){return this._oBoundingBoxMap;};this._sn=function(_oR){this._oBoundingBoxMap=_oR;};this.requestCopyright=function(_oR){if(this._cO.showCopyright){var bbox=_oR._k0().longitude()+","+_oR._k0()._nP()+","+_oR._kG().longitude()+","+_oR._kG()._nP();var dataSet=this.getCopyRightDataSetManager().getDatSet();if(this._cO.showCopyright)
_gg.getCopyright(bbox,this._lm(),this._F,dataSet,"AG_MAP_OBJECTS["+this._br+"].callbackCopyright");}}
this._j0=function(_oK){if(!(_oK instanceof _eT))
throw "Invalid BoundingBox";var _q7=this._kY();for(var i=this._bx;i>=this._bD;i--){var _oR=_e3.getBoundingBoxForZoom(_oK._j3(),i,_q7);if(_oR._hB(_oK))
return i;}
return this._bD;};this._lm=function(){return this._bW;};this._sT=function(_nN){this._bW=_nN;};this._sU=function(_og,_oa){if(_oa>_eI)
throw 'Invalid zoom level';if(_og<1)
throw 'Invalid zoom level';var _lT=this._lm();if(_lT>0&&(_lT<_og||_lT>_oa)) 
 throw "Zoom range does not contain current zoom level."
this._bx=_oa;this._bD=_og;};this._kF=function(){return this._bD;};this._kE=function(){return this._bx;};this._uR=function(){var _lU=this._lm();if(_lU>=this._bx)
return;var oCenterPointCoord=this._j3();this._hr(oCenterPointCoord,_lU+1);};this._uT=function(){var _lU=this._lm();if(_lU<=this._bD)
return;var oCenterPointCoord=this._j3();this._hr(oCenterPointCoord,_lU-1 );};this.getCopyRightDataSetManager=function(){if(!this._dataSetCopyRightManager instanceof AGCopyrightDataSetManager)
this._dataSetCopyRightManager=new AGCopyrightDataSetManager();return this._dataSetCopyRightManager;}
this._hr=function(_pc,_nN){this._ih();if(_pc==null||!(_pc instanceof _e2))
throw "Invalid centre input.";if(typeof _nN!="number"||_nN<this._bD||_nN>this._bx||_nN!=parseInt(_nN))
throw "Invalid zoom level input.";var _mY=this._lm();if(_mY==_nN){var _qI=this._kP(this._j3());var _qF=this._kP(_pc);var _qJ=new _fM(Math.round(_qI.x-_qF.x),Math.round(_qI.y-_qF.y) );if(this.continuousZoomEnabled())
this._rF(_qJ.x,_qJ.y);else this._rG(_qJ);}
else {if(!this._G){this._mC();}
var _q7=this._kY();var _oK=_e3.getBoundingBoxForZoom(_pc,_nN,_q7);this._sT(_nN);this._sn(_oK);this._dataSetCopyRightManager=new AGCopyrightDataSetManager();var _qA=new _fM(0,0);this._sA(_qA)
this._c5=_qA;this._lr(_fD.ZOOM);this._lq(_fD.ZOOM);if(!this._G){if(this._cO.loadInitialMap){switch(AG_INITIAL_MAP_TYPE){case AGInitialMapType.DEFAULT:
this._sV();break;case AGInitialMapType.DEFAULT_WITH_IMAGERY:
this._sW();this._sZ();break;}}
this._dd=new _fY();var _qW=new _e1(new _fM(10,10),_eR.BOTTOM_LEFT);this._d3(this._dd,_qW);this._ku();this._G=true;_fw.getPeriodicAdvert(this._br);_fd.trigger(this,"onload");}
_fd.trigger(this,"onmoveend");_fd.trigger(this,"onzoomend",_mY,_nN);this.requestCopyright(this._jZ());}};this.callbackCopyright=function(data){if(this._ck!=null)
this._ck.resetCopyrightString(data);}
this._rI=function(_pc){if(_pc==null||!(_pc instanceof _e2))
throw "Invalid input for centre.";var _qI=this._kP(this._j3());var _qF=this._kP(_pc);var _qJ=new _fM(Math.round(_qI.x-_qF.x),Math.round(_qI.y-_qF.y) );this._rG(_qJ);};this._rG=function(_qt){this._ih();if(_qt==null||!(_qt instanceof _fM))
throw "Invalid input for _ik.";this._sF(_fL.DEFAULT);this._oj(_qt);this._lr(_fD.PAN);this._lq(_fD.PAN);this.requestCopyright(this._jZ());};this._rH=function(_iZ,_i0){if( !(_iZ==1||_iZ==-1||_i0==1||_i0==-1) )
throw "_iZ and _i0 must be either 1 or-1.";var _q5=this._kY();var _qJ=new _fM(Math.round(_iZ*_q5.width/2),Math.round( _i0*_q5.height/2));this._rG(_qJ);};this._rF=function(x,y){var _rJ=Math.round(Math.abs(x)/AG_PAN_ANIMATION_UNIT_CALLING);if(_rJ<AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_rJ=AG_PAN_ANIMATION_DISTANCE_AMOUNT.x;var _rK=Math.floor(Math.abs(y)/AG_PAN_ANIMATION_UNIT_CALLING);if(_rK<AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_rK=AG_PAN_ANIMATION_DISTANCE_AMOUNT.y;AG_PAN_ANIMATION_DISTANCE_AMOUNT=new _fM(_rJ,_rK);this._jb();_fJ.smoothPan(this._br,x,y);};this._jb=function(){this._bPanAnimationEnabled=true;};this._ih=function(){this._bPanAnimationEnabled=false;};this.isEnabledPanAnimation=function(){return this._bPanAnimationEnabled;};this._sh=function(){this.oCoordSavedCenter=this._j3();this._q3=this._lm();};this._n0=function(){if(this.oCoordSavedCenter==null||this._q3<1)
throw "No saved position.";this._hr(this.oCoordSavedCenter,this._q3);};this._d8=function(_p7,_tM,_g5){if(typeof _p7=="undefined"||_p7==null)
throw "Invalid input for overlay.";if(typeof _tM=='string')
_p7.groupName=_tM;else _p7.groupName=null;if(typeof _g5=='boolean')
_p7.excludeFromClearOverlay=_g5;else _p7.excludeFromClearOverlay=false;var _my=this._kt(_p7);if(_my>=0)
this._r2(_p7);this._o.push(_p7);try
{_p7.initialize(this);}
catch(err){}
_fd.trigger(this,"onoverlayadded",_p7);};this._rW=function(_tM){if(typeof _tM!='string')
throw "Invalid group name";for(var i=0;i<this._o.length;i++){try
{if(this._o[i].groupName==_tM){this._o[i].remove();this._o.splice(i,1);i--;}}
catch(err){}}
_fd.trigger(this,"onoverlaygroupremoved",_tM);};this._r2=function(_p7){var _my=this._kt(_p7);if(_my>=0){this._o.splice(_my,1);try
{_p7.remove();}
catch(err){}
_fd.trigger(this,"onoverlayremoved",_p7);}};this._kt=function(_p7){var _mh=this._o.length;for(var i=0;i<_mh;i++)
if(this._o[i]==_p7)
return i;return-1;};this._ks=function(_o7){var _mh=this._f.length;for(var i=0;i<_mh;i++)
if(this._f[i]==_o7)
return i;return-1;};this._hw=function(){var _gN=new Array();for(var i=0;i<this._o.length;i++){var _p7=this._o[i];if(!_p7.excludeFromClearOverlay){try
{_p7.remove();}
catch(err){}}
else _gN.push(_p7);}
this._o=_gN;_fd.trigger(this,"onoverlayscleared");};this._kK=function(_mR){switch(_mR){case _fK.IMAGERY_PANE:
return(this._cK._cE);case _fK.MAP_PANE:
return(this._cK._cP);case _fK.OVERLAY_PANE:
return(this._cK._c0);case _fK.MARKER_SHADOW_PANE:
return(this._cK._cS);case _fK.MARKER_PANE:
return(this._cK._cR);case _fK.FLOAT_SHADOW_PANE:
return(this._cK._cy);case _fK.STATIC_PANE:
return(this._cK._oStaticPane);case _fK.MOUSE_TARGET_PANE:
return(this._cK._cV);case _fK.FLOAT_PANE:
return(this._cK._cx);case _fK.MAP_CONTAINER:
return this._cK._cL;}
return null;};this._i6=function(){this._bInfoDisplayEnabled=true;};this._ic=function(){this._bInfoDisplayEnabled=false;var _pL=this._ku();_pL.hide();};this.infoDisplayEnabled=function(){return this._bInfoDisplayEnabled;};this._sr=function(_po){if(_po==null||!(_po instanceof _fp))
throw "Invalid input for InfoWindowOptions.";this._oCurrentInfoDisplayOptions=_po;};this._kd=function(){if(this._oCurrentInfoDisplayOptions==null)
this._oCurrentInfoDisplayOptions=new _fp();return this._oCurrentInfoDisplayOptions;};this._qd=function(_o9,_p0,_qX){if( _o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";if(typeof _p0!="object")
throw "Invalid input for node.";this._qe(_o9,_p0,_qX);};this._qf=function(_o9,_tP,_qX){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";if(typeof _tP!="string")
throw "Invalid input for node.";this._qe(_o9,_tP,_qX);};this._qe=function(_o9,content,_qX){if(this._bInfoDisplayEnabled){if(_qX!=null&&(_qX instanceof _fp))
this._sr(_qX);else {this._oCurrentInfoDisplayOptions=new _fp();} 
var _pL=this._ku();var _po=this._kd();var arrPanel=new Array();arrPanel.push(new _fq(null,content));_pL.reset(_o9,arrPanel,new _f2(_po.width,_po.height),_po.pixelOffset,_po.selectedPanel)
}
else return;};this._qh=function(_o9,_gE,_qX){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";if(_gE==null||typeof _gE!="object")
throw "Invalid input for panels.";this._qg(_o9,_gE,_qX);};this._qi=function(_o9,_gE,_qX){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";if(_gE==null||typeof _gE!="object")
throw "Invalid input for panels.";this._qg(_o9,_gE,_qX);};this._qg=function(_o9,_gE,_qX){if(this._bInfoDisplayEnabled){if(_qX!=null&&(_qX instanceof _fp))
this._sr(_qX);else {this._oCurrentInfoDisplayOptions=new _fp();} 
var _pL=this._ku();var _po=this._kd();_pL.reset(_o9,_gE,new _f2(_po.width,_po.height),_po.pixelOffset,_po.selectedPanel)
this._oInfoDisplayPanelOptions=null;}
else return;};this.updateInfoDisplay=function(_gE,optOnUpdate){if(this._bInfoDisplayEnabled){var _pL=this._ku();_pL.updateDisplayContent(_gE);}};this.updateActivePanel=function(fnModifier,optOnUpdate){};this._sY=function(_o9,_qX){if( _o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";var _io=document.createElement('div');_io.style.border="solid 1px black";_io.style.width=AG_DEFAULT_BLOWUP_SIZE.width-2+"px";_io.style.height=AG_DEFAULT_BLOWUP_SIZE.height-2+"px";var arrPanel=new Array();arrPanel.push(new _fq(null,_io));var _pL=this._ku();_pL.reset(_o9,arrPanel,AG_DEFAULT_BLOWUP_SIZE);var _pT=new _fu(null,null,null,null,false)
var _pQ=new _fs(_io,_pT);_pQ._sC(_fv.ENLARGED_MAP);if(_qX!=null&&_qX instanceof _fp)
_pQ._hr(_o9,_qX.zoomLevel);else _pQ._hr(_o9,AG_DEFAULT_BLOWUP_ZOOM_LEVEL);_pQ._h8();_pQ._ig();_pQ._rU();_pQ._r4();};this._hz=function(){var _pL=this._ku();_pL.hide();};this._ku=function(){if(this._oInfoDisplay==null){this._oInfoDisplay=new _fn();this._d8(this._oInfoDisplay,null,true);}
return this._oInfoDisplay;};this.getInfoDisplayPanelOptions=function(){if(this._oInfoDisplayPanelOptions==null)
this._oInfoDisplayPanelOptions=new AGInfoDisplayPanelOptions();return this._oInfoDisplayPanelOptions;};this.setInfoDisplayPanelOptions=function(oInfoDisplayPanelOption){if((oInfoDisplayPanelOption!=null)&&(oInfoDisplayPanelOption instanceof AGInfoDisplayPanelOptions))
this._oInfoDisplayPanelOptions=oInfoDisplayPanelOption;};this._ka=function(_rL){if( _rL==null||!(_rL instanceof _fM))
throw "Invalid input for _rL.";var _oA=this._kB();_oA=new _fM(_oA.x+_rL.x,_oA.y+_rL.y);return this._kb(_oA);};this._kP=function(_o9){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";var _oA=this._kQ(_o9);var _oB=this._kB();return new _fM(_oA.x-_oB.x,_oA.y-_oB.y);};this._kQ=function(_o9){if( _o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";var dLat=_o9._nP();var dLong=_o9.longitude();var _oX=this._jZ();var _nR=_oX._kH();var _sf=_oX._kZ();var _iz=parseFloat(_nR._nP()-_sf._nP());var _iC=parseFloat(_sf.longitude()-_nR.longitude());var _iw=this._kY();var width=_iw.width;var height=_iw.height;var x=Math.round((width*((dLong-_nR.longitude())) / _iC));var y=Math.round((height*((_nR._nP()-dLat)) /_iz ));return new _fM(x,y);};this._kb=function(_rL){if(_rL==null||!(_rL instanceof _fM))
throw "Invalid input for _rL.";var _oX=this._jZ();var _nR=_oX._kH();var _sf=_oX._kZ();var _iz=Math.abs(_nR._nP()-_sf._nP());var _iC=Math.abs(_sf.longitude()-_nR.longitude());var _iw=this._kY();var width=_iw.width;var height=_iw.height;var _om=_nR.longitude()+(_iC*_rL.x / width);var _ol=_nR._nP()-(_iz*_rL.y / height);return new _e2(_ol,_om);};this._mC=function(){this._cK=new _ft(this._ct,this._kC());var _im=this._j6();this._dh=new _f2(_im.offsetWidth,_im.offsetHeight);var _py=this._kK(_fK.MOUSE_TARGET_PANE);_py=$(_py);_py.bind("dblclick",this,_fB.doubleClickHandler);_py.bind("mousedown",this,_fB.mouseDownHandler);_py.bind("mousemove",this,_fB.mouseMoveHandler);_py.bind("mouseup",this,_fB.mouseUpHandler);_py.bind("click",this,_fB.clickHandler);_py.bind("mouseover",this,_fB.mouseOverHandler);_py.bind("mouseout",this,_fB.mouseOutHandler);if(_eU._hg=="Firefox")
_py.bind("DOMMouseScroll",this,_fB.mouseScrollHandler);else _py.bind("mousewheel",this,_fB.mouseScrollHandler);this._ck=new _e4("");var _qW=new _e1(new _fM(10,10),_eR.BOTTOM_RIGHT);this._d3(this._ck,_qW);if(this._cO instanceof _fu&&this._cO.showCrossHair){this._oCrossHairControl=new AGCrossHair(AG_CROSS_HAIR_IMAGE,AG_CROSS_HAIR_SIZE);var oCtrlPositionCrossHair=new _e1( new _fM(0,0),_eR.TOP_LEFT);this._d3(this._oCrossHairControl,oCtrlPositionCrossHair);}
var _ow=new _eX("Start",_e5._sE,API_HOST_URL+"/Images/start.png");var _ov=new _eX("End",_e5._ss,API_HOST_URL+"/Images/stop.png");var _ou=new _eX("Clear",_e5.removeRoute,API_HOST_URL+"/Images/clear.png");var oAGContextMenuItemCoord=new _eX("Latitude-Longitude",_e5.showCoord);var _gn=new Array(_ow,_ov,_ou,oAGContextMenuItemCoord);var _ot=new _eW(_gn);this._sp(_ot);this.setCursor();};this._kB=function(){return this._c5;};this._sA=function(_qk){var _px=this._kK(_fK.MAP_CONTAINER);_px.style.left=_qk.x+"px";_px.style.top=_qk.y+"px";var _py=this._kK(_fK.MOUSE_TARGET_PANE);_py.style.left=-_qk.x+"px";_py.style.top=-_qk.y+"px";var oDivStaticPane=this._kK(_fK.STATIC_PANE);oDivStaticPane.style.top=-_qk.y+"px";oDivStaticPane.style.left=-_qk.x+"px";var oDivToolTipPane=this.getToolTipDiv();oDivToolTipPane.style.top=-_qk.y+"px";oDivToolTipPane.style.left=-_qk.x+"px";};this._oj=function(_qE){_fd.trigger(this,"onmove");var _mV=this._c5.x+_qE.x;var _mW=this._c5.y+_qE.y;var _qL=new _fM(_mV,_mW);this._sA(_qL);this._c5=_qL;var oBoundingBoxCurrent=this._jZ();var _q7=this._kY();this._sn(_e3.getBoundingBoxForPan(oBoundingBoxCurrent,_q7,_qE));};this._lr=function(_mQ){for(var i=0;i<this._o.length;i++){try
{this._o[i].redraw(_mQ);}
catch(err){}}
};this._lq=function(_mQ){for(var i=0;i<this._f.length;i++){try
{this._f[i].redraw(_mQ);}
catch(err){}}
};this._r9=function(){var _rb=this._dh;var oBoundingBoxOld=this._jZ();this._cK._r9(this._kC()==_fv.MAIN_MAP);var _im=this._j6();var _q9=new _f2(_im.offsetWidth,_im.offsetHeight);this._dh=_q9;var oBoundingBoxNew=_e3.getBoundingBoxForResize(oBoundingBoxOld,_rb,_q9);var _oK=_e3.getBoundingBoxForZoom(oBoundingBoxNew._j3(),this._lm(),_q9);this._sn(_oK);this._hr(oBoundingBoxNew._j3(),this._lm());if(this._oCrossHairControl!=null)
this._oCrossHairControl.setCrossHairPosition();if(this._dd!=null)
this._dd._r9();if(this._ck!=null)
this._ck._r9();};this._sp=function(_oy){if(typeof _oy!="object"||_oy==null)
throw "Invalid input for context menu.";if(this._hH()){if(this._b0!=null)
this._b0.remove();this._b0=_oy;try
{this._b0.initialize(this);}
catch(err){}}
else return false;};this._j8=function(){return this._b0;};this._sL=function(_ph){this._ih();if( _ph==null||!(_ph instanceof _e2))
throw "Invalid input for origin _nP-longitude.";this._dc._sE(_ph);};this._sK=function(_pe){this._ih();if( _pe==null||!(_pe instanceof _e2))
throw "Invalid input for destination _nP-longitude.";this._dc._ss(_pe);};this._sM=function(_gx){this._ih();if(typeof _gx=="undefined"||_gx==null||typeof _gx.length=="undefined")
throw "Invalid input for via points.";this._dc._sR(_gx);};this._kW=function(){return this._dc;};this._iO=function(){this._dc._iO(this);this._r2(this._cT);this._cT=null;this._r2(this._cQ);this._cQ=null;};this._hx=function(){this._dc.clear();this._r2(this._cT);this._cT=null;this._r2(this._cQ);this._cQ=null;};this._sw=function(_pw){this._dc._sw(_pw);};this._sx=function(_tw){this._dc._sx(_tw);};this._nX=function(){this._dc._nX();};this._kg=function(){if(this._cu==null){this._cu=new _fa();this._d8(this._cu);}
return this._cu;};this._sv=function(_pA){if( _pA==null||!(_pA instanceof _fa))
throw "invalid parameter in setDragZoomMarker function.";if( this._cu!=null&&this._cu instanceof _fa){this._r2(this._cu);}
this._cu=_pA;this._d8(this._cu);};this._d9=function(_p7){var _gG=_p7._j5();var _gA=_fi.getKeysForRegion(_gG);for(var i=0;i<_gA.length;i++)
this._cA._d5(_gA[i],_p7);};this._r3=function(_p7){var _gG=_p7._j5();if(_gG!=null){var _gA=_fi.getKeysForRegion(_gG);for(var i=0;i<_gA.length;i++)
this._cA._rY(_gA[i],_p7);}};this._j4=function(_qk){var _tO=_fi.getClickMappingKeyForPosition(_qk);if(this._cA._lu(_tO)){var _gD=this._cA._kw(_tO);for(var i=_gD.length-1;i>=0;i--){var _p7=_gD[i];var _gG=_p7._j5();if(_gG==null)
return null;if(this._nl(_gG,_qk))
return _p7;}}
return null;};this._nl=function(_gG,_qk){return _gg.insidePixelRegion(_gG,_qk);};this._rU=function(){if(this._ck instanceof _e4)
this._rT(this._ck);this._ck=null;};this._r4=function(){if(this._dd instanceof _fY)
this._rT(this._dd);this._dd=null;};this._sF=function(_nm){this._mS=_nm;};this._kM=function(){return this._mS;};this._ll=function(){return this._cK._ll();};this.getToolTipDiv=function(){return this._cK.getToolTipDiv();};this._sZ=function(){if(this._cD==null){var _oF=new _ga(AG_IMAGERY_TMS_OPTIONS);this._cD=new _f7(1,_oF)
this._cD._sC(_fv.IMAGERY_MAP);this._d8(this._cD,null,true);}
else this._cD.show();this._ck.setForeColor("White");this._dd.setColour("White");this._F=true;};this._lz=function(){if(this._cD!=null){this._cD.hide();this._F=false;}
this._ck.setForeColor("Black");this._dd.setColour("Black");};this._rX=function(){if(this._cD!=null){this._r2(this._cD);this._cD=null;this._F=false;}};this._nh=function(){return this._F;};this._hu=function(){for(var i=0;i<this._o.length;i++){if(this._o[i] instanceof _f7)
this._o[i]._hu();}};this._sC=function(_jd){this._bu=_jd;};this._kC=function(){return this._bu;};this._jW=function(){return this._cK._dg;};this._jV=function(){return this._cK._bZ;};this._jU=function(){return this._cK._bY;};this._sD=function(_tS,_t4){if(_fx.status&&this._kC()==_fv.MAIN_MAP){var _l7=this._jW().width;var _l6=this._jW().height;var _or=this._jU();var _oq=this._jV();_or.src=_tS;_oq.link=_t4;}};this._h4=function(){for(var i=0;i<this._o.length;i++){var _p7=this._o[i];try
{_p7.remove();}
catch(err){}}
AG_MAP_OBJECTS[this._br]=null;this._cO=null;this._ct.innerHTML="";this._cK=null;this._o=new Array();this._f=null;this._ck=null;this._dd=null;this._cA=null;this._dh=null;this._oBoundingBoxMap=null;this._c5=null;this._b0=null;this._dc=null;this._cT=null;this._cQ=null;this._cu=null;this._bx=-1;this._bD=-1;this._oInfoDisplay=null;this._oCurrentInfoDisplayOptions=null;this._bInfoDisplayEnabled=true;this.oCoordSavedCenter=null;this._q3=null;this._sn(new _eT(new _e2(-1,-1),new _e2(-1,-1)));};this._sX=function(){if(this._bu==_fv.MAIN_MAP){if(this._U==null){this._U=document.createElement('div');this._U.style.position="absolute";this._U.style.backgroundColor="#D6E9F8";this._U.style.width="100%";this._U.style.height="100%";this._U.style.textAlign="center";this._U.style.zIndex="999999";this._U.style.overflow="auto";this._U.innerHTML+="JavaScriptAPI v "+AG_API_VERSION+"<br/>";this._U.innerHTML+="Developed by :<br/>";this._U.innerHTML+="Ashis Saha<br/>";this._U.innerHTML+="Iaan Roux<br/>";this._U.innerHTML+="Ranada Proshad Biswas<br/>";this._U.innerHTML+="Rezaul Hasan<br/>";this._U.innerHTML+="Shuvabrata Saha<br/>";this._U.innerHTML+="<br/>Thanks for using JavaScriptAPI. Press any key to return ... ";this._U.style.border="1px solid Black";this._U.style.visibility="visible";}
var _im=this._j6();_im.appendChild(this._U);}};this._ly=function(){if(this._bu==_fv.MAIN_MAP){if(this._U!=null&&this._U.parentNode)
this._U.parentNode.removeChild(this._U);}};this.setDraggableCursor=function(strCursor){if(this._cO!=null&&this._cO instanceof _fu){if(typeof strCursor=="string"&&strCursor.length>0)
this._cO.draggableCursor=strCursor;}};this.setDraggingCursor=function(strCursor){if(this._cO!=null&&this._cO instanceof _fu){if(typeof strCursor=="string"&&strCursor.length>0)
this._cO.draggingCursor=strCursor;}};this.setStaticCursor=function(strCursor){if(this._cO!=null&&this._cO instanceof _fu){if(typeof strCursor=="string"&&strCursor.length>0)
this._cO.staticCursor=strCursor;}};this.setCursor=function(){var oMouseTargetPane=this._kK(_fK.MOUSE_TARGET_PANE);if(this._iK()){oMouseTargetPane.style.cursor=AG_DRAG_ZOOM_CURSOR;}
else {if(this._iJ())
oMouseTargetPane.style.cursor=this._cO.draggableCursor;else oMouseTargetPane.style.cursor=this._cO.staticCursor;}}
this._sV=function(){if(this._dp==null){switch(AG_DEFAULT_MS_TYPE){case AGMapServerType.DMS:
if(this._oDMSRegusteManager==null)
this._oDMSRegusteManager=new _e9(AG_DEFAULT_DMS_OPTION);this._dp=new _f7(1,this._oDMSRegusteManager)
this._d8(this._dp,null,true);break;case AGMapServerType.TMS:
var _oF=new _ga(AG_DEFAULT_TMS_OPTIONS);this._dp=new _f7(1,_oF)
this._d8(this._dp,null,true);break;}}
else this._dp.show();};this._lw=function(){if(this._dp!=null)
this._dp.hide();};this._m7=function(){if(this._dp!=null)
return this._dp._np();return false;};this._sW=function(){if(this._dq==null){switch(AG_DEFAULT_MS_TYPE_FOR_IMAGERY){case AGMapServerType.DMS:
var _oF=new _e9(AG_DEFAULT_DMS_OPTIONS_FOR_IMAGERY);this._dq=new _f7(2,_oF)
this._d8(this._dq,null,true);break;case AGMapServerType.TMS:
var _oF=new _ga(AG_DEFAULT_TMS_OPTIONS_FOR_IMAGERY);this._dq=new _f7(2,_oF)
this._d8(this._dq,null,true);break;}}
else this._dq.show();};this._lx=function(){if(this._dq!=null)
this._dq.hide();};this._m6=function(){if(this._dq!=null)
return this._dq._np();return false;};this.showScaleBar=function(){if(this._dd instanceof _fY)
this._dd.show();};this.hideScaleBar=function(){if(this._dd instanceof _fY)
this._dd.hide();};this.enableDraggingRoute=function(){this._bEnableDraggingRoute=true;};this.disableDraggingRoute=function(){this._bEnableDraggingRoute=false;};this.enabledDraggingRoute=function(){return this._bEnableDraggingRoute;};this.setFeatureSelectionParam=function(strParams){if(typeof strParams=="string"&&strParams.length>0){this._strFeatureInfoParam=strParams;if(this._oDMSRegusteManager==null)
this._oDMSRegusteManager=new _e9(AG_DEFAULT_DMS_OPTION);this._oDMSRegusteManager.setFeatureSelectionParam(this._strFeatureInfoParam);}};this.getFeatureSelectionParam=function(){return this._strFeatureInfoParam;};this.clearFeatureSelectionParam=function(){this._strFeatureInfoParam="";if(this._oDMSRegusteManager==null)
this._oDMSRegusteManager=new _e9(AG_DEFAULT_DMS_OPTION);this._oDMSRegusteManager.clearFeatureSelectionParam();};this.enableDragPan=this._i4;this.disableDragPan=this._ia;this.dragPanEnabled=this._iJ;this.enableDragZoom=this._i5;this.disableDragZoom=this._ib;this.dragZoomEnabled=this._iK;this.enableZoomOnDblClick=this._jc;this.disableZoomOnDblClick=this._ij;this.zoomOnDblClickEnabled=this._uS;this.enableMouseWheelZoom=this._ja;this.disableMouseWheelZoom=this._ig;this.mouseWheelZoomEnabled=this._oi;this.enableContextMenu=this._i2;this.disableContextMenu=this._h8;this.contextMenuEnabled=this._hH;this.addControl=this._d3;this.removeControl=this._rT;this.getContainer=this._j6;this.isLoaded=this._nk;this.getSize=this._kY;this.getCentre=this._j3;this.getBoundingBox=this._jZ;this.getBoundingBoxZoomLevel=this._j0;this.getZoomLevel=this._lm;this.setZoomRange=this._sU;this.getMinZoomLevel=this._kF;this.getMaxZoomLevel=this._kE;this.zoomIn=this._uR;this.zoomOut=this._uT;this.centreAndScale=this._hr;this.panToCoord=this._rI;this.panBy=this._rG;this.panDirection=this._rH;this.saveState=this._sh;this.loadState=this._n0;this.addOverlay=this._d8;this.removeGroupOverlay=this._rW;this.removeOverlay=this._r2;this.getPane=this._kK;this.enableInfoDisplay=this._i6;this.disableInfoDisplay=this._ic;this.infoDisplayEnabled=this.infoDisplayEnabled;this.openInfoDisplay=this._qd;this.openInfoDisplayHTML=this._qf;this.openInfoDisplayPanels=this._qh;this.openInfoDisplayPanelsHTML=this._qi;this.showEnlargedMap=this._sY;this.closeInfoDisplay=this._hz;this.getInfoDisplay=this._ku;this.getCoordFromMap=this._ka;this.getPointFromMap=this._kP;this.getPointFromVisibleArea=this._kQ;this.getCoordFromVisibleArea=this._kb;this.resize=this._r9;this.setContextMenu=this._sp;this.getContextMenu=this._j8;this.showImagery=this._sZ;this.hideImagery=this._lz;this.isImageryVisible=this._nh;this.showDefaultMap=this._sV;this.hideDefaultMap=this._lw;this.isDefaultMapVisible=this._m7;this.showDefaultMapForImagery=this._sW;this.hideDefaultMapForImagery=this._lx;this.isDefaultMapForImageryVisible=this._m6;this.clearCache=this._hu;this.setDraggableCursor=this.setDraggableCursor;this.setDraggingCursor=this.setDraggingCursor;this.setStaticCursor=this.setStaticCursor;this.showScaleBar=this.showScaleBar;this.hideScaleBar=this.hideScaleBar;this.enableContinuousZoom=this.enableContinuousZoom;this.disableContinuousZoom=this.disableContinuousZoom;this.continuousZoomEnabled=this.continuousZoomEnabled;this.setFeatureSelectionParam=this.setFeatureSelectionParam;this.getFeatureSelectionParam=this.getFeatureSelectionParam;this.clearFeatureSelectionParam=this.clearFeatureSelectionParam;this.getInfoDisplayPanelOptions=this.getInfoDisplayPanelOptions;this.setInfoDisplayPanelOptions=this.setInfoDisplayPanelOptions;this.clearOverlays=this._hw;}
var AGMap=_fs;

function _fu(_ti,_tz,_tA,_hd,bShowCrossHair,strStaticCursor){if(typeof _ti=="string")
this.backgroundColour=_ti;else this.backgroundColour=null;if(typeof _tz=="string")
this.draggableCursor=_tz;else this.draggableCursor=AG_DRAGGABLE_CURSOR;if(typeof _tA=="string")
this.draggingCursor=_tA;else this.draggingCursor=AG_DRAGGING_CURSOR;if(typeof _hd=="boolean") 
this.loadInitialMap=_hd;else this.loadInitialMap=true;if(typeof bShowCrossHair=="boolean")
this.showCrossHair=bShowCrossHair;else this.showCrossHair=true;if(typeof strStaticCursor=="string")
this.staticCursor=strStaticCursor;else this.staticCursor=AG_STATIC_CURSOR;this.showCopyright=true;this.copy=function(){return new _fu(this.backgroundColour,this.draggableCursor,this.draggingCursor,this.loadInitialMap,this.showCrossHair,this.staticCursor);};}
var AGMapOptions=_fu;

function _ft(_qc,_jd){this._dz=_qc;this._6=_jd;this._dz.setAttribute('align','left');this._dz.style.textAlign="left";this._dz.style.overflow="hidden";this._cZ=null;this._cf=null;this._cL=null;this._de=null;this._cl=null;this._cE=null;this._cP=null;this._c0=null;this._cS=null;this._cR=null;this._cy=null;this._cV=null;this._cx=null;this._bZ=null;this._bY=null;this._oStaticPane=null;this._oToolTipPane=null;this._cZ=document.createElement('div');this._cZ.style.position="absolute";this._cZ.style.width=$(this._dz).innerWidth()+"px";this._cZ.style.height=$(this._dz).innerHeight()+"px";this._cZ.style.overflow="hidden";this._cZ.oncontextmenu=function(){return false;};this._cf=document.createElement('div');this._cf.style.position="absolute";this._cf.style.width=$(this._dz).innerWidth()+"px";this._cf.style.height=$(this._dz).innerHeight()+"px";this._cf.style.overflow="hidden";this._cf.oncontextmenu=function(){return false;};this._cL=document.createElement('div');this._cL.style.position="absolute";this._cL.style.width=$(this._dz).innerWidth()+"px";this._cL.style.height=$(this._dz).innerHeight()+"px";this._cL.oncontextmenu=function(){return false;};this._cE=document.createElement('div');this._cE.style.position="absolute";this._cE.style.zIndex="50";this._cL.appendChild(this._cE);this._cP=document.createElement('div');this._cP.style.position="absolute";this._cP.style.zIndex="100";this._cL.appendChild(this._cP);this._c0=document.createElement('div');this._c0.style.position="absolute";this._c0.style.zIndex="110";this._cL.appendChild(this._c0);this._cS=document.createElement('div');this._cS.style.position="absolute";this._cS.style.zIndex="120";this._cL.appendChild(this._cS);this._cR=document.createElement('div');this._cR.style.position="absolute";this._cR.style.zIndex="130";this._cL.appendChild(this._cR);this._cy=document.createElement('div');this._cy.style.position="absolute";this._cy.style.zIndex="140";this._cL.appendChild(this._cy);this._oStaticPane=document.createElement('div');this._oStaticPane.style.position="absolute";this._oStaticPane.style.zIndex="145";this._oStaticPane.style.width=$(this._dz).innerWidth()+"px";this._oStaticPane.style.height=$(this._dz).innerHeight()+"px";this._oStaticPane.style.left="0px";this._oStaticPane.style.top="0px";this._cL.appendChild(this._oStaticPane);this._cV=document.createElement('div');this._cV.style.position="absolute";this._cV.style.zIndex="150";this._cV.style.width=$(this._dz).innerWidth()+"px";this._cV.style.height=$(this._dz).innerHeight()+"px";this._cV.style.left="0px";this._cV.style.top="0px";this._cV.style.cursor="pointer";this._cV.style.backgroundColor="Black";this._cV.style.opacity="0";this._cV.style.filter="alpha(opacity=0)";this._cV.style.mozOpacity="0";this._cV.oncontextmenu=function(){return false;};this._cL.appendChild(this._cV);this._cx=document.createElement('div');this._cx.style.position="absolute";this._cx.style.zIndex="160";this._cL.appendChild(this._cx);this._oToolTipPane=document.createElement('div');this._oToolTipPane.setAttribute('id',_fm.getToolTipDivId());this._oToolTipPane.style.position="absolute";this._oToolTipPane.style.left="0px";this._oToolTipPane.style.top="0px";this._oToolTipPane.style.width="auto";this._oToolTipPane.style.height="auto";this._oToolTipPane.style.zIndex="130";this._oToolTipPane.style.border="1px solid Black";this._oToolTipPane.style.backgroundColor="ivory";this._oToolTipPane.style.visibility="hidden";this._cL.appendChild(this._oToolTipPane);this._b4=document.createElement('div');this._b4.setAttribute('id',_fm.getZoomAnimationDivId());this._b4.style.position="absolute";this._b4.style.left="0px";this._b4.style.top="0px";this._b4.style.width="0px";this._b4.style.height="0px";this._b4.style.zIndex="130";this._b4.style.border="2px dashed Red";this._b4.style.visibility="hidden";this._cL.appendChild(this._b4);this._cf.appendChild(this._cL);this._cZ.appendChild(this._cf);this._bZ=document.createElement('div');this._bZ.style.position="absolute";this._bZ.style.top="0px";this._bZ.style.visibility="hidden";this._bZ.style.zIndex="100";this._bZ.style.cursor="pointer";this._bZ.style.overflow="hidden";this._bZ.style.backgroundColor="White";this._bZ.style.zIndex="370";this._bZ.link="";this._bZ.onclick=function(_ji){window.open(this.link);};this._bY=document.createElement('img');this._bY.setAttribute('src',API_HOST_URL+"Images/white.JPG");this._bY.setAttribute('alt',"");this._bY.style.visibility="hidden";this._bY.style.position="absolute";this._bY.style.left="0px";this._bY.style.top="0px";this._bY.style.zIndex="370";this._bZ.appendChild(this._bY);this._cZ.appendChild(this._bZ);this._dz.appendChild(this._cZ);this._dg=new _f2(0,0);this._r9=function(){var _lF=0;var _lG=0;this._cZ.style.width=$(this._dz).innerWidth()+"px";this._cZ.style.height=$(this._dz).innerHeight()+"px";var _nE=0;var _l3=0;if(this._6==_fv.MAIN_MAP&&_fx.status==true){_lF=parseInt( 0.15*$(this._dz).innerHeight());_lG=$(this._dz).innerWidth();if(_lF>=70&&_lG>=700){_l3=70;_nE=700;}
else if(_lF>=60&&_lG>=600){_l3=60;_nE=600;}
else if(_lF>=40&&_lG>=400){_l3=40;_nE=400;}
else if(_lF>=30&&_lG>=300){_l3=30;_nE=300;}
else {_l3=20;_nE=200;}
this._dg=new _f2(_nE,_l3);this._bZ.style.width=$(this._dz).innerWidth()+"px";this._bZ.style.height=_lF+"px";if(_nE>0||_l3>0){var _l7=this._dg.width;var _l6=this._dg.height;var _or=this._bY;var _oq=this._bZ;_or.style.visibility="visible";_or.style.width=_l7+"px";_or.style.height=_l6+"px";_oq.style.visibility="visible";var _lE=$(_oq).innerWidth();var _lD=$(_oq).innerHeight();if( _l7<_lE){var _nE=parseInt((_lE-_l7)/2,10);_or.style.left=_nE+"px";}
else _or.style.left="0px";if( _l6<_lD){var _me=parseInt((_lD-_l6)/2,10);_or.style.top=_me+"px";}
else _or.style.top="0px";}}
this._cf.style.width=$(this._dz).innerWidth()+"px";this._cf.style.height=$(this._dz).innerHeight()-_lF+"px";this._cL.style.width=$(this._dz).innerWidth()+"px";this._cL.style.height=$(this._dz).innerHeight()-_lF+"px";this._cV.style.width=$(this._dz).innerWidth()+"px";this._cV.style.height=$(this._dz).innerHeight()-_lF+"px";this._bZ.style.top=this._cL.offsetHeight+"px";};this._ll=function(){return this._b4;};this.getToolTipDiv=function(){return this._oToolTipPane;};this._r9();}


function _fm(){}
_fm.strTileIdPrefix="AGMapTile";_fm.iTileIdCount=0;_fm.getTileIdPrefix=function(){_fm.iTileIdCount++;return _fm.strTileIdPrefix+_fm.iTileIdCount;};_fm.strZoomAnimationDivIdPrefix="_gi";_fm.iZoomAnimationIdCount=0;_fm.getZoomAnimationDivId=function(){_fm.iZoomAnimationIdCount++;return _fm.strZoomAnimationDivIdPrefix+_fm.iZoomAnimationIdCount;};_fm.strToolTipDivIdPrefix="AGToolTip";_fm.iToolTipIdCount=0;_fm.getToolTipDivId=function(){_fm.iToolTipIdCount++;return _fm.strToolTipDivIdPrefix+_fm.iToolTipIdCount;};

function _eV(_mc,_gZ){this._br=_mc;this._w=_gZ;this._kq=function(){return this._br;};this._m3=function(){return this._w;};}


function _f5(_pQ,_nz,_mI){this._cJ=_pQ;this._bQ=_nz;this._bF=_mI;this._t=new Array();for(var i=0;i<=this._bF;i++)
this._t[i]=new Array();this._i=new Array();for(var i=0;i<this._bQ;i++)
this._i.push(i);this._s=new Array();for(var i=0;i<this._bQ;i++)
this._s[i]=new _f6(-1,-1,-1,new _eT(new _e2(0,0),new _e2(-1,-1)));this._k=new Array();this.getTile=function(_ro){_nN=_ro._lm();_nF=_ro._lj();_nI=_ro._lk();oBoundingBoxTile=_ro._jZ();var _g7=false;var _nu=this._j2(_ro);if(_nu>=0){_g7=true;return new _eV(_nu,_g7);}
if(this._i.length>0){var _nu=this._i.pop();this._t[_nN].push(_nu);this._s[_nu]._hs(_nN,_nF,_nI,oBoundingBoxTile);this._rP(this._s[_nu],_nu);return new _eV(_nu,_g7);}
if(this._t[_nN].length<this._bQ){var _nu=this._lb(_nN,_nF,_nI);this._t[_nN].push(_nu);this._s[_nu]._hs(_nN,_nF,_nI,oBoundingBoxTile);this._rP(this._s[_nu],_nu);return new _eV(_nu,_g7);}
var _nu=this._kk(_nN);this._r6(this._s[_nu]);this._s[_nu]._hs(_nN,_nF,_nI,oBoundingBoxTile);this._rP(this._s[_nu],_nu);return new _eV(_nu,_g7);};this._lb=function(_lU,_nF,_nI){var _mH=this._s.length;var _s8=Math.floor( Math.random()*_mH);var i=_s8;for(var c=0;c<_mH;c++){i=(i+1) % _mH;var _uA=this._s[i];if(_uA._lm()!=_lU){var _mZ=_uA._lm();var _mh=this._t[_mZ].length;for(var j=0;j<_mh;j++){if(this._t[_mZ][j]==i){this._t[_mZ].splice(j,1);}}
this._r6(_uA);return i;}}
return-1;};this._kk=function(_nN){var _pc=this._cJ._j3();var _rs=_f8.getTMSTileInfo(_nN,_pc);var _jB=-1;var _lY=-1;var _gO=this._t[_nN];for(var i=0;i<_gO.length;i++){var _uB=_gO[i];var _uA=this._s[_uB];if(!this._nj(_uA)){var _jn=this._kf(_rs,_uA);if(_jn>_jB){_jB=_jn;_lY=_uB;}}
}
return _lY;};this._nj=function(_ro){if(_ro._lm()<0)
return false;var oBoundingBoxTileRegion=_ro._jZ();var oBoundingBoxViewRegion=this._cJ._jZ();return oBoundingBoxTileRegion._mL(oBoundingBoxViewRegion);};this._kf=function(_rq,_rr){var _nG=_rq._lj();var _nJ=_rq._lk();var _nH=_rr._lj();var _nK=_rr._lk();return Math.pow((_nG-_nH)*(_nG-_nH)+(_nJ-_nK)*(_nJ-_nK),0.5);};this._rP=function(_rp,_nu){var _tN=this._km(_rp);this._k[_tN]=_nu;};this._r6=function(_rp){var _tN=this._km(_rp);this._k[_tN]=-1;};this._j2=function(_rp){var _tN=this._km(_rp);if(this._k[_tN]>=0)
return this._k[_tN];return-1;};this._km=function(_rp){var _sm=",";return _rp._lm()+_sm+_rp._lj()+_sm+_rp._lk();};this._ld=function(_nN){return this._t[_nN];};this._lc=function(_nu){return this._s[_nu];};this._n3=function(_nu){var _hQ=this._s[_nu];var _nN=_hQ._lm();if( _nN>0){var _mx=this._kr(this._t[_nN],_nu);if(_mx>=0){this._t[_nN].splice(_mx,1);this._r6(_hQ);this._s[_nu]._hs(-1,-1,-1,new _eT(new _e2(0,0),new _e2(-1,-1)));this._i.push(_nu);}}
};this._kr=function(_gn,value){for(var i=0;i<_gn.length;i++){if(_gn[i]==value)
return i;}
return-1;};}


function _f6(_nN,_nF,_nI,_oK){this._bW=_nN;this._bS=_nF;this._bT=_nI;this._oBoundingBox=_oK;this._hs=function(_nN,_nF,_nI,_oK){this._bW=_nN;this._bS=_nF;this._bT=_nI;this._oBoundingBox=_oK;};this._lm=function(){return this._bW;};this._lj=function(){return this._bS;};this._lk=function(){return this._bT;};this._jZ=function(){return this._oBoundingBox;};}


_f7.prototype=new _fE;var _s7=0;function _f7(_nL,_oF){if(typeof _nL!="number")
_nL=1;this._dataSetManager=null;this._a=null;this._oBoundingBoxVisible=null;this._u=null;this._j=null;this._dY=null;this._do=null;this._0=null;this._bU=_nL*2;this._bJ=-1;this._bn=-1;this._bE=0;this._M=false;this._bR=_fv.NORMAL_MAP;if(typeof _oF=="undefined"||_oF==null)
this._db=new _ga(AG_DEFAULT_TMS_OPTIONS);else this._db=_oF;this.initialize=function(_fr){this._a=_fr;this._dataSetManager=this._a.getCopyRightDataSetManager();this._hN();this._do=new _f5(this._a,_eH,_eI);this._sB();this._bJ=this._a._lm();this._bn=-1;this._M=true;this._dataSetManager.addDataSet(this._db._da.dataSet);this.updateCopyRight();};this.copy=function(){};this.redraw=function(_mP){if(!this._np())
return;switch(_mP){case _fD.ZOOM:
if(this._bn>0)
this._lA(this._bn);if(this._bJ>0 )
this._rR(this._bJ);this._sB(1);this._bn=this._bJ;this._bJ=this._a._lm();break;case _fD.PAN:
this._sB();break;}};this.remove=function(){this.stopLoadingAllTiles();if(this._kC()==_fv.IMAGERY_MAP)
_iq=this._a._kK(_fK.IMAGERY_PANE);else _iq=this._a._kK(_fK.MAP_PANE);_iq.removeChild(this._0);this._a=null;this._M=false;this._dataSetManager.removeDataSet(this._db._da.dataSet);this.updateCopyRight();};this.stopLoadingAllTiles=function(){for(var i=0;i<_eH;i++){var _rp=this._do._lc(i);var _uy=document.getElementById(this._dY+"_"+i);if(_uy.src!=_eD&&_uy._nk==false){_uy._ok="";_uy.setAttribute("src",_eD);_uy._nk=false;this._do._n3(i);if(this._bE==1&&this._bn>0&&this._bn!=this._a._lm()) 
 this._lA(this._bn);this._bE=Math.max(this._bE-1,0);}}
};this._sC=function(iType){this._bR=iType;};this._kC=function(){return this._bR;};this.hide=function(){if(!this._ni())
return;this._s9(false);this._0.style.display="none";this._M=false;this._dataSetManager.removeDataSet(this._db._da.dataSet);this.updateCopyRight();};this.show=function(){if(!this._ni())
return;if(!this._np()){this._0.style.display="";this._M=true;this.redraw(_fD.ZOOM);this._dataSetManager.addDataSet(this._db._da.dataSet);this.updateCopyRight();}};this._np=function(){return this._M;};this._hN=function(){this._dY=_fm.getTileIdPrefix();this._0=document.createElement("div");this._0.setAttribute("id","_s7"+_s7);_s7++;this._0.style.position="absolute";this._0.style.left="0px";this._0.style.top="0px";this._0.style.visibility="visible";this._0.style.zIndex=this._bU;var _iq;if(this._kC()==_fv.IMAGERY_MAP)
_iq=this._a._kK(_fK.IMAGERY_PANE);else _iq=this._a._kK(_fK.MAP_PANE);_iq.appendChild(this._0);if(_eU._hg=="Explorer"&&_eU.VERSION<=7){this._u=new Array();this._j=new Array();for(var i=0;i<_eH;i++){var _uy=document.createElement("div");_uy.setAttribute("id",this._dY+"_"+i);_uy._ok="";_uy.setAttribute("src",_eD);_uy.style.position="absolute";_uy.style.width=AG_TILE_SIZE.width+"px";_uy.style.height=AG_TILE_SIZE.height+"px";_uy.style.visibility="hidden";_uy._nk=false;_uy.zoomLevel=-1;var img=document.createElement("img");img.style.position="absolute";img.style.visibility="hidden";img._my=i;var _ux=this;img.onload=function(){if(typeof this._ok=="string"&&this._ok.length>0){var oTrafficEvent=new _gb(this._ok,"");var _m1=new Date().getTime();var _lW=_m1-this.ReqTime;_jS.addRecord(oTrafficEvent,true,_lW)
}
if(!_ux._ni())
return false;var _uz=_ux._u[this._my];if(_uz.src==_eD){_uz._nk=false;return false;}
var _hR=_ux._a._lm();if( _hR==_uz.zoomLevel){_uz.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.src+"',sizingMethod='scale')";_uz.style.visibility="visible";if(_ux._bE==1&&_ux._bn>0&&_ux._bn!=_hR) 
 _ux._lA(_ux._bn);_ux._bE=Math.max(_ux._bE-1,0);}
_uz._nk=true;}
img.onerror=function(){if(typeof this._ok=="string"&&this._ok.length>0){var oTrafficEvent=new _gb(this._ok,"");var _m1=new Date().getTime();var _lW=_m1-this.ReqTime;_jS.addRecord(oTrafficEvent,false,_lW)
}}
img._ok="";this._j.push(img);this._0.appendChild(img);this._u.push(_uy);this._0.appendChild(_uy);}}
else {this._u=new Array();for(var i=0;i<_eH;i++){var _uy=document.createElement("img");_uy.setAttribute("id",this._dY+"_"+i);_uy.style.position="absolute";_uy.style.width=AG_TILE_SIZE.width+"px";_uy.style.height=AG_TILE_SIZE.height+"px";_uy.style.visibility="hidden";_uy._nk=false;_uy.zoomLevel=-1;var _ux=this;_uy.onload=function(){if(typeof this._ok=="string"&&this._ok.length>0){var oTrafficEvent=new _gb(this._ok,"");var _m1=new Date().getTime();var _lW=_m1-this.ReqTime;_jS.addRecord(oTrafficEvent,true,_lW)
}
if(_ux._a._lm()==this.zoomLevel){this.style.visibility="visible";if(_ux._bE==1&&_ux._bn>0) 
 _ux._lA(_ux._bn);_ux._bE=Math.max(_ux._bE-1,0);}
this._nk=true;};_uy.onerror=function(){if(typeof this._ok=="string"&&this._ok.length>0){var oTrafficEvent=new _gb(this._ok,"");var _m1=new Date().getTime();var _lW=_m1-this.ReqTime;_jS.addRecord(oTrafficEvent,false,_lW)
}};this._u.push(_uy);this._0.appendChild(_uy);}}
};this._sB=function(_mk){this._s9();var _nN=this._a._lm();if(_mk==1)
this._bE=0;this._oBoundingBoxVisible=this._a._jZ()
var oCoordNW=this._oBoundingBoxVisible._kH();var _rw=_f8.getTMSTileInfo(_nN,oCoordNW);var oCoordTopLeftTileSpan=_rw._jZ()._uC();var oCoordRightBottomMap=this._oBoundingBoxVisible._kZ();var oCoordRightBottomTile=_rw._jZ()._kZ();var _mG=Math.ceil((oCoordRightBottomMap.longitude()-oCoordRightBottomTile.longitude()) / oCoordTopLeftTileSpan.longitude())+1;var _mF=Math.ceil((oCoordRightBottomTile._nP()-oCoordRightBottomMap._nP() ) / oCoordTopLeftTileSpan._nP())+1;var oCoordLeftTopTile=_rw._jZ()._kH();var _qz=this._a._kP(oCoordLeftTopTile);for(var i=0;i<_mG;i++){for(var j=0;j<_mF;j++){var _nF=_rw._lj()+i;var _nI=_rw._lk()+j;var oCoordTopLeftOfNewTile=new _e2(oCoordLeftTopTile._nP()-j*oCoordTopLeftTileSpan._nP(),oCoordLeftTopTile.longitude()+i*oCoordTopLeftTileSpan.longitude());var oCoordBottomRightOfNewTile=new _e2(oCoordLeftTopTile._nP()-(j+1)*oCoordTopLeftTileSpan._nP(),oCoordLeftTopTile.longitude()+(i+1)*oCoordTopLeftTileSpan.longitude());var oBoundingBoxNewTile=new _eT(oCoordTopLeftOfNewTile,oCoordBottomRightOfNewTile);var _oZ=this._do.getTile( new _f6(_nN,_nF,_nI,oBoundingBoxNewTile));var _oo=_oZ._kq();var _g7=_oZ._m3();var _uy=document.getElementById(this._dY+"_"+_oo);_uy.style.zIndex=this._bU;_uy.style.width=AG_TILE_SIZE.width+"px";_uy.style.height=AG_TILE_SIZE.height+"px";if(!_g7){if(_eU._hg=="Explorer"&&_eU.VERSION<=7){_uy.parentNode.removeChild(_uy);_uy=document.createElement("div");_uy.setAttribute("id",this._dY+"_"+_oo);_uy.style.position="absolute";_uy.style.width=AG_TILE_SIZE.width+"px";_uy.style.height=AG_TILE_SIZE.height+"px";_uy.style.visibility="hidden";_uy._nk=false;_uy.zoomLevel=-1;_uy.style.zIndex=this._bU;this._u[_oo]=_uy;this._0.appendChild(_uy);}
_uy.zoomLevel=_nN;_uy.style.visibility="hidden";_uy._nk=false;if(_mk==1)
this._bE++;if(_eU._hg=="Explorer"&&_eU.VERSION<=7){var strTileUrl=this._db._le(new _f6(_nN,_nF,_nI,oBoundingBoxNewTile) );try
{this._j[_oo].ReqTime=new Date().getTime();this._j[_oo]._ok=this._db._ky();}
catch(err){}
this._j[_oo].setAttribute("src",strTileUrl);}
else {var strTileUrl=this._db._le(new _f6(_nN,_nF,_nI,oBoundingBoxNewTile));try
{_uy.ReqTime=new Date().getTime();_uy._ok=this._db._ky();}
catch(err){}
_uy.setAttribute("src",strTileUrl);}}
else {if(_uy._nk==true){_uy.style.visibility="visible";}}
_uy.style.left=_qz.x+(i*AG_TILE_SIZE.width)+"px";_uy.style.top=_qz.y+(j*AG_TILE_SIZE.height)+"px";}}
if( _mk==1&&this._bE==0&&this._bJ>0&&this._bJ!=_nN)
this._lA(this._bJ);};this._lA=function(_nN){var _lL=this._a._lm();if(_nN==_lL)
return;var _gP=this._do._ld(_nN);for(var i=0;i<_gP.length;i++){var _nu=_gP[i];var _ix=this._u[_nu];_ix.style.visibility="hidden";}};this._rR=function(_mX){var _gP=this._do._ld(_mX);for(var i=0;i<_gP.length;i++){var _nu=_gP[i];var _ix=this._u[_nu];var _rp=this._do._lc(_nu);var oBoundingBoxTile=_rp._jZ();var oCoordTopLeft=oBoundingBoxTile._kH();var oCoordBottomRight=oBoundingBoxTile._kZ();var _qR=this._a._kP(oCoordTopLeft);var _qo=this._a._kP(oCoordBottomRight);_ix.style.left=_qR.x+"px";_ix.style.top=_qR.y+"px";_ix.style.width=Math.abs(_qo.x-_qR.x)+"px";_ix.style.height=Math.abs(_qo.y-_qR.y)+"px";_ix.style.zIndex=this._bU-1;}};this._s9=function(_hi){if(typeof _hi!="boolean")
_hi=true;var _oN=this._a._jZ();var _lU=this._a._lm();for(var i=0;i<_eH;i++){var _rp=this._do._lc(i);if(_rp._lm()==_lU&&_hi){var _oU=_rp._jZ();if(_oN._mL(_oU))
continue;}
var _uy=document.getElementById(this._dY+"_"+i);if(_uy.src!=_eD&&_uy._nk==false){_uy._ok="";_uy.setAttribute("src",_eD);_uy._nk=false;this._do._n3(i);if(this._bE==1&&this._bn>0&&this._bn!=this._a._lm()) 
 this._lA(this._bn);this._bE=Math.max(this._bE-1,0);}}
};this._ni=function(){return this._a!=null;};this._hu=function(){for(var i=0;i<_eH;i++){var _uy=document.getElementById(this._dY+"_"+i);_uy._ok="";_uy.setAttribute("src",_eD);_uy._nk=false;this._do._n3(i);if(this._bE==1&&this._bn>0&&this._bn!=this._a._lm()) 
 this._lA(this._bn);this._bE=Math.max(this._bE-1,0);}
this.redraw(_fD.PAN);};this.updateCopyRight=function(){if(this._a!=null){var _oL=this._a._jZ();this._a.requestCopyright(_oL);}};this.hide=this.hide;this.show=this.show;this.isVisible=this._np;this.clearCache=this._hu;}
var AGTileLayerOverlay=_f7;

function _f8(){}
_f8.getDistanceInKiloMetre=function(dLng1,dLat1,dLng2,dLat2){dLng1=parseFloat(dLng1);dLat1=parseFloat(dLat1);dLng2=parseFloat(dLng2);dLat2=parseFloat(dLat2);var _iX=parseFloat(parseFloat(180.0)/Math.acos(-1.0));var _iH=parseFloat(6378.7);var _hZ=_iH*Math.acos(Math.sin(dLat1/_iX)*Math.sin(dLat2/_iX)+Math.cos(dLat1/_iX)*Math.cos(dLat2/_iX)*Math.cos(dLng2/_iX-dLng1/_iX) );return _hZ;};_f8.getTMSTileInfo=function(_nN,_o9){var oCoordDiffForATile=180.0 / Math.pow(2,_nN-1);var x=Math.floor((_o9.longitude()+180) / oCoordDiffForATile);var y=Math.floor((-_o9._nP()+90) / oCoordDiffForATile);var _uM=-180+x*oCoordDiffForATile;var _uL=_uM+oCoordDiffForATile;var _uO=90-y*oCoordDiffForATile;var _uP=_uO-oCoordDiffForATile;var _oX=new _eT(new _e2(_uP,_uM),new _e2(_uO,_uL));return new _f6(_nN,x,y,_oX);};_f8.getBBoxOfTile=function(_nN,_nF,_nI){var oCoordDiffForATile=180.0 / Math.pow(2,_nN-1);var _uM=-180+_nF*oCoordDiffForATile;var _uL=_uM+oCoordDiffForATile;var _uO=90-_nI*oCoordDiffForATile;var _uP=_uO-oCoordDiffForATile;return new _eT(new _e2(_uP,_uM),new _e2(_uO,_uL));};_f8.getDistanceBetweenCoords=function(_pa,_pb,unit){if(typeof unit!="number")
unit=_gf.KILOMETERS;switch(unit){case _gf.KILOMETERS : 
return _f8.getDistanceInKiloMetre(_pa.longitude(),_pa._nP(),_pb.longitude(),_pb._nP());case _gf.MILES :
var _mE=_f8.getDistanceInKiloMetre(_pa.longitude(),_pa._nP(),_pb.longitude(),_pb._nP());return _mE*0.621371192;}};_f8.getDistanceMetreToPixel=function(fMetre,_nN){_nN=parseInt(_nN);var iScaleRatio=_f8.getLevelScale(_nN);var inCM=parseFloat(fMetre*100 / iScaleRatio);var inINC=parseFloat(inCM*.4);var inPixel=parseFloat(inINC*96);return inPixel;};_f8.getLevelScale=function(level){var CONST_PER_DEGREE=111.32;var k=(256.0/96.0)*2.54;var baseScale=CONST_PER_DEGREE*360*100000;var tileWidth=baseScale/Math.pow(2,level);var scale=tileWidth/k;return scale;}


var AG_MARKER_OBJECTS=new Array();var AG_MARKER_INDEX=-1;_fy.prototype=new _fE;function _fy(_o9,_qX){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalid input for _nP-longitude.";this._br=++AG_MARKER_INDEX;AG_MARKER_OBJECTS[this._br]=this;this._oCoord=_o9;if( _qX!=null&&_qX instanceof _fz)
this._c9=_qX.copy();else this._c9=new _fz();if(this._c9.draggable) 
 this._c9.clickable=true;this._b1=null;this._V=null;this._cM=null;this._H=true;this._dV="image";this.bVisibilityChangeStatus=true;this._W=null;this._cN=null;this._e=null;this._arrInfoDisplayPanels=new Array();this.oInfoDisplayContent=null;this.oInfoDisplayOptions=null;this._cG=null;this._downed=false;this._moved=false;this._7=null;this._8=null;this._ba=null;this._9=null;this._d6=function(_oV,_o9,_pC,_pD,_oW){var pt=this._b1._kP(_o9);var _on=new _fM((pt.x+_pC-_oW.offsetLeft),(pt.y+_pD-_oW.offsetTop));_oV.Lat=_o9._nP();_oV.Long=_o9.longitude();_oV._pC=_pC;_oV._pD=_pD;_oV.style.position="absolute";_oV.style.left=_on.x+"px";_oV.style.top=_on.y+"px";_oW.appendChild(_oV);this._so(_on);};this.initialize=function(_fr){this._b1=_fr;this._V=this._b1._kK(_fK.MARKER_PANE);if(_eU._hg=="Explorer"&&_eU.VERSION<7 ){this._cM=document.createElement("div");if(this._c9.icon.iconSize.width>0&&this._c9.icon.iconSize.height>0){this._dV="scale";this._cM.style.width=this._c9.icon.iconSize.width+"px";this._cM.style.height=this._c9.icon.iconSize.height+"px";}
else {this._dV="image";this._cM.style.width="1px";this._cM.style.height="1px";}
this._cM.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this._ko().image+"',sizingMethod='"+this._dV+"')";}
else {this._cM=document.createElement("img");this._cM.src=this._ko().image;if(this._c9.icon.iconSize.width>0&&this._c9.icon.iconSize.height>0){this._cM.style.width=this._c9.icon.iconSize.width+"px";this._cM.style.height=this._c9.icon.iconSize.height+"px";}}
this._d6(this._cM,this._oCoord,this._ko().iconAnchor.x,this._ko().iconAnchor.y,this._V);this._W=this._b1._kK(_fK.MARKER_SHADOW_PANE);if(_eU._hg=="Explorer" ){var sizingMethod="scale";this._cN=document.createElement("div");if(this._c9.icon.shadowSize.width>0&&this._c9.icon.shadowSize.height>0){sizingMethod="scale";this._cN.style.width=this._c9.icon.shadowSize.width+"px";this._cN.style.height=this._c9.icon.shadowSize.height+"px";}
else if(this._c9.icon.iconSize.width>0&&this._c9.icon.iconSize.height>0){sizingMethod="scale";this._cN.style.width=Math.round(this._c9.icon.iconSize.width*1.5)+"px";this._cN.style.height=this._c9.icon.iconSize.height+"px";}
else {sizingMethod="image";this._cN.style.width="1px";this._cN.style.height="1px";}
this._cN.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this._ko().shadow+"',sizingMethod='"+sizingMethod+"')";}
else {this._cN=document.createElement("img");this._cN.src=this._ko().shadow;if(this._c9.icon.shadowSize.width>0&&this._c9.icon.shadowSize.height>0){this._cN.style.width=this._c9.icon.shadowSize.width+"px";this._cN.style.height=this._c9.icon.shadowSize.height+"px";}
else if(this._c9.icon.iconSize.width>0&&this._c9.icon.iconSize.height>0){this._cN.style.width=Math.round(this._c9.icon.iconSize.width*1.5)+"px";this._cN.style.height=this._c9.icon.iconSize.height+"px";}}
this._cN.style.position="absolute";var pt=this._b1._kP(this._oCoord);var _me=pt.x+this._ko().iconAnchor.x;var _nw=pt.y+this._ko().iconAnchor.y;this._cN.style.left=_me+"px";this._cN.style.top=_nw+"px";this._W.appendChild(this._cN);if(this._c9.stationary)
this._n2();if(this._c9.draggable)
this._n1();};this.copy=function(){}
this.redraw=function(_mP){switch(_mP){case _fD.ZOOM:
if(!(this._oCoord instanceof _e2))
throw "Coord not given.";var _pK=this._b1._kP(this._oCoord);var _pZ=new _fM((_pK.x+this._ko().iconAnchor.x),(_pK.y+this._ko().iconAnchor.y));this._cM.style.left=_pZ.x+"px";this._cM.style.top=_pZ.y+"px";this._cN.style.left=_pZ.x+"px";this._cN.style.top=_pZ.y+"px";this._so(_pZ);if(this._c9.stationary)
this._n2();break;case _fD.PAN:
if(this._c9.stationary&&this._b1._mS==_fL.DEFAULT){var _pR=this._b1._kB();var _me=-_pR.x+this._cG.x+this._ko().iconAnchor.x;var _nw=-_pR.y+this._cG.y+this._ko().iconAnchor.y;this._cM.style.left=_me+"px";this._cM.style.top=_nw+"px";this._cN.style.left=_me+"px";this._cN.style.top=_nw+"px";var _pu=new _fM((-_pR.x+this._cG.x),(-_pR.y+this._cG.y));this._so(new _fM(parseInt(this._cM.style.left),parseInt(this._cM.style.top)));this._oCoord=this._b1._ka(_pu);}
else if((this._c9.stationary||this._c9.draggable)&&this._b1._mS==_fL.DRAG){this._cG=this._b1._kQ(this._oCoord);}
break;}};this.remove=function(){var _ir=this._b1._kK(_fK.MARKER_PANE);_ir.removeChild(this._cM);var _is=this._b1._kK(_fK.MARKER_SHADOW_PANE);_is.removeChild(this._cN);if(this._oCoord==this._b1._ku()._kO())
this._b1._hz();this._rS();this._b1=null;this._cM=null;_fd.trigger(this,"onremove");};this._qd=function(_tt,_pM){if(typeof _tt!="object")
throw("Invalid HTML _s5 in the _ob _qd");if(this._arrInfoDisplayPanels.length>0)
this._arrInfoDisplayPanels=new Array();if(!(_pM instanceof _fp)){_pM=new _fp();_pM.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_pM.stationary=true;_pM.pixelOffset=this._ko().infoDisplayAnchor;_pM.isMarkerOpen=true;this._b1._qd(this._oCoord,_tt,_pM);this._arrInfoDisplayPanels.push(new _fq("",_tt));_fd.trigger(this,"oninfodisplayopen");};this._qf=function(_tP,_pM){if(typeof _tP!="string")
throw("Invalid HTML string _s5 in the _ob _qf");if(this._arrInfoDisplayPanels.length>0)
this._arrInfoDisplayPanels=new Array();if(!(_pM instanceof _fp)){_pM=new _fp();_pM.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_pM.stationary=true;_pM.pixelOffset=this._ko().infoDisplayAnchor;_pM.isMarkerOpen=true;this._b1._qf(this._oCoord,_tP,_pM);this._arrInfoDisplayPanels.push(new _fq("",_tP));_fd.trigger(this,"oninfodisplayopen");};this._qh=function(_gE,_pM){if(typeof _gE!="object")
throw("Invalid HTML _s5 in the _ob _qd");if(this._arrInfoDisplayPanels.length>0)
this._arrInfoDisplayPanels=new Array();if(!(_pM instanceof _fp)){_pM=new _fp();_pM.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_pM.stationary=true;_pM.pixelOffset=this._ko().infoDisplayAnchor;_pM.isMarkerOpen=true;this._b1._qh(this._oCoord,_gE,_pM);this._arrInfoDisplayPanels=_gE;_fd.trigger(this,"oninfodisplayopen");};this._qi=function(_gE,_pM){if(typeof _gE!="object")
throw("Invalid HTML _s5 in the _ob _qd");if(this._arrInfoDisplayPanels.length>0)
this._arrInfoDisplayPanels=new Array();if(!(_pM instanceof _fp)){_pM=new _fp();_pM.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_pM.stationary=true;_pM.pixelOffset=this._ko().infoDisplayAnchor;_pM.isMarkerOpen=true;this._b1._qi(this._oCoord,_gE,_pM);this._arrInfoDisplayPanels=_gE;_fd.trigger(this,"oninfodisplayopen");};this._oInfoDisplayEventListener=null;this.removePreviousInfoDisplayListener=function(){if(this._oInfoDisplayEventListener){_fd.removeListener(this._oInfoDisplayEventListener);this._oInfoDisplayEventListener=null;}};this._g8=function(content,_qX){this.removePreviousInfoDisplayListener();this.oInfoDisplayContent=content;if(!(_qX instanceof _fp)){_qX=new _fp();_qX.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_qX.stationary=true;this.oInfoDisplayOptions=_qX;this._oInfoDisplayEventListener=_fd.bind(this,"onclick",this,this._s1);if(content==null||content=="")
this.removePreviousInfoDisplayListener();};this._s1=function(){this._qd(this.oInfoDisplayContent,this.oInfoDisplayOptions);};this._g9=function(content,_qX){this.removePreviousInfoDisplayListener();this.oInfoDisplayContent=content;if(!(_qX instanceof _fp)){_qX=new _fp();_qX.pixelOffset=this._ko().infoDisplayAnchor;}
_qX.stationary=this._c9.stationary;this.oInfoDisplayOptions=_qX;this._oInfoDisplayEventListener=_fd.bind(this,"onclick",this,this._s0);if(content==null||content=="")
this.removePreviousInfoDisplayListener();};this._s0=function(){this._qf(this.oInfoDisplayContent,this.oInfoDisplayOptions);};this._ha=function(panels,_qX){this.removePreviousInfoDisplayListener();this.oInfoDisplayContent=panels;if(!(_qX instanceof _fp)){_qX=new _fp();_qX.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_qX.stationary=true;this.oInfoDisplayOptions=_qX;this._oInfoDisplayEventListener=_fd.bind(this,"onclick",this,this._s3);if(panels==null||panels=="")
this.removePreviousInfoDisplayListener();};this._s3=function(){this._qh(this.oInfoDisplayContent,this.oInfoDisplayOptions);};this._hb=function(panels,_qX){this.removePreviousInfoDisplayListener();this.oInfoDisplayContent=panels;if(!(_qX instanceof _fp)){_qX=new _fp();_qX.pixelOffset=this._ko().infoDisplayAnchor;}
if(this._c9.stationary)
_qX.stationary=true;this.oInfoDisplayOptions=_qX;this._oInfoDisplayEventListener=_fd.bind(this,"onclick",this,this._s2);if(panels==null||panels=="")
this.removePreviousInfoDisplayListener();};this._s2=function(){this._qi(this.oInfoDisplayContent,this.oInfoDisplayOptions);};this._hz=function(){if(this._b1!=null){if(this._oCoord==this._b1._ku()._kO()){_fd.trigger(this,"oninfodisplayclosing");this._b1._hz();_fd.trigger(this,"oninfodisplayclosed");}}
};this._sY=function(_qX){if(!(_qX instanceof _fp)){_qX=new _fp();_qX.pixelOffset=this._ko().infoDisplayAnchor;}
this._b1._sY(this._oCoord,_qX);};this._ko=function(){return this._c9.icon;};this._lf=function(){if(typeof this._c9.title=="string")
return this._c9.title;else return null;};this._j9=function(){return this._oCoord;};this._sq=function(_o9){if(!(_o9 instanceof _e2))
throw "Invalid Latitude and Longitude";var _pk=this._oCoord;this._oCoord=_o9;if(this._b1!=null){var _pK=this._b1._kP(this._oCoord);var _qy=new _fM(_pK.x+this._ko().iconAnchor.x,_pK.y+this._ko().iconAnchor.y);this._cM.style.left=_qy.x+"px";this._cM.style.top=_qy.y+"px";this._cN.style.left=_qy.x+"px";this._cN.style.top=_qy.y+"px";this._so(_qy);if(_pk!=null&&_pk==this._b1._ku()._kO()){if(!this._b1._ku()._nd()){var _pL=this._b1._ku();_pL._uG(this._oCoord);}}
this._cG=this._b1._kQ(this._oCoord);}};this._i3=function(){this._c9.draggable=true;this._n1();};this._h9=function(){this._c9.draggable=false;this.makeUndraggable();};this.draggable=function(){if(this._c9.draggable==true)
return true;else return false;};this._iI=function(){return this._c9.draggable;};this._sz=function(_un){if(this._c9!=null)
this._c9.icon.image=_un;if(this._cM!=null){if(_eU._hg=="Explorer"&&_eU.VERSION<7 )
this._cM.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_un+"',sizingMethod='"+this._dV+"')";else this._cM.setAttribute("src",_un);}};this.hide=function(){if(!this._ni())
return;if(this.bVisibilityChangeStatus){_fd.trigger(this,"onvisibilitychanged",this.bVisibilityChangeStatus);} 
this.bVisibilityChangeStatus=false;if(this._H){this._H=false;this._cM.style.visibility="hidden";this._cN.style.visibility="hidden";var _pL=this._b1._ku();if(this._oCoord==_pL._kO())
_pL.hide();this._rS();}};this.show=function(){if(!this._ni())
return;if(!this.bVisibilityChangeStatus){_fd.trigger(this,"onvisibilitychanged",this.bVisibilityChangeStatus);}
this.bVisibilityChangeStatus=true;if(!this._H){this._H=true;this._cM.style.visibility="visible";this._cN.style.visibility="visible";var _pL=this._b1._ku();if(this._oCoord==_pL._kO())
_pL.show();this._so( new _fM(parseInt(this._cM.style.left),parseInt(this._cM.style.top)) );}};this._nd=function(){return !this._H;};this._np=function(){return !this._nd();};this._j5=function(){if(this._c9.clickable)
return this._e;return null;};this._so=function(_qy){var _pJ=this._ko();if(_pJ.iconSize instanceof _f2&&_pJ.imageMap==null){this._e=new Array();this._e.push(new _fM(_qy.x,_qy.y));this._e.push(new _fM(_qy.x,_qy.y+_pJ.iconSize.height));this._e.push(new _fM(_qy.x+_pJ.iconSize.width,_qy.y+_pJ.iconSize.height));this._e.push(new _fM(_qy.x+_pJ.iconSize.width,_qy.y));this._b1._d9(this);}
else {if(_pJ.imageMap.length>2)
this._e=new Array();for(var i=0;i<_pJ.imageMap.length;i++)
this._e.push(new _fM(_pJ.imageMap[i].x+_qy.x,_pJ.imageMap[i].y+_qy.y));this._b1._d9(this);}};this._rS=function(){this._b1._r3(this);this._e=null;};this._n2=function(){this._c9.stationary=true;var oInitialCoord=this._j9();this._cG=this._b1._kQ(oInitialCoord);};this._ii=function(){this._c9.stationary=true;};this._z=false;this._c4=null;this.mousedown=function(_o9){if(this._c9.draggable){this._z=true;this._c4=this._b1._kQ(_o9);this._downed=true;}};this.mousemove=function(_o9){if(this._z&&this._c9.draggable){var _qq=this._b1._kQ(_o9);var _mv=Math.round(_qq.x-this._c4.x);var _mw=Math.round(_qq.y-this._c4.y);var _qG=new _fM(parseInt(this._cM.style.left)+_mv,parseInt(this._cM.style.top)+_mw );this._cM.style.left=_qG.x+"px";this._cM.style.top=_qG.y+"px";this._cN.style.left=_qG.x+"px";this._cN.style.top=_qG.y+"px";this._so(_qG);this._c4=_qq;this._oCoord=this._b1._ka(new _fM(_qG.x-this._ko().iconAnchor.x,_qG.y-this._ko().iconAnchor.y));if(this._c9.stationary){this._cG=this._b1._kQ(this._oCoord);}
if(this._downed==true){_fd.trigger(this,"ondragstart",_o9);this._downed=false;}
_fd.trigger(this,"ondrag",this._oCoord);this._moved=true;}};this.mouseup=function(_o9){if(this._c9.bouncy){var iMarkerIndex=this._br;var dGravity=this._c9.bounceGravity;var _lW=AG_BOUNCE_DURATION;if(dGravity>=0.5&&dGravity<1.0)
_lW=30;else if(dGravity>=0.2&&dGravity<0.5) 
_lW=40;else if(dGravity>=0.001&&dGravity<0.2) 
_lW=50;else _lW=AG_BOUNCE_DURATION;AGMarkerBounce.bouncingUpDirection(iMarkerIndex,AG_BOUNCE_AMOUNT,_lW);}
this._z=false;if(this._moved)
_fd.trigger(this,"ondragend",_o9,this._b1);this._moved=false;};this.mouseout=function(_o9){this._z=false;};this._n1=function(){if(this._7==null)
this._7=_fd.bind(this,"onmousedown",this,this.mousedown);if(this._8==null)
this._8=_fd.bind(this._b1,"onmousemove",this,this.mousemove);if(this._ba==null)
this._ba=_fd.bind(this,"onmouseup",this,this.mouseup);if(this._9==null)
this._9=_fd.bind(this._b1,"onmouseout",this,this.mouseout);};this.makeUndraggable=function(){if(this._7==null)
_fd.removeListener(this._7);if(this._8==null)
_fd.removeListener(this._8);if(this._ba==null)
_fd.removeListener(this._ba );if(this._9==null)
_fd.removeListener(this._9);this._7=null;this._8=null;this._ba=null;this._9=null;}
this.mouseover=function(e){if(typeof this._c9.title=="string"&&this._c9.title.length>0){var _qq=this._b1._kQ(this._oCoord);AGToolTip.show(this._b1,_qq,this._c9.title,e);}
return false;};this.mouseout2=function(){if(typeof this._c9.title=="string"&&this._c9.title.length>0)
AGToolTip.hide(this._b1);return false;};_fd.bind(this,"onmouseover",this,this.mouseover);_fd.bind(this,"onmouseout",this,this.mouseout2);this._ni=function(){return this._b1!=null;};this.openInfoDisplay=this._qd;this.openInfoDisplayHTML=this._qf;this.openInfoDisplayPanels=this._qh;this.openInfoDisplayPanelsHTML=this._qi;this.bindInfoDisplayPanels=this._ha;this.bindInfoDisplayPanelsHTML=this._hb;this.bindInfoDisplay=this._g8;this.bindInfoDisplayHTML=this._g9;this.showEnlargedMap=this._sY;this.getIcon=this._ko;this.getTitle=this._lf;this.getCoord=this._j9;this.setCoord=this._sq;this.setImage=this._sz;this.hide=this.hide;this.show=this.show;this.isVisible=this._np;this.closeInfoDisplay=this._hz;this.enableDragging=this._i3;this.disableDragging=this._h9;this.draggingEnabled=this._iI;this.draggable=this.draggable;}
var AGMarker=_fy;

function _fz(_pJ,_g2,_g3,_hj,_um,bBouncy,dBounceGravity){if(_pJ!=null&&_pJ instanceof _fl)
this.icon=_pJ;else this.icon=AG_DEFAULT_ICON.copy();if(typeof _um=="string")
this.title=_um;else this.title="";if(typeof _g3!="boolean")
this.draggable=false;else this.draggable=_g3;if(typeof _g2!="boolean")
this.clickable=true;else this.clickable=_g2;if(typeof _hj!="boolean")
this.stationary=false;else this.stationary=_hj;if(typeof bBouncy!="boolean")
this.bouncy=false;else this.bouncy=bBouncy;if(typeof dBounceGravity=="number"&&dBounceGravity>0&&dBounceGravity<=1)
this.bounceGravity=dBounceGravity;else this.bounceGravity=AG_DEFAULT_BOUNCE_GRAVITY;this.copy=function(){return new _fz(this.icon.copy(),this.clickable,this.draggable,this.stationary,this.title,this.bouncy,this.bounceGravity);};}
var AGMarkerOptions=_fz;

function _e0(){this.printable=function(){throw "You must implement this";};this.selectable=function(){throw "You must implement this";};this.initialize=function(_ox,_o8){throw "You must implement this";};this.getDefaultPosition=function(){return new _e1();};this.redraw=function(_mP){throw "You must implement this";};this.remove=function(){throw "You must implement this";};}
var AGControl=_e0;

_gj.prototype=new _e0;function _gj(_nM){var _ux=this;if(typeof _nM=="NaN"||typeof _nM=="undefined"||Math.floor(_nM)!=_nM||_nM<1||_nM>AG_TOTAL_NO_OF_ZOOMBAR)
_nM=AG_DEFAULT_ZOOMBAR_NO;this._bV=parseInt(_nM);this._b1=null;this._dC=null;this._dE=null;this._dF=null;this._dD=null;this._dG=null;this._E=true;var _rz=new _f2(0,0);var _rD=new _f2(0,0);var _rB=new _f2(0,0);var _rC=new _f2(0,0);var _rE=new _f2(0,0);switch(_nM){case 1:
_rz=new _f2(34,0);_rD=new _f2(0,120);_rB=new _f2(34,31);_rC=new _f2(34,33);_rE=new _f2(16,16);break;case 2:
_rz=new _f2(30,0);_rD=new _f2(30,176);_rB=new _f2(21,19);_rC=new _f2(21,19);_rE=new _f2(19,8);break;case 3:
_rz=new _f2(30,0);_rD=new _f2(30,176);_rB=new _f2(21,19);_rC=new _f2(21,19);_rE=new _f2(19,8);break;case 4:
_rz=new _f2(20,0);_rD=new _f2(0,221);_rB=new _f2(20,20);_rC=new _f2(20,20);_rE=new _f2(20,12);break;case 5:
_rz=new _f2(20,0);_rD=new _f2(0,120);_rB=new _f2(20,20);_rC=new _f2(20,20);_rE=new _f2(18,9);break;case 6:
_rz=new _f2(20,0);_rD=new _f2(20,140);_rB=new _f2(20,20);_rC=new _f2(20,20);_rE=new _f2(18,9);break;case 7:
_rz=new _f2(23,0);_rD=new _f2(23,136);_rB=new _f2(38,28);_rC=new _f2(38,28);_rE=new _f2(26,15);break;case 8:
_rz=new _f2(20,40);_rD=new _f2(0,0);_rB=new _f2(21,19);_rC=new _f2(21,18);break;};this.printable=function(){};this.selectable=function(){};this.redraw=function(_mP){var _m8=parseInt(parseInt(this._dF.style.height) /(_eI-1));switch(_mP){case _fD.ZOOM:
switch(this._dF.ZoomBarNo){case 1:
case 5:
case 6: 
case 7:
this._dG.style.top=parseInt(this._dE.style.top)-parseInt(_rE.height/2)-_m8*(this._b1._lm()-1)+"px";break;case 2:
case 3:
case 4:
this.setZoomSlideControl(this._b1._lm());break;}
break;}};this.initialize=function(_ox,_o8){this._b1=_ox;var _im=_ox._j6();if( _o8==null||!(_o8 instanceof _e1))
_o8=new _e1();this._dC=document.createElement('div');this._dC.style.position="absolute";this._dC.style.width=_rz.width+"px";this._dC.style.height=_rC.height+_rD.height+_rB.height+"px";this._dC.style.zIndex="270";this._dC.style.textAlign="left";this._dC.style.cursor="pointer";this._dC.ZoomBarNo=this._bV;if(_o8.anchor==_eR.TOP_RIGHT){switch(this._bV){case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 8:
this._dC.style.right=_o8.offset.x+"px";this._dC.style.top=_o8.offset.y+"px";break;case 7:
this._dC.style.right=(_o8.offset.x+8)+"px";this._dC.style.top=_o8.offset.y+"px";break;}}
else if(_o8.anchor==_eR.TOP_LEFT){this._dC.style.left=_o8.offset.x+"px";this._dC.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_RIGHT){switch(this._bV){case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
this._dC.style.right=_o8.offset.x+"px";this._dC.style.bottom=_o8.offset.y+"px";break;case 7:
this._dC.style.right=(_o8.offset.x+8)+"px";this._dC.style.bottom=_o8.offset.y+"px";break;}}
else if(_o8.anchor==_eR.BOTTOM_LEFT){this._dC.style.left=_o8.offset.x+"px";this._dC.style.bottom=_o8.offset.y+"px";}
var _mr=API_HOST_URL+"zoombar/"+"zb"+this._bV+"/ZoomIn.png";this._dD=document.createElement('img');this._dD.setAttribute('src',_mr);if(_eU._hg=="Explorer"){this._dD=document.createElement("div");this._dD.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_mr+"',sizingMethod='scale')";}
this._dD.style.position="absolute";this._dD.style.left="0px";this._dD.style.top="0px";this._dD.style.zIndex="5";this._dD.style.height=_rB.height+"px";this._dD.style.width=_rB.width+"px";this._dD.ZoomBarNo=this._bV;switch(this._bV){case 7:
this._dD.style.left="-3px";this._dD.style.top="2px";this._dD.onmouseover=function(_ji){_gk.handleMouseOverZoomInClick(_ji,_ux);}
this._dD.onmouseout=function(_ji){_gk.handleMouseOutZoomInClick(_ji,_ux);}
break;}
this._dC.appendChild(this._dD);this._dD.onclick=function(_ji){_gk.handleZoomInClick(_ji,_ux);}
if(this._bV!=8){_mr=API_HOST_URL+"zoombar/"+"zb"+this._bV+"/sliderBack.png";this._dF=document.createElement('img');this._dF.setAttribute('src',_mr);if(_eU._hg=="Explorer"){this._dF=document.createElement("div");this._dF.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_mr+"',sizingMethod='scale')";}
this._dF.style.position="absolute";this._dF.style.left="0px";this._dF.style.top=_rB.height+"px";this._dF.style.width="100%";this._dF.style.height=_rD.height+"px";this._dF.style.zIndex="5";this._dF.ZoomBarNo=this._bV;this._dC.appendChild(this._dF);this._dF.onclick=function(_ji){_gk.handleSlideBarClick(_ji,_ux);}}
_mr=API_HOST_URL+"zoombar/"+"zb"+this._bV+"/ZoomOut.png";this._dE=document.createElement('img');this._dE.setAttribute('src',_mr);if(_eU._hg=="Explorer"){this._dE=document.createElement("div");this._dE.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_mr+"',sizingMethod='scale')";}
this._dE.style.position="absolute";this._dE.style.left="0px";this._dE.style.top=_rB.height+_rD.height+"px";this._dE.style.height=_rC.height+"px";this._dE.style.width=_rC.width+"px";this._dE.style.zIndex="5";this._dE.ZoomBarNo=this._bV;switch(this._bV){case 7:
this._dE.style.left="-6px";this._dE.onmouseover=function(_ji){_gk.handleMouseOverZoomOutClick(_ji,_ux);}
this._dE.onmouseout=function(_ji){_gk.handleMouseOutZoomOutClick(_ji,_ux);}
break;}
this._dC.appendChild(this._dE);this._dE.onclick=function(_ji){_gk.handleZoomOutClick(_ji,_ux);}
if(this._bV==2||this._bV==3||this._bV==4){this.setZoomSlideControl(this._b1._lm());}
else {if(this._bV!=8){_mr=API_HOST_URL+"zoombar/"+"zb"+this._bV+"/arrow_blue.png";this._dG=document.createElement('img');this._dG.setAttribute('src',_mr);this._dG.setAttribute('alt',"");this._dG.style.position="absolute";this._dG.style.left="50%";this._dG.style.top=parseInt(this._dE.style.top)-parseInt(_rE.height/2)-parseInt(parseInt(this._dF.style.height) /(_eI-1))*(this._b1._lm()-1)+"px";this._dG.style.zIndex="10";this._dG.ZoomBarNo=this._bV;this._dG.onmousedown=function(_ji){_gk.SlideControllerMouseDown(_ji,_ux);return false;}
this._dG.onmouseup=function(_ji){_gk.SlideControllerMouseUp(_ji,_ux);return false;}
this._dG.onmousemove=function(_ji){_gk.SlideControllerMouseMove(_ji,_ux);return false;}
this._dG.onmouseout=function(_ji){_gk.SlideControllerMouseOut(_ji,_ux);return false;}
this._dC.appendChild(this._dG);}}
_im.appendChild(this._dC);this._E=false;};this._kA=function(){return this._b1;};this._ln=function(){return this._dF;};this._lo=function(){return this._dG;};this.getZoomInControl=function(){return this._dD;};this.getZoomOutControl=function(){return this._dE;};this.getZoomBarNumber=function(){return this._bV;};this.remove=function(){var _im=this._b1._j6();_im.removeChild(this._dC);this._b1=null;};this.hide=function(){if(!this._ni())
return;this._E=true;this._dC.style.display="none";};this.show=function(){if(!this._ni())
return;this._E=false;this._dC.style.display="";};this._np=function(){return !this._E;};this._ni=function(){return this._b1!=null;};this.setZoomSlideControl=function(_nN){while(this._dC.hasChildNodes()){this._dC.removeChild(this._dC.firstChild);}
this._dC.appendChild(this._dE);this._dC.appendChild(this._dD);this._dC.appendChild(this._dF);_mr=API_HOST_URL+"zoombar/"+"zb"+this._bV+"/scale_filler.png";var _m8=_rD.height / _eI;for(var i=0;i<_nN;i++){var zoomSlideController=document.createElement('img');zoomSlideController.setAttribute('src',_mr);zoomSlideController.setAttribute('alt',"");if(_eU._hg=="Explorer"){zoomSlideController=document.createElement("div");zoomSlideController.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_mr+"',sizingMethod='scale')";}
zoomSlideController.style.position="absolute";zoomSlideController.style.width=_rE.width+"px";zoomSlideController.style.height=_rE.height+"px";if(this._bV=="4")
zoomSlideController.style.left="0px";else zoomSlideController.style.left="1px";zoomSlideController.style.top=parseInt(this._dE.style.top)-(_m8*i)-_m8+"px";zoomSlideController.style.zIndex="8";this._dC.appendChild(zoomSlideController);zoomSlideController.onclick=function(_ji){_gk.handleSlideBarClick(_ji,_ux);}}
};this.hide=this.hide;this.show=this.show;this.isVisible=this._np;}
var AGZoomControl=_gj;

function _e1(_qH,_lH){if(typeof _lH!="number")
this.anchor=_eR.TOP_LEFT;else this.anchor=_lH;if( _qH==null||!(_qH instanceof _fM))
this.offset=new _fM(0,0);else this.offset=_qH;this.copy=function(){return new _e1(this.offset.copy(),this.anchor);};}
var AGControlPosition=_e1;

function _gk(){}
_gk.handleZoomInClick=function(e,_rA){_rA._kA()._uR();return false;};_gk.handleZoomOutClick=function(e,_rA){_rA._kA()._uT();return false;};_gk.handleMouseOverZoomInClick=function(e,_rA){var _mr=API_HOST_URL+"zoombar/"+"zb"+_rA.getZoomBarNumber()+"/ZoomIn_mo.png";var oZoomInControl=_rA.getZoomInControl();oZoomInControl.setAttribute('src',_mr);return false;};_gk.handleMouseOutZoomInClick=function(e,_rA){var _mr=API_HOST_URL+"zoombar/"+"zb"+_rA.getZoomBarNumber()+"/ZoomIn.png";var oZoomInControl=_rA.getZoomInControl();oZoomInControl.setAttribute('src',_mr);return false;};_gk.handleMouseOverZoomOutClick=function(e,_rA){var _mr=API_HOST_URL+"zoombar/"+"zb"+_rA.getZoomBarNumber()+"/ZoomOut_mo.png";var oZoomOutControl=_rA.getZoomOutControl();oZoomOutControl.setAttribute('src',_mr);return false;};_gk.handleMouseOutZoomOutClick=function(e,_rA){var _mr=API_HOST_URL+"zoombar/"+"zb"+_rA.getZoomBarNumber()+"/ZoomOut.png";var oZoomOutControl=_rA.getZoomOutControl();oZoomOutControl.setAttribute('src',_mr);return false;};_gk.handleSlideBarClick=function(e,_rA){e=e||window.event;if(!e)
return false;var _oh=_fB.getMouseOffset(e,_rA._ln());var _ng=parseInt(_rA._ln().style.height);var _m8=_ng / _eI;var iDiff=parseInt((_ng-_oh.y) / _m8);var oCenterPointCoord=_rA._kA()._j3();var _pQ=_rA._kA();var _m4=iDiff+1;_gk.zoomMapToScale(_pQ,oCenterPointCoord,_m4);return false;};var _qx=null;var _hl=false;_gk.SlideControllerMouseDown=function(_ji,_rA){_qx=_fB.getMouseOffset(_ji,_rA._ln());_hl=true;switch(_rA.getZoomBarNumber()){case 7:
var _mr=API_HOST_URL+"zoombar/"+"zb"+_rA.getZoomBarNumber()+"/arrow_blue_mo.png";var _rE=_rA._lo();_rE.setAttribute('src',_mr);break;}
return false;};_gk.SlideControllerMouseUp=function(_ji,_rA){switch(_rA.getZoomBarNumber()){case 7:
var _mr=API_HOST_URL+"zoombar/"+"zb"+_rA.getZoomBarNumber()+"/arrow_blue.png";var _rE=_rA._lo();_rE.setAttribute('src',_mr);break;}
if(_hl==true){var _ng=parseInt(_rA._ln().style.height);var _m8=_ng / _eI;var _lV=parseInt((_ng-_qx.y) / _m8);var oCenterPointCoord=_rA._kA()._j3();_gk.zoomMapToScale(_rA._kA(),oCenterPointCoord,_lV+1);_hl=false;_rA.redraw(_fD.ZOOM);return false;}
_hl=false;return false;};_gk.zoomMapToScale=function(_pQ,oCenterPointCoord,_m4){var _mu=_pQ._kF();var _mq=_pQ._kE();if(_m4>=_mu&&_m4<=_mq)
_pQ._hr(oCenterPointCoord,_m4);else if(_m4<_mu)
_pQ._hr(oCenterPointCoord,_mu);else if(_m4>_mq)
_pQ._hr(oCenterPointCoord,_mq);};_gk.SlideControllerMouseMove=function(_ji,_rA){if(_hl==true){var _qq=_fB.getMouseOffset(_ji,_rA._ln());if(_qq.y<0)
_qq.y=0;var _nf=parseInt(_qq.y)-parseInt(_qx.y);var _ng=parseInt(_rA._ln().style.height);if(_qq.y>_ng)
_qq.y=_ng;var _m8=_ng / _eI;var _lV=parseInt(_qq.y / _m8);if(_lV<=_eI-1)
_rA._lo().style.top=(_rA._lo().offsetTop+_nf)+"px";else return false;_qx=_qq;}
return false;};_gk.SlideControllerMouseOut=function(_ji,_rA){_gk.SlideControllerMouseMove(_ji,_rA);_gk.SlideControllerMouseUp(_ji,_rA);return false;};

_e4.prototype=new _e0;function _e4(_tu){this._dL=_tu;this._cl=null;this.printable=function(){};this.selectable=function(){};this.redraw=function(_mP){};this.initialize=function(_ox,_o8){this._b1=_ox;var _im=_ox._j6();if( _o8==null||!(_o8 instanceof _e1))
_o8=new _e1();this._cl=document.createElement('div');this._cl.style.position="absolute";this._cl.style.zIndex="300";this._cl.innerHTML=this._dL;if(_o8.anchor==_eR.TOP_RIGHT){this._cl.style.right=_o8.offset.x+"px";this._cl.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.TOP_LEFT){this._cl.style.left=_o8.offset.x+"px";this._cl.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_RIGHT){this._cl.style.right=_o8.offset.x+"px";this._cl.style.bottom=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_LEFT){this._cl.style.left=_o8.offset.x+"px";this._cl.style.bottom=_o8.offset.y+"px";}
_im.appendChild(this._cl);};this.resetCopyrightString=function(strCOpyright){this._cl.innerHTML=strCOpyright;}
this._r9=function(){var _q5=this._b1._kY();this._b1._j6().style.width=_q5.width+"px";this._b1._j6().style.height=_q5.height+"px";};this.hide=function(){this._cl.style.display="none";};this.show=function(){this._cl.style.display="";};this.remove=function(){this._b1._j6().removeChild(this._cl)
};this.setForeColor=function(strColor){this._cl.style.color=strColor;};}


_fY.prototype=new _e0;function _fY(){this._cr=null;this._dZ=null;this._b1=null;this._bo=0;this._bp=0;this.printable=function(){};this.selectable=function(){};this.redraw=function(_mP){switch(_mP){case _fD.ZOOM:
case _fD.PAN:
this._hm();this._cr.style.width=this._bp+"px";this._cs.style.left=this._bp+"px";this._dx.style.width=this._bp+"px";this._dx.innerHTML=this._bo+" "+this._dZ;break;}};this.initialize=function(_ox,_o8){this._b1=_ox;var _iF=1;this._hm();var divStaticContainer=_ox._kK(_fK.STATIC_PANE);if( _o8==null||!(_o8 instanceof _e1))
_o8=new _e1();this._cY=document.createElement('div');this._cY.style.position="absolute";this._cY.style.zIndex="300";this._cq=document.createElement('div');this._cq.style.height="6px";this._cq.style.left="0px";this._cq.style.styleFloat="left";this._cq.style.cssFloat="left";this._cq.style.border="1px solid black";this._cq.style.width="0px";this._cq.style.MozOpacity=_iF;this._cq.style.filter="alpha(opacity="+(_iF*100)+")";this._cq.style.opacity=_iF;this._cY.appendChild(this._cq);this._cr=document.createElement('div');this._cr.style.styleFloat="left";this._cr.style.cssFloat="left";this._cr.style.width=this._bp+"px";this._cr.style.height="1px";this._cr.style.borderTop="1px solid black";this._cr.style.MozOpacity=_iF;this._cr.style.filter="alpha(opacity="+(_iF*100)+")";this._cr.style.opacity=_iF;this._cY.appendChild(this._cr);this._cs=document.createElement('div');this._cs.style.height="6px";this._cs.style.left=this._bp+"px";this._cs.style.styleFloat="left";this._cs.style.cssFloat="left";this._cs.style.border="1px solid black";this._cs.style.width="0px";this._cs.style.MozOpacity=_iF;this._cs.style.filter="alpha(opacity="+(_iF*100)+")";this._cs.style.opacity=_iF;this._cY.appendChild(this._cs);this._dx=document.createElement('div');this._dx.style.position="absolute";this._dx.style.left="0px";this._dx.style.fontSize="8pt";this._dx.style.textAlign="center";this._dx.style.color="black";this._dx.style.width=this._bp+"px";this._dx.innerHTML=this._bo+" "+this._dZ;this._dx.style.MozOpacity=_iF;this._dx.style.filter="alpha(opacity="+(_iF*100)+")";this._dx.style.opacity=_iF;this._cY.appendChild(this._dx);if(_o8.anchor==_eR.TOP_RIGHT){this._cY.style.right=_o8.offset.x+"px";this._cY.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.TOP_LEFT){this._cY.style.left=_o8.offset.x+"px";this._cY.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_RIGHT){this._cY.style.right=_o8.offset.x+"px";this._cY.style.bottom=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_LEFT){this._cY.style.left=_o8.offset.x+"px";this._cY.style.bottom=_o8.offset.y+"px";}
divStaticContainer.appendChild(this._cY);};this._hm=function(){var dLong1=this._b1._jZ()._k0().longitude();var dLong2=this._b1._jZ()._kG().longitude();var dLat1=this._b1._jZ()._k0()._nP();var dLat2=this._b1._jZ()._kG()._nP();var _hq=parseFloat((dLat1+dLat2)/2);var _ik=_f8.getDistanceInKiloMetre(dLong1,_hq,dLong2,_hq);var _n6=this._b1._kY().width;var _mD=80;var _mB=parseFloat((_ik*_mD)/_n6);var _uw=parseFloat(_mB/5);_uw=Math.round(_uw);this._dZ="km";if(_uw>0){this._bo=_uw*5;this._bp=Math.round(_mD*this._bo/_mB);}
else {_uw=Math.round(parseFloat(_mB/2));if(_uw>0){this._bo=_uw*2;this._bp=Math.round(_mD*this._bo/_mB);}
else {_uw=Math.round(_mB);if(_uw>0){this._bo=Math.round(_mB);this._bp=Math.round(_mD*_uw/_mB);}
else {this._dZ="m";var _mB=parseFloat((_ik*_mD*1000)/_n6);var _uw=Math.round(parseFloat(_mB/50));if(_uw>0){this._bo=_uw*50;this._bp=Math.round(_mD*this._bo/_mB);}
else {_uw=Math.round(parseFloat(_mB/10));if(_uw>0){this._bo=_uw*10;this._bp=Math.round(_mD*this._bo/_mB);}}
}}
}};this._r9=function(){var _q5=this._b1._kY();this._b1._kK(_fK.STATIC_PANE).style.width=_q5.width+"px";this._b1._kK(_fK.STATIC_PANE).style.height=_q5.height+"px";};this.hide=function(){this._cY.style.display="none";};this.show=function(){this._cY.style.display="";};this.remove=function(){var divStaticContainer=this._b1._kK(_fK.STATIC_PANE)
divStaticContainer.removeChild(this._cY);};this.setColour=function(_ts){$("*",this._cY).css("border-color",_ts);this._dx.style.color=_ts;};}


AGCrossHair.prototype=new _e0;function AGCrossHair(_un,_q5){this._cJ=null;this._d0=_un;this._oSize=_q5;this._M=false;this._oCrossHairImg=null;this.initialize=function(_ox,_o8){this._cJ=_ox;var _iF=1;var oSizeContainer=this._cJ._kY();this._oCrossHairImg=document.createElement('img');this._oCrossHairImg.setAttribute('src',this._d0);this._oCrossHairImg.style.position="absolute";this._oCrossHairImg.style.zIndex="500";this._oCrossHairImg.style.top=(oSizeContainer.height-this._oSize.height)/2+"px";this._oCrossHairImg.style.left=(oSizeContainer.width-this._oSize.width)/2+"px";this._oCrossHairImg.style.MozOpacity=_iF;this._oCrossHairImg.style.filter="alpha(opacity="+(_iF*100)+")";this._oCrossHairImg.style.opacity=_iF;this._cJ._kK(_fK.STATIC_PANE).appendChild(this._oCrossHairImg);this._M=true;};this.redraw=function(_mP){};this.setCrossHairPosition=function(){var oSizeContainer=this._cJ._kY();this._oCrossHairImg.style.top=(oSizeContainer.height-this._oSize.height)/2+"px";this._oCrossHairImg.style.left=(oSizeContainer.width-this._oSize.width)/2+"px";}
this.remove=function(){this._cJ._kK(_fK.STATIC_PANE).removeChild(this._oCrossHairImg);this._oCrossHairImg=null;this._cJ=null;};}


function _f0(){this._cB=new _fh();this.get=function(_ta){if(typeof _ta!='string')
throw "Invalid argument";var _tr=this.toCanonical(_ta);var _gI=this._cB._kw(_tr);if(typeof _gI=="object"&&_gI!=null&&_gI.length>0)
return _gI[0];else return null;};this.isCachable=function(_t5){return true;};this.put=function(_ta,_t5){if(typeof _ta!='string')
throw "Invalid argument";var _tb=this.toCanonical(_ta);this._cB._d5(_tb,_t5);};this.reset=function(){this._cB=new _fh();};this.toCanonical=function(_ta){var _tc=_ta.toLowerCase();_tc=jQuery.trim(_tc);for(;;){if(_tc.match(",")!=null){_tc=_tc.replace(","," ");}
else if(_tc.match(" "+" ")!=null){_tc=_tc.replace(" "+" "," ");}
else break;}
return _tc;};}
var AGSearchCache=_f0;

var _eJ=-1;var _ec=new Array();function _fZ(_pF){this._bG=++_eJ;_ec[this._bG]=this;this._dU=null;this._cd=null;if(_pF instanceof _f0)
this._cz=_pF;else this._cz=new _f0();this._dT=null;this._si=function(_ue,_jG){if(typeof _ue!='string'||typeof _jG!="function")
throw 'Invalid argument';if(jQuery.trim(_ue)=="")
throw "Search string should have some text";this._dT=_ue;var _qY=this._cz.get(this._dT);this._cd=_jG;if(_qY!=null){this._cd(_qY);return;}
var _un=this._kT(_ue);var script=document.createElement("script");script.setAttribute("src",_un);script.setAttribute("type","text/javascript");document.body.appendChild(script);};this._kT=function(_ud){this._dU="Street";var _un=AG_CLIENT_GEOCODER_GATEWAY;_un+="?";_un+="SearchString="+_ud;_un+="&SearchType="+this._dU;_un+="&jsonp="+"_ec["+this._bG+"]._hp";_un+="&key="+_eS.key;_un+="&rnd="+Math.random();return _un;};this.getCache=function(){return this._cz;}
this.setCache=function(oSearchCache){if(oSearchCache!=null||oSearchCache instanceof AGGeocodeCache)
this._cz=oSearchCache;else throw "SearchCache object is not valid";}
this.reset=function(){this._cz.reset();}
this._hp=function(_t8){var _s6=eval("("+_t8+")");if(this._cz.isCachable())
this._cz.put(this._dT,_s6);this._cd(_s6);};this.search=this._si;}
var AGSearch=_fZ;

_fF.prototype=new _e0;var _eK=-1;var _eN=new Array();function _fF(_oz){if(_oz instanceof _fH)
this._cX=_oz.copy();else this._cX=new _fH();this._cI=null;this._c1=null;this._X=null;this._2=null;this._Z=null
this._1=null;this._bA=null;this._bz=null;this._by=null;this._cn=null;this._di=null;this._dj=null;this._dr=null;this._bP=10;this._bq=5;this._M=false;this._br=++_eK;_eN[this._br]=this;this.printable=function(){};this.selectable=function(){};this.getDefaultPosition=function(){return new _e1(new _fM(10,10),_eR.TOP_RIGHT);};this.initialize=function(_ox,_o8){this._cI=_ox;this._cn=_o8;this._hO();var _pS=new _fu(this._cX.backgroundColour,null,null,null,false);_pS.showCopyright=false;_pS.loadInitialMap=false;this._c1=new _fs(this._X,_pS);this._c1._sC(_fv.OVERVIEW_MAP);var _nN=Math.max(this._cI._lm()-this._cX.zoomDifference,1);this._c1._hr(this._cI._j3(),_nN);var _oF=new _ga(AG_DEFAULT_TMS_OPTIONS);var _rt=new _f7(1,_oF)
this._c1._d8(_rt,null,true);this._c1._rU();this._c1._r4()
this._c1._h8();this._c1._ij();this._c1._ig();this._c1._ia();this._sS();this._M=true;};this.redraw=function(_mP){switch(_mP){case _fD.ZOOM:
case _fD.PAN:
var _nN=Math.max(this._cI._lm()-this._cX.zoomDifference,1);this._c1._hr(this._cI._j3(),_nN);this._sS();break;}};this.remove=function(){var _it=this._cI._j6();_it.removeChild(this._Z);if(this._dr!=null)
clearTimeout(this._dr);this._cI=null;this._c1=null;this._X=null;this._2=null;this._Z=null
this._1=null;this._bA=null;this._bz=null;this._by=null;this._cn=null;this._di=null;this._dj=null;this._M=false;};this.hide=function(){if(this._Z!=null){this._Z.style.display="none";this._M=false;}};this.show=function(){if(this._Z!=null){this._Z.style.display="";this._M=true;}};this._np=function(){return this._M;};this._hO=function(){this._Z=document.createElement("div");this._Z.style.position="absolute";this._Z.style.width=this._cX.size.width+"px";this._Z.style.height=this._cX.size.height+"px";switch(this._cn.anchor){case _eR.TOP_RIGHT:
this._Z.style.right=this._cn.offset.x+"px";this._Z.style.top=this._cn.offset.y+"px";break;case _eR.TOP_LEFT:
this._Z.style.left=this._cn.offset.x+"px";this._Z.style.top=this._cn.offset.y+"px";break;case _eR.BOTTOM_RIGHT:
this._Z.style.right=this._cn.offset.x+"px";this._Z.style.bottom=this._cn.offset.y+"px";break;case _eR.BOTTOM_LEFT:
this._Z.style.left=this._cn.offset.x+"px";this._Z.style.bottom=this._cn.offset.y+"px";break;}
this._Z.style.border="1px solid black";this._Z.style.zIndex=300;this._Z.style.overflow="hidden";this._X=document.createElement("div");this._X.style.position="absolute";this._X.style.width=this._cX.size.width+"px";this._X.style.height=this._cX.size.height+"px";this._X.style.left="0px";this._X.style.top="0px";this._X.style.borderWidth="0px";this._X.style.zIndex=1;this._Z.appendChild(this._X);this._2=document.createElement("div");this._2.style.position="absolute";this._2.style.backgroundColor=this._cX.viewportColour;var _jJ=this._cX.viewportOpacity;this._2.style.opacity=_jJ;this._2.style.filter="alpha(opacity="+_jJ*100+")";this._2.style.mozOpacity=_jJ;this._2.style.zIndex=3;this._2.style.border="0px solid black";this._2.style.cursor=this._cX.viewPortCursor;this._Z.appendChild(this._2);var _it=this._cI._j6();_it.appendChild(this._Z);var _oV=new Object();_oV.overviewMap=this;var _iy=$(this._2);_iy.bind("mousedown",_oV,_fG.viewportMouseDownHandler);_iy.bind("mousemove",_oV,_fG.viewportMouseMoveHandler);_iy.bind("mouseup",_oV,_fG.viewportMouseUpHandler);_iy.bind("mouseout",_oV,_fG.viewportMouseOutHandler);if(this._cX.draggable){this._Y=document.createElement("div");this._Y.style.position="absolute";this._Y.style.width=this._cX.size.width+"px";this._Y.style.height=this._cX.size.height+"px";this._Y.style.backgroundColor="black";this._Y.style.opacity=0;this._Y.style.filter="alpha(opacity=0)";this._Y.style.mozOpacity=0;this._Y.style.zIndex=2;this._Y.style.cursor=this._cX.mapCursor;this._Z.appendChild(this._Y);var _iv=$(this._Y);_iv.bind("mousedown",_oV,_fG.omMouseDownHandler);_iv.bind("mousemove",_oV,_fG.omMouseMoveHandler);_iv.bind("mouseup",_oV,_fG.omMouseUpHandler);_iv.bind("mouseout",_oV,_fG.omMouseOutHandler);}
var _lK=12;this._1=document.createElement("div");this._1.style.position="absolute";this._1.style.right="0px";this._1.style.top="0px";this._1.style.width="39px";this._1.style.height="13px";this._1.style.background="black";this._1.style.zIndex=4;this._Z.appendChild(this._1);this._by=document.createElement("img");this._by.style.position="absolute";this._by.style.right="0px";this._by.style.top="0px";this._by.alt="Close";this._by.title="Close";this._by.setAttribute("src",AG_CLOSE_IMG_URL);this._1.appendChild(this._by);$(this._by).bind("click",_oV,_fG.closeButtonHandler);this._bz=document.createElement("img");this._bz.style.position="absolute";this._bz.style.right="13px";this._bz.style.top="0px";this._bz.alt="Maximize";this._bz.title="Maximize";this._bz.setAttribute("src",_eB);this._1.appendChild(this._bz);this._bA=document.createElement("img");this._bA.style.position="absolute";this._bA.style.right="26px";this._bA.style.top="0px";this._bA.alt="Minimize";this._bA.title="Minimize";this._bA.setAttribute("src",_eF);this._1.appendChild(this._bA);this._i9();this._di=new _f2(this._cX.size.width,this._cX.size.height);this._dj=new _f2(39,13);};this._sS=function(){var oCoordSpanOM=this._c1._jZ()._uC();var _rd=this._c1._kY();var oCoordSpanMM=this._cI._jZ()._uC();var _nC=Math.round(_rd.width*oCoordSpanMM.longitude() / oCoordSpanOM.longitude());var _nB=Math.round(_rd.height*oCoordSpanMM._nP() / oCoordSpanOM._nP());this._2.style.width=_nC+"px";this._2.style.height=_nB+"px";var oCoordTopLeft=this._cI._jZ()._kH();var _qy=this._c1._kQ(oCoordTopLeft);this._2.style.left=_qy.x+"px";this._2.style.top=_qy.y+"px";};this._rG=function(_re){if(_re.width==0&&_re.height==0)
return;var _q8=this._cI._kY();var _nC=parseInt(this._2.style.width);var _nB=parseInt(this._2.style.height);var _rJ=_q8.width*_re.width / _nC;var _rK=_q8.height*_re.height / _nB;this._cI._rG(new _fM(_rJ,_rK));this._sS();};this._i7=function(){if(this._bz!=null){this._bz.setAttribute("src",_eE);var _oV=new Object();_oV.overviewMap=this;$(this._bz).bind("click",_oV,_fG.maximizeButtonHandler);}};this._id=function(){if(this._bz!=null){this._bz.setAttribute("src",_eB);$(this._bz).unbind("click");}};this._i9=function(){if(this._bA!=null){this._bA.setAttribute("src",_eF);var _oV=new Object();_oV.overviewMap=this;$(this._bA).bind("click",_oV,_fG.minimizeButtonHandler);}};this._if=function(){if(this._bA!=null){this._bA.setAttribute("src",_eC);$(this._bA).unbind("click");}};this._n7=function(){if(!this._d4())
return;if(this._dr!=null)
clearTimeout(this._dr);this._id();var _lS=parseInt(this._Z.style.width);var _lO=parseInt(this._Z.style.height);if(_lS+this._bq<this._di.width)
this._Z.style.width=_lS+this._bq+"px";else this._Z.style.width=this._di.width+"px";if(_lO+this._bq<this._di.height)
this._Z.style.height=_lO+this._bq+"px";else this._Z.style.height=this._di.height+"px";if(_lS+this._bq<this._di.width||_lO+this._bq<this._di.height)
this._dr=setTimeout( "_eN["+this._br+"]._n7()",this._bP);else {this._dr=null;this._i9();}};this._od=function(){if(!this._d4())
return;if(this._dr!=null)
clearTimeout(this._dr);this._if();var _lS=parseInt(this._Z.style.width);var _lO=parseInt(this._Z.style.height);if(_lS-this._bq>this._dj.width)
this._Z.style.width=_lS-this._bq+"px";else this._Z.style.width=this._dj.width+"px";if(_lO-this._bq>this._dj.height)
this._Z.style.height=_lO-this._bq+"px";else this._Z.style.height=this._dj.height+"px";if(_lS-this._bq>this._dj.width||_lO-this._bq>this._dj.height)
this._dr=setTimeout( "_eN["+this._br+"]._od()",this._bP);else {this._dr=null;this._i7();}};this._d4=function(){return this._cI!=null;};this.hide=this.hide;this.show=this.show;this.maximize=this._n7;this.minimize=this._od;this.isVisible=this._np;}
var AGOverviewMapControl=_fF;

function _fH(_q5,_g3,_tf,_uq,_jO,_nO,strMapCursor,strViewPortCursor){if(_q5 instanceof _f2)
this.size=_q5;else this.size=new _f2(_eL.width,_eL.height);if(typeof _g3=="boolean")
this.draggable=_g3;else this.draggable=true;if(typeof _tf=="string"&&_tf.length>0)
this.backgroundColour=_tf;else this.backgroundColour="white";if(typeof _uq=="string"&&_uq.length>0)
this.viewportColour=_uq;else this.viewportColour="blue";if(typeof _jO=="number"&&_jO>0&&_jO<=1)
this.viewportOpacity=_jO;else this.viewportOpacity=0.5;if(typeof _nO=="number"&&Math.abs(Math.floor(_nO))==_nO )
this.zoomDifference=_nO;else this.zoomDifference=3;if(typeof strMapCursor=="string"&&strMapCursor.length>0)
this.mapCursor=strMapCursor;else this.mapCursor=AG_OVERVIEW_MAP_CURSOR;if(typeof strViewPortCursor=="string"&&strViewPortCursor.length>0)
this.viewPortCursor=strViewPortCursor;else this.viewPortCursor=AG_OVERVIEW_VIEWPORT_CURSOR;this.copy=function(){return new _fH(new _f2(this.size.width,this.size.height),this.draggable,this.backgroundColour,this.viewportColour,this.viewportOpacity,this.zoomDifference,this.mapCursor,this.viewPortCursor);};}
var AGOverviewMapOptions=_fH;

function _fG(){}
_fG.bViewportDrag=false;_fG.bOMDrag=false;_fG.oPointDragStart=null;_fG.oPointDragEnd=null;_fG._qx=null;_fG.viewportMouseDownHandler=function(e){if(_fB.isRightButton(e))
return false;var _p9=e.data.overviewMap;_fG.bViewportDrag=true;_fG.oPointDragStart=_fB.getMouseCoords(e);_fG._qx=new _fM(_fG.oPointDragStart.x,_fG.oPointDragStart.y);return false;};_fG.viewportMouseMoveHandler=function(e){if(_fG.bViewportDrag){var _p9=e.data.overviewMap;var _qs=_fB.getMouseCoords(e);var _rJ=_qs.x-_fG._qx.x;var _rK=_qs.y-_fG._qx.y;_p9._2.style.left=parseInt(_p9._2.style.left)+_rJ+"px";_p9._2.style.top=parseInt(_p9._2.style.top)+_rK+"px";_fG._qx=_qs;}
return false;};_fG.viewportMouseUpHandler=function(e){if(_fG.bViewportDrag){var _p9=e.data.overviewMap;_fG.oPointDragEnd=_fB.getMouseCoords(e);var _rJ=_fG.oPointDragEnd.x-_fG._qx.x;var _rK=_fG.oPointDragEnd.y-_fG._qx.y;_p9._2.style.left=parseInt(_p9._2.style.left)+_rJ+"px";_p9._2.style.top=parseInt(_p9._2.style.top)+_rK+"px";_rJ=parseInt(_fG.oPointDragEnd.x-_fG.oPointDragStart.x);_rK=parseInt(_fG.oPointDragEnd.y-_fG.oPointDragStart.y);_p9._rG(new _f2(-_rJ,-_rK));_fG.bViewportDrag=false;}
return false;};_fG.viewportMouseOutHandler=function(e){return _fG.viewportMouseUpHandler(e);};_fG.closeButtonHandler=function(e){var _p9=e.data.overviewMap;_p9._cI._rT(_p9);};_fG.maximizeButtonHandler=function(e){var _p9=e.data.overviewMap;_p9._n7();};_fG.minimizeButtonHandler=function(e){var _p9=e.data.overviewMap;_p9._od();};_fG.omMouseDownHandler=function(e){if(_fB.isRightButton(e))
return false;var _p9=e.data.overviewMap;_fG.bOMDrag=true;_fG._qx=_fB.getMouseCoords(e);return false;};_fG.omMouseMoveHandler=function(e){if(_fG.bOMDrag){var _p9=e.data.overviewMap;var _qs=_fB.getMouseCoords(e);var _rJ=_qs.x-_fG._qx.x;var _rK=_qs.y-_fG._qx.y;var _q8=_p9._cI._kY();var r=0;var l=0;var t=0;var b=0;var _mn=_q8.width-_p9._cX.size.width;var _mm=_q8.height-_p9._cX.size.height;switch(_p9._cn.anchor){case _eR.TOP_RIGHT:
r=Math.min(parseInt(_p9._Z.style.right)-_rJ,_mn);r=Math.max(r,0);_p9._Z.style.right=r+"px";t=Math.min(parseInt(_p9._Z.style.top)+_rK,_mm);t=Math.max(t,0);_p9._Z.style.top=t+"px";break;case _eR.TOP_LEFT:
l=Math.min(parseInt(_p9._Z.style.left)+_rJ,_mn);l=Math.max(l,0);_p9._Z.style.left=l+"px";t=Math.min(parseInt(_p9._Z.style.top)+_rK,_mm);t=Math.max(t,0);_p9._Z.style.top=t+"px";break;case _eR.BOTTOM_RIGHT:
r=Math.min(parseInt(_p9._Z.style.right)-_rJ,_mn);r=Math.max(r,0);_p9._Z.style.right=r+"px";b=Math.min(parseInt(_p9._Z.style.bottom)-_rK,_mm);b=Math.max(b,0);_p9._Z.style.bottom=b+"px";break;case _eR.BOTTOM_LEFT:
l=Math.min(parseInt(_p9._Z.style.left)+_rJ,_mn);l=Math.max(l,0);_p9._Z.style.left=l+"px";b=Math.min(parseInt(_p9._Z.style.bottom)-_rK,_mm);b=Math.max(b,0);_p9._Z.style.bottom=b+"px";break;}
_fG._qx=_qs;}
return false;};_fG.omMouseUpHandler=function(e){_fG.bOMDrag=false;return false;};_fG.omMouseOutHandler=function(e){return _fG.omMouseUpHandler(e);};

function _gi(_ox){}
var _gl=null;_gi.animate=function(_il,_nr,_nq,_lM,_lN,_ma,_mb){var _in=document.getElementById(_il);var _nE=parseInt(_in.style.width);var _l3=parseInt(_in.style.height);if(_ma>0&&_mb>0){var _lB=_ma;var _lC=_mb;if(_nE+_ma>=_nr)
_lB=_nr-_nE;if(_l3+_mb>=_nq)
_lC=_nq-_l3;var _mA=_nE+_lB;var _mz=_l3+_lC;_in.style.width=_mA+"px";_in.style.height=_mz+"px";_in.style.left=(_lM-_mA/2)+"px";_in.style.top=(_lN-_mz/2)+"px";_in.style.visibility="visible";if(_mA<_nr||_mz<_nq)
_gl=setTimeout("_gi.animate('"+_il+"',"+_nr+","+_nq+","+_lM+","+_lN+","+_ma+","+_mb+" )",_eP);else {_in.style.visibility="hidden";_gl=null;}}
else if(_ma<0&&_mb<0){var _lB=_ma;var _lC=_mb;if(_nE+_ma<=_nr)
_lB=_nr-_nE;if(_l3+_mb<=_nq)
_lC=_nq-_l3;var _mA=_nE+_lB;var _mz=_l3+_lC;_in.style.width=_mA+"px";_in.style.height=_mz+"px";_in.style.left=(_lM-_mA/2)+"px";_in.style.top=(_lN-_mz/2)+"px";_in.style.visibility="visible";if(_mA>_nr||_mz>_nq)
_gl=setTimeout("_gi.animate('"+_il+"',"+_nr+","+_nq+","+_lM+","+_lN+","+_ma+","+_mb+" )",_eP);else {_in.style.visibility="hidden";_gl=null;}}
};_gi.zoomOnRedDisplayAnimation=function(_ox,_qP,_g1){if(_gl!=null)
clearTimeout(_gl);var x=parseInt(_qP.x,10);var y=parseInt(_qP.y,10);var _ma=5;var _mb=5;if(_g1==1){var _in=_ox._ll();_in.style.left=x+"px";_in.style.top=y+"px";_in.style.width="0px";_in.style.height="0px";_in.style.visibility="visible";_gi.animate(_in.id,_eO.width,_eO.height,x,y,_ma,_mb);}
else if(_g1==0){var _in=_ox._ll();_in.style.left=(x-_eO.width/2)+"px";_in.style.top=(y-_eO.height/2)+"px";_in.style.width=_eO.width+"px";_in.style.height=_eO.height+"px";_in.style.visibility="visible";_gi.animate(_in.id,0,0,x,y,-_ma,-_mb);}
else {var _in=_ox._ll();_in.style.visibility="hidden";return false;}};

function _eS(){}
_eS.key="GRIDWEB";_eS.validate=function(){var _un=_eS.getValidationUrl(_eS.key,"http://afrigis.co.za","_eS.callbackValidationUrl");var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",_un);document.body.appendChild(script);};_eS.getValidationUrl=function(_tU,strCurrentUrl,callback){var _un=AG_KEY_VALIDATION_GATEWAY+"?";_un+="Request=ValidateKey"
_un+="&Key="+_tU;_un+="&Jsonp="+callback;_un+="&CurrentUrl"+strCurrentUrl;_un+="&rnd="+Math.random();return _un;};_eS.callbackValidationUrl=function(_t8){if(typeof _t8!="undefined"&&_t8!=null){if(typeof _t8=="string"&&_t8=="error"){return;}
if(_t8.Status.toLowerCase()=="error"){for(var i=0;i<AG_MAP_OBJECTS.length;i++){AG_MAP_OBJECTS[i]._h4();}
_fs=null;_e2=null;_f2=null;alert("Invalid Key");}}
};

function _fw(){}
_fw.getPeriodicAdvert=function(_n5){if(_fx.status==true){var _pQ=AG_MAP_OBJECTS[_n5];var _os=_pQ._jW();var _oL=_pQ._jZ();var _th=_oL._dk.longitude()+","+_oL._dk._nP()+","+_oL._cW.longitude()+","+_oL._cW._nP();var location="bb{"+_th+"}";var _un=_fw.getMarbilAdUrl(_os.width,_os.height,location,_n5,"_fw.callbackMarbilAdUsingJsonP");var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",_un);document.body.appendChild(script);setTimeout("_fw.getPeriodicAdvert("+_n5+");",AG_ADVERTISE_DURATION*1000);}
else if(_fx.status==false){return;}
else {setTimeout("_fw.getPeriodicAdvert("+_n5+");",AG_ADVERTISE_DURATION*1000);}};_fw.getMarbilAdUrl=function(_nE,_l3,_tY,_n5,_hn){var _un=AG_MARBIL_GATEWAY+"?";_un+="&Request=GetAdvertNow";_un+="&UserName="+_fx.userName;_un+="&Password="+_fx.password;_un+="&Width="+_nE;_un+="&Height="+_l3;_un+="&Location="+_tY;_un+="&Jsonp="+_hn;_un+="&MapIndex="+_n5;_un+="&key="+_eS.key;_un+="&rnd="+Math.random();return _un;}
_fw.callbackMarbilAdUsingJsonP=function(_tL,_mj){if(_tL.Status=="error"){return;}
if(_tL.length>0){var _pQ=AG_MAP_OBJECTS[_mj];_pQ._sD(_tL[0].ImageUrl,_tL[0].RedirectionUrl,_mj);}}


function _fx(){}
_fx.userName=null;_fx.password=null;_fx.status=null;_fx._nW=function(_td){var _un=AG_MARBIL_GATEWAY+"?";_un+="&Request=GetMarbilUser";_un+="&Key="+_td;_un+="&Jsonp=_fx.callbackLoad";var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",_un);document.body.appendChild(script);};_fx.callbackLoad=function(_uo){if(typeof _uo!="undefined"&&_uo!=null){if(typeof _uo.Status=="string"&&_uo.Status.toLowerCase()=="error")
return;_fx.userName=_uo.UserName;_fx.password=_uo.Password;_fx.status=(_uo.AdvertStatus.toLowerCase()=="true");if(_fx.status){for(var i=0;i<AG_MAP_OBJECTS.length;i++){AG_MAP_OBJECTS[i]._r9();}}
}};

function _fJ(){}
_fJ.smoothPan=function(_n5,x,y){var _pQ=AG_MAP_OBJECTS[_n5];var _qt=new _fM(x,y);if(_pQ.isEnabledPanAnimation()){if(_qt==null||!(_qt instanceof _fM))
throw "Invalid input for _ik.";var _q4=new _fM(0,0);if(_qt.x<=0&&_qt.y>=0){if(_qt.x<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,0);else if(_qt.y>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x>-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y<AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(_qt.x,_qt.y);else if(_qt.x>-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(_qt.x,0);else if(_qt.y<AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,_qt.y);if(_q4.x==0&&_q4.y==0)
return;else {_fJ.setMapContainer(_n5,_q4,x,y);}}
else if(_qt.x>=0&&_qt.y<=0){if(_qt.x>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,0);else if(_qt.y<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x<AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y>AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(_qt.x,_qt.y);else if(_qt.x<AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(_qt.x,0);else if(_qt.y>AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,_qt.y);if(_q4.x==0&&_q4.y==0)
return;else {_fJ.setMapContainer(_n5,_q4,x,y);}}
else if(_qt.x>=0&&_qt.y>=0){if(_qt.x>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,0);else if(_qt.y>=AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x<AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y<AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(_qt.x,_qt.y);else if(_qt.x<AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(_qt.x,0);else if(_qt.y<AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,_qt.y);if(_q4.x==0&&_q4.y==0)
return;else {_fJ.setMapContainer(_n5,_q4,x,y);}}
else if(_qt.x<=0&&_qt.y<=0){if(_qt.x<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x,0);else if(_qt.y<=-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,-AG_PAN_ANIMATION_DISTANCE_AMOUNT.y);else if(_qt.x>-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x&&_qt.y>AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(_qt.x,_qt.y);else if(_qt.x>-AG_PAN_ANIMATION_DISTANCE_AMOUNT.x)
_q4=new _fM(_qt.x,0);else if(_qt.y>AG_PAN_ANIMATION_DISTANCE_AMOUNT.y)
_q4=new _fM(0,_qt.y);if(_q4.x==0&&_q4.y==0)
return;else {_fJ.setMapContainer(_n5,_q4,x,y);}}
}
else {return;}};_fJ.setMapContainer=function(_n5,_q4,x,y){var _pQ=AG_MAP_OBJECTS[_n5];_pQ._oj(_q4);_pQ._lr(_fD.PAN);_pQ._lq(_fD.PAN);_qt=new _fM((x-_q4.x),(y-_q4.y));setTimeout('_fJ.smoothPan('+_n5+','+_qt.x+','+_qt.y+')',AG_PAN_ANIMATION_DURATION);}


function _fc(){}
_fc.show=function(){for(var i=0;i<AG_MAP_OBJECTS.length;i++)
AG_MAP_OBJECTS[i]._sX();jQuery(document).bind('keydown',_fc.hide);};_fc.hide=function(){for(var i=0;i<AG_MAP_OBJECTS.length;i++)
AG_MAP_OBJECTS[i]._ly();jQuery(document).unbind('keydown',_fc.hide);};

function _fj(_pI,_pj,_p2){if(_pI==null||typeof _pI!="object")
throw "Invalid HTML Object";if(!(_pj instanceof _e2))
throw "Invalid coordinate";if(_p2 instanceof _fk)
this._cX=_p2.copy();else this._cX=new _fk();this._cC=_pI;this._cj=_pj;this._cJ=null;this._M=false;this.initialize=function(_pQ){this._cJ=_pQ;this._sI();var divMap=this._cJ._kK(_fK.FLOAT_PANE);divMap.appendChild(this._cC);this._M=true;};this.copy=function(){};this.redraw=function(_mP){switch(_mP){case _fD.ZOOM:
this._sI();break;case _fD.PAN:
break;}};this.remove=function(){if(this._cC.parentNode)
this._cC.parentNode.removeChild(this._cC);this._cJ=null;this._M=false;};this._sI=function(){this._cC.style.position="absolute";var _qy=this._cJ._kP(this._cj);this._cC.style.left=_qy.x+this._cX.pixelOffset.x+"px";this._cC.style.top=_qy.y+this._cX.pixelOffset.y+"px";};this.show=function(){this._cC.style.visibility="visible";this._M=true;};this.hide=function(){this._cC.style.visibility="hidden";this._M=false;};this._np=function(){return this._M;};this._sq=function(_o9){if(!(_o9 instanceof _e2))
throw "Invalid coord input";this._cj=_o9;if(this._ni())
this._sI();};this._j9=function(){return this._cj;};this._ni=function(){return this._cJ!=null;};this.show=this.show;this.hide=this.hide;this.isVisible=this._np;this.setCoord=this._sq;this.getCoord=this._j9;}
var AGHTMLOverlay=_fj;

function _fk(_qK){if(_qK!=null&&_qK instanceof _fM)
this.pixelOffset=_qK;else this.pixelOffset=new _fM(0,0);this.copy=function(){return new _fk(this.pixelOffset);};}
var AGHTMLOverlayOptions=_fk;

AGMapTypeControl.prototype=new _e0;function AGMapTypeControl(_qX){if(_qX!=null&&_qX instanceof AGMapTypeOptions)
this._oMapTypeOptions=_qX;else this._oMapTypeOptions=new AGMapTypeOptions();this._cJ=null;this._M=false;this._oMapTypeContainer=null;this._oTypeMap=null;this._oTypeImagery=null;this._oTypeHybrid=null;this._oMapTypeContainer=document.createElement("div");this._oMapTypeContainer.style.position="absolute";this._oMapTypeContainer.style.width="202px";this._oMapTypeContainer.style.height="20px";this._oMapTypeContainer.style.zIndex="300";this._oTypeMap=document.createElement("div");this._oTypeMap.style.position="absolute";this._oTypeMap.style.width="100px";this._oTypeMap.style.height="18px";this._oTypeMap.style.textAlign="left";this._oTypeMap.setAttribute('align','left');this._oTypeMap.style.fontSize="12px";this._oTypeMap.innerHTML="Map";this._oTypeMap.style.border="1px solid black";this._oTypeMap.style.fontWeight="normal";this._oTypeMap.style.cursor="pointer";this._oTypeMap.style.backgroundColor=this._oMapTypeOptions.bgSelectedColour;this._oMapTypeContainer.appendChild(this._oTypeMap);this._oTypeImagery=document.createElement("div");this._oTypeImagery.style.position="absolute";this._oTypeImagery.style.backgroundColor=this._oMapTypeOptions.bgColour;this._oTypeImagery.style.width="100px";this._oTypeImagery.style.height="18px";this._oTypeImagery.style.left="101px";this._oTypeImagery.style.textAlign="left";this._oTypeImagery.style.fontSize="12px";this._oTypeImagery.setAttribute('align','left');this._oTypeImagery.innerHTML="Imagery";this._oTypeImagery.style.border="1px solid black";this._oTypeImagery.style.cursor="pointer";this._oTypeImagery.style.overflow="hidden";this._oTypeImagery.onmouseover=function(){this.style.height="80px";}
this._oTypeImagery.onmouseout=function(){this.style.height="18px";}
this._oTypeImagery.innerHTML+="<hr/>";if(_eU._hg=="Explorer")
this._oRadioButtonHybrid=document.createElement("input type='radio'");else {this._oRadioButtonHybrid=document.createElement("input");this._oRadioButtonHybrid.type="radio";} 
this._oRadioButtonHybrid.name="ImageryGroup";this._oRadioButtonHybrid.checked="checked";this._oTypeImagery.appendChild(this._oRadioButtonHybrid);this._oTypeImagery.innerHTML+="Hybrid";this._oTypeImagery.innerHTML+="<br/>";this._oMapTypeContainer.appendChild(this._oTypeImagery);if(_eU._hg=="Explorer")
this._oRadioButtonImageryOnly=document.createElement("input type='radio'");else {this._oRadioButtonImageryOnly=document.createElement("input");this._oRadioButtonImageryOnly.type="radio";} 
this._oRadioButtonImageryOnly.name="ImageryGroup";this._oTypeImagery.appendChild(this._oRadioButtonImageryOnly);this._oTypeImagery.innerHTML+="Imagery Only";this.initialize=function(_ox,_o8){this._cJ=_ox;var _im=_ox._j6();if( _o8==null||!(_o8 instanceof _e1))
_o8=new _e1();if(_o8.anchor==_eR.TOP_RIGHT){this._oMapTypeContainer.style.right=_o8.offset.x+"px";this._oMapTypeContainer.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.TOP_LEFT){this._oMapTypeContainer.style.left=_o8.offset.x+"px";this._oMapTypeContainer.style.top=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_RIGHT){this._oMapTypeContainer.style.right=_o8.offset.x+"px";this._oMapTypeContainer.style.bottom=_o8.offset.y+"px";}
else if(_o8.anchor==_eR.BOTTOM_LEFT){this._oMapTypeContainer.style.left=_o8.offset.x+"px";this._oMapTypeContainer.style.bottom=_o8.offset.y+"px";}
_im.appendChild(this._oMapTypeContainer);this._M=true;$(this._oTypeMap).bind("click",{map:this._cJ,_oV:this._oTypeMap,type:"map",_hI:this},AGMapTypeMouseManager.onmouseclick);$(this._oTypeImagery).bind("click",{map:this._cJ,_oV:this._oTypeImagery,type:"imagery",_hI:this},AGMapTypeMouseManager.onmouseclick);this._oTypeImagery.childNodes[2].checked=true;this._oTypeMap.style.fontWeight="bold";};this.redraw=function(_mP){};this._r9=function(){}
this.remove=function(){var _im=this._cJ._j6();_im.removeChild(this._oMapTypeContainer);};this.copy=function(){};this._np=function(){return this._M;};this.show=function(){if(!this._M){this._oMapTypeContainer.style.visibility="visible";this._M=true;}};this.hide=function(){if(this._M){this._oMapTypeContainer.style.visibility="hidden";this._M=false;}};this.customMapType=function(_tV,fxHandler){if(_tV==null||typeof _tV=="undefined"||typeof _tV!="string")
return;this._oTypeCustom=document.createElement("div");this._oTypeCustom.style.position="absolute";this._oTypeCustom.style.height="18px";this._oTypeCustom.style.textAlign="left";this._oTypeCustom.setAttribute('align','left');this._oTypeCustom.style.fontSize="12px";this._oTypeCustom.innerHTML=_tV;this._oTypeCustom.style.border="1px solid black";this._oTypeCustom.style.fontWeight="normal";this._oTypeCustom.style.backgroundColor=this._oMapTypeOptions.bgColour;this._oTypeCustom.style.cursor="pointer";this._oTypeCustom.style.left="212px";this._oTypeCustom.style.width="100px";this._oMapTypeContainer.appendChild(this._oTypeCustom);$(this._oTypeCustom).bind("click",{map:this._cJ,_oV:this._oTypeCustom,type:"custom",_hI:this,_ls:fxHandler},AGMapTypeMouseManager.onmouseClickCustom);this._oMapTypeContainer.style.width="310px";}
this.hide=this.hide;this.show=this.show;this.isVisible=this._np;}
var AGMapTypeControl=AGMapTypeControl;

function AGMapTypeMouseManager(){}
AGMapTypeMouseManager.onmouseclick=function(_ji){var _pQ=_ji.data.map;var _oV=_ji.data._oV;var type=_ji.data.type;var _hI=_ji.data._hI;$("*",_oV.parentNode).css("background-Color",_hI._oMapTypeOptions.bgColour);$("*",_oV.parentNode).css("font-Weight","normal");if(_eU._hg=="Explorer"&&type=="imagery"){_oV.childNodes[1].style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;_oV.childNodes[2].style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;_oV.childNodes[3].style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;_oV.childNodes[5].style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;_oV.childNodes[6].style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;}
_oV.style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;if(type=="map"){_oV.style.fontWeight="bold";_pQ._lz();_pQ._lx();_pQ._sV();_pQ._r9();_fd.trigger(_hI,"onmapcontrol");} 
else if(type=="imagery"){_pQ._lw();_pQ._sZ();_oV.style.fontWeight="bold";if(_oV.childNodes[2].checked==true){_pQ._sW();_fd.trigger(_hI,"onhibridcontrol");}
else {_pQ._lx();_fd.trigger(_hI,"onimagerycontrol");} 
_pQ._r9();_oV.checked=true;}}
AGMapTypeMouseManager.onmouseClickCustom=function(_ji){if(typeof _ji!="object")
return;var _oV=_ji.data._oV;var type=_ji.data.type;var _hI=_ji.data._hI;var _ls=_ji.data._ls;$("*",_oV.parentNode).css("background-Color",_hI._oMapTypeOptions.bgColour);$("*",_oV.parentNode).css("font-Weight","normal");_oV.style.backgroundColor=_hI._oMapTypeOptions.bgSelectedColour;eval('_ls()');return false;}


function AGCircle(_pc,fRadiusInMeter,_ry,_qX){if(_pc instanceof _e2)
this._oCoordCentre=_pc;else throw "Invalied centre coord";if(_qX!=null&&_qX instanceof AGCircleOptions)
this._cX=_qX;else this._cX=new AGCircleOptions();if(typeof fRadiusInMeter!="undefined"&&fRadiusInMeter!=null&&typeof fRadiusInMeter=="Number")
throw "Invalied radius";this._fRadiusInMeter=fRadiusInMeter;this._dA=_ry instanceof _gh ? _ry : AG_DEFAULT_VECTOR_OPTIONS.copy();this._cJ=null;this._oCirclePainter=new AGCirclePainter();this._oCircleElement=null;this._M=false;this._p=null;this.initialize=function(_pQ){this._cJ=_pQ;var _pO=this._cJ._kK(_fK.OVERLAY_PANE);var oPointCentre=this._cJ._kP(this._oCoordCentre);var iRadius=_f8.getDistanceMetreToPixel(this._fRadiusInMeter,this._cJ._lm());this._oCircleElement=this._oCirclePainter.circle(oPointCentre,iRadius,this._dA);_pO.appendChild(this._oCircleElement);if(this._cX.clickable)
this._so();this._M=true;};this.copy=function(){};this.redraw=function(_mP){if(_fD.ZOOM==_mP){var oPointCentre=this._cJ._kP(this._oCoordCentre);var iRadius=_f8.getDistanceMetreToPixel(this._fRadiusInMeter,this._cJ._lm());this._oCirclePainter.redraw(oPointCentre,iRadius);if(this._cX.clickable)
this._so();}};this.remove=function(){if(this._oCircleElement.parentNode){this._oCircleElement.parentNode.removeChild(this._oCircleElement);_fd.trigger(this,"onremove");this._rS();}};this._j5=function(){return null;};this._ni=function(){return this._b1!=null;};this.moveCentre=function(_pc){if(_pc instanceof _e2){this._oCoordCentre=_pc;if(this._oCircleElement){var iRadius=_f8.getDistanceMetreToPixel(this._fRadiusInMeter,this._cJ._lm());var oPointCentre=this._cJ._kP(this._oCoordCentre);this._oCirclePainter.redraw(oPointCentre,iRadius);_fd.trigger(this,"onlineupdated");if(this._cX.clickable)
this._so();}}
};this.show=function(){if(!this._np()){this._M=true;this._oCircleElement.style.visibility='visible';_fd.trigger(this,"onvisibilitychanged",true);if(this._cX.clickable)
this._so();}};this.hide=function(){if(this._np()){this._M=false;this._oCircleElement.style.visibility='hidden';_fd.trigger(this,"onvisibilitychanged",false);this._rS();}};this._np=function(){return this._M;};this.setRadius=function(fRadiusInMeter){if(fRadiusInMeter!=null&&typeof fRadiusInMeter!="undefined"&&typeof fRadiusInMeter=="number"){this._fRadiusInMeter=fRadiusInMeter;if(this._oCircleElement){var iRadius=_f8.getDistanceMetreToPixel(this._fRadiusInMeter,this._cJ._lm());var oPointCentre=this._cJ._kP(this._oCoordCentre);this._oCirclePainter.redraw(oPointCentre,iRadius);_fd.trigger(this,"onlineupdated");if(this._cX.clickable)
this._so();}}
};this._sP=function(_ry){if(_ry instanceof _gh){this._dA=_ry;if(this._oCircleElement){this._oCirclePainter._sP(_ry);_fd.trigger(this,"onlineupdated");}}
};this.insideCircle=function(_o9){if(_o9==null||!(_o9 instanceof _e2))
throw "Invalied centre coord";var _hZ=_f8.getDistanceBetweenCoords(this._oCoordCentre,_o9)*1000;if(_hZ<=this._fRadiusInMeter)
return true;else return false;}
this._j5=function(){if(this._cX.clickable){return this._p;}
return null;};this._so=function(){if(this._p!=null)
this._rS();this._p=new Array();var iRadius=_f8.getDistanceMetreToPixel(this._fRadiusInMeter,this._cJ._lm());var oPointCentre=this._cJ._kP(this._oCoordCentre);var angle=null;if(iRadius<100)
angle=10;else if(iRadius<200)
angle=5;else angle=2;this._p=_gg.getPolygonFromCircle(oPointCentre,iRadius,angle);this._cJ._d9(this);return this._p;};this._rS=function(){this._cJ._r3(this);this._p=null;};this._jZ=function(){var iRadius=_f8.getDistanceMetreToPixel(this._fRadiusInMeter,this._cJ._lm());var oPointCentre=this._cJ._kP(this._oCoordCentre);var angle=90;var points=_gg.getPolygonFromCircle(oPointCentre,iRadius,angle);var oCooed0=this._cJ._ka(points[0]);var oCooed1=this._cJ._ka(points[1]);var _oK=new _eT(oCooed0,oCooed1);for(var i=2;i<points.length;i++){_oK._jl(this._cJ._ka(points[i]));}
return _oK;}
this.moveCentre=this.moveCentre;this.show=this.show;this.hide=this.hide;this.isVisible=this._np;this.setRadius=this.setRadius;this.setStyle=this._sP;this.insideCircle=this.insideCircle;this.getBoundingBox=this._jZ;}
var AGCircle=AGCircle;

function AGInfoDisplayMaxMin(){}
AGInfoDisplayMaxMin.loadingMaximizeInfoDisplay=function(oInfoDisplayMaxSizeWidth,oInfoDisplayMaxSizeHeight,oCurentSizeWidth,oCurentSizeHeight,_n5){var _pQ=AG_MAP_OBJECTS[_n5];var oInfoDispaly=_pQ._ku();AGInfoDisplayMaxMin._sN(_n5,oCurentSizeWidth,oCurentSizeHeight,1);if(oCurentSizeWidth<oInfoDisplayMaxSizeWidth){if(oCurentSizeWidth+AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT.width>oInfoDisplayMaxSizeWidth)
oCurentSize=new _f2(oInfoDisplayMaxSizeWidth,oInfoDisplayMaxSizeHeight);else oCurentSize=new _f2((oCurentSizeWidth+AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT.width ),(oCurentSizeHeight+AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT.height ));setTimeout('AGInfoDisplayMaxMin.loadingMaximizeInfoDisplay('+oInfoDisplayMaxSizeWidth+','+oInfoDisplayMaxSizeHeight+','+oCurentSize.width+','+oCurentSize.height+','+_n5+')',AG_PAN_ANIMATION_DURATION);}
else {oInfoDispaly._oInfoDisplaySize=new _f2(oInfoDisplayMaxSizeWidth,oInfoDisplayMaxSizeHeight);var oInfoDisplayOpts=_pQ._kd();oInfoDispaly._cc.innerHTML="";var oDivTitle=document.createElement('div');oDivTitle.style.textAlign="center";oDivTitle.style.background="#F3F3F3";oDivTitle.innerHTML=oInfoDisplayOpts.maxTitle;oInfoDispaly._cc.appendChild(oDivTitle);oInfoDispaly._cc.innerHTML+=oInfoDisplayOpts.maxContent;var infoDisplayHeight=_ed+oInfoDispaly._oInfoDisplaySize.height+2*_ed;var infoDisplayWidth=_ed+oInfoDispaly._oInfoDisplaySize.width+_ed;var _hk=new _f2(infoDisplayWidth,infoDisplayHeight);oInfoDispaly._s4(oInfoDispaly._oCoord,oInfoDispaly._c3,_hk);_fd.trigger(oInfoDispaly,"onmaximizeend");}}
AGInfoDisplayMaxMin.loadingMinimizeInfoDisplay=function(oInfoDisplayMinSizeWidth,oInfoDisplayMinSizeHeight,oCurentSizeWidth,oCurentSizeHeight,_n5){var _pQ=AG_MAP_OBJECTS[_n5];var oInfoDispaly=_pQ._ku();AGInfoDisplayMaxMin._sN(_n5,oCurentSizeWidth,oCurentSizeHeight,2);if(oCurentSizeWidth>oInfoDisplayMinSizeWidth){if(oCurentSizeWidth-AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT.width<oInfoDisplayMinSizeWidth)
oCurentSize=new _f2(oInfoDisplayMinSizeWidth,oInfoDisplayMinSizeHeight);else oCurentSize=new _f2((oCurentSizeWidth-AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT.width),(oCurentSizeHeight-AG_MAX_MIN_ANIMATION_DISTANCE_AMOUNT.height));setTimeout('AGInfoDisplayMaxMin.loadingMinimizeInfoDisplay('+oInfoDisplayMinSizeWidth+','+oInfoDisplayMinSizeHeight+','+oCurentSize.width+','+oCurentSize.height+','+_n5+')',AG_PAN_ANIMATION_DURATION);}
else {oInfoDispaly._oInfoDisplaySize=new _f2(oInfoDisplayMinSizeWidth,oInfoDisplayMinSizeHeight);var oInfoDisplayOpts=_pQ._kd();oInfoDispaly._oPanelDiv.style.background='#FFFFFF';var oContent=oInfoDispaly._kL();oInfoDispaly.updateDisplayContent(oContent);var infoDisplayHeight=_ed+oInfoDispaly._oInfoDisplaySize.height+2*_ed;var infoDisplayWidth=_ed+oInfoDispaly._oInfoDisplaySize.width+_ed;var _hk=new _f2(infoDisplayWidth,infoDisplayHeight);oInfoDispaly._s4(oInfoDispaly._oCoord,oInfoDispaly._c3,_hk);_fd.trigger(oInfoDispaly,"onrestoreend");}}
AGInfoDisplayMaxMin._sN=function(_n5,oCurentSizeWidth,oCurentSizeHeight,iMaxMinIndex){var _pQ=AG_MAP_OBJECTS[_n5];var oInfoDispaly=_pQ._ku();var oInfoDisplayTempSize=new _f2(oCurentSizeWidth,oCurentSizeHeight);oInfoDispaly._cb.style.width=oInfoDisplayTempSize.width+(2*_ed)+"px";oInfoDispaly._b9.style.width=oInfoDisplayTempSize.width+"px";oInfoDispaly._b9.style.left=_ed+"px";oInfoDispaly._ca.style.left=parseInt(_ed+oInfoDisplayTempSize.width)+"px";oInfoDispaly._ci.style.width=(oInfoDisplayTempSize.width+2*_ed )+"px";oInfoDispaly._ci.style.height=oInfoDisplayTempSize.height+"px";oInfoDispaly._cg.style.height=oInfoDisplayTempSize.height+"px";oInfoDispaly._cc.style.width=oInfoDisplayTempSize.width+"px";oInfoDispaly._cc.style.height=oInfoDisplayTempSize.height+"px";oInfoDispaly._ch.style.height=oInfoDisplayTempSize.height+"px";oInfoDispaly._ch.style.left=_ed+oInfoDisplayTempSize.width+"px";oInfoDispaly._dv.style.width=oInfoDisplayTempSize.width+(2*_ed)+"px";oInfoDispaly._dt.style.width=oInfoDisplayTempSize.width+"px";oInfoDispaly._dt.style.left=_ed+"px";oInfoDispaly._du.style.left=parseInt(_ed+oInfoDisplayTempSize.width)+"px";var iMaxInfoDisplayPanelHeight=0;if(iMaxMinIndex==1)
iMaxInfoDisplayPanelHeight=0;else iMaxInfoDisplayPanelHeight=oInfoDispaly._oPanelDiv.offsetHeight;oInfoDispaly._oPanelRowPane.style.width=2*_ed+oInfoDisplayTempSize.width+"px";oInfoDispaly._oPanelDiv.style.width=oInfoDisplayTempSize.width+"px";oInfoDispaly._oPanelDiv.style.top=_ed+"px";oInfoDispaly._ci.style.top=_ed+iMaxInfoDisplayPanelHeight+"px";oInfoDispaly._cb.style.top=_ed+iMaxInfoDisplayPanelHeight+oInfoDisplayTempSize.height+"px";oInfoDispaly._oPanelLeftPane.style.height=iMaxInfoDisplayPanelHeight+"px";oInfoDispaly._oPanelRightPane.style.height=iMaxInfoDisplayPanelHeight+"px";oInfoDispaly._cm.style.top=_ed+iMaxInfoDisplayPanelHeight+oInfoDisplayTempSize.height+_ed+"px";var _o9=oInfoDispaly._oCoord;var _qk=oInfoDispaly._b1._kP(_o9);var _op=new _fM(oInfoDispaly._c3.x,(-oInfoDisplayTempSize.height-3*_ed-iMaxInfoDisplayPanelHeight+oInfoDispaly._c3.y) );_qk=new _fM(_qk.x+_op.x,_qk.y+_op.y);_qk=new _fM(_qk.x,_qk.y);oInfoDispaly._dB.style.position="absolute";oInfoDispaly._dB.style.top=_qk.y+"px";oInfoDispaly._dB.style.left=_qk.x+"px";if(oInfoDispaly._co.shadow){oInfoDispaly._df.style.width=(2*oInfoDisplayTempSize.width+20+iMaxInfoDisplayPanelHeight)+"px";oInfoDispaly._df.style.height=oInfoDisplayTempSize.height+iMaxInfoDisplayPanelHeight+"px";oInfoDispaly._df.style.top=_qk.y+65+"px";oInfoDispaly._df.style.left=_qk.x+"px";oInfoDispaly._df.style.display="";} 
else oInfoDispaly._df.style.display="none";}


function AGMarkerBounce(){}
AGMarkerBounce.bouncingUpDirection=function(iMarkerIndex,iAmount,_lW){var _pU=AG_MARKER_OBJECTS[iMarkerIndex];_pU._cM.style.top=parseInt(_pU._cM.style.top)-1+"px";_pU._cN.style.top=parseInt(_pU._cN.style.top)-1+"px";iAmount--;if(iAmount==0 ){AGMarkerBounce.bouncingDownDirection(iMarkerIndex,AG_BOUNCE_AMOUNT,_lW);}
else setTimeout('AGMarkerBounce.bouncingUpDirection('+iMarkerIndex+','+iAmount+','+_lW+')',_lW);}
AGMarkerBounce.bouncingDownDirection=function(iMarkerIndex,iAmount,_lW){var _pU=AG_MARKER_OBJECTS[iMarkerIndex];_pU._cM.style.top=parseInt(_pU._cM.style.top)+1+"px";_pU._cN.style.top=parseInt(_pU._cN.style.top)+1+"px";iAmount--;if(iAmount!=0 )
setTimeout('AGMarkerBounce.bouncingDownDirection('+iMarkerIndex+','+iAmount+','+_lW+')',_lW);else return;}


function AGToolTip(){}
AGToolTip.show=function(_ox,_qq,_um,e){var divToolTip=_ox.getToolTipDiv();var x=_qq.x-_ox._c5.x;var y=_qq.y-_ox._c5.y;divToolTip.style.visibility="visible";divToolTip.style.left=x+"px";divToolTip.style.top=y+"px";divToolTip.innerHTML=_um;}
AGToolTip.hide=function(_ox){var divToolTip=_ox.getToolTipDiv();divToolTip.style.visibility="hidden";}


function AGCircleOptions(_g2){this.clickable=false;if(_g2!=null&&typeof _g2!='undefined'&&typeof _g2=="boolean")
this.clickable=_g2;else this.clickable=false;this.copy=function(){return AGCircleOptions(this.clickable);}}


function AGMapTypeOptions(strBGColour,strBgSelectedColour){if(strBgSelectedColour!=null&&typeof strBgSelectedColour=="string")
this.bgSelectedColour=strBgSelectedColour;else this.bgSelectedColour=AG_BG_SELECTED_COLUOR;if(strBGColour!=null&&typeof strBGColour=="string")
this.bgColour=strBGColour;else this.bgColour=AG_BG_COLOUR;this.copy=function(){return new AGMapTypeOptions(this.bgSelectedColour,this.bgColour);}}


function AGCopyrightDataSetManager(){this._strDataSet="";this.getDatSet=function(){return this._strDataSet;}
this.addDataSet=function(_tx){if(!this.isExist(_tx)){if(this._strDataSet.length>0) 
 this._strDataSet+=","+_tx;else this._strDataSet=_tx;}};this.removeDataSet=function(_tx){var _my=-1;_my=this._strDataSet.indexOf(_tx);if(_my>=0){if(_my==0){this._strDataSet=this._strDataSet.substring(_tx.length);if(this._strDataSet.length>1)
this._strDataSet=this._strDataSet.substring(1);}
else {if((_my+_tx.length)==this._strDataSet.length)
this._strDataSet=this._strDataSet.substring(0,(_my-1));else this._strDataSet=this._strDataSet.substring(0,(_my-1))+this._strDataSet.substring(_my+_tx.length);}}
};this.isExist=function(_tx){if(this._strDataSet.indexOf(_tx)>0)
return true;return false;};}


function _gb(_tC,_tE){if(typeof _tC!="string")
throw "Invalid Category for Event.";else this._dK=_tC;if(typeof _tE!="string")
this._dW="";else this._dW=_tE;this.getCategory=function(){return this._dK;};this._k8=function(){return this._dW;};}


function _gd(){this._r=new Array();this._bI=0;this._bN=0;this._h=new Array();this._bH=0;this._bk=0;this._ea=function(_lW){var iSucessPoint=(_lW>=0 ) ? 1 : 0;if(this._r.length<AG_SUCCESS_REQ_LOG_COUNT){this._r.push(iSucessPoint);this._bN+=iSucessPoint;}
else {var _mO=this._r[this._bI];this._r[this._bI]=iSucessPoint;this._bI=(this._bI+1) % AG_SUCCESS_REQ_LOG_COUNT;this._bN=this._bN-_mO+iSucessPoint;}
if(_lW>=0){if(this._h.length<AG_TRAFFIC_RATE_LOG_COUNT){this._h.push(_lW);this._bk+=_lW;}
else {var _mN=this._h[this._bH];this._h[this._bH]=_lW;this._bH=(this._bH+1) % AG_TRAFFIC_RATE_LOG_COUNT;this._bk=this._bk-_mN+_lW;}}
};this._k9=function(){if(this._r.length>0)
return this._bN / this._r.length;return-1;};this._jX=function(){if(this._h.length>0)
return this._bk / this._h.length;return-1;};}


function _gc(){this._bm=new _fh();this.addRecord=function(oTrafficEvent,bSuccess,iTime){var oStatistics=this._k4(oTrafficEvent);if(oStatistics==null){oStatistics=new _gd();var _tU=this._kn(oTrafficEvent);this._bm._d5(_tU,oStatistics);}
if(bSuccess==true)
oStatistics._ea(iTime);else oStatistics._ea(-1);};this._k9=function(oTrafficEvent){var oStatistics=this._k4(oTrafficEvent);if(oStatistics!=null)
return oStatistics._k9();return-1;};this._kS=function(oTrafficEvent){var oStatistics=this._k4(oTrafficEvent);if(oStatistics!=null)
return oStatistics._jX();return-1;};this._hv=function(oTrafficEvent){var oStatistics=this._k4(oTrafficEvent);if(oStatistics!=null){var _tU=this._kn(oTrafficEvent);this._bm._rZ(_tU);if(oStatistics)
delete oStatistics;}};this._kn=function(oTrafficEvent){return oTrafficEvent.getCategory()+"|"+oTrafficEvent._k8();};this._k4=function(oTrafficEvent){var _tU=this._kn(oTrafficEvent);if(!this._bm._lu(_tU))
return null;var arrEventItems=this._bm._kw(_tU);return arrEventItems[0];};}
var _jS=new _gc();

function _fC(_gC,_tD){this._l=_gC;this._dP=_tD;this._n=new Array();this._be=0.00001;this._m=new Array(this._l.length);this._bK=0;this._bM=-1;for(var i=0;i<this._l.length;i++){var oTrafficEvent=new _gb(this._dP+i,"");_jS.addRecord(oTrafficEvent,true,1);var oStats=_jS._k4(oTrafficEvent);this._n.push(oStats);}
this._ht=function(){if(this._bK<=0||this._n[this._bM]._k9()<0.8){this._rQ();this._bK=AG_MS_REFRESH_RATE;}
this._bK--;return this._bM;};this._rQ=function(){var fTotalPoints=0;var _jt=-99999;var _l4=-1;for(var i=0;i<this._n.length;i++){var fSuccessRate=this._n[i]._k9()+this._be;var _jo=this._n[i]._jX()+this._be;this._m[i]=100*fSuccessRate / _jo;fTotalPoints+=this._m[i];if(this._m[i]>_jt){_jt=this._m[i];_l4=i;}}
if(_l4<0)
_l4=0;this._m[_l4]+=_jt*10;fTotalPoints+=_jt*10;var fRandomNumber=Math.random()*fTotalPoints;var _jm=0;for(var i=0;i<this._n.length;i++){_jm+=this._m[i];if(fRandomNumber<=_jm){this._bM=i;return;}}
};}
var _jR=new _fC(AG_AVAILABLE_TMS_URLS,AG_TMS_MARKER_PREFIX);var _jQ=new _fC(AG_AVAILABLE_DMS_URLS,AG_DMS_MARKER_PREFIX);
