MAPSERVER=new Array("tile21.mqcdn.com","tile22.mqcdn.com","tile23.mqcdn.com","tile24.mqcdn.com");
HYBSERVER=new Array("tile21.mqcdn.com","tile22.mqcdn.com","tile23.mqcdn.com","tile24.mqcdn.com");
SATSERVER=new Array("tile21.mqcdn.com","tile22.mqcdn.com","tile23.mqcdn.com","tile24.mqcdn.com");
RESSERVER="tile21.mqcdn.com";
LOGSERVER="btilelog.access.mapquest.com";
STATICSERVER="btileprint.access.mapquest.com";
TRAFFSERVER="btraffic.access.mapquest.com";
PCSEARCHSERVER="mq.place.pushpin.com";
PCIMAGESERVER="mq.dl.pushpin.com";
IsDotCom=false;

document.write("<link rel='stylesheet' href='" + 'http://btilelog.access.mapquest.com/tilelog/transaction?transaction=script&key=mjtd%7Clu612d6znq%2C7g%3Do5-lwz59&v=5.3.s&itkcss=true'.replace(/^http:/, location.protocol) + "' type='text/css'  charset='iso-8859-1'/>");
Key="mjtd%7Clu612d6znq%2C7g%3Do5-lwz59";
if(typeof (MQA)=="undefined"){
MQA=new Object();
}
if(window.location.protocol=="https:"){
MAPSERVER=new Array("tile21-s.mqcdn.com","tile22-s.mqcdn.com","tile23-s.mqcdn.com","tile24-s.mqcdn.com");
HYBSERVER=new Array("tile21-s.mqcdn.com","tile22-s.mqcdn.com","tile23-s.mqcdn.com","tile24-s.mqcdn.com");
SATSERVER=new Array("tile21-s.mqcdn.com","tile22-s.mqcdn.com","tile23-s.mqcdn.com","tile24-s.mqcdn.com");
RESSERVER="tile21-s.mqcdn.com";
}
MQA={PIXERSPERLATDEGREE:315552459.661917,PIXERSPERLNGDEGREE:250344597.90989706,TILESIZE:256,SLIDESTEPS:9,SLIDEDELAY:11,SCALES:new Array(0,88011773,29337258,9779086,3520471,1504475,701289,324767,154950,74999,36000,18000,9000,4700,2500,1500,1000),MODS:new Array(0,4,12,36,100,234,502,1084,2272,4694,9778,19558,39116,74900,140818,234698,352047),VENDORLIST:new Array("","mz1copy.gif","mz4copy.gif","mz7copy.gif","mz0copy.gif"),MAPVENDORS:new Array(0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,4),CORNER_TOPLEFT:0,CORNER_TOPRIGHT:1,CORNER_BOTTOMLEFT:2,CORNER_BOTTOMRIGHT:3,LOGO_MQ_LOGO:0,LOGO_MQ_SCALES:1,LOGO_MQ_COPY:2,LOGO_NT_COPY:3,LOGO_I3_COPY:4,LOGO_MAP_COPY:3,LOGO_SAT_COPY:4,EVENT_NONE:-1,EVENT_CLICK:0,EVENT_DBLCLICK:1,OPER_RECENTER:0,OPER_RECENTERZOOM:1,MAXMAPHEIGHT:7168,MAXMAPWIDTH:7168,BUTTON_MQ_LEFT:0,BUTTON_MQ_MIDDLE:1,BUTTON_MQ_RIGHT:2,MASTER_BROKER:null,SAFARI_BROWSER:(navigator.userAgent.indexOf("Safari")>=0),PAN_NORTH:0,PAN_SOUTH:1,PAN_EAST:2,PAN_WEST:3,CONTROL_PANZOOM:0,CONTROL_PAN:1,CONTROL_ZOOM:2,CONTROL_TYPE:3,CONTROL_TRAFFIC:4};
MQA.SURFACE_OFFSET=2*MQA.TILESIZE;
MQA.PROTOCOL=window.location.protocol;
MQA.RESOURCES=MQA.PROTOCOL+"//"+RESSERVER+"/res/";
MQA.STATICRESOURCES=MQA.PROTOCOL+"//"+STATICSERVER+"/tileprint.php";
MQA.IMGHOST=(MQA.PROTOCOL=="https:")?"api":"img";
MQA.NOTHING=MQA.RESOURCES+"nothing.gif";
MQA.MAP_TYPE={MAP:"map",SAT:"sat",HYB:"hyb",NONE:"none"};
MQA.TILE_LAYER_ID={MAP:"mqmaptilediv",SAT:"mqsattilediv",HYB:"mqhybtilediv",BLA:"mqblanktilediv"};
MQA.TILE_LAYER_TYPE={MAP:1,SAT:2,STRLBL:3,HOODPOLY:4,PARCEL:5};

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
if(typeof (MQA.Common)=="undefined"){
MQA.Common=new Object();
}
MQA.createXMLDoc=function(_1){
var _2;
if(document.implementation.createDocument){
var _3=new window.DOMParser();
if(MQA.BrowserInfo.isSafari){
_1=_1.replace(/&/g,"&amp;");
}
_2=_3.parseFromString(_1,"text/xml");
}else{
if(window.ActiveXObject){
_2=new window.ActiveXObject("Microsoft.XMLDOM");
_2.async="false";
_2.loadXML(_1);
}
}
return _2;
};
mqCreateXMLDoc=MQA.createXMLDoc;
MQA.createXMLDocFromNode=function(_4){
var _5;
_4=_4.documentElement;
if(document.implementation.createDocument){
var _5=document.implementation.createDocument("","",null);
try{
_5.appendChild(_5.importNode(_4,true));
}
catch(error){
alert(error);
alert(_4.nodeName);
}
}else{
if(window.ActiveXObject){
_5=new ActiveXObject("Microsoft.XMLDOM");
_5.async="false";
_5.loadXML(_4.xml);
}
}
return _5;
};
mqCreateXMLDocFromNode=MQA.createXMLDocFromNode;
MQA.Browser=function(){
this.name=null;
this.version=null;
this.os=null;
this.appname=null;
this.appVersion=null;
this.vMajor=null;
this.isNS=null;
this.isNS4=null;
this.isNS6=null;
this.isIE=null;
this.isIE4=null;
this.isIE5=null;
this.isDOM=null;
this.isSafari=null;
this.platform=null;
};
MQBrowser=MQA.Browser;
MQA.getBrowserInfo=function(){
var _6=new MQA.Browser();
_6.name=_6.version=_6.os="unknown";
var _7=window.navigator.userAgent.toLowerCase();
var _8=window.navigator.appName;
var _9=window.navigator.appVersion;
var _a=new Array("firefox","msie","netscape","opera","safari");
var _b=new Array("linux","mac","windows","x11");
var _c=_a.length;
var _d="";
for(var i=0,n=_c;i<n;i++){
_d=_7.indexOf(_a[i])+1;
if(_d>0){
_6.name=_a[i];
var _10=_d+_6.name.length;
var _11=((_6.name=="safari")||(_7.charAt(_10+4)>0&&_7.charAt(_10+4)<9))?5:3;
_6.version=_7.substring(_10,_10+_11);
}
}
var _12=_b.length;
for(var j=0,m=_12;j<m;j++){
_d=_7.indexOf(_b[j])+1;
if(_d>0){
_6.os=_b[j];
}
}
if(_8=="Netscape"){
_6.appname="ns";
}else{
if(_8=="Microsoft Internet Explorer"){
_6.appname="ie";
}
}
_6.appVersion=_9;
_6.vMajor=parseInt(_6.appVersion);
_6.isNS=(_6.appname=="ns"&&_6.vMajor>=4);
_6.isNS4=(_6.appname=="ns"&&_6.vMajor==4);
_6.isNS6=(_6.appname=="ns"&&_6.vMajor==5);
_6.isIE=(_6.appname=="ie"&&_6.vMajor>=4);
_6.isIE4=(_6.appVersion.indexOf("MSIE 4")>0);
_6.isIE5=(_6.appVersion.indexOf("MSIE 5")>0);
_6.isDOM=(document.createElement&&document.appendChild&&document.getElementsByTagName)?true:false;
_6.isSafari=(_6.name=="safari");
if(_7.indexOf("win")>-1){
_6.platform="win";
}else{
if(_7.indexOf("mac")>-1){
_6.platform="mac";
}else{
_6.platform="other";
}
}
return _6;
};
mqGetBrowserInfo=MQA.getBrowserInfo;
MQA.BrowserInfo=MQA.getBrowserInfo();
MQA.Object=function(){
var _15=null;
this.getM_XmlDoc=function(){
return _15;
};
this.setM_XmlDoc=function(_16){
_15=_16;
};
var _17=null;
this.getM_Xpath=function(){
return _17;
};
this.setM_Xpath=function(_18){
_17=_18;
};
};
MQA.Object.prototype.getClassName=function(){
return "MQObject";
};
MQA.Object.prototype.getObjectVersion=function(){
return 0;
};
MQA.Object.prototype.setProperty=function(_19,_1a){
var _1b;
if(_19!==null){
_1b="/"+this.getM_Xpath()+"/"+_19;
}else{
_1b="/"+this.getM_Xpath();
}
var _1c=mqSetNodeText(this.getM_XmlDoc(),_1b,_1a);
if(_1c===null){
var _1d=this.getM_XmlDoc().createElement(_19);
var _1e=this.getM_XmlDoc().documentElement.appendChild(_1d);
_1c=mqSetNodeText(this.getM_XmlDoc(),_1b,_1a);
}
return _1c;
};
MQA.Object.prototype.getProperty=function(_1f){
var _20;
if(_1f!==null){
_20="/"+this.getM_Xpath()+"/"+_1f;
}else{
_20="/"+this.getM_Xpath();
}
return mqGetXPathNodeText(this.getM_XmlDoc(),_20);
};
MQA.Object.prototype.copy=function(){
var cp=new this.constructor;
cp.loadXml(this.saveXml());
return cp;
};
MQA.Object.prototype.internalCopy=function(obj){
var _23="<"+obj.getM_Xpath();
if(this.getObjectVersion()>0){
_23=_23+" Version=\""+this.getObjectVersion()+"\"";
}
_23=_23+">";
var _24=this.getM_XmlDoc().documentElement;
var _25=_24.childNodes;
var _26=_25.length;
for(var _27=0;_27<_26;_27++){
_23=_23+mqXmlToStr(_25[_27]);
}
_23=_23+"</"+obj.getM_Xpath()+">";
var cp=new this.constructor;
cp.loadXml(_23);
return cp;
};
MQObject=MQA.Object;
MQA.Point=function(_29,_2a){
this.x=0;
this.y=0;
this.setM_Xpath("Point");
if(arguments.length==1){
this.setM_Xpath(_29);
}else{
if(arguments.length==2){
this.x=parseInt(_29);
this.y=parseInt(_2a);
if(isNaN(this.x)||isNaN(this.y)){
throw new Error("1MQPoint constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQPoint constructor called with "+arguments.length+" arguments, but it expects 0, 1, or 2 arguments");
}
}
}
};
MQA.Point.prototype=new MQA.Object();
MQA.Point.prototype.constructor=MQA.Point;
MQA.Point.prototype.getClassName=function(){
return "MQPoint";
};
MQA.Point.prototype.getObjectVersion=function(){
return 0;
};
MQA.Point.prototype.loadXml=function(_2b){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_2b));
this.x=this.getProperty("X");
this.y=this.getProperty("Y");
}
};
MQA.Point.prototype.saveXml=function(){
return "<"+this.getM_Xpath()+"><X>"+this.x+"</X><Y>"+this.y+"</Y></"+this.getM_Xpath()+">";
};
MQA.Point.prototype.setX=function(x){
this.x=parseInt(x);
if(isNaN(this.x)){
throw new Error("MQPoint.setX called with invalid parameter");
}
};
MQA.Point.prototype.getX=function(){
return this.x;
};
MQA.Point.prototype.setY=function(y){
this.y=parseInt(y);
if(isNaN(this.y)){
throw new Error("MQPoint.setY called with invalid parameter");
}
};
MQA.Point.prototype.getY=function(){
return this.y;
};
MQA.Point.prototype.setXY=function(x,y){
this.x=parseInt(x);
this.y=parseInt(y);
if(isNaN(this.x)||isNaN(this.y)){
throw new Error("MQPoint.setXY called with invalid parameter");
}
};
MQA.Point.prototype.valid=function(){
if("undefined"!==typeof (mqutils)){
return (Math.abs(this.x!=MQCONSTANT.MQPOINT_INVALID)&&Math.abs(this.y!=MQCONSTANT.MQPOINT_INVALID));
}
return false;
};
MQA.Point.prototype.equals=function(pt){
if(pt){
return (this.x===pt.x&&this.y===pt.y);
}
return false;
};
MQA.Point.prototype.toString=function(){
return this.x+","+this.y;
};
MQPoint=MQA.Point;
MQA.LatLng=function(_31,_32){
MQA.Object.call(this);
this.lat=0;
this.lng=0;
this.setM_Xpath("LatLng");
if(arguments.length==1){
this.setM_Xpath(_31);
}else{
if(arguments.length==2){
this.lat=parseFloat(_31);
this.lng=parseFloat(_32);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQA.LatLng constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQA.LatLng constructor called with "+arguments.length+" arguments, but it expects 0, 1, or 2 arguments.");
}
}
}
};
MQA.LatLng.prototype=new MQA.Object();
MQA.LatLng.prototype.constructor=MQA.LatLng;
MQA.LatLng.prototype.getClassName=function(){
return "MQLatLng";
};
MQA.LatLng.prototype.getObjectVersion=function(){
return 0;
};
MQA.LatLng.prototype.loadXml=function(_33){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_33));
this.lat=this.getProperty("Lat");
this.lng=this.getProperty("Lng");
}
};
MQA.LatLng.prototype.saveXml=function(){
return "<"+this.getM_Xpath()+"><Lat>"+this.lat+"</Lat><Lng>"+this.lng+"</Lng></"+this.getM_Xpath()+">";
};
MQA.LatLng.prototype.setLatitude=function(_34){
this.lat=parseFloat(_34);
if(isNaN(this.lat)){
throw new Error("MQA.LatLng.setLatitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLatitude=function(){
return this.lat;
};
MQA.LatLng.prototype.setLongitude=function(_35){
this.lng=parseFloat(_35);
if(isNaN(this.lng)){
throw new Error("MQA.LatLng.setLongitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLongitude=function(){
return this.lng;
};
MQA.LatLng.prototype.setLatLng=function(_36,_37){
this.lat=parseFloat(_36);
this.lng=parseFloat(_37);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQA.LatLng.setLatLng called with invalid parameter");
}
};
MQA.LatLng.prototype.arcDistance=function(ll2,_39){
if("undefined"!==typeof (mqutils)){
if(ll2){
if(ll2.getClassName()!=="MQLatLng"){
alert("failure in arcDistance");
throw "failure in arcDistance";
}
}else{
alert("failure in arcDistance");
throw "failure in arcDistance";
}
if(_39){
mqIsClass("MQDistanceUnits",_39,false);
}else{
_39=new MQDistanceUnits(MQCONSTANT.MQDISTANCEUNITS_MILES);
}
if(this.getLatitude()==ll2.getLatitude()&&this.getLongitude()==ll2.getLongitude()){
return 0;
}
var _3a=ll2.getLongitude()-this.getLongitude();
var a=MQCONSTANT.MQLATLNG_RADIANS*(90-this.getLatitude());
var c=MQCONSTANT.MQLATLNG_RADIANS*(90-ll2.getLatitude());
var _3d=(Math.cos(a)*Math.cos(c))+(Math.sin(a)*Math.sin(c)*Math.cos(MQCONSTANT.MQLATLNG_RADIANS*(_3a)));
var _3e=(_39.getValue()===MQCONSTANT.MQDISTANCEUNITS_MILES)?3963.205:6378.160187;
if(_3d<-1){
return MQCONSTANT.PI*_3e;
}else{
if(_3d>=1){
return 0;
}else{
return Math.acos(_3d)*_3e;
}
}
}
return -1;
};
MQA.LatLng.prototype.valid=function(){
if("undefined"!==typeof (mqutils)){
return (Math.abs(this.getLatitude()-MQCONSTANT.MQLATLNG_INVALID)>MQCONSTANT.MQLATLNG_TOLERANCE&&Math.abs(this.getLongitude()-MQCONSTANT.MQLATLNG_INVALID)>MQCONSTANT.MQLATLNG_TOLERANCE);
}
return false;
};
MQA.LatLng.prototype.equals=function(ll){
if(ll!==null){
return (this.getLongitude()===ll.getLongitude()&&this.getLatitude()===ll.getLatitude());
}
return false;
};
MQA.LatLng.prototype.toString=function(){
return this.lat+","+this.lng;
};
MQLatLng=MQA.LatLng;
MQA.XMLDOC=function(){
this.AUTOGEOCODECOVSWITCH=null;
this.AUTOROUTECOVSWITCH=null;
this.AUTOMAPCOVSWITCH=null;
this.DBLAYERQUERY=null;
this.LINEPRIMITIVE=null;
this.POLYGONPRIMITIVE=null;
this.RECTANGLEPRIMITIVE=null;
this.ELLIPSEPRIMITIVE=null;
this.TEXTPRIMITIVE=null;
this.SYMBOLPRIMITIVE=null;
this.LATLNG=null;
this.POINT=null;
this.POINTFEATURE=null;
this.LINEFEATURE=null;
this.POLYGONFEATURE=null;
this.LOCATION=null;
this.ADDRESS=null;
this.SINGLELINEADDRESS=null;
this.GEOADDRESS=null;
this.GEOCODEOPTIONS=null;
this.MANEUVER=null;
this.ROUTEOPTIONS=null;
this.ROUTERESULTS=null;
this.ROUTEMATRIXRESULTS=null;
this.RADIUSSEARCHCRITERIA=null;
this.RECTSEARCHCRITERIA=null;
this.POLYSEARCHCRITERIA=null;
this.CORRIDORSEARCHCRITERIA=null;
this.SIGN=null;
this.TREKROUTE=null;
this.INTCOLLECTION=null;
this.DTCOLLECTION=null;
this.LATLNGCOLLECTION=null;
this.LOCATIONCOLLECTION=null;
this.LOCATIONCOLLECTIONCOLLECTION=null;
this.MANEUVERCOLLECTION=null;
this.SIGNCOLLECTION=null;
this.STRINGCOLLECTION=null;
this.STRCOLCOLLECTION=null;
this.FEATURECOLLECTION=null;
this.PRIMITIVECOLLECTION=null;
this.POINTCOLLECTION=null;
this.TREKROUTECOLLECTION=null;
this.FEATURESPECIFIERCOLLECTION=null;
this.GEOCODEOPTIONSCOLLECTION=null;
this.COVERAGESTYLE=null;
this.RECORDSET=null;
this.MAPSTATE=null;
this.SESSION=null;
this.SESSIONID=null;
this.DTSTYLE=null;
this.DTSTYLEEX=null;
this.DTFEATURESTYLEEX=null;
this.FEATURESPECIFIER=null;
this.BESTFIT=null;
this.BESTFITLL=null;
this.CENTER=null;
this.CENTERLATLNG=null;
this.PAN=null;
this.ZOOMIN=null;
this.ZOOMOUT=null;
this.ZOOMTO=null;
this.ZOOMTORECT=null;
this.ZOOMTORECTLATLNG=null;
this.getAUTOGEOCODECOVSWITCH=function(){
if(this.AUTOGEOCODECOVSWITCH===null){
this.AUTOGEOCODECOVSWITCH=MQA.createXMLDoc("<AutoGeocodeCovSwitch/>");
}
return this.AUTOGEOCODECOVSWITCH;
};
this.getAUTOROUTECOVSWITCH=function(){
if(this.AUTOROUTECOVSWITCH===null){
this.AUTOROUTECOVSWITCH=MQA.createXMLDoc("<AutoRouteCovSwitch><Name/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></AutoRouteCovSwitch>");
}
return this.AUTOROUTECOVSWITCH;
};
this.getAUTOMAPCOVSWITCH=function(){
if(this.AUTOMAPCOVSWITCH===null){
this.AUTOMAPCOVSWITCH=MQA.createXMLDoc("<AutoMapCovSwitch><Name/><Style/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/><ZoomLevels Count=\"14\"><Item>6000</Item><Item>12000</Item><Item>24000</Item><Item>48000</Item><Item>96000</Item><Item>192000</Item><Item>400000</Item><Item>800000</Item><Item>1600000</Item><Item>3000000</Item><Item>6000000</Item><Item>12000000</Item><Item>24000000</Item><Item>48000000</Item></ZoomLevels></AutoMapCovSwitch>");
}
return this.AUTOMAPCOVSWITCH;
};
this.getDBLAYERQUERY=function(){
if(this.DBLAYERQUERY===null){
this.DBLAYERQUERY=MQA.createXMLDoc("<DBLayerQuery/>");
}
return this.DBLAYERQUERY;
};
this.getLINEPRIMITIVE=function(){
if(this.LINEPRIMITIVE===null){
this.LINEPRIMITIVE=MQA.createXMLDoc("<LinePrimitive Version=\"2\"/>");
}
return this.LINEPRIMITIVE;
};
this.getPOLYGONPRIMITIVE=function(){
if(this.POLYGONPRIMITIVE===null){
this.POLYGONPRIMITIVE=MQA.createXMLDoc("<PolygonPrimitive Version=\"2\"/>");
}
return this.POLYGONPRIMITIVE;
};
this.getRECTANGLEPRIMITIVE=function(){
if(this.RECTANGLEPRIMITIVE===null){
this.RECTANGLEPRIMITIVE=MQA.createXMLDoc("<RectanglePrimitive Version=\"2\"/>");
}
return this.RECTANGLEPRIMITIVE;
};
this.getELLIPSEPRIMITIVE=function(){
if(this.ELLIPSEPRIMITIVE===null){
this.ELLIPSEPRIMITIVE=MQA.createXMLDoc("<EllipsePrimitive Version=\"2\"/>");
}
return this.ELLIPSEPRIMITIVE;
};
this.getTEXTPRIMITIVE=function(){
if(this.TEXTPRIMITIVE===null){
this.TEXTPRIMITIVE=MQA.createXMLDoc("<TextPrimitive Version=\"2\"/>");
}
return this.TEXTPRIMITIVE;
};
this.getSYMBOLPRIMITIVE=function(){
if(this.SYMBOLPRIMITIVE===null){
this.SYMBOLPRIMITIVE=MQA.createXMLDoc("<SymbolPrimitive Version=\"2\"/>");
}
return this.SYMBOLPRIMITIVE;
};
this.getLATLNG=function(){
if(this.LATLNG===null){
this.LATLNG=MQA.createXMLDoc("<LatLng/>");
}
return this.LATLNG;
};
this.getPOINT=function(){
if(this.POINT===null){
this.POINT=MQA.createXMLDoc("<Point/>");
}
return this.POINT;
};
this.getPOINTFEATURE=function(){
if(this.POINTFEATURE===null){
this.POINTFEATURE=MQA.createXMLDoc("<PointFeature/>");
}
return this.POINTFEATURE;
};
this.getLINEFEATURE=function(){
if(this.LINEFEATURE===null){
this.LINEFEATURE=MQA.createXMLDoc("<LineFeature/>");
}
return this.LINEFEATURE;
};
this.getPOLYGONFEATURE=function(){
if(this.POLYGONFEATURE===null){
this.POLYGONFEATURE=MQA.createXMLDoc("<PolygonFeature/>");
}
return this.POLYGONFEATURE;
};
this.getLOCATION=function(){
if(this.LOCATION===null){
this.LOCATION=MQA.createXMLDoc("<Location/>");
}
return this.LOCATION;
};
this.getADDRESS=function(){
if(this.ADDRESS===null){
this.ADDRESS=MQA.createXMLDoc("<Address/>");
}
return this.ADDRESS;
};
this.getSINGLELINEADDRESS=function(){
if(this.SINGLELINEADDRESS===null){
this.SINGLELINEADDRESS=MQA.createXMLDoc("<SingleLineAddress/>");
}
return this.SINGLELINEADDRESS;
};
this.getGEOADDRESS=function(){
if(this.GEOADDRESS===null){
this.GEOADDRESS=MQA.createXMLDoc("<GeoAddress/>");
}
return this.GEOADDRESS;
};
this.getGEOCODEOPTIONS=function(){
if(this.GEOCODEOPTIONS===null){
this.GEOCODEOPTIONS=MQA.createXMLDoc("<GeocodeOptions/>");
}
return this.GEOCODEOPTIONS;
};
this.getMANEUVER=function(){
if(this.MANEUVER===null){
this.MANEUVER=MQA.createXMLDoc("<Maneuver Version=\"1\"><Narrative/><Streets Count=\"0\"/><TurnType>-1</TurnType><Distance>0.0</Distance><Time>-1</Time><Direction>0</Direction><ShapePoints Count=\"0\"/><GEFIDs Count=\"0\"/><Signs  Count=\"0\"/></Maneuver>");
}
return this.MANEUVER;
};
this.getROUTEOPTIONS=function(){
if(this.ROUTEOPTIONS===null){
this.ROUTEOPTIONS=MQA.createXMLDoc("<RouteOptions Version=\"3\"><RouteType>0</RouteType><NarrativeType>1</NarrativeType><NarrativeDistanceUnitType>0</NarrativeDistanceUnitType><MaxShape>0</MaxShape><MaxGEFID>0</MaxGEFID><Language>English</Language><CoverageName></CoverageName><CovSwitcher><Name></Name><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></CovSwitcher><AvoidAttributeList Count=\"0\"/><AvoidGefIdList Count=\"0\"/><AvoidAbsoluteGefIdList Count=\"0\"/><StateBoundaryDisplay>1</StateBoundaryDisplay><CountryBoundaryDisplay>1</CountryBoundaryDisplay></RouteOptions>");
}
return this.ROUTEOPTIONS;
};
this.getROUTERESULTS=function(){
if(this.ROUTERESULTS===null){
this.ROUTERESULTS=MQA.createXMLDoc("<RouteResults Version=\"1\"><Locations Count=\"0\"/><CoverageName/><ResultMessages Count=\"0\"/><TrekRoutes Count=\"0\"/></RouteResults>");
}
return this.ROUTERESULTS;
};
this.getROUTEMATRIXRESULTS=function(){
if(this.ROUTEMATRIXRESULTS===null){
this.ROUTEMATRIXRESULTS=MQA.createXMLDoc("<RouteMatrixResults/>");
}
return this.ROUTEMATRIXRESULTS;
};
this.getRADIUSSEARCHCRITERIA=function(){
if(this.RADIUSSEARCHCRITERIA===null){
this.RADIUSSEARCHCRITERIA=MQA.createXMLDoc("<RadiusSearchCriteria/>");
}
return this.RADIUSSEARCHCRITERIA;
};
this.getRECTSEARCHCRITERIA=function(){
if(this.RECTSEARCHCRITERIA===null){
this.RECTSEARCHCRITERIA=MQA.createXMLDoc("<RectSearchCriteria/>");
}
return this.RECTSEARCHCRITERIA;
};
this.getPOLYSEARCHCRITERIA=function(){
if(this.POLYSEARCHCRITERIA===null){
this.POLYSEARCHCRITERIA=MQA.createXMLDoc("<PolySearchCriteria/>");
}
return this.POLYSEARCHCRITERIA;
};
this.getCORRIDORSEARCHCRITERIA=function(){
if(this.CORRIDORSEARCHCRITERIA===null){
this.CORRIDORSEARCHCRITERIA=MQA.createXMLDoc("<CorridorSearchCriteria/>");
}
return this.CORRIDORSEARCHCRITERIA;
};
this.getSIGN=function(){
if(this.SIGN===null){
this.SIGN=MQA.createXMLDoc("<Sign><Type>0</Type><Text></Text><ExtraText></ExtraText><Direction>0</Direction></Sign>");
}
return this.SIGN;
};
this.getTREKROUTE=function(){
if(this.TREKROUTE===null){
this.TREKROUTE=MQA.createXMLDoc("<TrekRoute><Maneuvers Count=\"0\"/></TrekRoute>");
}
return this.TREKROUTE;
};
this.getINTCOLLECTION=function(){
if(this.INTCOLLECTION===null){
this.INTCOLLECTION=MQA.createXMLDoc("<IntCollection Count=\"0\"/>");
}
return this.INTCOLLECTION;
};
this.getDTCOLLECTION=function(){
if(this.DTCOLLECTION===null){
this.DTCOLLECTION=MQA.createXMLDoc("<DTCollection Version=\"1\" Count=\"0\"/>");
}
return this.DTCOLLECTION;
};
this.getLATLNGCOLLECTION=function(){
if(this.LATLNGCOLLECTION===null){
this.LATLNGCOLLECTION=MQA.createXMLDoc("<LatLngCollection Version=\"1\" Count=\"0\"/>");
}
return this.LATLNGCOLLECTION;
};
this.getLOCATIONCOLLECTION=function(){
if(this.LOCATIONCOLLECTION===null){
this.LOCATIONCOLLECTION=MQA.createXMLDoc("<LocationCollection Count=\"0\"/>");
}
return this.LOCATIONCOLLECTION;
};
this.getLOCATIONCOLLECTIONCOLLECTION=function(){
if(this.LOCATIONCOLLECTIONCOLLECTION===null){
this.LOCATIONCOLLECTIONCOLLECTION=MQA.createXMLDoc("<LocationCollectionCollection Count=\"0\"/>");
}
return this.LOCATIONCOLLECTIONCOLLECTION;
};
this.getMANEUVERCOLLECTION=function(){
if(this.MANEUVERCOLLECTION===null){
this.MANEUVERCOLLECTION=MQA.createXMLDoc("<ManeuverCollection Count=\"0\"/>");
}
return this.MANEUVERCOLLECTION;
};
this.getSIGNCOLLECTION=function(){
if(this.SIGNCOLLECTION===null){
this.SIGNCOLLECTION=MQA.createXMLDoc("<SignCollection Count=\"0\"/>");
}
return this.SIGNCOLLECTION;
};
this.getSTRINGCOLLECTION=function(){
if(this.STRINGCOLLECTION===null){
this.STRINGCOLLECTION=MQA.createXMLDoc("<StringCollection Count=\"0\"/>");
}
return this.STRINGCOLLECTION;
};
this.getSTRCOLCOLLECTION=function(){
if(this.STRCOLCOLLECTION===null){
this.STRCOLCOLLECTION=MQA.createXMLDoc("<StrColCollectin/>");
}
return this.STRCOLCOLLECTION;
};
this.getFEATURECOLLECTION=function(){
if(this.FEATURECOLLECTION===null){
this.FEATURECOLLECTION=MQA.createXMLDoc("<FeatureCollection Count=\"0\"/>");
}
return this.FEATURECOLLECTION;
};
this.getPRIMITIVECOLLECTION=function(){
if(this.PRIMITIVECOLLECTION===null){
this.PRIMITIVECOLLECTION=MQA.createXMLDoc("<PrimitiveCollection Count=\"0\"/>");
}
return this.PRIMITIVECOLLECTION;
};
this.getPOINTCOLLECTION=function(){
if(this.POINTCOLLECTION===null){
this.POINTCOLLECTION=MQA.createXMLDoc("<PointCollection Count=\"0\"/>");
}
return this.POINTCOLLECTION;
};
this.getTREKROUTECOLLECTION=function(){
if(this.TREKROUTECOLLECTION===null){
this.TREKROUTECOLLECTION=MQA.createXMLDoc("<TrekRouteCollection Count=\"0\"/>");
}
return this.TREKROUTECOLLECTION;
};
this.getFEATURESPECIFIERCOLLECTION=function(){
if(this.FEATURESPECIFIERCOLLECTION===null){
this.FEATURESPECIFIERCOLLECTION=MQA.createXMLDoc("<FeatureSpecifierCollection Count=\"0\"/>");
}
return this.FEATURESPECIFIERCOLLECTION;
};
this.getGEOCODEOPTIONSCOLLECTION=function(){
if(this.GEOCODEOPTIONSCOLLECTION===null){
this.GEOCODEOPTIONSCOLLECTION=MQA.createXMLDoc("<GeocodeOptionsCollection Count=\"0\"/>");
}
return this.GEOCODEOPTIONSCOLLECTION;
};
this.getCOVERAGESTYLE=function(){
if(this.COVERAGESTYLE===null){
this.COVERAGESTYLE=MQA.createXMLDoc("<CoverageStyle/>");
}
return this.COVERAGESTYLE;
};
this.getRECORDSET=function(){
if(this.RECORDSET===null){
this.RECORDSET=MQA.createXMLDoc("<RecordSet/>");
}
return this.RECORDSET;
};
this.getMAPSTATE=function(){
if(this.MAPSTATE===null){
this.MAPSTATE=MQA.createXMLDoc("<MapState/>");
}
return this.MAPSTATE;
};
this.getSESSION=function(){
if(this.SESSION===null){
this.SESSION=MQA.createXMLDoc("<Session Count=\"0\"/>");
}
return this.SESSION;
};
this.getSESSIONID=function(){
if(this.SESSIONID===null){
this.SESSIONID=MQA.createXMLDoc("<SessionID/>");
}
return this.SESSIONID;
};
this.getDTSTYLE=function(){
if(this.DTSTYLE===null){
this.DTSTYLE=MQA.createXMLDoc("<DTStyle/>");
}
return this.DTSTYLE;
};
this.getDTSTYLEEX=function(){
if(this.DTSTYLEEX===null){
this.DTSTYLEEX=MQA.createXMLDoc("<DTStyleEx/>");
}
return this.DTSTYLEEX;
};
this.getDTFEATURESTYLEEX=function(){
if(this.DTFEATURESTYLEEX===null){
this.DTFEATURESTYLEEX=MQA.createXMLDoc("<DTFeatureStyleEx/>");
}
return this.DTFEATURESTYLEEX;
};
this.getFEATURESPECIFIER=function(){
if(this.FEATURESPECIFIER===null){
this.FEATURESPECIFIER=MQA.createXMLDoc("<FeatureSpecifier/>");
}
return this.FEATURESPECIFIER;
};
this.getBESTFIT=function(){
if(this.BESTFIT===null){
this.BESTFIT=MQA.createXMLDoc("<BestFit Version=\"2\"/>");
}
return this.BESTFIT;
};
this.getBESTFITLL=function(){
if(this.BESTFITLL===null){
this.BESTFITLL=MQA.createXMLDoc("<BestFitLL Version=\"2\"/>");
}
return this.BESTFITLL;
};
this.getCENTER=function(){
if(this.CENTER===null){
this.CENTER=MQA.createXMLDoc("<Center/>");
}
return this.CENTER;
};
this.getCENTERLATLNG=function(){
if(this.CENTERLATLNG===null){
this.CENTERLATLNG=MQA.createXMLDoc("<CenterLatLng/>");
}
return this.CENTERLATLNG;
};
this.getPAN=function(){
if(this.PAN===null){
this.PAN=MQA.createXMLDoc("<Pan/>");
}
return this.PAN;
};
this.getZOOMIN=function(){
if(this.ZOOMIN===null){
this.ZOOMIN=MQA.createXMLDoc("<ZoomIn/>");
}
return this.ZOOMIN;
};
this.getZOOMOUT=function(){
if(this.ZOOMOUT===null){
this.ZOOMOUT=MQA.createXMLDoc("<ZoomOut/>");
}
return this.ZOOMOUT;
};
this.getZOOMTO=function(){
if(this.ZOOMTO===null){
this.ZOOMTO=MQA.createXMLDoc("<ZoomTo/>");
}
return this.ZOOMTO;
};
this.getZOOMTORECT=function(){
if(this.ZOOMTORECT===null){
this.ZOOMTORECT=MQA.createXMLDoc("<ZoomToRect/>");
}
return this.ZOOMTORECT;
};
this.getZOOMTORECTLATLNG=function(){
if(this.ZOOMTORECTLATLNG===null){
this.ZOOMTORECTLATLNG=MQA.createXMLDoc("<ZoomToRectLatLng/>");
}
return this.ZOOMTORECTLATLNG;
};
};
MQXMLDOC=MQA.XMLDOC;
MQA.MQXML=new MQA.XMLDOC();
MQXML=MQA.MQXML;
MQA.ObjectCollection=function(max){
MQA.Object.call(this);
var _41=new Array();
this.getM_Items=function(){
return _41;
};
var _42=(max!==null)?max:-1;
var _43="MQObject";
this.getValidClassName=function(){
return _43;
};
this.setValidClassName=function(_44){
_43=_44;
};
this.add=function(obj){
if(this.isValidObject(obj)){
if(_42!==-1&&_41.length===max){
return;
}
_41.push(obj);
return _41.length;
}
return;
};
this.getSize=function(){
return _41.length;
};
this.get=function(i){
return _41[i];
};
this.remove=function(_47){
return _41.splice(_47,1);
};
this.removeAll=function(){
_41=null;
_41=new Array();
};
this.contains=function(_48){
var _49=this.getSize();
for(var _4a=0;_4a<_49;_4a++){
if(_41[_4a]===_48){
return true;
}
}
return false;
};
this.append=function(_4b){
if(this.getClassName()===_4b.getClassName()){
_41=_41.concat(_4b.getM_Items());
}else{
alert("Invalid attempt to append "+this.getClassName()+" to "+_4b.getClassName()+"!");
throw "Invalid attempt to append "+this.getClassName()+" to "+_4b.getClassName()+"!";
}
};
this.set=function(i,_4d){
var _4e=get(i);
_41[i]=_4d;
return _4e;
};
this.isValidObject=function(obj){
if(obj!==null){
if(_43==="ALL"){
return true;
}else{
if(_43==="MQObject"){
return true;
}else{
if(_43==="String"){
return true;
}else{
if(_43==="int"){
if(isNaN(obj)){
return false;
}else{
if(obj===Math.floor(obj)){
return true;
}
}
}else{
if(obj.getClassName()===_43){
return true;
}
}
}
}
}
}
return false;
};
var _50="Item";
this.getM_itemXpath=function(){
return _50;
};
this.setM_itemXpath=function(_51){
_50=_51;
};
this.getById=function(_52){
try{
for(var _53=0;_53<this.getSize();_53++){
if(_41[_53].getId()==_52){
return _41[_53];
}
}
}
catch(Error){
}
return null;
};
this.removeItem=function(_54){
for(var i=0;i<_41.length;i++){
if(_41[i]==_54){
this.remove(i);
i=_41.length;
}
}
};
};
MQA.ObjectCollection.prototype=new MQA.Object();
MQA.ObjectCollection.prototype.constructor=MQA.ObjectCollection;
MQA.ObjectCollection.prototype.getClassName=function(){
return "MQObjectCollection";
};
MQA.ObjectCollection.prototype.getObjectVersion=function(){
return 0;
};
MQA.ObjectCollection.prototype.getAt=function(i){
return this.get(i);
};
MQObjectCollection=MQA.ObjectCollection;
MQA.LatLngCollection=function(){
MQA.ObjectCollection.call(this,32678);
this.setValidClassName("MQLatLng");
this.setM_Xpath("LatLngCollection");
this.setM_XmlDoc(MQA.createXMLDocFromNode(MQA.MQXML.getLATLNGCOLLECTION()));
};
MQA.LatLngCollection.prototype=new MQA.ObjectCollection(32678);
MQA.LatLngCollection.prototype.constructor=MQA.LatLngCollection;
MQA.LatLngCollection.prototype.getClassName=function(){
return "MQLatLngCollection";
};
MQA.LatLngCollection.prototype.getObjectVersion=function(){
return 1;
};
MQA.LatLngCollection.prototype.loadXml=function(_57){
this.removeAll();
var _58=MQA.createXMLDoc(_57);
this.setM_XmlDoc(_58);
if(_58!==null){
this._loadCollection(_58);
}
};
MQA.LatLngCollection.prototype.loadXmlFromNode=function(_59){
this.removeAll();
var _5a=mqCreateXMLDocImportNode(_59);
this.setM_XmlDoc(_5a);
if(_5a!==null){
this._loadCollection(_5a);
}
};
MQA.LatLngCollection.prototype._loadCollection=function(_5b){
var _5c=_5b.documentElement;
var _5d=_5c.childNodes;
var _5e=_5d.length;
_5e=(_5e<32678)?_5e:32678;
var _5f=0;
var _60=0;
var _61=0;
var _62=0;
var _63=null;
if(this.getValidClassName()==="MQLatLng"){
for(var _64=0;_64<_5e;_64++){
if(_64==0){
if(_5d[_64].firstChild!==null){
_61=_5d[_64].firstChild.nodeValue/1000000;
}
_64++;
if(_5d[_64].firstChild!==null){
_62=_5d[_64].firstChild.nodeValue/1000000;
}
}else{
if(_5d[_64].firstChild!==null){
_61=_5f+(_5d[_64].firstChild.nodeValue/1000000);
}
_64++;
if(_5d[_64].firstChild!==null){
_62=_60+(_5d[_64].firstChild.nodeValue/1000000);
}
}
_5f=_61;
_60=_62;
_63=new MQA.LatLng(_61,_62);
this.add(_63);
}
}
};
MQA.LatLngCollection.prototype.saveXml=function(){
var _65="<"+this.getM_Xpath()+" Version=\""+this.getObjectVersion()+"\" Count=\""+this.getSize()+"\">";
var _66=parseInt(this.getSize());
if(_66>=1){
var _67=nLng=nPrevLat=nPrevLng=nDeltaLat=nDeltaLng=0;
var _68=null;
for(var i=0;i<_66;i++){
_68=this.getAt(i);
_67=parseInt(_68.getLatitude()*1000000);
nLng=parseInt(_68.getLongitude()*1000000);
nDeltaLat=_67-nPrevLat;
nDeltaLng=nLng-nPrevLng;
_65+="<Lat>"+nDeltaLat+"</Lat>";
_65+="<Lng>"+nDeltaLng+"</Lng>";
nPrevLat=_67;
nPrevLng=nLng;
}
}
_65=_65+"</"+this.getM_Xpath()+">";
return _65;
};
MQA.LatLngCollection.prototype.generalize=function(_6a){
var _6b=function(){
this.pLL=null;
this.dSegmentLength=0;
this.dPriorLength=0;
};
var _6c=function(){
this.pLL=null;
this.ulOriginalPoint=0;
};
mqllAnchor=null;
var _6d;
var i;
var _6f=0;
var _70=this.getSize();
var _71=new Array(_70);
var _72=new Array(_70);
var _73=0;
if(_70<2){
return;
}
for(i=0;i<_70;i++){
_71[i]=new _6b();
_72[i]=new _6c();
_71[i].pLL=this.getAt(i);
}
for(i=0;i<_70-1;i++){
_71[i].dSegmentLength=_71[i].pLL.arcDistance(_71[(i+1)].pLL);
if(i==0){
_71[i].dPriorLength=0;
}else{
_71[i].dPriorLength=_6f;
}
_6f+=_71[i].dSegmentLength;
}
mqllAnchor=_71[0].pLL;
_6d=0;
_72[0].pLL=mqllAnchor;
_72[0].ulOriginalPoint=0;
_73=1;
for(i=2;i<_70;i++){
if(!this.isEverybodyWithinDeviation(_71,_6d,i,_6a)){
mqllAnchor=_71[(i-1)].pLL;
_6d=(i-1);
_72[_73].pLL=mqllAnchor;
_72[_73].ulOriginalPoint=(i-1);
_73++;
}
}
_72[_73].pLL=_71[_70-1].pLL;
_72[_73].ulOriginalPoint=_70-1;
_73++;
var _74=_70;
var _75;
for(_75=(_73-1);_75>=0;_75--){
if((_74-1)!=_72[_75].ulOriginalPoint){
for(var x=(_74-1);x>_72[_75].ulOriginalPoint;x--){
try{
this.remove(x);
}
catch(e){
}
}
_74=_72[_75].ulOriginalPoint;
}else{
_74--;
}
}
_71=null;
_72=null;
};
MQA.LatLngCollection.prototype.isEverybodyWithinDeviation=function(_77,_78,_79,_7a){
var _7b=0;
var _7c=0;
var _7d=null;
var _7e=null;
var _7f=0;
var _80=0;
var _81=0;
var i;
var _83=null;
var _84=0;
var _85=0;
var _86=0;
var _87=0;
var _88=0;
var _89=0;
var _8a=0;
var _8b=0;
_7b=MQA.DistanceApproximation.getMilesPerLngDeg(_77[_78].pLL.getLatitude());
_7c=_7a*_7a;
_7d=_77[_78].pLL;
_7e=_77[_79].pLL;
_7f=(_7e.getLatitude()-_7d.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;
_80=(_7e.getLongitude()-_7d.getLongitude())*_7b;
_81=_7f*_7f+_80*_80;
for(i=_78+1;i<_79;i++){
_83=_77[i].pLL;
_84=(_83.getLatitude()-_7d.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;
_85=(_83.getLongitude()-_7d.getLongitude())*_7b;
_86=_84*_84+_85*_85;
_88=_7f*_84+_80*_85;
_89=_7f*_7f+_80*_80;
if(_89==0){
_87=0;
}else{
_87=_88/_89;
}
_8a=_87*_87*_81;
_8b=_86-_8a;
if(_8b>_7c){
return false;
}
}
return true;
};
MQLatLngCollection=MQA.LatLngCollection;
MQA.DistanceApproximation=new function(){
this.m_testLat;
this.m_testLng;
this.m_mpd;
this.m_milesPerLngDeg=new Array(69.170976,69.160441,69.128838,69.076177,69.002475,68.907753,68.792041,68.655373,68.497792,68.319345,68.120088,67.900079,67.659387,67.398085,67.116253,66.813976,66.491346,66.148462,65.785428,65.402355,64.999359,64.576564,64.134098,63.672096,63.190698,62.690052,62.17031,61.63163,61.074176,60.498118,59.903632,59.290899,58.660106,58.011443,57.345111,56.66131,55.96025,55.242144,54.507211,53.755675,52.987764,52.203713,51.403761,50.588151,49.757131,48.910956,48.049882,47.174172,46.284093,45.379915,44.461915,43.530372,42.58557,41.627796,40.657342,39.674504,38.679582,37.672877,36.654698,35.625354,34.585159,33.534429,32.473485,31.40265,30.322249,29.232613,28.134073,27.026963,25.911621,24.788387,23.657602,22.519612,21.374762,20.223401,19.065881,17.902554,16.733774,15.559897,14.38128,13.198283,12.011266,10.820591,9.626619,8.429716,7.230245,6.028572,4.825062,3.620083,2.414002,1.207185,1);
this.MILES_PER_LATITUDE=69.170976;
this.KILOMETERS_PER_MILE=1.609347;
this.getMilesPerLngDeg=function(lat){
return (Math.abs(lat)<=90)?this.m_milesPerLngDeg[parseInt(Math.abs(lat)+0.5)]:69.170976;
};
};
DistanceApproximation=MQA.DistanceApproximation;

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
MQA.Util={getLLToXY:function(LL){
var xy=new MQA.PointXY(0,0);
var _3=MQA.getColTile(LL.lng,this.scale);
var _4=MQA.getRowTile(LL.lat,this.scale);
var _5=MQA.getColTileOffset(LL.lng,this.scale);
var _6=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_3)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_5);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_4)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_6);
xy.x=parseInt(xy.x);
xy.y=parseInt(xy.y);
return xy;
},isIntersectedXY:function(_7,_8){
var _9=(_7.lr.x>_8.ul.x)&&(_7.ul.x<_8.lr.x)&&(_7.lr.y>_8.ul.y)&&(_7.ul.y<_8.lr.y);
return _9;
},isIntersectedLL:function(_a,_b){
var _c=(_a.lr.lat<_b.ul.lat)&&(_a.ul.lat>_b.lr.lat)&&(_a.lr.lng>_b.ul.lng)&&(_a.ul.lng<_b.lr.lng);
return _c;
},isMouseLeaveOrEnter:function(e,_e){
if(e.type!="mouseout"&&e.type!="mouseover"){
return false;
}
var _f=e.relatedTarget?e.relatedTarget:e.type=="mouseout"?e.toElement:e.fromElement;
while(_f&&_f!=_e){
_f=_f.parentNode;
}
return (_f!=_e);
},getTop:function(_10){
var top=0;
while(_10){
top+=parseInt(_10.offsetTop);
_10=_10.offsetParent;
}
return (top);
},centreElement:function(_12){
_12.style.left=(MQA.browser.size().width-_12.offsetWidth)/2+"px";
_12.style.top=(MQA.browser.size().height-_12.offsetHeight)/2+"px";
},deleteChildElements:function(obj){
if(obj&&obj.childNodes.length>0){
for(var i=(obj.childNodes.length-1);i>=0;i--){
obj.removeChild(obj.childNodes[i]);
}
}
},deleteElement:function(obj){
if(obj){
obj.parentNode.removeChild(obj);
}
},pngFilter:function(_16){
if(!document.getElementsByTagName){
return;
}
if(MQA.browser.info.name=="msie"&&((MQA.browser.info.version<7)&&MQA.browser.info.version>5)){
var _17=(_16)?_16:document.images;
for(var i=0,l=_17.length;i<l;i++){
var img=_17[i];
var _1b=img.src;
if(_1b){
var _1c=_1b.length;
if(_1b.toLowerCase().substring(_1c-4,_1c)==".png"){
if(!img.title){
img.title=(img.alt)?img.alt:"";
}
img.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"');";
img.src=MQ.art.spacer;
}
}
}
}
},_modifyImageSrc:function(src){
var _1e=MQA.browser;
var _1f=src;
if(_1e.name=="msie"&&_1e.version<7){
_1f=_1f+".gif";
}else{
_1f=_1f+".png";
}
return _1f;
},getSuperRect:function(_20,_21){
var _22=new MQA.RectLL(new MQA.PointLL(0,0),new MQA.PointLL(0,0));
_22.ul.lat=Math.max(_20.ul.lat,_21.ul.lat);
_22.ul.lng=Math.min(_20.ul.lng,_21.ul.lng);
_22.lr.lat=Math.min(_20.lr.lat,_21.lr.lat);
_22.lr.lng=Math.max(_20.lr.lng,_21.lr.lng);
return _22;
},_hasPngExtention:function(url){
var _24=url.toLowerCase();
var _25=_24.lastIndexOf(".png");
if((_25!=-1)&&(_25==(_24.length-4))){
return true;
}
return false;
},_createImage:function(url,_27,top,_29,_2a,_2b){
var img;
img=document.createElement("img");
if(_2b==null){
_2b=false;
}
if(_2b){
img.isPng=_2b;
}else{
img.isPng=this._hasPngExtention(url);
}
if(!img.isPng){
img.src=url;
}else{
if(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5)){
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='image')";
img.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
}else{
img.src=url;
}
}
img.style.left=_27+"px";
img.style.top=top+"px";
img.style.width=_29+"px";
img.style.height=_2a+"px";
img.style.position="absolute";
img.style.zIndex=200;
img.style.MozUserSelect="none";
img.style.border="none";
img.style.display="block";
img.unselectable="on";
img.onselectstart=MQA._prEvent.falseFunction;
img.oncontextmenu=MQA._prEvent.falseFunction;
if(_2b==null){
_2b=false;
}
if(_2b){
img.isPng=_2b;
}else{
img.isPng=this._hasPngExtention(url);
}
return img;
},createImage:function(URL,_2e,TOP,_30,_31,_32,_33){
var _34;
_34=document.createElement("IMG");
if(typeof (_33)!="undefined"){
_34.onload=_33;
}
_34.galleryimg="no";
_34.lt=_2e;
_34.tp=TOP;
var _35=_34.style;
_35.width=MQA.Util.asPix(_30);
_35.height=MQA.Util.asPix(_31);
_35.position="absolute";
_35.left=MQA.Util.asPix(_2e);
_35.top=MQA.Util.asPix(TOP);
_35.zIndex=_32;
_35.MozUserSelect="none";
_35.display="block";
_35.border="0";
if(URL.length==0){
_35.visibility="hidden";
}else{
_35.visibility="visible";
_34.src=URL;
}
_34.unselectable="on";
_34.onselectstart=MQA._prEvent.falseFunction;
_34.oncontextmenu=MQA._prEvent.falseFunction;
return _34;
},pause:function(_36){
var now=new Date();
var _38=now.getTime()+_36;
while(true){
now=new Date();
if(now.getTime()>_38){
return;
}
}
},asPix:function(X){
return X+"px";
},calcPercentage:function(_3a,_3b){
return Math.round((_3a/_3b)*100);
},stripHTMLTags:function(s){
return s.replace(/<\/?[^>]+>/gi,"");
},panAngle:function(_3d,_3e,_3f,_40){
var b=(_40-_3e);
var c=(_3f-_3d);
if(b<0){
b=b*-1;
}
if(c<0){
c=c*-1;
}
var a=Math.round(Math.sqrt(b*b+c*c));
var _44=Math.round((Math.asin(b/a)*360)/(2*3.14));
return _44;
},isOverLimit:function(_45){
var _46=false;
var _47=16000;
for(var i=0;i<_45.length;i++){
if(_45[i].x>_47||_45[i].x<-_47||_45[i].y>_47||_45[i].y<-_47){
_46=true;
break;
}
}
return _46;
},InitDojo:function(_49){
window.onload=_49;
},getWindowScrollXY:function(){
var _4a=new MQA.Point(0,0);
if(typeof (window.pageYOffset)=="number"){
_4a.setX(window.pageXOffset);
_4a.setY(window.pageYOffset);
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_4a.setX(document.body.scrollLeft);
_4a.setY(document.body.scrollTop);
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_4a.setX(document.documentElement.scrollLeft);
_4a.setY(document.documentElement.scrollTop);
}
}
}
return (_4a);
},getHTMLSubstring:function(_4b,_4c,_4d){
var _4e=/<\/?[^>]+>/ig;
var _4f=new Array();
var _50=_4b.replace(_4e,"|");
var _51=_50.split("|");
_4f=_4b.match(_4e);
var _52="";
var _53=false;
for(var i=charCount=0;i<_51.length;i++){
charCount+=_51[i].length;
if(charCount>=_4c&&_53==false){
charCount-=_51[i].length;
_51[i]=_51[i].substr(0,(_4c-charCount))+_4d;
_53=true;
continue;
}
if(_53==true){
_51[i]="";
}
}
for(var i=0;i<_51.length;i++){
_52+=_51[i];
if(_4f&&(_4f.length>0)&&(i<_4f.length)){
_52+=_4f[i];
}
}
return (_52);
},getBrowserSize:function(){
size=new MQA.Size(0,0);
if(document.body.scrollHeight>document.body.offsetHeight){
size.width=document.body.scrollWidth;
size.height=document.body.scrollHeight;
}else{
size.width=document.body.offsetWidth;
size.height=document.body.offsetHeight;
}
if(document.body.clientWidth){
size.width=document.body.clientWidth;
size.height=document.body.clientHeight;
}else{
size.width=document.body.offsetWidth;
size.height=document.body.offsetHeight;
}
if(document.documentElement.clientWidth){
size.width=document.documentElement.clientWidth;
size.height=document.documentElement.clientHeight;
}
if(self.innerWidth){
size.width=self.innerWidth;
size.height=self.innerHeight;
}
return size;
},isSupportedBrowser:function(){
browser=MQA.browser;
switch(browser.name){
case "msie":
if(browser.version>=6){
return true;
}
return false;
break;
case "firefox":
if(browser.version>1.5){
return true;
}
return false;
break;
case "netscape":
return false;
break;
case "opera":
return false;
break;
case "safari":
if(browser.version>=2){
return true;
}
return false;
break;
}
return true;
},getParentOffset:function(_55){
var _56=0,_57=0;
do{
_56+=_55.offsetTop||0;
_57+=_55.offsetLeft||0;
_55=_55.offsetParent;
}while(_55);
return (new MQA.Point(_57,_56));
},indexOf:function(_58,_59){
for(var i=0,_5b=_58.length;i<_5b;i++){
if(_58[i]==_59){
return i;
}
}
return -1;
},getBrowserInfo:function(){
browser=new Object();
browser.name=browser.version=browser.os="unknown";
var _5c=navigator.userAgent.toLowerCase();
var _5d=new Array("firefox","msie","netscape","opera","safari");
var _5e=new Array("linux","mac","windows","x11");
for(var i=0,n=_5d.length;i<n;i++){
var _61=_5c.indexOf(_5d[i])+1;
if(_61>0){
browser.name=_5d[i];
var _62=_61+browser.name.length;
var _63=((browser.name=="safari")||(_5c.charAt(_62+4)>0&&_5c.charAt(_62+4)<9))?5:3;
browser.version=_5c.substring(_62,_62+_63);
}
}
for(var i=0,n=_5e.length;i<n;i++){
var _61=_5c.indexOf(_5e[i])+1;
if(_61>0){
browser.os=_5e[i];
}
}
return browser;
},createParentDiv:function(id,lt,tp,_67,top,_69,_6a,_6b,_6c){
var _6d=document.createElement("div");
_6d.id=id;
_6d.lt=lt;
_6d.tp=tp;
_6d.style.position=_67;
_6d.style.top=top+"px";
_6d.style.left=_69+"px";
if(_6a!=null){
_6d.style.zIndex=_6a;
}
if(_6b!=null){
_6d.style.width=_6b+"px";
}
if(_6c!=null){
_6d.style.height=_6c+"px";
}
return _6d;
},createImgHolder:function(src,_6f,_70,_71,_72){
var _73=document.createElement("img");
if(src!=null){
_73.src=src;
}
_73.unselectable=_6f;
_73.style.MozUserSelect=_70;
_73.style.display=_71;
if(_72!=null){
_73.style.zIndex=_72;
}
return _73;
},createImgLogo:function(_74,_75,_76,_77,_78,_79,_7a,src,_7c,_7d){
var _7e=document.createElement("img");
_7e.style.MozUserSelect=_74;
_7e.unselectable=_75;
_7e.corner=_76;
_7e.offset=_77;
_7e.style.position=_78;
_7e.style.display=_79;
_7e.style.zIndex=_7a;
if(_7c!=null){
_7e.width=_7c;
}
if(_7d!=null){
_7e.height=_7d;
}
return _7e;
},createArea:function(_7f,_80,_81,_82,alt){
var tmp=document.createElement("area");
if(_7f!=null){
tmp.shape=_7f;
}
if(_80!=null){
tmp.coords=_80;
}
if(_81!=null){
tmp.href=_81;
}
if(_82!=null){
tmp.title=_82;
}
if(alt!=null){
tmp.alt=alt;
}
return tmp;
},getCurrentDateObject:function(){
var _85;
iDate=new Date();
if((iDate.toString().indexOf("DT",0)!=-1)||(iDate.toString().indexOf("Daylight Time)",0)!=-1)){
_85=60;
}else{
_85=0;
}
var d=new Date();
var _87=new Object;
_87.year=d.getFullYear();
_87.month=d.getMonth();
_87.day=d.getDate();
_87.hours=d.getHours();
_87.minutes=d.getMinutes();
_87.seconds=d.getSeconds();
_87.ampm=((_87.hours>=12)&&(_87.minutes>0)?"pm":"am");
switch(d.getTimezoneOffset()+_85){
case 300:
_87.timeZone=(_85>0?"EDT":"EST");
break;
case 360:
_87.timeZone=(_85>0?"CDT":"CST");
break;
case 420:
_87.timeZone=(_85>0?"MDT":"MST");
break;
case 480:
_87.timeZone=(_85>0?"PDT":"PST");
break;
case 600:
_87.timeZone=(_85>0?"HDT":"HST");
break;
}
return _87;
},_getRandomGUID:function(n){
var p;
var _8a="";
var _8b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(var i=0;i<n;i++){
p=Math.floor(Math.random()*_8b.length);
_8a+=_8b.substr(p,1);
}
return _8a;
},_cloneValue:function(obj){
if(typeof (obj)!=="object"||obj==null){
return obj;
}
var c=obj instanceof Array?[]:{};
for(var i in obj){
var _90=obj[i];
if(typeof (_90)=="object"){
if(_90 instanceof Array){
c[i]=[];
for(var j=0;j<_90.length;j++){
if(typeof (_90[j])!="object"){
c[i].push(_90[j]);
}else{
c[i].push(this._cloneValue(_90[j]));
}
}
}else{
c[i]=this._cloneValue(_90);
}
}else{
c[i]=_90;
}
}
if(MQA.browser.name=="msie"){
c.toString=obj.toString;
}
return c;
},_trim:function(s){
return s.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
},_nukeChildren:function(obj){
var c;
while(obj.childNodes&&obj.childNodes.length>0){
c=obj.lastChild;
this._nukeChildren(c);
if(c.innerHTML){
c.innerHTML=null;
}
if(c.outerHTML){
this._setOuterHTMLToEmptyString(c);
}
if(c.parentNode){
c.parentNode.removeChild(c);
}
c=null;
delete c;
}
},_deleteDOMObject:function(obj){
this._setInnerHTMLToEmptyString(obj);
this._setOuterHTMLToEmptyString(obj);
this._nukeChildren(obj);
if(obj.parentNode){
obj.parentNode.removeChild(obj);
}
obj=null;
return null;
},_setInnerHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="msie"&&this.getBrowserInfo().name!="safari"){
obj.innerHTML=null;
}
},_setOuterHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="safari"&&this.getBrowserInfo().name!="msie"){
obj.outerHTML="";
}
},_purge:function(d){
var a=d.attributes,i,l,n;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
n=a[i].name;
if(typeof d[n]==="function"){
d[n]=null;
}
}
}
a=d.childNodes;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
this._purge(d.childNodes[i]);
}
}
},inArray:function(_9d,_9e){
for(var i=0;i<_9e.length;i++){
if(_9d==_9e[i]){
return true;
}
}
return false;
},inBounds:function(_a0,_a1){
var _a2,_a3,_a4,_a5;
if(_a1.getUpperLeft){
_a2=_a1.getUpperLeft().getLatitude();
_a3=_a1.getUpperLeft().getLongitude();
_a4=_a1.getLowerRight().getLatitude();
_a5=_a1.getLowerRight().getLongitude();
}else{
_a2=_a1.getLatitude();
_a3=_a1.getLongitude();
_a4=_a1.getLatitude();
_a5=_a1.getLongitude();
}
if(_a0.getUpperLeft){
if((_a2<=_a0.getUpperLeft().getLatitude())&&(_a4>=_a0.getLowerRight().getLatitude())){
if((_a3>=_a0.getUpperLeft().getLongitude())&&(_a5<=_a0.getLowerRight().getLongitude())){
return true;
}
}
}
return false;
}};
MQA.browser=MQA.Util.getBrowserInfo();

MQA._prEvent=new function(){
var _1=false,_2=false,_3=[],_4=[],_5=false;
function _checkUnlReg(){
if(!_5&&document.body){
_5=true;
if(document.body.attachEvent){
document.body.attachEvent("onunload",_onUnload);
}else{
document.body.addEventListener("onunload",_onUnload,false);
}
}
}
function _onLoad(){
_1=true;
_checkUnlReg();
for(var i=0;i<_3.length;i++){
_3[i]();
}
}
function _onUnload(){
}
this._onUnload=function(){
if(_2){
return;
}
if(window.detachEvent){
window.detachEvent("onload",_onLoad);
window.detachEvent("onunload",_onUnload);
if(document.body){
document.body.detachEvent("onunload",_onUnload);
}
}
for(var i=0;i<_4.length;i++){
var l=_4[i];
try{
_4[i]();
if(l){
_4[i]();
}
}
catch(e){
}
}
_2=true;
};
this.addOnUnload=function(_9){
_4.push(_9);
};
this.observe=function(_a,_b,_c){
if(typeof _a=="string"){
_a=document.getElementById(_a);
}
if(_b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_a.attachEvent)){
_b="keydown";
}
this._observe(_a,_b,_c);
};
this.stopObserving=function(_d,_e,_f){
if(typeof _d=="string"){
_d=document.getElementById(_d);
}
if(_e=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_d.attachEvent)){
_e="keydown";
}
this._stopObserving(_d,_e,_f);
};
var dav=navigator.appVersion;
var _11;
if(dav.match(/\bMSIE\b/)&&window.attachEvent){
_11=parseFloat(dav.split("MSIE ")[1].split(";")[0]);
if(_11){
var _12=[];
this._observe=function(_13,_14,_15){
_13.attachEvent("on"+_14,_15);
var _16=_12.length;
_12[_16]=[_13,_14,_15];
_15["__ie6_"+_14]=_16;
};
this._stopObserving=function(_17,_18,_19){
_17.detachEvent("on"+_18,_19);
var _1a=_19["__ie6_"+_18];
if(_1a){
delete _12[_1a];
}
};
this.addOnUnload(this._evUnloadFcn=function(){
for(var k in _12){
var v=_12[k];
if(typeof v=="object"&&v.length==3){
delete _12[k];
try{
v[0].detachEvent("on"+v[1],v[2]);
}
catch(e){
}
}
}
});
}else{
this._observe=function(_1d,_1e,_1f){
_1d.attachEvent("on"+_1e,_1f);
};
this._stopObserving=function(_20,_21,_22){
_20.detachEvent("on"+_21,_22);
};
}
}else{
_11=false;
this._observe=function(_23,_24,_25){
_23.addEventListener(_24,_25,false);
};
this._stopObserving=function(_26,_27,_28){
_26.removeEventListener(_27,_28,false);
};
}
var _29=[];
this.addDtor=function(obj,_2b){
var _2c=_29.length,v;
if(arguments.length>1){
v=[obj,_2b];
}else{
v=[obj];
}
_29[_2c]=v;
return _2c;
};
this.delDtor=function(_2e){
delete _29[_2e];
};
this._dtorHandler=function(){
var k,v;
for(k in _29){
v=_29[k];
if(v&&(typeof v=="object")&&v.length){
try{
if(v.length==1){
v[0].call(null);
}else{
v[0][v[1]].call(v[0]);
}
}
catch(e){
}
try{
delete _29[k];
}
catch(e){
}
}
}
};
this.observe(window,"unload",this._onUnload);
this.addOnUnload(this._dtorHandler);
};
MQA._prEvent.element=function(_31){
return _31.target||_31.srcElement;
};
MQA._prEvent.isLeftClick=function(_32){
return ((_32.which&&(_32.which==1))||(_32.button&&(_32.button==1)));
};
MQA._prEvent.stop=function(_33){
if(_33.preventDefault){
_33.preventDefault();
_33.stopPropagation();
}else{
_33.returnValue=false;
_33.cancelBubble=true;
}
};
MQA._prEvent.falseFunction=function(){
return false;
};
MQA._prEvent.emptyFunction=function(){
};
MQA._prEvent.hitch=function(_34,_35){
var _36=[];
for(var i=2;i<arguments.length;i++){
_36.push(arguments[i]);
}
return function(){
return _34[_35].apply(_34,_36);
};
};
MQA._prEvent.EventCallback=function(_38,_39){
var _3a=_38;
return function(_3b){
if(_3a.turnEventsOff||(_3a.map&&_3a.map.turnEventsOff)){
return;
}
if(!_3b){
_3b=window.event;
}
_3a[_39](_3b);
};
};
MQA.Event=function(){
this.type="event";
this.srcObject=null;
if(arguments.length){
this.eventName=arguments[0];
}else{
this.eventName="unnamed event";
}
};
MQA.EventManager=new function(){
this.addListener=function(_3c,_3d,_3e,_3f){
_3d=_3d.toLowerCase();
if(!this.observers){
this.observers=[];
}
if(_3f==null){
_3f=_3c;
}
this.observers.push([_3c,_3d,_3e,_3f]);
};
this.removeListener=function(_40,_41,_42,_43){
_41=_41.toLowerCase();
if(this.observers){
if(_43==null){
_43=_40;
}
for(x=this.observers.length-1;x>=0;x--){
var _44=this.observers[x];
if(_44[0]==_40&&_44[1]==_41&&_44[2]==_42&&_44[3]==_43){
this.observers.splice(x,1);
}
}
}
};
this.clearListeners=function(_45,_46){
_46=_46.toLowerCase();
if(this.observers){
for(x=this.observers.length-1;x>=0;x--){
var _47=this.observers[x];
if(_47[0]==_45){
if(_46&&_47[1]!=_46){
continue;
}
this.observers.splice(x,1);
}
}
}
};
this.trigger=function(_48,_49,_4a){
_49=_49.toLowerCase();
if(this.observers){
_4a=_4a||{type:_4a};
for(var i=0,j=this.observers.length;i<j;i++){
var _4d=this.observers[i];
if(_4d[0]==_48&&_4d[1]==_49){
_4d[2].call(_4d[3],_4a);
}
}
}
};
};

MQA.tileMapCount=0;
MQA.getMapResources=function(){
return MQA.RESOURCES;
};
MQA.getStaticMapResources=function(){
return MQA.STATICRESOURCES;
};
MQA.incrTileMapCount=function(){
MQA.tileMapCount=MQA.tileMapCount+1;
return MQA.tileMapCount;
};
MQA.getTileMapCount=function(){
return MQA.tileMapCount;
};
MQA.getRowTile=function(_1,_2){
var y=(_1+90)*(MQA.PIXERSPERLATDEGREE/_2);
var RW=parseInt(y/MQA.TILESIZE);
return RW;
};
MQA.getRowTileOffset=function(_5,_6){
var y=(_5+90)*(MQA.PIXERSPERLATDEGREE/_6);
var RW=parseInt(y/MQA.TILESIZE);
return (y-RW*MQA.TILESIZE);
};
MQA.getLatTileRowOffset=function(TL,_a,_b){
var y=TL*MQA.TILESIZE+_a;
var _d=y/(MQA.PIXERSPERLATDEGREE/_b)-90;
_d=parseInt(_d*1000000)/1000000;
return _d;
};
MQA.getColTile=function(_e,_f){
var x=(_e+180)*(MQA.PIXERSPERLNGDEGREE/_f);
var _11=parseInt(x/MQA.TILESIZE);
return _11;
};
MQA.getColTileOffset=function(LNG,_13){
var x=(LNG+180)*(MQA.PIXERSPERLNGDEGREE/_13);
var _15=parseInt(x/MQA.TILESIZE);
return (x-_15*MQA.TILESIZE);
};
MQA.getLngTileColOffset=function(TL,_17,_18){
var x=TL*MQA.TILESIZE+_17;
var LNG=x/(MQA.PIXERSPERLNGDEGREE/_18)-180;
LNG=parseInt(LNG*1000000)/1000000;
while(LNG>180){
LNG-=360;
}
while(LNG<-180){
LNG+=360;
}
return LNG;
};
MQA.APACAdded=false;
MQA.APACLayer=null;

MQA.PointFloatXY=function(X,Y){
this.x=parseFloat(X);
this.y=parseFloat(Y);
};
MQA.PointXY=function(X,Y){
this.x=parseInt(X);
this.y=parseInt(Y);
};
MQA.PointLL=function(_5,_6){
this.lat=parseFloat(_5);
this.lng=parseFloat(_6);
};
MQA.Image=function(){
this.image=null;
};
MQA.TKObjectCollection=function(_7){
var _8=new Array();
var _9=_7||-1;
this.guid=MQA.Util._getRandomGUID(10);
this.collectionName="";
this.setName=function(n){
this.collectionName=n;
};
this.getName=function(){
return this.collectionName;
};
this._add=function(_b){
if(_9!=-1&&_8.length==_7){
return;
}
_8.push(_b);
};
this.add=function(_c){
this._add(_c);
return _8.length;
};
this.getSize=function(){
return _8.length;
};
this.getAt=function(_d){
return _8[_d];
};
this._remove=function(_e){
_8.splice(_e,1);
};
this._removeAll=function(){
while(_8.length>0){
this.remove(0);
}
};
this.remove=function(_f){
this._remove(_f);
return _8.splice(_f,1);
};
this.removeAll=function(){
this._removeAll();
};
this.contains=function(_10){
for(var _11=0,x=this.getSize();_11<x;_11++){
if(_8[_11]==_10){
return true;
}
}
return false;
};
this.getById=function(_13){
for(var _14=0,x=this.getSize();_14<x;_14++){
if(_8[_14].getId()==_13){
return _8[_14];
}
}
return null;
};
this.removeItem=function(_16){
for(i=0;i<_8.length;i++){
if(_8[i]==_16){
this.remove(i);
i=_8.length;
}
}
};
this.append=function(_17){
for(var i=0;i<_17.getSize();i++){
this.add(_17.getAt(i));
}
};
this.getItemIndex=function(_19){
var _1a=false;
for(var i=0;i<_8.length;i++){
if(_19==_8[i]){
_1a=i;
break;
}
}
return _1a;
};
};
MQA.ShapeCollection=function(){
MQA.TKObjectCollection.call(this);
this.map=null;
this.declutter=true;
this.maxZoomLevel=16;
this.minZoomLevel=1;
this.getByKey=function(key){
var j=this.getSize();
for(var i=0;i<j;i++){
if(key==this.getAt(i).getValue("key")){
return this.getAt(i);
}
}
return false;
};
this.add=function(obj){
obj.parentCollections.push(this);
if(this.map){
this.map.addShape(obj,false);
}
this._add(obj);
return this.getSize();
};
this.remove=function(_20){
if(this.getSize()>0){
var obj=this.getAt(_20);
for(var i=0;i<obj.parentCollections.length;i++){
if(obj.parentCollections[i]==this){
obj.parentCollections.splice(i,1);
}
}
if(this.map){
this.map.removeShape(obj,false);
}
this._remove(_20);
}
return this.getSize();
};
this.removeAll=function(){
if(this.map){
var _23=this.map.getDeclutter().getDeclutterMode();
if(_23!=0){
this.map.getDeclutter().setDeclutterMode(0);
}
}
this._removeAll();
if(this.map){
if(_23!=0){
this.map.getDeclutter().setDeclutterMode(_23);
}
}
};
this.setDeclutter=function(d){
if(this.map){
var _25=this.map.getDeclutter().getDeclutterMode();
if(_25!=0){
this.map.getDeclutter().setDeclutterMode(0);
}
}
this.declutter=d;
if(this.map){
if(_25!=0){
this.map.getDeclutter().setDeclutterMode(_25);
}
}
};
this.getDeclutter=function(){
return this.declutter;
};
this.setMinZoomLevel=function(z){
this.minZoomLevel=z;
};
this.getMinZoomLevel=function(){
return this.minZoomLevel;
};
this.setMaxZoomLevel=function(z){
this.maxZoomLevel=z;
};
this.getMaxZoomLevel=function(){
return this.maxZoomLevel;
};
this.inZoomWindow=function(){
if(!this.map){
return false;
}
var _28=this.map.getZoomLevel();
return (_28>=this.minZoomLevel&&_28<=this.maxZoomLevel);
};
this.isOnMap=function(){
return (this.map!=null);
};
this.getBoundingRect=function(){
if(this.getSize()==0){
return null;
}
var _29=null;
var _2a=[];
for(var i=0;i<this.getSize();i++){
_29=this.getAt(i);
if(_29 instanceof MQA.Poi){
_2a.push(_29.getValue("latLng"));
}else{
for(var j=0;j<_29.getValue("shapePoints").getSize();j++){
_2a.push(_29.getValue("shapePoints").getAt(j));
}
}
}
var _2d=new MQA.RectLL(_2a[0],_2a[0]);
for(var i=0;i<_2a.length;i++){
_2d.extend(_2a[i]);
}
return _2d;
};
};
MQA.MapLogo=function(){
throw new Error("Do NOT instantiate MapLogo - use static values");
};
MQA.MapLogo.MAPQUEST=MQA.LOGO_MQ_LOGO;
MQA.MapLogo.SCALES=MQA.LOGO_MQ_SCALES;
MQA.MapLogo.MAPQUEST_COPYRIGHT=MQA.LOGO_MQ_COPY;
MQA.MapLogo.NAVTEQ_COPYRIGHT=MQA.LOGO_NT_COPY;
MQA.MapLogo.ICUBED_COPYRIGHT=MQA.LOGO_I3_COPY;
MQA.MapCorner=function(){
throw new Error("Do NOT instantiate MapCorner - use static values");
};
MQA.MapCorner.TOP_LEFT=MQA.CORNER_TOPLEFT;
MQA.MapCorner.TOP_RIGHT=MQA.CORNER_TOPRIGHT;
MQA.MapCorner.BOTTOM_LEFT=MQA.CORNER_BOTTOMLEFT;
MQA.MapCorner.BOTTOM_RIGHT=MQA.CORNER_BOTTOMRIGHT;
MQA.MapCornerPlacement=function(_2e,_2f){
if(_2e==null){
_2e=MQA.MapCorner.TOP_LEFT;
}
if(_2f==null){
_2f=new MQA.Size(0,0);
}
this.mapCorner=_2e;
this.offsetSize=new MQA.Size(_2f.getWidth(),_2f.getHeight());
};
MQA.MapCornerPlacement.prototype.getMapCorner=function(){
return this.mapCorner;
};
MQA.MapCornerPlacement.prototype.getOffsetSize=function(){
return new MQA.Size(this.offsetSize.getWidth(),this.offsetSize.getHeight());
};
MQA.RectLL=function(_30,_31){
if(_30==null){
_30=new MQA.LatLng(0,0);
}
if(_31==null){
_31=new MQA.LatLng(0,0);
}
this.ul=new MQA.PointLL(_30.lat,_30.lng);
this.lr=new MQA.PointLL(_31.lat,_31.lng);
};
MQA.RectLL.prototype.setLowerRight=function(_32){
this.lr=new MQA.LatLng(_32.getLatitude(),_32.getLongitude());
};
MQA.RectLL.prototype.setUpperLeft=function(_33){
this.ul=new MQA.LatLng(_33.getLatitude(),_33.getLongitude());
};
MQA.RectLL.prototype.getUpperLeft=function(){
return new MQA.LatLng(this.ul.lat,this.ul.lng);
};
MQA.RectLL.prototype.getLowerRight=function(){
return new MQA.LatLng(this.lr.lat,this.lr.lng);
};
MQA.RectLL.prototype.setBounds=function(_34){
for(var i=1;i<_34.length;i++){
var _36=_34[i];
this.extend(_36);
}
};
MQA.RectLL.prototype.extend=function(_37){
if(_37.lat>this.ul.lat){
this.ul.lat=_37.lat;
}
if(_37.lng<this.ul.lng){
this.ul.lng=_37.lng;
}
if(_37.lat<this.lr.lat){
this.lr.lat=_37.lat;
}
if(_37.lng>this.lr.lng){
this.lr.lng=_37.lng;
}
};
MQA.RectXY=function(_38,_39){
if(_38==null){
_38=new MQA.Point(0,0);
}
if(_39==null){
_39=new MQA.Point(0,0);
}
this.ul=new MQA.PointXY(_38.x,_38.y);
this.lr=new MQA.PointXY(_39.x,_39.y);
};
MQA.RectXY.prototype.setUpperLeft=function(_3a){
this.ul=new MQA.Point(_3a.getX(),_3a.getY());
};
MQA.RectXY.prototype.setLowerRight=function(_3b){
this.lr=new MQA.Point(_3b.getX(),_3b.getY());
};
MQA.RectXY.prototype.getUpperLeft=function(){
return new MQA.Point(this.ul.x,this.ul.y);
};
MQA.RectXY.prototype.getLowerRight=function(){
return new MQA.Point(this.lr.x,this.lr.y);
};
MQA.Size=function(w,h){
if(w==null){
w=0;
}
if(h==null){
h=0;
}
this.width=parseInt(w);
this.height=parseInt(h);
};
MQA.Size.prototype.constructor=MQA.Size;
MQA.Size.prototype.getWidth=function(){
return this.width;
};
MQA.Size.prototype.getHeight=function(){
return this.height;
};
MQA.Size.prototype.setWidth=function(w){
this.width=parseInt(w);
};
MQA.Size.prototype.setHeight=function(h){
this.height=parseInt(h);
};
MQA.Size.prototype.toString=function(){
return this.width+","+this.height;
};
MQA.Clip=function(_40,_41,_42,_43,vIn,_45){
var _46=new Array();
var D=(_45?3:2);
if(vIn.length<D){
return _46;
}
_46=clipAgainstEdge(0,vIn,_45);
var _48=clipAgainstEdge(1,_46,_45);
var _49=clipAgainstEdge(2,_48,_45);
var _4a=clipAgainstEdge(3,_49,_45);
return _4a;
function clipAgainstEdge(_4b,_4c,_4d){
var v1;
var _4f,_50;
var _51;
var _52=new Array();
for(var v2=0;v2<_4c.length;v2++){
if(_45){
v1=(v2==0?_4c.length-1:v2-1);
}else{
v1=(v2==0?0:v2-1);
}
_4f=inside(_4b,_4c[v1]);
_50=inside(_4b,_4c[v2]);
if(_4f&&_50){
_52.push(_4c[v2]);
}else{
if(!_4f&&_50){
_51=clipIntersection(_4b,_4c[v2],_4c[v1]);
_52.push(_51);
_52.push(_4c[v2]);
}else{
if(_4f&&!_50){
_51=clipIntersection(_4b,_4c[v1],_4c[v2]);
_52.push(_51);
}
}
}
}
return _52;
}
function clipIntersection(_54,inv,_56){
var x1=inv.x;
var y1=inv.y;
var x2=_56.x;
var y2=_56.y;
var AU=0;
var _5c={x:0,y:0};
switch(_54){
case 0:
var x3=_40;
var y3=_42;
var x4=_40;
var y4=_43;
break;
case 1:
var x3=_41;
var y3=_42;
var x4=_41;
var y4=_43;
break;
case 2:
var x3=_40;
var y3=_43;
var x4=_41;
var y4=_43;
break;
case 3:
var x3=_40;
var y3=_42;
var x4=_41;
var y4=_42;
break;
}
UA=(((x4-x3)*(y1-y3))-((y4-y3)*(x1-x3)))/(((y4-y3)*(x2-x1))-((x4-x3)*(y2-y1)));
_5c.x=Math.round(x1+(UA*(x2-x1)));
_5c.y=Math.round(y1+(UA*(y2-y1)));
return _5c;
}
function inside(_61,v){
switch(_61){
case 0:
return (v.x>_40);
case 1:
return (v.x<_41);
case 2:
return (v.y<_43);
case 3:
return (v.y>_42);
}
return false;
}
};
MQA.MapInit=function(){
this.bestFitRect=null;
this.bestFitMargin=0;
this.keepCenter=false;
this.minZoom=1;
this.maxZoom=16;
};
MQA.MapInit.prototype={setBestFitRect:function(_63){
this.bestFitRect=_63;
},getBestFitRect:function(){
return this.bestFitRect;
},setBestFitMargin:function(_64){
this.bestFitMargin=_64;
},getBestFitMargin:function(){
return this.bestFitMargin;
},setKeepCenter:function(_65){
this.keepCenter=_65;
},isKeepCenter:function(){
return this.keepCenter;
},setMinZoom:function(_66){
_66=parseInt(_66);
if(_66<1||_66>15){
this.minZoom=1;
}else{
this.minZoom=_66;
}
if(this.minZoom>this.maxZoom){
this.minZoom=this.maxZoom;
}
},getMinZoom:function(){
return this.minZoom;
},setMaxZoom:function(_67){
_67=parseInt(_67);
if(_67<1||_67>16){
this.maxZoom=16;
}else{
this.maxZoom=_67;
}
if(this.maxZoom<this.minZoom){
this.maxZoom=this.minZoom;
}
},getMaxZoom:function(){
return this.maxZoom;
}};
MQA.Copyright=function(map,id,_6a,_6b,_6c,_6d){
this.map=map;
this.id=id;
this.text=_6a;
this.position=_6b;
this.handleEvents=false;
this.left=0;
this.top=0;
this.width=(_6c!=null)?100:_6c;
this.height=(_6d!=null)?15:_6d;
this.copyrightLayerDiv=null;
this.positionControl();
};
MQA.Copyright.prototype.positionControl=function(){
if(this.position.getMapCorner()==MQA.CORNER_TOPLEFT){
this.left=0;
this.top=0;
}else{
if(this.position.getMapCorner()==MQA.CORNER_TOPRIGHT){
this.left=this.map.width-parseInt(this.width);
this.top=0;
this.position.offsetSize.width*=-1;
}else{
if(this.position.getMapCorner()==MQA.CORNER_BOTTOMLEFT){
this.left=0;
this.top=this.map.height-parseInt(this.height);
this.position.offsetSize.height*=-1;
}else{
if(this.position.getMapCorner()==MQA.CORNER_BOTTOMRIGHT){
this.left=this.map.width-parseInt(this.width);
this.top=this.map.height-parseInt(this.height);
this.position.offsetSize.width*=-1;
this.position.offsetSize.height*=-1;
}
}
}
}
this.left+=this.position.offsetSize.width;
this.top+=this.position.offsetSize.height;
};
MQA.Copyright.prototype.draw=function(){
if(this.copyrightLayerDiv==null){
this.copyrightLayerDiv=MQA.Util.createParentDiv(this.id,0,0,"absolute",0,0,100,null,null);
this.copyrightLayerDiv.style.color="black";
this.copyrightLayerDiv.style.fontFamily="Arial,sans-serif";
this.copyrightLayerDiv.style.fontSize="11px";
this.copyrightLayerDiv.style.whiteSpace="nowrap";
this.copyrightLayerDiv.style.align="right";
this.copyrightLayerDiv.style.MozUserSelect="none";
this.copyrightLayerDiv.style.right="3px";
this.copyrightLayerDiv.style.bottom="2px";
this.copyrightLayerDiv.style.left=this.left+"px";
this.copyrightLayerDiv.style.top=this.top+"px";
this.copyrightLayerDiv.innerHTML="<span>"+this.text+"</span>";
this.copyrightLayerDiv.style.width=this.width+"px";
this.copyrightLayerDiv.style.height=this.height+"px";
if(this.handleEvents){
this.copyrightLayerDiv.style.cursor="pointer";
this.copyrightLayerDiv.style.cursor="hand";
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"click",this.eCopyrightClick);
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"mouseover",this.eCopyrightClick);
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"mouseout",this.eCopyrightClick);
}
this.map.parent.appendChild(this.copyrightLayerDiv);
}
return this.copyrightLayerDiv;
};
MQA.Copyright.prototype.eventmonitor=function(evt){
var _6f=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
var e=new MQA.Event("MQA.Copyright.click");
e.srcObject=this;
this.onClick(e);
case "mouseover":
var e=new MQA.Event("MQA.Copyright.mouseover");
e.srcObject=this;
this.onMouseOver(e);
break;
case "mouseout":
var e=new MQA.Event("MQA.Copyright.mouseout");
e.srcObject=this;
this.onMouseOver(e);
break;
}
};
MQA.Copyright.prototype.dispose=function(){
this.remove();
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv=null;
}
this.map=null;
this.corner=null;
};
MQA.Copyright.prototype.remove=function(){
this.map.parent.removeChild(this.copyrightLayerDiv);
};
MQA.Copyright.prototype.setPosition=function(_71){
this.position=_71;
this.positionControl();
this.copyrightLayerDiv.style.left=this.left+"px";
this.copyrightLayerDiv.style.top=this.top+"px";
};
MQA.Copyright.prototype.show=function(){
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv.style.visibility="visible";
this.copyrightLayerDiv.style.display="block";
}
};
MQA.Copyright.prototype.hide=function(){
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv.style.visibility="hidden";
this.copyrightLayerDiv.style.display="none";
}
};
MQA.Copyright.prototype.onClick=function(e){
MQA.EventManager.trigger(this,"click",e);
};
MQA.Copyright.prototype.onMouseOver=function(e){
MQA.EventManager.trigger(this,"mouseover",e);
};
MQA.Copyright.prototype.onMouseOut=function(e){
MQA.EventManager.trigger(this,"mouseout",e);
};
MQA.CopyrightCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.CopyrightCollection.prototype=new MQA.TKObjectCollection();
MQA.CopyrightCollection.prototype.constructor=MQA.CopyrightCollection;

MQA.InitOverlays=function(_1){
window.onload=_1;
};
MQA.ShapeOverlay=function(){
MQA.Base.call(this);
this.map=null;
this.className="MQA.ShapeOverlay";
this.key="";
this.color="#000000";
this.altColor=null;
this.colorAlpha="1";
this.altColorAlpha=null;
this.fillColor="#000000";
this.altFillColor=null;
this.fillColorAlpha="1";
this.altFillColorAlpha=null;
this.borderWidth="3";
this.altBorderWidth=null;
this.altStateFlag=false;
this.visible=true;
this.shapePoints=null;
this.shape=null;
this.maxZoomLevel=16;
this.minZoomLevel=1;
this.imageURL="";
this.imageLevels=null;
this.imageOpacity=1;
this.eClick=null;
this.eDoubleClick=null;
this.eMouseDown=null;
this.eMouseUp=null;
this.eMouseOver=null;
this.eMouseOut=null;
this._facio=function(_2,_3){
switch(_2){
case "color":
this._setColor(_3);
break;
case "altColor":
this._setAltColor(_3);
break;
case "colorAlpha":
this._setColorAlpha(_3);
break;
case "altColorAlpha":
this._setAltColorAlpha(_3);
break;
case "fillColor":
this._setFillColor(_3);
break;
case "altFillColor":
this._setAltFillColor(_3);
break;
case "fillColorAlpha":
this._setFillColorAlpha(_3);
break;
case "altFillColorAlpha":
this._setAltFillColorAlpha(_3);
break;
case "borderWidth":
this._setBorderWidth(_3);
break;
case "altBorderWidth":
this._setAltBorderWidth(_3);
break;
case "altStateFlag":
this._setAltStateFlag(_3);
break;
case "visible":
this._setVisible(_3);
break;
case "shapePoints":
this._setShapePoints(_3);
break;
case "maxZoomLevel":
this._setMaxZoomLevel(_3);
break;
case "minZoomLevel":
this._setMinZoomLevel(_3);
break;
case "imageURL":
this._setImageURL();
break;
case "imageLevels":
this._setImageOverlayLevels();
break;
case "imageOpacity":
this._setImageOpacity(_3);
break;
}
};
this._duco=function(_4){
switch(_4){
case "altColor":
return (this.altColor!=null?this.altColor:this.color);
break;
case "altColorAlpha":
return (this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
break;
case "altFillColor":
return (this.altFillColor!=null?this.altFillColor:this.fillColor);
break;
case "altFillColorAlpha":
return (this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
break;
case "altBorderWidth":
return (this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
break;
}
};
this.dispose=function(_5){
};
this._adjustXY=function(_6){
_6.x=_6.x+(MQA.SURFACE_OFFSET);
_6.y=_6.y+(MQA.SURFACE_OFFSET);
return _6;
};
this._setColor=function(_7){
if(this.shape&&!this.altStateFlag){
var _8=MQA.Graphics.normalizeColor(_7);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_8.hex);
break;
case "vml":
this.shape.stroke.color=_8.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltColor=function(_9){
if(this.shape&&this.altStateFlag){
var _a=MQA.Graphics.normalizeColor(_9);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_a.hex);
break;
case "vml":
this.shape.stroke.color=_a.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setColorAlpha=function(_b){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",_b);
break;
case "vml":
this.shape.stroke.opacity=_b;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltColorAlpha=function(_c){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",_c);
break;
case "vml":
this.shape.stroke.opacity=_c;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setFillColor=function(_d){
if(this.shape&&!this.altStateFlag){
var _e=MQA.Graphics.normalizeColor(_d);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_e.hex);
break;
case "vml":
this.shape.fill.color=_e.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltFillColor=function(_f){
if(this.shape&&this.altStateFlag){
var _10=MQA.Graphics.normalizeColor(_f);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_10.hex);
break;
case "vml":
this.shape.fill.color=_10.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setFillColorAlpha=function(_11){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",_11);
break;
case "vml":
this.shape.fill.opacity=_11;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltFillColorAlpha=function(_12){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",_12);
break;
case "vml":
this.shape.fill.opacity=_12;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setBorderWidth=function(_13){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_13);
break;
case "vml":
this.shape.stroke.weight=_13;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltBorderWidth=function(_14){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_14);
break;
case "vml":
this.shape.stroke.weight=_14;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltStateFlag=function(_15){
if(this.shape&&(this.className!="MQA.ImageOverlay")){
var _16=this._getCurrentState();
_16.color=MQA.Graphics.normalizeColor(_16.color).hex;
_16.fillColor=MQA.Graphics.normalizeColor(_16.fillColor).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_16.color);
this.shape.setAttribute("stroke-opacity",_16.colorAlpha);
if(this.className!="MQA.LineOverlay"){
this.shape.setAttribute("fill",_16.fillColor);
this.shape.setAttribute("fill-opacity",_16.fillColorAlpha);
}
this.shape.setAttribute("stroke-width",_16.borderWidth);
break;
case "vml":
this.shape.stroke.color=_16.color;
this.shape.stroke.opacity=_16.colorAlpha;
if(this.className!="MQA.LineOverlay"){
this.shape.fill.color=_16.fillColor;
this.shape.fill.opacity=_16.fillColorAlpha;
}
this.shape.stroke.weight=_16.borderWidth;
break;
case "canvas":
this.drawShape();
break;
}
var _17=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_17.style.display=(_16.visible?"inline":"none");
}
};
this._setVisible=function(_18){
if(this.shape){
var _19=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_19.style.display=(_18?"inline":"none");
}
};
this._setMaxZoomLevel=function(_1a){
var _1b=parseInt(_1a);
if(isNaN(_1b)){
return;
}
this.maxZoomLevel=((_1b>16)?16:((_1b<this.minZoomLevel)?this.minZoomLevel:_1b));
this.redraw();
};
this._setMinZoomLevel=function(_1c){
var _1d=parseInt(_1c);
if(isNaN(_1d)){
return;
}
this.minZoomLevel=((_1d<1)?1:((_1d>this.maxZoomLevel)?this.maxZoomLevel:_1d));
this.redraw();
};
this._setShapePoints=function(_1e){
if(_1e.setLowerRight){
var _1f=new MQA.LatLngCollection();
_1f.add(new MQA.LatLng(_1e.ul.lat,_1e.ul.lng));
_1f.add(new MQA.LatLng(_1e.lr.lat,_1e.lr.lng));
_1e=_1f;
this.shapePoints=_1e;
}
if(this.shape){
this.drawShape();
}
};
this._getCurrentState=function(){
var _20=new Object();
if(!this.altStateFlag){
_20.color=this.color;
_20.colorAlpha=this.colorAlpha;
_20.fillColor=this.fillColor;
_20.fillColorAlpha=this.fillColorAlpha;
_20.borderWidth=this.borderWidth;
}else{
_20.color=(this.altColor!=null?this.altColor:this.color);
_20.colorAlpha=(this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
_20.fillColor=(this.altFillColor!=null?this.altFillColor:this.fillColor);
_20.fillColorAlpha=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
_20.borderWidth=(this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
}
_20.visible=this.visible;
_20.url=this.url;
_20.maxZoomLevel=this.maxZoomLevel;
_20.minZoomLevel=this.minZoomLevel;
return _20;
};
this._cloneOverlay=function(_21){
this.key=_21.key;
this.color=_21.color;
this.altColor=_21.altColor;
this.colorAlpha=_21.colorAlpha;
this.altColorAlpha=_21.altColorAlpha;
this.fillColor=_21.fillColor;
this.altFillColor=_21.altFillColor;
this.fillColorAlpha=_21.fillColorAlpha;
this.altFillColorAlpha=_21.altFillColorAlpha;
this.borderWidth=_21.borderWidth;
this.altBorderWidth=_21.altBorderWidth;
this.altStateFlag=_21.altStateFlag;
this.visible=_21.visible;
this.maxZoomLevel=_21.maxZoomLevel;
this.minZoomLevel=_21.minZoomLevel;
this.shapePoints=_21.shapePoints;
if(this.className=="MQA.ImageOverlay"){
this.imageURL=_21.imageURL;
this.imageLevels=_21.imageLevels;
this.imageOpacity=_21.imageOpacity;
}
this.shape=null;
this.map=null;
},this.redraw=function(){
if(!this.map){
return;
}
this.drawShape();
};
this.onClick=function(e){
var mqe=new MQA.Event(this.className+".click");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
};
this.onDoubleClick=function(e){
var mqe=new MQA.Event(this.className+".doubleClick");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
};
this.onMouseDown=function(e){
var mqe=new MQA.Event(this.className+".mouseDown");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mousedown",mqe);
};
this.onMouseUp=function(e){
var mqe=new MQA.Event(this.className+".mouseUp");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseup",mqe);
};
this.onMouseOver=function(e){
var mqe=new MQA.Event(this.className+".mouseOver");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseover",mqe);
MQA._prEvent.stop(e);
};
this.onMouseOut=function(e){
var mqe=new MQA.Event(this.className+".mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
MQA._prEvent.stop(e);
};
this.onRemoved=function(e){
MQA.EventManager.trigger(this,"removed",e);
};
this.drawShape=function(){
this.draw();
};
this.isOnMap=function(){
return (this.map!=null);
};
this.setKey=function(t){
this.setValue("key",t);
};
this.getKey=function(){
return this.getValue("key");
};
this.setAltBorderWidth=function(t){
this.setValue("altBorderWidth",t);
};
this.getAltBorderWidth=function(){
return this.getValue("altBorderWidth");
};
this.setAltColor=function(t){
this.setValue("altColor",t);
};
this.getAltColor=function(){
return this.getValue("altColor");
};
this.setAltColorAlpha=function(t){
this.setValue("altColorAlpha",t);
};
this.getAltColorAlpha=function(){
return this.getValue("altColorAlpha");
};
this.setAltFillColor=function(t){
this.setValue("altFillColor",t);
};
this.getAltFillColor=function(){
return this.getValue("altFillColor");
};
this.setAltFillColorAlpha=function(t){
this.setValue("altFillColorAlpha",t);
};
this.getAltFillColorAlpha=function(){
return this.getValue("altFillColorAlpha");
};
this.setAltStateFlag=function(t){
this.setValue("altStateFlag",t);
};
this.getAltStateFlag=function(){
return this.getValue("altStateFlag");
};
this.setBorderWidth=function(t){
this.setValue("borderWidth",t);
};
this.getBorderWidth=function(){
return this.getValue("borderWidth");
};
this.getClassName=function(){
return this.getValue("className");
};
this.setColor=function(t){
this.setValue("color",t);
};
this.getColor=function(){
return this.getValue("color");
};
this.setColorAlpha=function(t){
this.setValue("colorAlpha",t);
};
this.getColorAlpha=function(){
return this.getValue("colorAlpha");
};
this.setFillColor=function(t){
this.setValue("fillColor",t);
};
this.getFillColor=function(){
return this.getValue("fillColor");
};
this.setFillColorAlpha=function(t){
this.setValue("fillColorAlpha",t);
};
this.getFillColorAlpha=function(){
return this.getValue("fillColorAlpha");
};
this.setMaxZoomLevel=function(t){
this.setValue("maxZoomLevel",t);
};
this.getMaxZoomLevel=function(){
return this.getValue("maxZoomLevel");
};
this.setMinZoomLevel=function(t){
this.setValue("minZoomLevel",t);
};
this.getMinZoomLevel=function(){
return this.getValue("minZoomLevel");
};
this.setShapePoints=function(t){
this.setValue("shapePoints",t);
};
this.getShapePoints=function(){
return this.getValue("shapePoints");
};
this.setVisible=function(t){
this.setValue("visible",t);
};
this.getVisible=function(){
return this.getValue("visible");
};
};
MQA.RectangleOverlay=function(_3f){
MQA.ShapeOverlay.call(this);
this.className="MQA.RectangleOverlay";
if(_3f){
if(_3f.getValue("className")==this.className){
this._cloneOverlay(_3f);
}
}
this.draw=function(){
var xy1,xy2,_42,_43,_44,_45,_46,_47,_48;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_45=xy1.x;
_46=xy2.x;
_47=xy1.y;
_48=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_46;
xy2.x=_45;
}
if(xy1.y>xy2.y){
xy1.y=_48;
xy2.y=_47;
}
_44=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_44.minZoomLevel)||(this.map.getZoomLevel()>_44.maxZoomLevel)){
return;
}
var _49=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _4a=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
xy1.x=(xy1.x<0?0:xy1.x);
xy1.y=(xy1.y<0?0:xy1.y);
xy2.x=(xy2.x>_49?_49:xy2.x);
xy2.y=(xy2.y>_4a?_4a:xy2.y);
_42=xy2.y-xy1.y;
_43=xy2.x-xy1.x;
_42=(_42>_4a?_4a:_42);
_43=(_43>_49?_49:_43);
if(!(_42<1||_43<1)){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawRectangle(p,_44.color,_44.colorAlpha,_44.borderWidth,_44.fillColor,_44.fillColorAlpha,_44.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_4c){
if(this.shape==null){
return;
}
var _4c=(typeof (_4c)=="undefined"?false:_4c);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_4c){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.LineOverlay=function(_4d){
MQA.ShapeOverlay.call(this);
this.className="MQA.LineOverlay";
this.fillColorAlpha="0.0";
this.altFillColorAlpha="0.0";
if(_4d){
if(_4d.getValue("className")==this.className){
this._cloneOverlay(_4d);
}
}
this.override(["fillColor","altFillColor","fillColorAlpha","altFillColorAlpha"]);
this.draw=function(){
var i,j;
var xy=new Array;
for(i=0,j=this.shapePoints.getSize();i<j;i++){
var p=new Object;
p.x=this.map.llToPix(this.shapePoints.get(i)).x;
p.y=this.map.llToPix(this.shapePoints.get(i)).y;
p=this._adjustXY(p);
xy[i]=p;
}
var _52=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_52.minZoomLevel)||(this.map.getZoomLevel()>_52.maxZoomLevel)){
return;
}
var _53=new Array();
if(MQA.Util.isOverLimit(xy)){
var _54=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _55=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_53=MQA.Clip(0,_54,0,_55,xy,false);
}else{
_53=xy;
}
if(_53.length){
this.shape=MQA.Graphics.drawLine(_53,_52.color,_52.colorAlpha,_52.borderWidth,_52.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_56){
if(this.shape==null){
return;
}
var _56=(typeof (_56)=="undefined"?false:_56);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_56){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.PolygonOverlay=function(_57){
MQA.ShapeOverlay.call(this);
this.className="MQA.PolygonOverlay";
if(_57){
if(_57.getValue("className")==this.className){
this._cloneOverlay(_57);
}
}
this.draw=function(){
var i,j;
var xy=new Array;
for(i=0,j=this.shapePoints.getSize();i<j;i++){
var p=new Object;
p.x=this.map.llToPix(this.shapePoints.get(i)).x;
p.y=this.map.llToPix(this.shapePoints.get(i)).y;
p=this._adjustXY(p);
xy[i]=p;
}
var _5c=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_5c.minZoomLevel)||(this.map.getZoomLevel()>_5c.maxZoomLevel)){
return;
}
var _5d=new Array();
if(MQA.Util.isOverLimit(xy)){
var _5e=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _5f=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_5d=MQA.Clip(0,_5e,0,_5f,xy,true);
}else{
_5d=xy;
}
if(_5d.length){
this.shape=MQA.Graphics.drawPolygon(_5d,_5c.color,_5c.colorAlpha,_5c.borderWidth,_5c.fillColor,_5c.fillColorAlpha,_5c.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_60){
if(this.shape==null){
return;
}
var _60=(typeof (_60)=="undefined"?false:_60);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_60){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.EllipseOverlay=function(_61){
MQA.ShapeOverlay.call(this);
this.className="MQA.EllipseOverlay";
if(_61){
if(_61.getValue("className")==this.className){
this._cloneOverlay(_61);
}
}
this.draw=function(){
var xy1,xy2,_64,_65,_66,_67,_68,_69,_6a;
var _6b,_6c,_6d,_6e;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_67=xy1.x;
_68=xy2.x;
_69=xy1.y;
_6a=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_68;
xy2.x=_67;
}
if(xy1.y>xy2.y){
xy1.y=_6a;
xy2.y=_69;
}
_6b=Math.round((xy2.x-xy1.x)/2);
_6c=Math.round((xy2.y-xy1.y)/2);
_6d=xy1.x+_6b;
_6e=xy1.y+_6c;
var _6f=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _70=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
var _71=0;
if((xy1.x>_6f)||(xy2.x<0)||(xy1.y>_70)||(xy2.y<0)){
_71=1;
}
if(!_71){
var x,y,c;
var _75=false;
x=0;
y=0;
_75=((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1;
if(_75){
x=_6f;
y=0;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
if(_75){
x=0;
y=_70;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
if(_75){
x=_6f;
y=_70;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
}
}
}
if(_75){
_71=2;
}
}
if(!_71){
if((_6b*2)>32000||(_6c*2)>32000){
_71=3;
}
}
var _66=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_66.minZoomLevel)||(this.map.getZoomLevel()>_66.maxZoomLevel)){
return;
}
switch(_71){
case 0:
if(_6b>1&&_6c>1){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawEllipse(p,_66.color,_66.colorAlpha,_66.borderWidth,_66.fillColor,_66.fillColorAlpha,_66.visible);
this.map.surface.appendChild(this.shape);
}
break;
case 1:
break;
case 2:
this.shape=MQA.Graphics.drawRectangle(p,_66.color,_66.colorAlpha,_66.borderWidth,_66.fillColor,_66.fillColorAlpha,_66.visible);
this.map.surface.appendChild(this.shape);
break;
case 3:
break;
}
if(this.shape){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_77){
if(this.shape==null){
return;
}
var _77=(typeof (_77)=="undefined"?false:_77);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_77){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.ImageOverlay=function(_78){
MQA.ShapeOverlay.call(this);
this.className="MQA.ImageOverlay";
this.imageURL=null;
this.imageLevels=null;
this.imageOpacity=1;
if(_78){
if(_78.getValue("className")==this.className){
this._cloneOverlay(_78);
}
}
this.draw=function(){
var xy1,xy2,_7b,_7c,_7d,_7e,_7f,_80,_81,_82,_83,_84,_85,_86;
_7d=this._getCurrentState();
if(this.imageLevels){
_83=this.map.getZoomLevel();
_84=17;
for(var i=0,j=this.imageLevels.length;i<j;i++){
if(this.imageLevels[i].zoomLevel==_83){
_82=this.imageLevels[i].url;
break;
}else{
_85=Math.abs(this.imageLevels[i].zoomLevel-_83);
if(_85<_84){
_82=this.imageLevels[i].url;
_84=_85;
}
}
}
_7d.imageURL=_82;
}else{
_7d.imageURL=this.imageURL;
}
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_7e=xy1.x;
_7f=xy2.x;
_80=xy1.y;
_81=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_7f;
xy2.x=_7e;
}
if(xy1.y>xy2.y){
xy1.y=_81;
xy2.y=_80;
}
if(this.shape!=null){
this.shape.firstChild.style.width="0px";
this.shape.firstChild.height="0px";
this.shape.firstChild.src="";
this.shape.removeChild(this.shape.firstChild);
this.shape=this.map.overlaydiv.removeChild(this.shape);
this.shape=null;
}
if((this.map.getZoomLevel()<_7d.minZoomLevel)||(this.map.getZoomLevel()>_7d.maxZoomLevel)){
return;
}
if(this.map.getDragOffset().x!=this.map.overlayOffsetX||this.map.getDragOffset().y!=this.map.overlayOffsetY){
this.map.overlayOffsetX=this.map.getDragOffset().x;
this.map.overlayOffsetY=this.map.getDragOffset().y;
if(this.map.overlaydiv){
this.map.overlaydiv.style.left=-(MQA.SURFACE_OFFSET+this.map.overlayOffsetX)+"px";
this.map.overlaydiv.style.top=-(MQA.SURFACE_OFFSET+this.map.overlayOffsetY)+"px";
}
}
_7b=xy2.y-xy1.y;
_7c=xy2.x-xy1.x;
if(!(_7b<1||_7c<1)){
this.shape=document.createElement("div");
this.shape.style.position="absolute";
this.shape.style.left=xy1.x+"px";
this.shape.style.top=xy1.y+"px";
this.map.overlaydiv.appendChild(this.shape);
var _89=document.createElement("img");
_89.GALLERYIMG="no";
_89.width=_7c;
_89.height=_7b;
_89.style.height=_7b+"px";
_89.style.width=_7c+"px";
_89.src=_7d.imageURL;
_89.UNSELECTABLE="on";
_89.MozUserSelect="none";
this.shape.appendChild(_89);
this.shape.firstChild.style.display=(_7d.visible?"inline":"none");
if(MQA.browser.name=="msie"){
this.shape.firstChild.style.filter="alpha(opacity="+(this.imageOpacity*100)+")";
}
this.shape.firstChild.style.MozOpacity=this.imageOpacity;
this.shape.firstChild.style.opacity=this.imageOpacity;
}
if(this.shape){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this._setImageURL=function(){
if(this.imageLevels==null&&this.shape!=null){
this.drawShape();
}
};
this._setImageOverlayLevels=function(){
if(this.shape!=null){
this.drawShape();
}
};
this._setImageOpacity=function(op){
if(this.shape){
if(MQA.browser.name=="msie"){
this.shape.firstChild.style.filter="alpha(opacity="+(op*100)+")";
}
this.shape.firstChild.style.MozOpacity=op;
this.shape.firstChild.style.opacity=op;
}
};
this.dispose=function(_8b){
if(this.shape==null){
return;
}
var _8b=(typeof (_8b)=="undefined"?false:_8b);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_8b){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._deleteDOMObject(this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
this.setImageOpacity=function(t){
this.setValue("imageOpacity",t);
};
this.getImageOpacity=function(){
return this.getValue("imageOpacity");
};
this.setImageOverlayLevels=function(t){
this.setValue("imageLevels",t);
};
this.getImageOverlayLevels=function(){
return this.getValue("imageLevels");
};
this.setImageURL=function(t){
this.setValue("imageURL",t);
};
this.getImageURL=function(){
return this.getValue("imageURL");
};
};
MQA.ImageLevel=function(url,_90){
this.url=url;
this.zoomLevel=_90;
};
ImageOverlayLevel=MQA.ImageLevel;

MQA.Icon=function(_1,_2,_3){
this.imageURL=_1;
this.width=parseInt(_2);
this.height=parseInt(_3);
};
MQA.Poi=function(_4,_5){
MQA.Base.call(this);
this.map=null;
this.className="MQA.Poi";
this.key="";
this.shape=null;
this._icon=null;
this._shadow=null;
this._label=null;
this._leaderLineDotIconDiv=null;
this.latLng=MQA.Util._cloneValue(_4);
if(typeof (_5)!="undefined"&&_5 instanceof MQA.Icon){
this.icon=MQA.Util._cloneValue(_5);
}else{
this.icon=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/star.png",29,29);
}
this.iconOffset=new MQA.PointXY(-Math.round(this.icon.width/2),-Math.round(this.icon.height/2));
this.shadow=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/shadow.png",23,7);
this.shadowOffset=new MQA.Point(6,0);
this.infoWindowOffset=new MQA.Point(Math.round(this.icon.width/2),0);
this.altIcon=null;
this.altIconOffset=null;
this.altShadow=null;
this.altShadowOffset=null;
this.altInfoWindowOffset=null;
this.declutterIcon=null;
this.declutterIconOffset=null;
this.declutterShadow=null;
this.declutterShadowOffset=null;
this.declutterInfoWindowOffset=null;
this.HTMLContent=null;
this.HTMLOffset=null;
this.HTMLInfoWindowOffset=null;
this.blankImageURL=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.altStateFlag=false;
this.visible=true;
this.infoContentHTML=null;
this.infoTitleHTML=null;
this.rolloverEnabled=true;
this.showingInfo=false;
this.mqrw=null;
this.mqiw=null;
this.labelText=null;
this.labelClass="mq-poi-label";
this.labelVisible=true;
this.draggable=false;
this.isDragging=false;
this.dragFlag=false;
this.snapback=false;
this.keepRolloverOnDrag=true;
this.mouseStartX=null;
this.mouseStartY=null;
this.shapeStartX=null;
this.shapeStartY=null;
this.isMouseOver=false;
this.leaderLine=false;
this.leaderLineDot=false;
this.leaderLineDotIcon=null;
this.leaderLineColor=null;
this.leaderLineDotImage=null;
this.dragTop=null;
this.dragLeft=null;
this.isDecluttered=false;
this.minZoomLevel=1;
this.maxZoomLevel=16;
this.maxInfoWindowWidth=null;
this.titleBackgroundColor=null;
this.infoWindowTitleText=null;
this.eClick=null;
this.eDoubleClick=null;
this.eMouseDown=null;
this.eMouseUp=null;
this.eMouseOver=null;
this.eMouseOut=null;
this._facio=function(_6,_7){
switch(_6){
case "HTMLContent":
this.HTMLOffset=(this.HTMLOffset?this.HTMLOffset:new MQA.Point(0,0));
if(this.shape){
this.draw();
}
break;
case "HTMLOffset":
if(this.shape){
this.draw();
}
break;
case "icon":
if(!this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "iconOffset":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "shadow":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "shadowOffset":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "altIcon":
this.altIconOffset=(this.altIconOffset?this.altIconOffset:new MQA.PointXY(-Math.round(this.altIcon.width/2),-Math.round(this.altIcon.height/2)));
if(this.altStateFlag&&this.shape){
this.draw();
}
break;
case "altIconOffset":
if(!this.isDecluttered&&this.altStateFlag&&this.shape){
this.draw();
}
break;
case "altShadow":
if(this.shape&&this.altStateFlag){
this.draw();
}
break;
case "altShadowOffset":
if(!this.isDecluttered&&this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterIcon":
this.declutterIconOffset=(this.declutterIconOffset?this.declutterIconOffset:new MQA.PointXY(-Math.round(this.declutterIcon.width/2),-Math.round(this.declutterIcon.height/2)));
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterIconOffset":
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterShadow":
if(this.shape&&!this.altStateFlag&&this.isDecluttered){
this.draw();
}
break;
case "declutterShadowOffset":
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "visible":
if(this.shape){
this.shape.style.display=(_7?"block":"none");
}
if(this.map){
if(!_7&&this.leaderLine){
this.map.getDeclutter().leaderLineDispose(this);
}else{
if(this.dragTop||this.dragLeft){
if(!this.leaderLine){
this.map.getDeclutter().drawLeaderLine(this);
}
}
}
}
break;
case "latLng":
if(this.shape){
this.draw();
}
break;
case "altStateFlag":
if(this.shape){
this.draw();
}
break;
case "isDecluttered":
if(this.shape){
this.draw();
}
break;
case "labelText":
this._setLabelText();
break;
case "labelVisible":
if(this.shape&&this._label){
var _8=1;
if(theShadowImage!=null){
_8+=1;
}
this.shape.childNodes[_8].style.display=(_7?"block":"none");
this._centerLabel();
}
break;
case "labelClass":
if(this.shape&&this._label){
this.draw();
}
break;
case "zIndex":
this._setZIndex(_7);
break;
case "infoTitleHTML":
this._setInfoTitleHTML(_7);
break;
case "infoContentHTML":
this._setInfoContentHTML(_7);
break;
case "leaderLineColor":
this._setLeaderLineColor(_7);
break;
case "leaderLineDotImage":
this._setLeaderLineDotImage(_7);
break;
case "minZoomLevel":
if(this.map){
if(this.map.getZoomLevel()<this.minZoomLevel){
this.setValue("visible",false);
}else{
this.setValue("visible",true);
}
}
break;
case "maxZoomLevel":
if(this.map){
if(this.map.getZoomLevel()>this.maxZoomLevel){
this.setValue("visible",false);
}else{
this.setValue("visible",true);
}
}
break;
}
};
this._duco=function(_9){
switch(_9){
case "latLng":
return MQA.Util._cloneValue(this.latLng);
break;
case "altIcon":
return (this.altIcon?this.altIcon:this.icon);
break;
case "altIconOffset":
var _a=this.getValue("altIcon");
return (this.altIconOffset?this.altIconOffset:new MQA.PointXY(-Math.round(_a.width/2),-Math.round(_a.height/2)));
break;
case "altShadow":
return (this.altShadow?this.altShadow:this.shadow);
break;
case "altShadowOffset":
return (this.altShadowOffset?this.altShadowOffset:this.shadowOffset);
break;
case "altInfoWindowOffset":
return (this.altInfoWindowOffset?this.altInfoWindowOffset:this.infoWindowOffset);
break;
case "declutterIcon":
return (this.declutterIcon?this.declutterIcon:this.icon);
break;
case "declutterIconOffset":
var _a=this.getValue("declutterIcon");
return (this.declutterOffset?this.declutterOffset:new MQA.PointXY(-Math.round(_a.width/2),-Math.round(_a.height/2)));
break;
case "declutterShadow":
return (this.declutterShadow?this.declutterShadow:this.shadow);
break;
case "declutterShadowOffset":
return (this.declutterShadowOffset?this.declutterShadowOffset:this.shadowOffset);
break;
case "declutterInfoWindowOffset":
return (this.declutterInfoWindowOffset?this.declutterInfoWindowOffset:this.infoWindowOffset);
break;
case "draggable":
return this._getDraggable();
break;
case "leaderLineColor":
return this._getLeaderLineColor();
break;
case "leaderLineDotImage":
return this._getLeaderLineDotImage();
break;
}
};
this.draw=function(){
var _b=(this.shape?false:true);
var _c;
var _d,_e,_f;
var _10=null;
var _11=null;
var _12=null;
var _13=null;
var _14=this._getCurrentInfo();
_10=_14.icon;
_11=_14.offset;
theShadowImage=_14.shadow;
_13=_14.shadowOffset;
if(!_b){
_c={x:parseInt(this.shape.style.left),y:parseInt(this.shape.style.top)};
}else{
_c={x:0,y:0};
}
if(_b){
this.shape=document.createElement("div");
this.shape.id="poi.shape.div";
var _15=this.map.llToPix(this.latLng);
this.shape.style.left=((_15.x+_11.x)-this.map.getDragOffset().x)+"px";
this.shape.style.top=((_15.y+_11.y)-this.map.getDragOffset().y)+"px";
this.shape.style.display=(this.visible?"block":"none");
var _16=this.map.getZoomLevel();
if(_16<this.minZoomLevel||_16>this.maxZoomLevel){
this.shape.style.display="none";
}
this.shape.style.position="absolute";
this.shape.setAttribute("unselectable","on");
this.shape.style.MozUserSelect="none";
this.shape.style.zIndex=90;
}else{
if(this.getValue("isDecluttered")){
var myX=this.shapeStartX-this.dragLeft;
var myY=this.shapeStartY-this.dragTop;
var _19={x:(_c.x),y:(_c.y)};
}else{
var _15=this.map.llToPix(this.latLng);
var _19={x:(_15.x+_11.x)-this.map.getDragOffset().x,y:(_15.y+_11.y)-this.map.getDragOffset().y};
}
this.shape.style.left=_19.x+"px";
this.shape.style.top=_19.y+"px";
}
if(this.HTMLContent){
this.shape.innerHTML=this.HTMLContent;
this._icon=false;
this._shadow=false;
this._label=false;
}else{
if(!this._icon&&!this._shadow&&!this._label){
this.shape.innerHTML="";
}
var _1a=(this._icon?false:true);
if(_1a){
_d=document.createElement("img");
_d.setAttribute("unselectable","on");
_d.style.MozUserSelect="none";
_d.style.display="block";
}else{
_d=this.shape.firstChild;
}
if((MQA.Util._hasPngExtention(_10.imageURL))&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_10.imageURL+"', sizingMethod='image')";
_d.src=this.blankImageURL;
}else{
_d.src=_10.imageURL;
}
if(_10.width){
_d.width=_10.width;
_d.style.width=_10.width+"px";
}
if(_10.height){
_d.height=_10.height;
_d.style.height=_10.height+"px";
}
if(_1a){
this.shape.appendChild(_d);
}
_d=null;
this._icon=true;
if(theShadowImage!=null){
var _1b=(this._shadow?false:true);
if(_1b){
_e=document.createElement("img");
_e.setAttribute("unselectable","on");
_e.style.MozUserSelect="none";
_e.style.display="block";
}else{
_e=this.shape.childNodes[1];
}
if((MQA.Util._hasPngExtention(theShadowImage.imageURL))&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+theShadowImage.imageURL+"', sizingMethod='image')";
_e.src=this.blankImageURL;
}else{
_e.src=theShadowImage.imageURL;
}
_e.width=theShadowImage.width;
_e.height=theShadowImage.height;
_e.style.marginLeft=_13.x+"px";
_e.style.marginTop=_13.y+"px";
if(_1b){
this.shape.appendChild(_e);
}
_e=null;
this._shadow=true;
}else{
if(this._shadow){
this.shape.removeChild(this.shape.childNodes[1]);
this._shadow=false;
}
}
if(!this._label&&this.labelText){
_f=this._createLabel();
this.shape.appendChild(_f);
_f=null;
this._label=true;
}
}
if(_b){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
this.map.div.poidiv.appendChild(this.shape);
this.mqrw=this.map.getRolloverWindow();
this.mqiw=this.map.getInfoWindow();
}
this._centerLabel();
if(!this.icon.width){
this.icon.width=this.shape.firstChild.offsetWidth;
}
if(!this.icon.height){
this.icon.height=this.shape.firstChild.offsetHeight;
}
};
this.dispose=function(_1c){
var _1c=(typeof (_1c)=="undefined"?false:_1c);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(this.leaderLine){
this.map.getDeclutter().leaderLineDispose(this);
}
this._icon=false;
this._label=false;
this._shadow=false;
this.map=null;
if(this.showingInfo){
this.onInfoWindowClose();
}
if(_1c){
if(this.infoContentHTML){
this.infoContentHTML.innerHTML=null;
this.infoContentHTML.outerHTML="";
MQA.Util._deleteDOMObject(this.infoContentHTML);
this.infoContentHTML=null;
}
if(this.infoTitleHTML){
this.infoTitleHTML.innerHTML=null;
this.infoTitleHTML.outerHTML="";
MQA.Util._deleteDOMObject(this.infoTitleHTML);
this.infoTitleHTML=null;
}
this.mqrw=null;
this.mqiw=null;
this._parentCollections=null;
this.shape.innerHTML=null;
this.shape.outerHTML="";
MQA.Util._deleteDOMObject(this.shape);
this.shape=null;
}else{
if(this.mqiw.popup.parentNode==this.shape){
this.shape.removeChild(this.mqiw.popup);
}
if(this.mqrw.minipopup.parentNode==this.shape){
this.shape.removeChild(this.mqrw.minipopup);
}
MQA.Util._nukeChildren(this.shape);
this.mqrw=null;
this.mqiw=null;
this.shape=null;
}
};
this.onClick=function(e){
if(MQA._prEvent.element(e).id=="poiclose"||MQA._prEvent.element(e).parentNode.id=="poiclose"){
return;
}
if(!this.dragFlag||(this.dragFlag&&(Math.abs(this.mouseStartX-e.clientX)<3&&Math.abs(this.mouseStartY-e.clientY)<3))){
this.showInfoWindow();
var mqe=new MQA.Event("MQA.Poi.click");
var _1f=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_1f.x;
var cy=e.clientY-_1f.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
}
if(this.mqiw!=null&&this.mqiw.opener==this){
return;
}
this.dragFlag=false;
};
this.onDoubleClick=function(e){
var mqe=new MQA.Event("MQA.Poi.dblClick");
var _24=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_24.x;
var cy=e.clientY-_24.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
mqe.srcObject=this;
this.map.onDoubleClick(mqe);
MQA._prEvent.stop(e);
};
this.onMouseDown=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseDown");
var _29=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_29.x;
var cy=e.clientY-_29.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
if(this.getValue("draggable")){
poiMouseDownFlg=this._isMouseOnPoi(e);
if(!poiMouseDownFlg){
MQA.EventManager.trigger(this,"mousedown",mqe);
return;
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart=MQA._prEvent.falseFunction;
}
this.shape.style.zIndex=110;
if(isNaN(parseInt(this.shape.style.left))){
this.shape.style.left=0;
}
if(isNaN(parseInt(this.shape.style.top))){
this.shape.style.top=0;
}
this.shapeStartX=parseInt(this.shape.style.left);
this.shapeStartY=parseInt(this.shape.style.top);
this.mouseStartX=e.clientX;
this.mouseStartY=e.clientY;
this.isDragging=true;
this.map.draggedObject=this;
if(this.map.getDeclutter()){
this.map.getDeclutter().leaderLineDispose(this);
}
if(this.map.getDeclutter()){
if(!this.map.getDeclutter().keepRolloversOnDrag&&this.map.getDeclutter().getDeclutterMode()==2){
if(this._isRolloverShowable()){
}
}else{
if(!this.keepRolloverOnDrag){
if(this._isRolloverShowable()){
this.mqrw.hide();
}
}
}
}else{
if(!this.keepRolloverOnDrag){
if(this._isRolloverShowable()){
this.mqrw.hide();
}
}
}
if(e.preventDefault){
e.preventDefault();
}
MQA._prEvent.stop(e);
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("hidden");
}
}
MQA.EventManager.trigger(this,"mousedown",mqe);
};
this.onMouseUp=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseUp");
var _2e=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_2e.x;
var cy=e.clientY-_2e.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
if(this.isDragging){
if(this._isRolloverShowable()&&!this.map.getDeclutter().keepRolloversOnDrag){
this.mqrw.setOpenerAndShow(this);
this.shape.style.zIndex=110;
}
if(this.map.getDeclutter().getDeclutterMode()==2){
this.isDecluttered=true;
}
this.finishDrag(mqe);
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart="";
}
MQA.EventManager.trigger(this,"mouseup",mqe);
};
this.finishDrag=function(mqe){
var _32=(MQA.browser.name=="safari");
this.isDragging=false;
var _33=this.map.getDragOffset();
if(this.HTMLContent){
var _34=this.getValue("HTMLOffset").x;
var _35=this.getValue("HTMLOffset").y;
}else{
if(this.getValue("altStateFlag")){
var _34=this.getValue("altIconOffset").x;
var _35=this.getValue("altIconOffset").y;
}else{
var _34=this.getValue("iconOffset").x;
var _35=this.getValue("iconOffset").y;
}
}
var _36=(parseInt(this.shape.style.left)-_34)+_33.x;
var _37=(parseInt(this.shape.style.top)-_35)+_33.y;
this.dragFlag=true;
if((Math.abs(this.shapeStartX-parseInt(this.shape.style.left))>3)||(Math.abs(this.shapeStartY-parseInt(this.shape.style.top)>3))){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2&&!this.getValue("altStateFlag")){
this.setValue("isDecluttered",true);
}
}
}else{
this.onClick(mqe.domEvent);
}
var _38=(this.map.getDeclutter()?this.map.getDeclutter().getDeclutterMode():0);
if(this.snapback&&_38!=2){
this.shape.style.left=this.shapeStartX+"px";
this.shape.style.top=this.shapeStartY+"px";
}else{
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==0){
this.setValue("latLng",this.map.pixToLL(new MQA.Point(_36,_37)));
}else{
if(this.map.getDeclutter().getDeclutterMode()==2){
theLatLngXY=this.map.llToPix(this.getValue("latLng"));
this.dragLeft=theLatLngXY.x-(_33.x+parseInt(this.shape.style.left));
this.dragTop=theLatLngXY.y-(_33.y+parseInt(this.shape.style.top));
if(this.isDecluttered||(Math.abs(this.shapeStartX-parseInt(this.shape.style.left))>3)||(Math.abs(this.shapeStartY-parseInt(this.shape.style.top))>3)||this.getValue("altStateFlag")){
if(!_32){
this.map.getDeclutter().drawLeaderLine(this);
}else{
this.map.getDeclutter().redrawLeaderLines();
}
}
}else{
}
}
}else{
this.setValue("latLng",this.map.pixToLL(new MQA.Point(_36,_37)));
}
}
this.map.draggedObject=null;
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("auto");
}
};
this.onMouseOver=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.shape)){
this.isMouseOver=true;
var mqe=new MQA.Event("MQA.Poi.mouseOver");
mqe.domEvent=e;
var _3b=(this.map.draggedObject&&this.map._mapShapes.contains(this.map.draggedObject)&&this.map.draggedObject.isDragging)?true:false;
if(!this.isDragging&&!_3b&&(this.mqrw.isHidden()||this.mqrw.opener!=this)){
this.showRolloverWindow(mqe);
}
MQA.EventManager.trigger(this,"mouseover",mqe);
}
};
this.onMouseOut=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.shape)){
if(this._isRolloverShowable()&&!this.isDragging&&this.mqrw.opener==this){
this.mqrw.hide();
}
var mqe=new MQA.Event("MQA.Poi.mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
}
};
this.onInfoWindowOpen=function(e){
this.shape.style.zIndex=110;
var mqe=new MQA.Event("MQA.Poi.infoWindowOpen");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"infowindowopen",mqe);
};
this.onInfoWindowClose=function(e){
this.showingInfo=false;
this.shape.style.zIndex=90;
if(this.isDecluttered&&this.map.getDeclutter()&&this.map.getDeclutter().getDeclutterMode()==1){
this.setVisible(false);
}
var mqe=new MQA.Event("MQA.Poi.infoWindowClose");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"infowindowclose",mqe);
};
this.onRolloverOpen=function(e){
this.shape.style.zIndex=115;
MQA.EventManager.trigger(this,"rolloveropen",e);
};
this.onRolloverClose=function(e){
this.shape.style.zIndex=90;
MQA.EventManager.trigger(this,"rolloverclose",e);
};
this.onRemoved=function(e){
MQA.EventManager.trigger(this,"removed",e);
};
this._setZIndex=function(i){
this.shape.style.zIndex=i;
};
this._createLabel=function(){
var _46=document.createElement("div");
_46.id="poi.label.div";
_46.style.display=(this.labelVisible?"block":"none");
_46.style.position="absolute";
_46.className=this.labelClass;
var _47=document.createTextNode(this.labelText);
_46.appendChild(_47);
return _46;
};
this._setLabelText=function(){
if(MQA.Util._trim(this.labelText)==""){
if(this.shape&&this._label){
this.shape.removeChild(this.shape.lastChild);
this._label=false;
}else{
if(!this.shape&&this._label){
this._label=false;
}
}
}else{
if(this.shape&&this._label){
this.shape.removeChild(this.shape.lastChild);
var _48=this._createLabel();
this.shape.appendChild(_48);
this._label=true;
this._centerLabel();
}else{
if(this.shape&&!this._label){
var _48=this._createLabel();
if(this.shape){
this.shape.appendChild(_48);
this._label=true;
this._centerLabel();
}
}
}
}
};
this._centerLabel=function(){
if(this._label&&this.labelVisible){
var _49=this.shape.childNodes;
if(this.mqrw==null&&this.mqiw==null){
var _4a=1;
}else{
if(this.mqrw!==null&&this.mqiw!==null){
var _4a=3;
}else{
var _4a=2;
}
}
_49[_49.length-_4a].style.width=_49[_49.length-_4a].offsetWidth+"px";
var _4b=parseInt(_49[_49.length-_4a].style.width);
var _4c=_49[0].width;
_49[_49.length-_4a].style.marginLeft=-((_4b-_4c)/2)+"px";
}
};
this._getCurrentInfoWindowOffset=function(){
if(this.HTMLContent){
return this.HTMLInfoWindowOffset;
}else{
if(!this.altStateFlag&&!this.isDecluttered){
return this.infoWindowOffset;
}else{
if(this.altStateFlag){
return (this.altInfoWindowOffset?this.altInfoWindowOffset:this.infoWindowOffset);
}else{
return (this.declutterInfoWindowOffset?this.declutterInfoWindowOffset:this.infoWindowOffset);
}
}
}
};
this.redraw=function(){
this.draw();
};
this.showRolloverWindow=function(){
var _4d=this._getCurrentInfoWindowOffset();
if(this.mqrw==null){
this.mqrw=this.map.getRolloverWindow();
}
if(this._isRolloverShowable()){
this.shape.appendChild(this.mqrw.minipopup);
var _4e=document.createElement("div");
_4e.innerHTML="<div>"+this.infoTitleHTML+"</div>";
this.mqrw.modify(this.map.getLLToXY(this.latLng),_4e,_4d,this);
this.mqrw.setOpenerAndShow(this);
this.onRolloverOpen(new MQA.Event("MQA.Poi.rolloverOpen"));
}
};
this.showInfoWindow=function(){
var _4f=this._getCurrentInfoWindowOffset();
if(this.infoContentHTML!=null){
if(this.mqiw==null){
this.mqiw=this.map.getInfoWindow();
}
if(this._isRolloverShowable()){
this.mqrw.hide();
}
var _50=this.mqiw.getMaxWidth();
var _51=this.mqiw.getTitleBackgroundColor();
if(this.titleBackgroundColor){
this.mqiw.setTitleBackgroundColor(this.titleBackgroundColor);
}
if(this.maxInfoWindowWidth){
this.mqiw.setMaxWidth(this.maxInfoWindowWidth);
}
this.mqiw.isAttachedToPoi=true;
this.shape.appendChild(this.mqiw.popup);
var _52=document.createElement("div");
var _53=(this.infoWindowTitleText?this.infoWindowTitleText:this.infoTitleHTML);
_52.innerHTML="<div>"+_53+"</div>";
var _54=document.createElement("div");
_54.innerHTML="<div>"+this.infoContentHTML+"</div>";
this.mqiw.modify(this.map.getLLToXY(this.latLng),_52,_54,_4f);
this.mqiw.setOpenerAndShow(this);
this.showingInfo=true;
this.onInfoWindowOpen(new MQA.Event("MQA.Poi.infoWindowOpen"));
this.mqiw.setMaxWidth(_50);
this.mqiw.setTitleBackgroundColor(_51);
}
};
this._setInfoTitleHTML=function(_55){
this.infoTitleHTML=_55;
};
this._setInfoContentHTML=function(_56){
if(_56==undefined){
return;
}
if(_56!=""){
this.infoContentExists=true;
}
this.infoContentHTML=_56;
};
this._isRolloverShowable=function(){
return this.rolloverEnabled&&this.map.getRolloversEnabled()&&(this.infoTitleHTML!=null)&&!this.showingInfo;
};
this._getDraggable=function(){
if(this.map){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
return true;
}
}
}
return this.draggable;
};
this._getLeaderLineColor=function(){
if(this.leaderLineColor){
return this.leaderLineColor;
}else{
if(this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineColor;
}else{
return "#000000";
}
}
};
this._getLeaderLineDotImage=function(){
if(this.leaderLineDotImage){
return this.leaderLineDotImage;
}else{
if(this.map&&this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineDotImage;
}else{
return null;
}
}
};
this._setLeaderLineColor=function(c){
if(!this.map){
return;
}
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
c=MQA.Graphics.normalizeColor(c).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.leaderLine.setAttribute("stroke",c);
if(this.map.getDeclutter().getLeaderLineDotMode()!=2){
this.leaderLineDot.setAttribute("stroke",c);
this.leaderLineDot.setAttribute("fill",c);
}
break;
case "vml":
this.leaderLine.stroke.color=c;
this.leaderLine.stroke.opacity=1;
this.leaderLine.fill.color=c;
this.leaderLineDot.stroke.color=c;
this.leaderLineDot.stroke.opacity=1;
this.leaderLineDot.fill.color=c;
break;
case "canvas":
this.map.getDeclutter().redrawLeaderLines();
break;
}
}
}
};
this._setLeaderLineDotImage=function(_58){
if(this.map&&this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
this.map.getDeclutter().leaderLineDispose(this);
this.map.getDeclutter().drawLeaderLine(this);
if(MQA.Graphics.drawMethod=="canvas"){
this.map.getDeclutter().redrawLeaderLines();
}
}
}
};
this._getCurrentInfo=function(){
var _59,_5a,_5b,_5c;
if(this.HTMLContent){
_5a=this.getValue("HTMLOffset");
_59=null;
_5b=null;
_5c=null;
}else{
if(!this.altStateFlag&&!this.isDecluttered){
_59=this.getValue("icon");
_5a=this.getValue("iconOffset");
_5b=this.getValue("shadow");
_5c=this.getValue("shadowOffset");
}else{
if(this.altStateFlag){
_59=this.getValue("altIcon");
_5a=this.getValue("altIconOffset");
_5b=this.getValue("altShadow");
_5c=this.getValue("altShadowOffset");
}else{
_59=this.getValue("declutterIcon");
_5a=this.getValue("declutterIconOffset");
_5b=this.getValue("declutterShadow");
_5c=this.getValue("declutterShadowOffset");
}
}
}
return {icon:_59,offset:_5a,shadow:_5b,shadowOffset:_5c};
};
this.isOnMap=function(){
return (this.map!=null);
};
this._isMouseOnPoi=function(e){
var _5e=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_5e.x;
var cy=e.clientY-_5e.y;
var _61=new MQA.Point(this.shape.offsetWidth,this.shape.offsetHeight);
var _62=this.map.getDragOffset();
var _63=MQA.Util.getWindowScrollXY();
var _64=cx+_63.x;
var _65=cy+_63.y;
var _66=parseInt(this.shape.style.left)+_62.x;
var _67=parseInt(this.shape.style.top)+_62.y;
var _68=(_65>=_67)&&(_65<=(_67+parseInt(_61.y)));
_68=_68&&(_64>=_66)&&_64<=(_66+parseInt(_61.x));
return _68;
};
};
MQA.Poi.prototype.setLabel=function(t){
this.setValue("labelText",t);
};
MQA.Poi.prototype.getLabel=function(){
return this.getValue("labelText");
};
MQA.Poi.prototype.setAltIcon=function(t){
this.setValue("altIcon",t);
};
MQA.Poi.prototype.getAltIcon=function(){
return this.getValue("altIcon");
};
MQA.Poi.prototype.setAltStateFlag=function(t){
this.setValue("altStateFlag",t);
};
MQA.Poi.prototype.getAltStateFlag=function(){
return this.getValue("altStateFlag");
};
MQA.Poi.prototype.setDraggable=function(t){
this.setValue("draggable",t);
};
MQA.Poi.prototype.getDraggable=function(){
return this.getValue("draggable");
};
MQA.Poi.prototype.setIcon=function(t){
this.setValue("icon",t);
};
MQA.Poi.prototype.getIcon=function(){
return this.getValue("icon");
};
MQA.Poi.prototype.setIconVisible=function(t){
this.setValue("visible",t);
};
MQA.Poi.prototype.getIconVisible=function(){
return this.getValue("visible");
};
MQA.Poi.prototype.setInfoContentHTML=function(t){
this.setValue("infoContentHTML",t);
};
MQA.Poi.prototype.setInfoTitleHTML=function(t){
this.setValue("infoTitleHTML",t);
};
MQA.Poi.prototype.setKey=function(t){
this.setValue("key",t);
};
MQA.Poi.prototype.getKey=function(){
return this.getValue("key");
};
MQA.Poi.prototype.setIcon=function(t){
this.setValue("icon",t);
};
MQA.Poi.prototype.getIcon=function(){
return this.getValue("icon");
};
MQA.Poi.prototype.setLabelVisible=function(t){
this.setValue("labelVisible",t);
};
MQA.Poi.prototype.isLabelVisible=function(){
return this.getValue("labelVisible");
};
MQA.Poi.prototype.setLatLng=function(t){
this.setValue("latLng",t);
};
MQA.Poi.prototype.getLatLng=function(){
return this.getValue("latLng");
};
MQA.Poi.prototype.setLeaderLineColor=function(t){
this.setValue("leaderLineColor",t);
};
MQA.Poi.prototype.getLeaderLineColor=function(){
return this.getValue("leaderLineColor");
};
MQA.Poi.prototype.setLeaderLineDotImage=function(t){
this.setValue("leaderLineDotImage",t);
};
MQA.Poi.prototype.getLeaderLineDotImage=function(){
return this.getValue("leaderLineDotImage");
};
MQA.Poi.prototype.setRolloverDrag=function(t){
this.setValue("keepRolloverOnDrag",t);
};
MQA.Poi.prototype.getRolloverDrag=function(){
return this.getValue("keepRolloverOnDrag");
};
MQA.Poi.prototype.setRolloverEnabled=function(t){
this.setValue("rolloverEnabled",t);
};
MQA.Poi.prototype.isRolloverEnabled=function(){
return this.getValue("rolloverEnabled");
};
MQA.Poi.prototype.setSnapback=function(t){
this.setValue("snapback",t);
};
MQA.Poi.prototype.getSnapback=function(){
return this.getValue("snapback");
};
MQA.Poi.prototype.setVisible=function(t){
this.setValue("visible",t);
};
MQA.Poi.prototype.isVisible=function(){
return this.getValue("visible");
};

MQA.Declutter=function(_1){
this.map=_1;
this.mode=0;
this.declutterCleared=true;
this.declutterIcon=null;
this.declutterAltIcon=null;
this.declutterOverIcon=null;
this.declutterOverAltIcon=null;
this.dcCollection=null;
this.pnCollection=null;
this.nextPageIcon=null;
this.prevPageIcon=null;
this.pageBarIcon=null;
this.pageMarkIcon=null;
this.stackHeight=1;
this.stackWidth=3;
this.currentPage=1;
this.keepRolloversOnDrag=true;
this.leaderLineColor="#000000";
this.leaderLineDotMode=1;
this.leaderLineDotImage=null;
this.poiCollection=null;
this.cpCollection=null;
};
MQA.Declutter.prototype.setDeclutterMode=function(_2){
if(_2!=0&&this.map.batchCount==0){
if(this.mode!=0&&!this.declutterCleared){
this.doDeclutter(0);
}
if(!this.declutterIcon){
this.setDeclutterIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/declut_star.png",29,29);
}
if(!this.declutterOverIcon){
this.setDeclutterOverIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/declut_star_over.png",29,29);
}
if(!this.nextPageIcon){
this.setNextPageIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_right.png",29,19);
}
if(!this.prevPageIcon){
this.setPrevPageIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_left.png",29,19);
}
if(!this.pageBarIcon){
this.pageBarIcon=new MQA.DeclutterIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_bar.png",29,19);
}
if(!this.pageMarkIcon){
this.pageMarkIcon=new MQA.DeclutterIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_mark.png",7,19);
}
this.dcCollection=new Array;
this.pnCollection=new Array;
this.cpCollection=new Array;
if(this.map){
this.map.getInfoWindow().hide();
this.doDeclutter(_2);
}
}else{
if(!this.declutterCleared){
this.doDeclutter(0);
}
}
this.mode=_2;
};
MQA.Declutter.prototype.getDeclutterMode=function(){
return this.mode;
};
MQA.Declutter.prototype.setDeclutterIcon=function(_3,_4,_5){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.declutterIcon=new MQA.DeclutterIcon(_3,_4,_5);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.setDeclutterOverIcon=function(_7,_8,_9){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.declutterOverIcon=new MQA.DeclutterIcon(_7,_8,_9);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getDeclutterIcon=function(){
return this.declutterIcon;
};
MQA.Declutter.prototype.setNextPageIcon=function(_b,_c,_d){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.nextPageIcon=new MQA.DeclutterIcon(_b,_c,_d);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getNextPageIcon=function(){
return this.nextPageIcon;
};
MQA.Declutter.prototype.setPrevPageIcon=function(_f,_10,_11){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.prevPageIcon=new MQA.DeclutterIcon(_f,_10,_11);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getPrevPageIcon=function(){
return this.prevPageIcon;
};
MQA.Declutter.prototype.setStackHeight=function(n){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.stackHeight=(n<1?1:n);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getStackHeight=function(){
return this.stackHeight;
};
MQA.Declutter.prototype.setStackWidth=function(n){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.stackWidth=(n<2?2:n);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getStackWidth=function(){
return this.stackWidth;
};
MQA.Declutter.prototype.setRolloverDrag=function(b){
this.keepRolloversOnDrag=b;
};
MQA.Declutter.prototype.getRolloverDrag=function(){
return this.keepRolloversOnDrag;
};
MQA.Declutter.prototype.setLeaderLineColor=function(c){
this.leaderLineColor=c;
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineColor=function(){
return this.leaderLineColor;
};
MQA.Declutter.prototype.setLeaderLineDotMode=function(m){
this.leaderLineDotMode=m;
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineDotMode=function(){
return this.leaderLineDotMode;
};
MQA.Declutter.prototype.setLeaderLineDotImage=function(url,_1b,_1c){
this.leaderLineDotImage=new MQA.Icon(url,_1b,_1c);
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineDotImage=function(){
return this.leaderLineDotImage;
};
MQA.Declutter.prototype.doDeclutter=function(_1d){
var i,j;
var x=100;
var y=50;
var _22=this.stackHeight*this.stackWidth;
var _23=1;
var _24=false;
var _25;
var _26;
var _27;
var _28;
var _29=1;
var _2a=true;
_1d=parseInt(_1d);
switch(_1d){
case 0:
this.declutterCleared=true;
if(this.mode==1){
for(var i=0,x=this.dcCollection.length;i<x;i++){
for(var j=0,y=this.dcCollection[i].length;j<y;j++){
this.dcCollection[i][j].poi.setValue("visible",true);
this.dcCollection[i][j].poi.setValue("isDecluttered",false);
this.dcCollection[i][j].dispose();
}
this.dcCollection[i]=null;
}
for(var i=0,x=this.pnCollection.length;i<x;i++){
if(this.pnCollection[i]!=null){
this.pnCollection[i][0].remove();
this.pnCollection[i][1].remove();
this.pnCollection[i][2].remove();
this.pnCollection[i][0]=null;
this.pnCollection[i][1]=null;
this.pnCollection[i][2]=null;
}
}
}else{
if(this.mode==2){
this.removeLeaderLines();
var _2b=this.getDeclutteredPois();
for(var i=0,x=_2b.getSize();i<x;i++){
_2b.getAt(i).dragLeft=0;
_2b.getAt(i).dragTop=0;
_2b.getAt(i).setValue("isDecluttered",false);
}
}
}
break;
case 1:
this.declutterCleared=false;
var _2c,_2d;
var _2e,_2f;
var _30;
var _31;
var b;
var _33=this.getDeclutterablePois();
var _34=new Array;
var _35=new Array;
var _36=0;
var y=_33.getSize();
for(var a=0,x=y;a<x;a++){
var _38=_33.getAt(a);
_34[a]=new Array(_33.getAt(a).getValue("latLng").getLatitude(),_33.getAt(a).getValue("latLng").getLongitude(),a);
}
_34.sort(this.sortPoisRL);
for(var a=0,e=_34.length;a<e;a++){
_2c=_33.getAt(_34[a][2]).getValue("icon").width;
_2d=_33.getAt(_34[a][2]).getValue("icon").height;
_2e=this.map.getLLToXY(new MQA.PointLL(_34[a][0],_34[a][1]));
_2e.x=parseInt(_33.getAt(_34[a][2]).shape.style.left);
_2e.y=parseInt(_33.getAt(_34[a][2]).shape.style.top);
_2f=new MQA.PointXY(_2e.x+_2c,_2e.y+_2d);
if(this.declutterIcon.height>_2d){
_2e.y-=(this.declutterIcon.height-_2d);
}
_2e.y-=(this.nextPageIcon.height+_29);
if(this.declutterIcon.width>_2c){
_2f.x-=(this.declutterIcon.width-_2c);
}
_30=new MQA.RectXY(_2e,_2f);
_31=false;
for(b=0;!_31&&b<_35.length;b++){
_31=this.isIntersected(_30,_35[b][0]);
}
if(_31){
b=b-1;
_35[b][1][_35[b][1].length]=a;
var _3a=_35[b][1].length;
var _3b=parseInt((_3a-1)%_22);
var _3c=parseInt(_3b/this.stackWidth);
var _3d=parseInt(_3b%this.stackWidth);
_25=_35[b][3].x-(_3d+1)*(this.declutterIcon.width+_29);
_26=_35[b][3].y-((_3c+1)*(this.declutterIcon.height+_29));
_2a=(_3a<=_22);
if(_3a<=this.stackWidth){
_35[b][0].ul.x-=(this.declutterIcon.width+_29);
}
if(_3d==0&&_3c>0&&_3c<this.stackHeight){
_35[b][0].ul.y-=(this.declutterIcon.height+_29)+(this.pageMarkIcon.height+_29);
}
this.addDeclutterPoi(_25,_26,_33.getAt(_34[a][2]),_2a,b);
if(_3a>_22&&this.pnCollection[b]==null){
this.pnCollection[b]=new Array();
var _3e=_35[b][3].y-(this.stackHeight*(this.declutterIcon.height+_29)+(Math.max(this.nextPageIcon.height,this.pageBarIcon.height)+_29));
this.pnCollection[b][0]=new MQA.PrevNextIcon(this.prevPageIcon,_35[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+this.prevPageIcon.width+(3*_29)),_3e,this.map,false,-1,b);
this.pnCollection[b][1]=new MQA.PrevNextIcon(this.nextPageIcon,_35[b][3].x-(this.nextPageIcon.width+_29),_3e,this.map,true,1,b);
this.pnCollection[b][2]=new MQA.PageMarkIcon(this.pageBarIcon,this.pageMarkIcon,_35[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+(2*_29)),_3e,this.map,b);
}
}else{
if(this.declutterIcon.height>_2d){
_2e.y-=parseInt((this.declutterIcon.height-_2d)/2);
}
_2e.y+=(this.declutterIcon.height+_29);
var _3f=new Array();
_3f[0]=_30;
_3f[1]=new Array();
_3f[2]=a;
_3f[3]=_2e;
_35[_35.length]=_3f;
this.pnCollection[this.pnCollection.length]=null;
this.dcCollection[this.dcCollection.length]=new Array();
this.cpCollection[this.cpCollection.length]=1;
}
}
break;
case 2:
this.declutterCleared=false;
this.getPoiDims();
var _40=this.createDeclutterGrps();
this.doDeclutterM2(_40);
break;
}
};
MQA.Declutter.prototype.resetIsDeclutteredFlag=function(){
var _41=this.map.getShapeCollections(true);
for(var i=0;i<_41.length;i++){
for(var x=0;x<_41[i].getSize();x++){
if(_41[i].getAt(x) instanceof MQA.Poi){
_41[i].getAt(x).isDecluttered=false;
}
}
}
};
MQA.Declutter.prototype.getDeclutterablePois=function(){
var _44=new MQA.ShapeCollection();
var _45=this.map.getShapeCollections(true);
for(var i=0;i<_45.length;i++){
var _47=this.map.getZoomLevel();
var _48=_45[i].getMinZoomLevel();
var _49=_45[i].getMaxZoomLevel();
if(_47<=_49&&_47>=_48){
if(_45[i].getDeclutter()){
for(var x=0;x<_45[i].getSize();x++){
if(_45[i].getAt(x) instanceof MQA.Poi){
if(!_44.contains(_45[i].getAt(x))){
_44.add(_45[i].getAt(x));
}
}
}
}
}
}
return _44;
};
MQA.Declutter.prototype.getDeclutteredPois=function(){
var _4b=new MQA.ShapeCollection();
var _4c=this.map.getShapeCollections(true);
for(var i=0;i<_4c.length;i++){
for(var x=0;x<_4c[i].getSize();x++){
if(_4c[i].getAt(x) instanceof MQA.Poi&&_4c[i].getAt(x).isDecluttered){
if(!_4b.contains(_4c[i].getAt(x))){
_4b.add(_4c[i].getAt(x));
}
}
}
}
return _4b;
};
MQA.Declutter.prototype.getPoiDims=function(){
var _4f=this.getDeclutterablePois();
var _50=_4f.getSize();
this.poiCollection={length:_50};
var _51=new Array;
for(var i=0;i<_50;i++){
_51[i]=new Array(_4f.getAt(i).getValue("latLng").getLatitude(),_4f.getAt(i).getValue("latLng").getLongitude(),i);
}
_51.sort(this.sortPois);
for(var i=0,j=_51.length;i<j;i++){
tmpHW=_4f.getAt(_51[i][2]).getValue("icon");
tmpXY=this.map.getLLToXY(_4f.getAt(_51[i][2]).getValue("latLng"));
tmpXY.x-=Math.ceil(tmpHW.width/2);
tmpXY.y-=Math.ceil(tmpHW.height/2);
this.poiCollection[i]={ix:tmpXY.x,iy:tmpXY.y,x:tmpXY.x,y:tmpXY.y,h:tmpHW.height,w:tmpHW.width,indx:_51[i][2]};
}
};
MQA.Declutter.prototype.createDeclutterGrps=function(){
var _54=new Array();
var _55=new Array;
var _56=0;
var _57;
for(var i=0,k=this.poiCollection.length;i<k;i++){
if(MQA.Util.indexOf(_54,i)>=0){
continue;
}
_57=false;
for(var j=i+1;j<k;j++){
if(MQA.Util.indexOf(_54,j)>=0){
continue;
}
if(this.isOverlapped(this.poiCollection[i],this.poiCollection[j])){
if(!_57){
_55[_56]=new Array();
_55[_56].push(i);
_54.push(i);
_57=true;
}
_55[_56].push(j);
_54.push(j);
}
}
if(_55[_56]&&_55[_56].length>0){
_56++;
}
}
return _55;
};
MQA.Declutter.prototype.doDeclutterM2=function(_5b){
var _5c={x:0,y:0,h:0,w:0};
var PI=3.14;
var _5e,_5f;
var nx,ny;
var n,_63;
var _64;
var _65;
var _66;
var _67;
var _68=false;
var _69;
if(_5b.length==1&&_5b[0].length==this.poiCollection.length){
_68=true;
_5e=360/_5b[0].length;
_5f=1350/_5e;
_5f=(_5f<75)?75:_5f;
}else{
_5e=10;
_5f=75;
}
var _6a;
var _6b,_6c;
var _6d=this.map.getDragOffset();
for(var i=0,p=_5b.length;i<p;i++){
n=-180;
_63=this.getDeclutCenterPt(_5b[i]);
_64=1;
_6a=_5f;
for(var k=0,q=_5b[i].length;k<q;k++){
_65=this.poiCollection[_5b[i][k]];
_6b=Math.ceil(_65.w/2);
_6c=Math.ceil(_65.h/2);
for(var _72=n;;_72+=_5e){
if(_72>=180){
++_64;
_72-=360;
if(_64>2){
_6a+=30;
}
}
if(_64>4){
break;
}
nx=Math.round(_6a*Math.cos(PI*_72/180));
ny=Math.round(_6a*Math.sin(PI*_72/180));
_5c.x=_63.x+nx-_6b;
_5c.y=_63.y+ny-_6c;
_5c.h=_65.h;
_5c.w=_65.w;
if(_63.x>0&&_63.y>0&&_63.x<this.map.width&&_63.y<this.map.height){
if(_5c.x<=_5c.w||_5c.y<=_5c.h||_5c.x+_5c.w>=this.map.width||_5c.y+_5c.h>=this.map.height){
continue;
}
}
_66=false;
for(var m=0,r=this.poiCollection.length;m<r;m++){
_69=MQA.Util.indexOf(_5b[i],m);
if((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y)){
if(this.checkLLIntersection(this.poiCollection[m].ix+_6b,this.poiCollection[m].iy+_6c,this.poiCollection[m].x+_6b,this.poiCollection[m].y+_6c,_65.ix+_6b,_65.iy+_6c,_5c.x+_6b,_5c.y+_6c)){
_66=true;
break;
}
}
if(_69<0){
if((this.isOverlapped(_5c,this.poiCollection[m]))||((_64<2)&&this.checkLPIntersection((_65.ix+_6b),(_65.iy+_6c),_5c.x+_6b,_5c.y+_6c,this.poiCollection[m]))){
_66=true;
break;
}else{
if((_64<2)&&((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y))){
if(this.checkLPIntersection(this.poiCollection[m].ix+(this.poiCollection[m].w/2),this.poiCollection[m].iy+(this.poiCollection[m].h/2),this.poiCollection[m].x+_6b,this.poiCollection[m].y+_6c,_5c)){
_66=true;
break;
}
}
}
}else{
if((_69>=0)&&(_69<k)&&(this.isOverlapped(_5c,this.poiCollection[m]))){
_66=true;
break;
}
}
}
if(_66){
continue;
}
n=_72+_5e;
_67=this.getDeclutterablePois().getAt(_65.indx);
_67.setValue("isDecluttered",true);
_67.shape.style.left=_5c.x-_6d.x+"px";
_67.shape.style.top=_5c.y-_6d.y+"px";
this.drawLeaderLine(_67);
theLatLngXY=this.map.llToPix(_67.getValue("latLng"));
_67.dragLeft=theLatLngXY.x-_5c.x;
_67.dragTop=theLatLngXY.y-_5c.y;
_65.x=_5c.x;
_65.y=_5c.y;
break;
}
}
}
};
MQA.Declutter.prototype.checkLPIntersection=function(x1,y1,x2,y2,poi){
var m1=(x2-x1==0)?(y2-y1)/1e-8:(y2-y1)/(x2-x1);
var a1=y1-m1*x1;
var hm2=0;
var vm2=poi.h/1e-8;
var u1,v1,u2,v2;
var a2,xi,yi;
for(var i=1;i<=4;i++){
switch(i){
case 1:
u1=poi.x;
v1=poi.y;
u2=poi.x+poi.w;
v2=poi.y;
break;
case 2:
u1=poi.x+poi.w;
v1=poi.y;
u2=poi.x+poi.w;
v2=poi.y+poi.h;
break;
case 3:
u1=poi.x;
v1=poi.y+poi.h;
u2=poi.x+poi.w;
v2=poi.y+poi.h;
break;
case 4:
u1=poi.x;
v1=poi.y;
u2=poi.x;
v2=poi.y+poi.h;
break;
}
if(i%2==1){
a2=v1;
xi=Math.round(0-(a1-a2)/m1);
yi=a2;
}else{
a2=v1-vm2*u1;
xi=Math.round(0-(a1-a2)/(m1-vm2));
yi=(Math.abs(m1)<Math.abs(vm2))?Math.round(a1+m1*xi):Math.round(a2+vm2*xi);
}
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){
return (true);
}
}
return (false);
};
MQA.Declutter.prototype.checkLLIntersection=function(x1,y1,x2,y2,u1,v1,u2,v2){
var m1=(x2-x1==0)?(y2-y1)/1e-8:(y2-y1)/(x2-x1);
var a1=y1-m1*x1;
var m2=(u2-u1==0)?(v2-v1)/1e-8:(v2-v1)/(u2-u1);
var a2=v1-m2*u1;
var xi,yi;
xi=Math.round(0-(a1-a2)/(m1-m2));
yi=(Math.abs(m1)<Math.abs(m2))?Math.round(a1+m1*xi):Math.round(a2+m2*xi);
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){
var _94=3;
if(((Math.abs(x1-xi)<=_94)&&(Math.abs(y1-yi)<=_94))||((Math.abs(u1-xi)<=_94)&&(Math.abs(v1-yi)<=_94))||((Math.abs(x2-xi)<=_94)&&(Math.abs(y2-yi)<=_94))||((Math.abs(u2-xi)<=_94)&&(Math.abs(v2-yi)<=_94))){
return (false);
}
return (true);
}
return (false);
};
MQA.Declutter.prototype.getDeclutCenterPt=function(_95){
var _96=0;
var _97=0;
var poi;
var _99=_95.length;
for(var i=0;i<_99;i++){
poi=this.poiCollection[_95[i]];
_96+=poi.ix+poi.w/2;
_97+=poi.iy+poi.h/2;
}
return (new MQA.PointXY(Math.round(_96/_99),Math.round(_97/_99)));
};
MQA.Declutter.prototype.isOverlapped=function(_9b,_9c){
var x1,x2,y1,y2,w1,w2,h1,h2;
x1=_9b.x;
y1=_9b.y;
h1=_9b.h;
w1=_9b.w;
x2=_9c.x;
y2=_9c.y;
h2=_9c.h;
w2=_9c.w;
if((((x1<=x2)&&((x1+w1)>=x2))&&(((y1<=y2)&&((y1+h1)>=y2))||((y1>=y2)&&((y2+h2)>=y1))))||(((x1>=x2)&&((x2+w2)>=x1))&&(((y1>=y2)&&((y2+h2)>=y1))||((y1<=y2)&&((y1+h1)>=y2))))){
return (true);
}
return (false);
};
MQA.Declutter.prototype.sortPois=function(a,b){
return (a[1]-b[1]);
};
MQA.Declutter.prototype.sortPoisRL=function(a,b){
return (b[1]-a[1]);
};
MQA.Declutter.prototype.isIntersected=function(_a9,_aa){
var _ab=(_a9.lr.x>_aa.ul.x)&&(_a9.ul.x<_aa.lr.x)&&(_a9.lr.y>_aa.ul.y)&&(_a9.ul.y<_aa.lr.y);
return _ab;
};
MQA.Declutter.prototype.setMap=function(map){
this.map=map;
};
MQA.Declutter.prototype.addDeclutterPoi=function(x,y,poi,_b0,_b1){
var _b2=new MQA.DeclutterPoi(this.map,poi,_b0);
this.dcCollection[_b1].push(_b2);
poi.isDecluttered=true;
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),_b2.div);
};
MQA.Declutter.prototype.turnPage=function(_b4,_b5){
var i;
var _b7=this.stackHeight*this.stackWidth;
var _b8=this.dcCollection[_b5].length;
if(this.cpCollection[_b5]==1&&_b4==-1){
return;
}
if(((this.cpCollection[_b5]*_b7)>=_b8)&&_b4==1){
return;
}
this.cpCollection[_b5]=this.cpCollection[_b5]+_b4;
for(i=0;i<_b8;i++){
this.dcCollection[_b5][i].setVisible(false);
}
var _b9=(this.cpCollection[_b5]*_b7);
if(_b9>_b8){
_b9=_b8;
}
var _ba=(this.cpCollection[_b5]*_b7)-_b7;
for(i=_ba;i<_b9;i++){
this.dcCollection[_b5][i].setVisible(true);
}
if(_ba>0){
this.pnCollection[_b5][0].setVisible(true);
}else{
this.pnCollection[_b5][0].setVisible(false);
}
if(_b9<_b8){
this.pnCollection[_b5][1].setVisible(true);
}else{
this.pnCollection[_b5][1].setVisible(false);
}
var _bb=this.cpCollection[_b5]-1;
var _bc=parseInt(Math.ceil(_b8/_b7))-1;
var _bd=this.pageBarIcon.width-6;
this.pnCollection[_b5][2].div.mar.style.left=parseInt(_bd*(_bb/_bc))+"px";
};
MQA.Declutter.prototype.adjustLeaderLineSurface=function(){
var _be=false;
if(this.map.poisurface){
if(this.map.getDragOffset().x!=this.map.poiLineOffsetX||this.map.getDragOffset().y!=this.map.poiLineOffsetY){
this.map.poiLineOffsetX=this.map.getDragOffset().x;
this.map.poiLineOffsetY=this.map.getDragOffset().y;
if(this.map.poilinediv){
this.map.poilinediv.style.left=-(MQA.SURFACE_OFFSET+this.map.poiLineOffsetX)+"px";
this.map.poilinediv.style.top=-(MQA.SURFACE_OFFSET+this.map.poiLineOffsetY)+"px";
}
_be=true;
}
}
if(this.map.dcCanvasDiv){
if(this.map.getDragOffset().x!=this.map.canvasOffsetX||this.map.getDragOffset().y!=this.map.canvasOffsetY){
this.map.canvasOffsetX=this.map.getDragOffset().x;
this.map.canvasOffsetY=this.map.getDragOffset().y;
if(this.map.dcCanvasDiv){
this.map.dcCanvasDiv.style.left=-(MQA.SURFACE_OFFSET+this.map.canvasOffsetX)+"px";
this.map.dcCanvasDiv.style.top=-(MQA.SURFACE_OFFSET+this.map.canvasOffsetY)+"px";
}
_be=true;
}
}
return _be;
};
MQA.Declutter.prototype.drawLeaderLine=function(poi){
if(poi.shape.style.display=="none"){
return;
}
var xy=new Object;
var _c1=(MQA.browser.name=="safari");
if(!_c1){
if(!this.map.poisurface){
this.map.createPoiDrawingSurface();
}
}else{
if(!this.map.dcCanvasDiv){
this.map.createCanvas();
}
}
if(!_c1){
if(!poi.map.poisurface){
throw ("Leader line drawing surface does not exist.");
}
}else{
if(!this.map.dcCanvasDiv){
throw ("Leaderline drawing canvas does not exist.");
}
}
if(!this.adjustLeaderLineSurface()){
var _c2=this.map.getDragOffset();
var _c3=new Array();
_c3[0]=new Object;
_c3[0]=this.map.llToPix(poi.getValue("latLng"));
_c3[0].x+=(MQA.SURFACE_OFFSET);
_c3[0].y+=(MQA.SURFACE_OFFSET);
_c3[1]=new Object;
var _c4=parseInt(this.map.div1.style.left)+_c2.x;
var _c5=parseInt(this.map.div1.style.top)+_c2.y;
if(poi.getValue("altStateFlag")){
var _c6=poi.getValue("altIconOffset").x;
var _c7=poi.getValue("altIconOffset").y;
}else{
var _c6=poi.getValue("declutterIconOffset").x;
var _c7=poi.getValue("declutterIconOffset").y;
}
_c3[1].x=(parseInt(poi.shape.style.left)+MQA.SURFACE_OFFSET)-_c6+_c4;
_c3[1].y=(parseInt(poi.shape.style.top)+MQA.SURFACE_OFFSET)-_c7+_c5;
cpnts=new Array();
if(MQA.Util.isOverLimit(xy)){
if(!_c1){
var _c8=parseInt(this.map.poilinediv.style.height.substr(0,(this.map.poilinediv.style.height.length)-2));
var _c9=parseInt(this.map.poilinediv.style.width.substr(0,(this.map.poilinediv.style.width.length)-2));
}else{
var _c8=parseInt(this.map.dcCanvasDiv.style.height.substr(0,(this.map.dcCanvasDiv.style.height.length)-2));
var _c9=parseInt(this.map.dcCanvasDiv.style.width.substr(0,(this.map.dcCanvasDiv.style.width.length)-2));
}
cpnts=MQA.Clip(0,_c8,0,_c9,_c3,false);
}else{
cpnts=_c3;
}
var _ca=poi.getValue("leaderLineColor");
if(!_c1){
poi.leaderLine=MQA.Graphics.drawLine(cpnts,_ca,1,2,true,{x:MQA.Graphics.surfaceWidth,y:MQA.Graphics.surfaceHeight});
this.map.poisurface.appendChild(poi.leaderLine);
poi.leaderLine.setAttribute("zIndex",80);
}else{
this.map.dcCanvasContext.strokeStyle=_ca;
this.map.dcCanvasContext.lineWidth=2;
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.moveTo(cpnts[1].x,cpnts[1].y);
this.map.dcCanvasContext.lineTo(cpnts[0].x,cpnts[0].y);
this.map.dcCanvasContext.stroke();
}
var _cb=parseInt(this.getLeaderLineDotMode());
switch(_cb){
case 0:
break;
case 1:
if(!_c1){
var c=new Array({x:cpnts[0].x-3,y:cpnts[0].y-3},{x:cpnts[0].x+3,y:cpnts[0].y+3});
var _cd=this.map.llToPix(poi.getValue("latLng")).x;
var _ce=this.map.llToPix(poi.getValue("latLng")).y;
var _cf=-MQA.SURFACE_OFFSET;
var _d0=-MQA.SURFACE_OFFSET;
if(!((_cd<_cf)||(_cd>_cf+MQA.Graphics.surfaceWidth)||(_ce<_d0)||(_ce>_d0+MQA.Graphics.surfaceHeight))){
poi.leaderLineDot=MQA.Graphics.drawEllipse(c,_ca,1,1,_ca,1,true);
this.map.poisurface.appendChild(poi.leaderLineDot);
poi.leaderLineDot.setAttribute("zIndex",80);
}
}else{
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,3,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,2,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,1,0,Math.PI*2,true);
this.map.dcCanvasContext.stroke();
}
break;
case 2:
var _d1=poi.getValue("leaderLineDotImage");
if(_d1){
poi._leaderLineDotIconDiv=document.createElement("div");
poi._leaderLineDotIconDiv.style.position="absolute";
poi._leaderLineDotIconDiv.style.display="block";
poi._leaderLineDotIconDiv.style.height=_d1.height;
poi._leaderLineDotIconDiv.style.width=_d1.width;
poi._leaderLineDotIconDiv.style.MozUserSelect="none";
poi._leaderLineDotIconDiv.unselectable="on";
var _d2=document.createElement("img");
_d2.src=_d1.imageURL;
_d2.unselectable="on";
_d2.style.height=_d1.height;
_d2.style.width=_d1.width;
poi._leaderLineDotIconDiv.appendChild(_d2);
poi.map._addPoi(poi.getValue("latLng"),new MQA.PointXY(-_d1.width/2,-_d1.height/2),poi._leaderLineDotIconDiv);
poi._leaderLineDotIconDiv.style.zIndex=85;
}
break;
default:
break;
}
}else{
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.redrawLeaderLines=function(){
var _d3=null;
var _d4=(MQA.browser.name=="safari");
if(arguments.length>0){
_d3=arguments[0];
}
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
var _d5=this.getDeclutteredPois();
for(var i=0,x=_d5.getSize();i<x;i++){
var _d8=_d5.getAt(i);
if(_d8.getValue("isDecluttered")){
if(!_d4||(x==0)){
this.leaderLineDispose(_d8);
}else{
if(_d4&&(x>0)){
this.leaderLineDispose(_d8,true);
}
}
this.drawLeaderLine(_d8);
}
}
};
MQA.Declutter.prototype.removeLeaderLines=function(){
var _d9=this.getDeclutteredPois();
for(var i=0,x=_d9.getSize();i<x;i++){
var _dc=_d9.getAt(i);
this.leaderLineDispose(_dc);
}
if(MQA.browser.name=="safari"){
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
}
};
MQA.Declutter.prototype.resetDraggedPois=function(){
var _dd;
var _de=this.getDeclutterablePois();
for(var i=0,j=_de.getSize();i<j;i++){
_dd=_de.getAt(i);
theLatLngXY=this.map.llToPix(_dd.getValue("latLng"));
if(_dd.dragLeft!=null){
_dd.shape.style.left=theLatLngXY.x-_dd.dragLeft+"px";
_dd.shape.style.top=theLatLngXY.y-_dd.dragTop+"px";
}
}
};
MQA.Declutter.prototype.leaderLineDispose=function(poi,_e2){
var _e2=(typeof (_e2)=="undefined"?false:_e2);
if(!poi.map&&!_e2){
return;
}
if(!_e2){
if(!poi.map.dcCanvasContext){
if(poi.leaderLine){
poi.leaderLine.innerHTML=null;
MQA.Graphics.remove(poi.map.poisurface,poi.leaderLine);
MQA.Util._setOuterHTMLToEmptyString(poi.leaderLine);
poi.leaderLine=null;
}
if(poi.leaderLineDot){
poi.leaderLineDot.innerHTML=null;
MQA.Graphics.remove(poi.map.poisurface,poi.leaderLineDot);
MQA.Util._setOuterHTMLToEmptyString(poi.leaderLineDot);
poi.leaderLineDot=null;
}
}else{
poi.map.dcCanvasContext.clearRect(0,0,parseInt(poi.map.dcCanvasDiv.style.width),parseInt(poi.map.dcCanvasDiv.style.height));
}
}
if(poi._leaderLineDotIconDiv){
poi._leaderLineDotIconDiv.style.display="none";
poi._leaderLineDotIconDiv.innerHTML=null;
MQA.Util._deleteDOMObject(poi._leaderLineDotIconDiv);
MQA.Util._setOuterHTMLToEmptyString(poi._leaderLineDotIconDiv);
poi._leaderLineDotIconDiv=null;
}
};
MQA.DeclutterPoi=function(map,poi,_e5){
this.map=map;
this.poi=poi;
this.div=document.createElement("div");
this.div.id="dc_"+poi.getValue("labelText");
this.div.className="pois";
this.div.im=document.createElement("img");
var _e6;
if(poi.getValue("altIcon")!=poi.getValue("icon")){
_e6=new MQA.DeclutterIcon(poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_e6=this.map.getDeclutter().getDeclutterIcon();
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.getDeclutter().declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_e6.imageURL)){
this.div.im.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e6.imageURL+"', sizingMethod='image') ";
}else{
this.div.im.src=_e6.imageURL;
}
this.div.im.style.height=_e6.height+"px";
this.div.im.style.width=_e6.width+"px";
this.div.im.style.position="absolute";
if(_e5){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
this.click=MQA._prEvent.EventCallback(poi,"onClick");
this.dblclick=MQA._prEvent.EventCallback(poi,"onDoubleClick");
this.mousedown=MQA._prEvent.EventCallback(poi,"onMouseDown");
this.mouseup=MQA._prEvent.EventCallback(poi,"onMouseUp");
this.mouseover=MQA._prEvent.EventCallback(this,"onMouseOver");
this.mouseout=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.div.im,"click",this.click);
MQA._prEvent.observe(this.div.im,"dblclick",this.dblclick);
MQA._prEvent.observe(this.div.im,"mousedown",this.mousedown);
MQA._prEvent.observe(this.div.im,"mouseup",this.mouseup);
MQA._prEvent.observe(this.div.im,"mouseover",this.mouseover);
MQA._prEvent.observe(this.div.im,"mouseout",this.mouseout);
poi.setValue("visible",false);
};
MQA.DeclutterPoi.prototype={dispose:function(){
MQA._prEvent.stopObserving(this.div.im,"click",this.click);
MQA._prEvent.stopObserving(this.div.im,"dblclick",this.dblclick);
MQA._prEvent.stopObserving(this.div.im,"mousedown",this.mousedown);
MQA._prEvent.stopObserving(this.div.im,"mouseup",this.mouseup);
MQA._prEvent.stopObserving(this.div.im,"mouseover",this.mouseover);
MQA._prEvent.stopObserving(this.div.im,"mouseout",this.mouseout);
this.div.im.outerHTML="";
MQA.Util._deleteDOMObject(this.div.im);
this.div.im=null;
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},onMouseOut:function(e){
if(this.poi.showingInfo!=true){
this.poi.setValue("visible",false);
this.poi.setValue("zIndex",90);
}
this.poi.onMouseOut(e);
var _e8;
if(this.poi.getValue("altIcon")!=this.poi.getValue("icon")){
_e8=new MQA.DeclutterIcon(this.poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_e8=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_e8.imageURL)){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e8.imageURL+"', sizingMethod='image') ";
}else{
this.div.im.src=_e8.imageURL;
}
},onMouseOver:function(e){
this.poi.setValue("zIndex",100);
this.poi.setValue("visible",true);
this.poi.onMouseOver(e);
var _ea;
if(this.poi.getValue("altIcon")!=this.poi.getValue("icon")){
_ea=new MQA.DeclutterIcon(this.poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_ea=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_ea.imageURL)){
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.map.mydeclutter.declutterOverIcon.imageURL+"', sizingMethod='image') ";
}
}else{
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.src=this.map.mydeclutter.declutterOverIcon.imageURL;
}
}
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
}};
MQA.PageMarkIcon=function(bar,_ed,x,y,map,_f1){
this.map=map;
this.index=_f1;
this.div=document.createElement("div");
this.div.className="pois";
this.div.bar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(bar.imageURL)){
this.div.bar.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.bar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bar.imageURL+"', sizingMethod='image');";
}else{
this.div.bar.src=bar.imageURL;
}
this.div.bar.style.position="absolute";
this.div.bar.style.display="block";
this.div.bar.style.height=bar.height;
this.div.bar.style.width=bar.width;
this.div.mar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_ed.imageURL)){
this.div.mar.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.mar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_ed.imageURL+"', sizingMethod='image');";
}else{
this.div.mar.src=_ed.imageURL;
}
this.div.mar.style.position="absolute";
this.div.mar.style.display="block";
this.div.mar.style.height=_ed.height;
this.div.mar.style.width=_ed.width;
this.div.mar.style.left="0px";
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.bar);
this.div.appendChild(this.div.mar);
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),this.div);
};
MQA.PageMarkIcon.prototype={dispose:function(){
this.div.bar.style.display="block";
this.div.mar.style.display="block";
this.div.removeChild(this.div.bar);
this.div.removeChild(this.div.mar);
this.div.bar=null;
this.div.mar=null;
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},remove:function(){
this.dispose();
}};
MQA.PrevNextIcon=function(_f3,x,y,map,_f7,_f8,_f9){
this.map=map;
this.increment=_f8;
this.index=_f9;
this.div=document.createElement("div");
this.div.className="pois";
this.div.im=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_f3.imageURL)){
this.div.im.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_f3.imageURL+"', sizingMethod='image');";
}else{
this.div.im.src=_f3.imageURL;
}
this.div.im.style.position="absolute";
if(_f7){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.im.style.height=_f3.height;
this.div.im.style.width=_f3.width;
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),this.div);
MQA._prEvent.observe(this.div.im,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.div.im,"dblclick",MQA._prEvent.EventCallback(this,"onDblClick"));
};
MQA.PrevNextIcon.prototype={dispose:function(){
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},remove:function(){
this.dispose();
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
},onClick:function(e){
this.map.getDeclutter().turnPage(this.increment,this.index);
},onDblClick:function(e){
e.stop;
}};
MQA.DeclutterIcon=function(url,_ff,_100){
this.url=url;
this.imageURL=url;
this.width=_ff;
this.height=_100;
};
MQA.LeaderLineDotImage=function(url,_102,_103){
this.imageURL=url;
this.width=_102;
this.height=_103;
};
MQA.LeaderLineDotIcon=function(_104,map,poi){
this.map=map;
this.div=document.createElement("div");
this.div.im=document.createElement("img");
this.div.im.src=_104.imageURL;
this.div.im.style.height=_104.height;
this.div.im.style.width=_104.width;
this.div.im.style.position="absolute";
this.div.im.style.display="block";
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
this.map._addPoi(poi.getValue("latLng"),new MQA.PointXY(-_104.width/2,-_104.height/2),this.div);
};

MQA.InfoWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=null;
this.title=null;
this.content=null;
this.offset=null;
this.maxwidth=this.map.width-50;
this.minwidth=60;
this.maxheight=this.map.height-50;
this.contentwidth=null;
this.titlebackgroundcolor=null;
this.opener=null;
this.infoWindowSrc=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/infopopup.png";
this.isAttachedToPoi=false;
this.popup=document.createElement("div");
this.popup.id="popupcontainer";
this.popup.className="mqpoipopup";
this.popup.currentElement=null;
this.popup.oncontextmenu=function(){
return false;
};
var _2="<div id='poiclose' class='mqpoiclose'><div style='width:650px;height:685px;margin-left:-180px;margin-top:-650px;'></div></div>";
_2+="<div id='popup-topleft' style='position:absolute;overflow:hidden;'><div style='width:650px;height:685px;'></div></div>";
_2+="<div id='popup-topright' style='position:absolute;width:20px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;'></div></div>";
_2+="<div id='popup-bottomleft' style='position:absolute;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-top:-630px;'></div></div>";
_2+="<div id='popup-bottomright' style='position:absolute;width:20px;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;margin-top:-630px;'></div></div>";
_2+="<div id='popup-pointer' style='position:absolute;width:20px;height:22px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-50px;margin-top:-654px;'></div></div>";
_2+="<div id='popup-fillercontainer'></div>";
_2+="<div id='popup-content' style='position:absolute;left:13px;top:13px;overflow:auto;z-index:1;'></div></div>";
this.popup.innerHTML=_2;
this.popup.style.position="absolute";
this.popup.style.visibility="hidden";
this.popup.style.left="-1000px";
this.popup.style.top="-1000px";
document.body.appendChild(this.popup);
var _3=this.popup.childNodes[0];
var _4=this.popup.childNodes[1];
var _5=this.popup.childNodes[2];
var _6=this.popup.childNodes[3];
var _7=this.popup.childNodes[4];
var _8=this.popup.childNodes[5];
var _9=this.popup.childNodes[6];
this.eClickClose=MQA._prEvent.EventCallback(this,"clickClose");
MQA._prEvent.observe(_3,"click",this.eClickClose);
this.popup.content=this.popup.childNodes[7];
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.popup,"click",this.eClick);
this.eDblClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.popup,"dblclick",this.eClick);
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(this.popup,"mousedown",this.eMouseDown);
if(MQA.browser.name=="msie"&&(MQA.browser.version>5)&&(MQA.browser.version<7)){
_4.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_5.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_6.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_7.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_8.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_3.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_4.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_5.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_6.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_7.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_8.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_3.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
};
MQA.InfoWindow.prototype.dispose=function(){
MQA._prEvent.stopObserving(this.popup.childNodes[0],"click",this.eClickClose);
MQA._prEvent.stopObserving(this.popup,"click",this.eClick);
MQA._prEvent.stopObserving(this.popup,"dblClick",this.eDblClick);
this.map=null;
this.opener=null;
this.content=null;
this.popup.oncontextmenu=null;
this.popup.innerHTML=null;
this.popup.content=null;
this.popup.id;
this.popup.innerHTML=null;
this.popup.outerHTML="";
MQA.Util._deleteDOMObject(this.popup);
this.popup=null;
delete this.popup;
};
MQA.InfoWindow.prototype.onOpen=function(e){
MQA.EventManager.trigger(this,"opened",e);
};
MQA.InfoWindow.prototype.onClose=function(e){
MQA.EventManager.trigger(this,"closed",e);
};
MQA.InfoWindow.prototype.onClickedClosed=function(e){
e=new MQA.Event("MQA.InfoWindow.clickedClosed");
MQA.EventManager.trigger(this,"clickedclosed",e);
MQA._prEvent.stop(e);
};
MQA.InfoWindow.prototype.clickClose=function(_d){
this.hide();
this.onClickedClosed(_d);
MQA._prEvent.stop(_d);
};
MQA.InfoWindow.prototype.onClick=function(_e){
_e.cancelBubble=true;
};
MQA.InfoWindow.prototype.onDoubleClick=function(_f){
_f.cancelBubble=true;
};
MQA.InfoWindow.prototype.onMouseDown=function(evt){
MQA._prEvent.stop(evt);
};
MQA.InfoWindow.prototype.hide=function(){
if(!this.isHidden()){
if(this.popup.style.visibility!="hidden"){
this.popup.style.visibility="hidden";
this.popup.style.display="none";
}
if(this.opener!=null){
if(this.map.getDeclutter()){
if((this.map.getDeclutter().getDeclutterMode()!=0)&&this.opener.decluttered){
this.opener.setVisible(false);
}
}
this.opener.onInfoWindowClose(new MQA.Event("MQTileMap.infoWindowClose"));
this.opener=null;
}
this.onClose(new MQA.Event("MQA.InfoWindow.close"));
}
};
MQA.InfoWindow.prototype.setOpenerAndShow=function(_11){
this.show();
this.opener=_11;
};
MQA.InfoWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
this.popup.style.display="block";
if(this.isAttachedToPoi){
var _12=this.offset.y;
var _13=this.offset.x;
}else{
var _12=this.point.y;
var _13=this.point.x;
}
var _14=this.popup.offsetHeight+3;
var _15=25;
this.popup.style.top=(_12-_14)+"px";
this.popup.style.left=(_13-_15)+"px";
this.popup.style.visibility="visible";
this.avoidPopupCollisions(this.popup);
this.onOpen(new MQA.Event("MQA.InfoWindow.open"));
};
MQA.InfoWindow.prototype.isHidden=function(){
return (this.popup.style.visibility=="hidden");
};
MQA.InfoWindow.prototype.modify=function(_16,_17,_18,_19){
if(_16){
this.point=_16;
}
if(_17){
this.title=_17;
}
if(_18){
this.content=_18;
}
this.offset=new MQA.PointXY(0,0);
if(_19){
this.offset=_19;
}
this.popup.style.position="absolute";
this.resize(false);
};
MQA.InfoWindow.prototype.getMaxWidth=function(){
return this.maxwidth;
};
MQA.InfoWindow.prototype.setMaxWidth=function(_1a){
_1a=parseInt(_1a);
if(isNaN(_1a)){
return;
}
this.maxwidth=(_1a>this.map.width-50)?(this.map.width-50):(_1a<this.minwidth)?this.minwidth:_1a;
};
MQA.InfoWindow.prototype.getMinWidth=function(){
return this.minwidth;
};
MQA.InfoWindow.prototype.setMinWidth=function(_1b){
_1b=parseInt(_1b);
if(isNaN(_1b)){
return;
}
this.minwidth=(_1b<60)?60:(_1b>this.maxwidth)?this.maxwidth:_1b;
};
MQA.InfoWindow.prototype.getContentWidth=function(){
return this.contentwidth;
};
MQA.InfoWindow.prototype.setContentWidth=function(_1c){
this.contentwidth=_1c;
};
MQA.InfoWindow.prototype.getTitleBackgroundColor=function(){
return this.titlebackgroundcolor;
};
MQA.InfoWindow.prototype.setTitleBackgroundColor=function(_1d){
this.titlebackgroundcolor=_1d;
};
MQA.InfoWindow.prototype.getPointLL=function(){
return this.map.getXYToLL(this.point);
};
MQA.InfoWindow.prototype.getPointXY=function(){
return this.point;
};
MQA.InfoWindow.prototype.getPixelOffset=function(){
return this.offset;
};
MQA.InfoWindow.prototype.avoidPopupCollisions=function(_1e){
var _1f=this.getCollisionInfo(_1e);
if(_1f.panX!=0||_1f.panY!=0){
this.map.slideMapByOffset(new MQA.PointXY(_1f.panX,_1f.panY));
}
};
MQA.InfoWindow.prototype.getCollisionInfo=function(_20){
var _21=this.map.parent;
var _22={panX:0,panY:0};
var _23=MQA.Util.getParentOffset(_21);
var _24=MQA.Util.getParentOffset(_20);
var _25=10;
_24.x=_24.x-_23.x-_25;
_24.y=_24.y-_23.y-_25;
var _26={width:37,height:300};
var _27={width:139,height:15};
var _28=(_24.x<_26.width&&_24.y<_26.height+_25)?_26.width:0;
var _29=(_24.x+_20.clientWidth>_21.clientWidth-_27.width&&_24.y<_27.height+_25)?_27.height:0;
if(_20.clientWidth>0&&_20.clientHeight>0){
if(_24.x<_28){
_22.panX=Math.abs(_24.x-_28);
}else{
if(_24.x+_25+_20.clientWidth>_21.clientWidth){
_22.panX=-1*(_20.clientWidth+_24.x+_25-_21.clientWidth);
}
}
if(_24.y<_29){
_22.panY=Math.abs(_24.y-_29);
}else{
if(_24.y+_20.clientHeight>_21.clientHeight){
_22.panY=_21.clientHeight-_24.y-_20.clientHeight;
}
}
}
return _22;
};
MQA.InfoWindow.prototype.getOpener=function(){
return this.opener;
};
MQA.InfoWindow.prototype.resize=function(_2a){
var _2b=this.popup.childNodes[0];
var _2c=this.popup.childNodes[1];
var _2d=this.popup.childNodes[2];
var _2e=this.popup.childNodes[3];
var _2f=this.popup.childNodes[4];
var _30=this.popup.childNodes[5];
var _31=this.popup.childNodes[6];
var _32="";
if(this.getTitleBackgroundColor()){
_32=" style=background:"+this.getTitleBackgroundColor();
}
_31.innerHTML="";
this.popup.style.display="block";
this.popup.content.style.width="auto";
this.popup.content.style.height="auto";
this.popup.content.style.overflow="visible";
var _33="";
if(_2a){
if(this.popup.content){
_33=this.popup.content.innerHTML;
}
}else{
_33="<div class='mqpoiheading'"+_32+" title='"+MQA.Util.stripHTMLTags(this.title.innerHTML)+"'>"+this.title.innerHTML+"</div><div class='mqpoicontenttext'>"+this.content.innerHTML+"</div>";
}
this.popup.content.innerHTML=_33;
var _34=this.popup.content.childNodes[0];
var _35=this.popup.content.childNodes[1];
_34.style.display="none";
_35.style.whiteSpace="nowrap";
_35.style.overflow="visible";
_35.style.width="auto";
_35.style.height="auto";
var _36=this.popup.content.offsetWidth+35+2;
var _37=(_36>this.maxwidth)?18:0;
_36=(_36>this.maxwidth)?this.maxwidth:(_36<this.minwidth)?this.minwidth:_36;
var _38=_36-35;
_35.style.width=_38+"px";
_34.style.display="";
_35.style.whiteSpace="";
var _39=this.popup.content.offsetHeight+_37+30+2;
var _3a=(_39>this.maxheight)?18:0;
_38+=_3a;
_36+=_3a;
_34.style.width=(_38-18)+"px";
var _3b=_34.childNodes[0];
if(typeof (_3b.tagName)=="undefined"){
_34.innerHTML="<div>"+this.title.innerHTML+"</div>";
_3b=_34.childNodes[0];
}
_3b.style.display="inline";
if((_3b.offsetWidth>(_38-18))&&((_38-18)>25)){
var _3c=MQA.Util.stripHTMLTags(this.title.innerHTML);
var _3d=_3b.innerHTML;
for(var i=_3c.length;(_3b.offsetWidth>=(_38-18)&&i>0);i--){
_3b.innerHTML=MQA.Util.getHTMLSubstring(_3d,i,"&nbsp;...");
}
}
_39=this.popup.content.offsetHeight+_37+30+2;
_39=(_39>this.maxheight)?this.maxheight:_39;
var _3f=_39-30+2;
var _40=Math.ceil(_38/600);
var _41=_38%600;
var _42=Math.ceil(_3f/600);
var _43=_3f%600;
var _44,_45,_46,_47;
var _48,_49;
var _4a,_4b;
var _4c,_4d,_4e,_4f;
var _50=600;
var _51=600;
for(var i=1;i<=_42;i++){
for(var j=1;j<=_40;j++){
if(i==1&&j==1){
continue;
}
_44=(j==_40&&_41!=0)?_41:_50;
_45=(i==_42&&_43!=0)?_43:_51;
_48=(j==1)?15:0;
_49=(i==1)?15:0;
_4a=(i==1)?0:15;
_4b=(j==1)?0:15;
_4c=(-1*_4b);
_4d=(-1*_4a);
_46=(_44+_48);
_47=(_45+_49);
_4e=(((j-1)*_50)+_4b);
_4f=(((i-1)*_51)+_4a);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
if(i==1){
_4c=-15;
_4d=-630;
_46=(_44+_48);
_47=15;
_4e=(((j-1)*_50)+_4b);
_4f=(_3f+15);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
}
}
if(i>1){
_4c=-630;
_4d=-15;
_46=20;
_47=(_45+_49);
_4e=(_38+15);
_4f=(((i-1)*_51)+_4a);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
}
}
var _53=(_38>_50)?_50:_38;
var _54=(_3f>_51)?_51:_3f;
this.popup.style.width=(_36)+"px";
this.popup.style.height=(_39)+"px";
this.popup.content.style.width=_38+"px";
this.popup.content.style.height=_3f+"px";
_2b.style.left=(_36-38)+"px";
_2b.style.top="12px";
_34.style.width=(_38-18)+"px";
_35.style.width=_38+"px";
_35.style.height=(_3f-_34.offsetHeight-5)+"px";
_35.style.overflow="auto";
_2c.style.width=_53+15+"px";
_2c.style.height=_54+15+"px";
_2d.style.left=_38+15+"px";
_2d.style.height=_54+15+"px";
_2e.style.top=_3f+15+"px";
_2e.style.width=_53+15+"px";
_2f.style.top=_3f+15+"px";
_2f.style.left=_38+15+"px";
_30.style.left="14px";
_30.style.top=_3f+15+"px";
if(_2a){
this.popup.style.visibility="hidden";
this.show();
}
};
MQA.InfoWindow.prototype.createFillerDiv=function(_55,_56,_57,_58,_59,_5a){
var _5b=this.popup.childNodes[6];
var _5c=document.createElement("div");
_5c.style.position="absolute";
_5c.style.overflow="hidden";
var str="<div style='width:650px;height:685px;'></div>";
_5c.innerHTML=str;
_5b.appendChild(_5c);
if((MQA.browser.name=="msie")&&(parseFloat(MQA.browser.version)<7)){
_5c.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_5c.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
_5c.childNodes[0].style.marginLeft=_55+"px";
_5c.childNodes[0].style.marginTop=_56+"px";
_5c.style.width=_57+"px";
_5c.style.height=_58+"px";
_5c.style.left=_59+"px";
_5c.style.top=_5a+"px";
};
MQA.InfoWindow.prototype.setPopupContentOverflow=function(_5e){
if(_5e&&(MQA.browser.name=="firefox")&&this.popup.content.childNodes[1]){
var _5f=this.popup.content.childNodes[1].scrollLeft;
var top=this.popup.content.childNodes[1].scrollTop;
this.popup.content.childNodes[1].style.overflow=_5e;
this.popup.content.childNodes[1].scrollLeft=_5f;
this.popup.content.childNodes[1].scrollTop=top;
}
};

MQA.RolloverWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=null;
this.title=null;
this.content=null;
this.offset=new MQA.Point(0,0);
this.opener=null;
this.maxwidth=null;
this.artUrl=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/";
this.flipStateEnabled=false;
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
this.rightRolloverSrc=this.artUrl+"rollover-right.png";
this.minipopup=null;
this.textLength=31;
this.leftRolloverOffsetX=-25;
this.rightRolloverOffsetX=-193;
this.createRolloverWindow();
this.rolloverOffsetY=13-this.minipopup.offsetHeight;
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.minipopup,"click",this.eClick);
this.eDblClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.minipopup,"dblclick",this.eDblClick);
};
MQA.RolloverWindow.prototype.dispose=function(){
MQA._prEvent.stopObserving(this.minipopup,"click",this.eClick);
MQA._prEvent.stopObserving(this.minipopup,"dblclick",this.eDblClick);
this.map=null;
this.opener=null;
this.minipopup.oncontextmenu=null;
this.minipopup.innerHTML=null;
this.minipopup.outerHTML="";
MQA.Util._deleteDOMObject(this.minipopup);
this.minipopup=null;
};
MQA.RolloverWindow.prototype.onOpen=function(e){
MQA.EventManager.trigger(this,"opened",e);
};
MQA.RolloverWindow.prototype.onClose=function(e){
MQA.EventManager.trigger(this,"closed",e);
};
MQA.RolloverWindow.prototype.onClick=function(_4){
_4.cancelBubble=true;
};
MQA.RolloverWindow.prototype.onDoubleClick=function(_5){
_5.cancelBubble=true;
};
MQA.RolloverWindow.prototype.hide=function(_6){
if(!this.isHidden()){
if(this.minipopup.style.visibility!="hidden"){
this.minipopup.style.visibility="hidden";
}
if(this.opener!=null){
this.opener.onRolloverClose(new MQA.Event("MQPoi.rolloverClose"));
this.opener=null;
}
this.onClose(new MQA.Event("MQA.RolloverWindow.close"));
}
};
MQA.RolloverWindow.prototype.setOpenerAndShow=function(_7){
this.show();
this.opener=_7;
};
MQA.RolloverWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
var _8=this.offset.y;
var _9=this.offset.x;
var _a=this.leftRolloverSrc;
this.minipopup.style.top=(_8+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_9+this.leftRolloverOffsetX)+"px";
this.minipopup.style.zIndex=-1;
if(this.flipStateEnabled){
var _b=this.getCollisionInfo(this.minipopup);
if(_b.panX<0){
_a=this.rightRolloverSrc;
this.minipopup.style.top=(_8+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_9+this.rightRolloverOffsetX)+"px";
}
}
if(MQA.browser.name=="msie"&&(MQA.browser.version>5)&&(MQA.browser.version<7)){
this.minipopup.style.display="none";
this.minipopup.style.visibility="visible";
this.minipopup.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_a+"', sizingMethod='scale')";
this.minipopup.style.display="block";
}else{
this.minipopup.style.background="";
this.minipopup.style.background="url("+_a+") left";
}
this.minipopup.style.visibility="visible";
this.onOpen(new MQA.Event("MQA.RolloverWindow.open"));
};
MQA.RolloverWindow.prototype.isHidden=function(){
return (this.minipopup.style.visibility=="hidden");
};
MQA.RolloverWindow.prototype.modify=function(_c,_d,_e,_f){
if(_c){
this.point=_c;
}
if(_d){
this.content=_d;
}
if(_e){
this.offset=_e;
}
this.minipopup.style.position="absolute";
this.minipopup.style.zIndex=9;
var _10=MQA.Util.stripHTMLTags(this.content.innerHTML);
if(_f.infoWindowContent&&this.textLength==31){
this.textLength-=2;
}
if(_f.infoWindowContent){
_10=(_10.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;...&nbsp;&raquo;"):MQA.Util.getHTMLSubstring(this.content.innerHTML,_10.length,"&nbsp;&raquo;");
}else{
_10=(_10.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;..."):MQA.Util.getHTMLSubstring(this.content.innerHTML,_10.length,"");
}
this.minipopup.innerHTML="<div class='mqminipopuphead'>"+_10+"</div>";
};
MQA.RolloverWindow.prototype.getMaxWidth=function(){
return this.maxWidth;
};
MQA.RolloverWindow.prototype.setMaxWidth=function(_11){
this.maxWidth=_11;
};
MQA.RolloverWindow.prototype.getPointLL=function(){
return this.map.getXYToLL(this.point);
};
MQA.RolloverWindow.prototype.getPointXY=function(){
return this.point;
};
MQA.RolloverWindow.prototype.getPixelOffset=function(){
return this.offset;
};
MQA.RolloverWindow.prototype.setRolloverGraphic=function(_12,_13){
if(typeof _12=="undefined"&&typeof _13=="undefined"){
this.setDefaultRollover();
}else{
if(typeof _12!="undefined"){
this.leftRolloverSrc=_12;
}
if(typeof _13!="undefined"){
this.rightRolloverSrc=_13;
}
}
};
MQA.RolloverWindow.prototype.getRolloverGraphic=function(_14){
var _15="";
if(typeof _14=="undefined"||_14=="left"){
_15=this.leftRolloverSrc;
}else{
if(_14=="right"){
_15=this.rightRolloverSrc;
}
}
return _15;
};
MQA.RolloverWindow.prototype.setDefaultRollover=function(){
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
this.rightRolloverSrc=this.artUrl+"rollover-right.png";
this.setRolloverGraphic(this.leftRolloverSrc,this.rightRolloverSrc);
};
MQA.RolloverWindow.prototype.setFlipStateEnabled=function(_16){
if(typeof _16=="undefined"||typeof _16!="boolean"){
this.flipStateEnabled=false;
}else{
this.flipStateEnabled=_16;
}
};
MQA.RolloverWindow.prototype.getFlipStateEnabled=function(){
return this.flipStateEnabled;
};
MQA.RolloverWindow.prototype.getCollisionInfo=function(_17,_18,_19){
var _1a=this.map.parent;
var _1b={panX:0,panY:0};
var _1c=(_18)?_18:false;
var _1d=(_19)?_19:false;
var _1e=MQA.Util.getParentOffset(_1a);
var _1f=MQA.Util.getParentOffset(_17);
var _20=0;
_1f.x=_1f.x-_1e.x-_20;
_1f.y=_1f.y-_1e.y-_20;
var _21=(_1c)?{width:37,height:300}:{width:0,height:0};
var _22=(_1d)?{width:139,height:15}:{width:0,height:0};
var _23=(_1f.x<_21.width&&_1f.y<_21.height+_20)?_21.width:0;
var _24=(_1f.x+_17.clientWidth>_1a.clientWidth-_22.width&&_1f.y<_22.height+_20)?_22.height:0;
if(_17.clientWidth>0&&_17.clientHeight>0){
if(_1f.x<_23){
_1b.panX=Math.abs(_1f.x-_23);
}else{
if(_1f.x+_20+_17.clientWidth>_1a.clientWidth){
_1b.panX=-1*(_17.clientWidth+_1f.x+_20-_1a.clientWidth);
}
}
if(_1f.y<_24){
_1b.panY=Math.abs(_1f.y-_24);
}else{
if(_1f.y+_17.clientHeight>_1a.clientHeight){
_1b.panY=_1a.clientHeight-_1f.y-_17.clientHeight;
}
}
}
return _1b;
};
MQA.RolloverWindow.prototype.createRolloverWindow=function(){
if(this.minipopup){
this.minipopup.parentNode.removeChild(this.minipopup);
this.minipopup=null;
}
this.minipopup=document.createElement("div");
this.minipopup.id="minipopup";
this.minipopup.className="mqminipopup";
this.minipopup.currentElement=null;
this.minipopup.style.left="-1000px";
this.minipopup.style.top="-1000px";
this.minipopup.oncontextmenu=function(){
return false;
};
document.body.appendChild(this.minipopup);
this.minipopup.style.position="absolute";
this.minipopup.style.visibility="hidden";
};
MQA.RolloverWindow.prototype.setTextLength=function(_25){
if(typeof _25=="undefined"||isNaN(parseInt(_25))){
this.textLength=31;
}else{
this.textLength=parseInt(_25);
}
};
MQA.RolloverWindow.prototype.getTextLength=function(){
return this.textLength;
};
MQA.RolloverWindow.prototype.setLeftRolloverOffsetX=function(_26){
if(typeof _26=="undefined"||isNaN(parseInt(_26))){
this.leftRolloverOffsetX=-25;
}else{
this.leftRolloverOffsetX=parseInt(_26);
}
};
MQA.RolloverWindow.prototype.getLeftRolloverOffsetX=function(){
return this.leftRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRightRolloverOffsetX=function(_27){
if(typeof _27=="undefined"||isNaN(parseInt(_27))){
this.rightRolloverOffsetX=-193;
}else{
this.rightRolloverOffsetX=parseInt(_27);
}
};
MQA.RolloverWindow.prototype.getRightRolloverOffsetX=function(){
return this.rightRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRolloverOffsetY=function(_28){
if(typeof _28=="undefined"||isNaN(parseInt(_28))){
this.rolloverOffsetY=(13-this.minipopup.offsetHeight);
}else{
this.rolloverOffsetY=parseInt(_28);
}
};
MQA.RolloverWindow.prototype.getRolloverOffsetY=function(){
return this.rolloverOffsetY;
};


MQA.TileMap=function(_1,_2,_3,_4,_5){
this.tileLayers=new MQA.TileLayerCollection;
this.showOurMaps=true;
var _6=new MQA.RectLL(new MQA.PointLL(90,-180),new MQA.PointLL(-90,180));
this.satLayer=new MQA.SatTileLayer(this,MQA.TILE_LAYER_ID.SAT,MQA.SatImageTile,{},_6,null,null,1,-1,null);
this.tileLayers.add(this.satLayer);
this.strlblLayer=new MQA.StrlblTileLayer(this,MQA.TILE_LAYER_ID.HYB,MQA.StrlblImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.strlblLayer);
this.mapLayer=new MQA.MapTileLayer(this,MQA.TILE_LAYER_ID.MAP,MQA.MapImageTile,{},_6,null,null,1,-1,null);
this.tileLayers.add(this.mapLayer);
this.blankLayer=new MQA.BlankTileLayer(this,MQA.TILE_LAYER_ID.BLA,MQA.BlankImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.blankLayer);
this.blankLayer.setValue("opacity",0);
this.div1=document.createElement("div");
this.div1.id="map.div1";
this.div1.style.width=_1.style.width;
this.div1.style.height=_1.style.height;
this.div1.style.zIndex=0;
_1.style.position="relative";
this.parent2=_1;
_1.appendChild(this.div1);
this.controls=[];
this._mapShapes=new MQA.ShapeCollection();
this._mapShapes.setName(this._mapShapes.guid);
this._mapShapes.setDeclutter(true);
this._shapeCollections=[this._mapShapes];
try{
this.mydeclutter=new MQA.Declutter(this);
}
catch(err){
this.mydeclutter=null;
}
this.iwparent=document.createElement("div");
if(_2==null){
_2=1;
}
if(_3==null){
_3=new MQA.LatLng(38.134557,-98.4375);
}
this.showRte=false;
this.updateOverlaysX=true;
this.updateOverlaysY=true;
this.tileMode=MQA.MAP_TYPE.MAP;
this.bestFitRect=null;
this.keepCenter=null;
this.bestFitMargin=0;
if(_4==MQA.MAP_TYPE.SAT){
this.tileMode=_4;
}
if(_4==MQA.MAP_TYPE.HYB){
this.tileMode=_4;
}
if(_4==MQA.MAP_TYPE.NONE){
this.tileMode=_4;
this.showOurMaps=true;
}
var me=this;
if(MQA.MASTER_BROKER==null){
MQA.MASTER_BROKER=new MQA.SlideBroker();
}
this.brokerKey=MQA.MASTER_BROKER.addListener(me);
this.parent=this.div1;
if(!this.parent.style.height||parseInt(this.parent.style.height)<100){
this.parent.style.width="550px";
this.parent.style.height="475px";
}
this.width=parseInt(this.parent.style.width);
this.height=parseInt(this.parent.style.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
if(_5!=null){
if(_5.getBestFitMargin()!=null){
this.setBestFitMargin(_5.getBestFitMargin());
}
if(_5.getBestFitRect()!=null){
this.bestFitRect=_5.getBestFitRect();
this.keepCenter=_5.isKeepCenter();
_2=this.getZoom(_5.getBestFitRect(),_3,_5.isKeepCenter(),_5.getMinZoom(),_5.getMaxZoom());
if(_5.isKeepCenter()==false){
var _8=_5.getBestFitRect();
var _9=new MQA.PointLL(_8.ul.lat,_8.ul.lng);
var _a=new MQA.PointLL(_8.lr.lat,_8.lr.lng);
_3=new MQA.PointLL(((_9.lat+_a.lat)/2),((_9.lng+_a.lng)/2));
}
}
}
this.zoom=(_2>16)?16:parseInt(_2);
this.scale=MQA.SCALES[this.zoom];
this.tilesize=MQA.TILESIZE;
this.centerlat=_3.lat;
this.centerlng=_3.lng;
this.lastlat=this.centerlat;
this.lastlng=this.centerlng;
this.maprows=Math.ceil(this.height/this.tilesize)+2;
this.mapcols=Math.ceil(this.width/this.tilesize)+2;
this.disabled=false;
this.drag=false;
this.slide=false;
this.routerect=null;
this.clickEvent=MQA.EVENT_NONE;
this.clickOper=-1;
this.rteserver="";
this.rtesession="";
this.routebestfit=false;
this.mapaccum1=0;
this.sataccum1=0;
this.hybaccum1=0;
this.mapaccum2=0;
this.sataccum2=0;
this.hybaccum2=0;
this.diffaccum=0;
this.moving=false;
this.startingToMove=false;
this.div=MQA.Util.createParentDiv("mqtiledmap",0,0,"absolute",0,0,0,null,null);
this.parent.style.overflow="hidden";
this.parent.style.background="#FFFFFF";
this.parent.style.position="relative";
this.parent.style.top="0px";
this.parent.style.left="0px";
this.parent.style.width=this.width+"px";
this.parent.style.height=this.height+"px";
this.parent.appendChild(this.div);
try{
if(navigator.userAgent.indexOf("MSIE")>=0){
document.execCommand("BackgroundImageCache",false,true);
}
}
catch(e){
}
if(this.showOurMaps){
this.div.ldiv=MQA.Util.createParentDiv("mqloading",0,0,"absolute",0,0,-2,(this.mapcols*MQA.TILESIZE),(this.maprows*MQA.TILESIZE));
this.div.ldiv.id="map.div.ldiv";
this.div.ldiv.style.backgroundImage="url("+MQA.RESOURCES+"loading.gif)";
this.div.ldiv.style.backgroundRepeat="repeat";
this.div.appendChild(this.div.ldiv);
if(this.tileMode==MQA.MAP_TYPE.NONE){
this.div.ldiv.style.display="none";
}
}
this.eMouseMove=MQA._prEvent.EventCallback(this,"onMouseMove");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(document,"mousemove",this.eMouseMove);
MQA._prEvent.observe(document,"mouseup",this.eMouseUp);
MQA._prEvent.observe(document,"mouseout",this.eMouseOut);
MQA._prEvent.observe(this.parent,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.parent,"mousedown",this.eMouseDown);
this.rtehighlight=MQA.Util.createImgHolder(null,"on","none","none",80);
this.rtehighlight.id="mqrtehl";
this.rtehighlight.onload=MQA._prEvent.hitch(this,"showRouteHighlight");
this.rtehighlight.onselectstart=MQA._prEvent.falseFunction;
this.rtehighlight.oncontextmenu=MQA._prEvent.falseFunction;
this.rtehighlight.style.position="absolute";
this.rtehighlight.style.opacity="0.6";
this.rtehighlight.style.filter="alpha(opacity='60')";
this.rtehighlight.GALLERYIMG="no";
this.div.appendChild(this.rtehighlight);
this.prnstyle=document.createElement("style");
this.prnstyle.type="text/css";
this.prnstyle.media="print";
var _b="img#mqrtehl { visibility:hidden; display:none }";
if(this.prnstyle.styleSheet){
this.prnstyle.styleSheet.cssText=_b;
}else{
var _c=document.createTextNode(_b);
this.prnstyle.appendChild(_c);
}
document.body.appendChild(this.prnstyle);
this.loading=MQA.Util.createImgHolder(null,"on","none","none",null);
this.loading.src=MQA.RESOURCES+"loading.gif";
this.parent.appendChild(this.loading);
this.maptiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.maptiler);
this.sattiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.sattiler);
this.hybtiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.hybtiler);
this.natiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.natiler);
this.naaccum1=0;
this.naaccum2=0;
this.apactiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.apactiler);
this.apacaccum1=0;
this.apacaccum2=0;
this.logos=new Array(5);
this.logos[MQA.LOGO_MQ_LOGO]=MQA.Util.createImgLogo("none","on",MQA.CORNER_TOPLEFT,new MQA.PointXY(0,0),"absolute","block",22,null,95,15);
this.logos[MQA.LOGO_MQ_LOGO].src=MQA.RESOURCES+"mqlogo.gif";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_LOGO]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_LOGO]);
this.logos[MQA.LOGO_MQ_SCALES]=document.createElement("div");
this.logos[MQA.LOGO_MQ_SCALES].corner=MQA.CORNER_TOPRIGHT;
this.logos[MQA.LOGO_MQ_SCALES].offset=new MQA.PointXY(0,0);
this.logos[MQA.LOGO_MQ_SCALES].style.position="absolute";
this.logos[MQA.LOGO_MQ_SCALES].style.display="block";
this.logos[MQA.LOGO_MQ_SCALES].style.zIndex=22;
this.logos[MQA.LOGO_MQ_SCALES].width="124";
this.logos[MQA.LOGO_MQ_SCALES].height="18";
this.logos[MQA.LOGO_MQ_SCALES].style.overflow="hidden";
this.logos[MQA.LOGO_MQ_SCALES].style.width="124px";
this.logos[MQA.LOGO_MQ_SCALES].style.height="18px";
this.logos[MQA.LOGO_MQ_SCALES].innerHTML="<img style='-moz-user-select:none;' unselectable='on' src='"+MQA.PROTOCOL+"//"+RESSERVER+"/scales/scalebar.gif' />";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_SCALES]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_SCALES]);
this.logos[MQA.LOGO_MQ_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMLEFT,new MQA.PointXY(0,0),"absolute","block",22,null,103,12);
this.logos[MQA.LOGO_MQ_COPY].src=MQA.RESOURCES+"mqcopy.gif";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_COPY]);
logoDisplay=(this.tileMode!=MQA.MAP_TYPE.SAT)?"block":"none";
this.logos[MQA.LOGO_MAP_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMRIGHT,new MQA.PointXY(0,0),"absolute",logoDisplay,22,null,190,12);
this.logos[MQA.LOGO_MAP_COPY].src=MQA.RESOURCES+MQA.VENDORLIST[1];
this.setLogoPosition(this.logos[MQA.LOGO_MAP_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_MAP_COPY]);
logoDisplay=(this.tileMode!=MQA.MAP_TYPE.MAP)?"block":"none";
this.logos[MQA.LOGO_SAT_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMRIGHT,new MQA.PointXY(0,-13),"absolute",logoDisplay,22,null,115,12);
this.logos[MQA.LOGO_SAT_COPY].src=MQA.RESOURCES+"sz1copy.gif";
this.setLogoPosition(this.logos[MQA.LOGO_SAT_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_SAT_COPY]);
this.grab_mousecursor=this.div.attachEvent?MQA.RESOURCES+"grab.cur":"-moz-grab";
this.grabbing_mousecursor=this.div.attachEvent?MQA.RESOURCES+"grabbing.cur":"-moz-grabbing";
this.current_mousecursor=this.grab_mousecursor;
this.div.style.cursor=this.current_mousecursor;
this.div.staticmapdiv=MQA.Util.createParentDiv("mqstaticmapdiv",0,0,"absolute",0,0,60,null,null);
this.div.appendChild(this.div.staticmapdiv);
this.div.poidiv=MQA.Util.createParentDiv("mqpoidiv",0,0,"absolute",0,0,90,null,null);
this.div.poidiv.style.cursor="auto";
this.div.poidiv.UNSELECTABLE="off";
this.div.appendChild(this.div.poidiv);
this.rebuildTiles();
this.mapShadowTop=document.createElement("div");
this.mapShadowTop.style.background="transparent url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/mapshadow-top.png) repeat-y scroll 0pt";
this.mapShadowTop.style.height="14px";
this.mapShadowTop.style.left="0pt";
this.mapShadowTop.style.position="absolute";
this.mapShadowTop.style.top="0pt";
this.mapShadowTop.style.width="5000px";
this.mapShadowTop.style.zIndex="20";
this.mapShadowTop.style.display="none";
this.div1.appendChild(this.mapShadowTop);
this.mapShadowLeft=document.createElement("div");
this.mapShadowLeft.style.background="transparent url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/mapshadow-side.png) repeat-y scroll 0pt";
this.mapShadowLeft.style.height="5000px";
this.mapShadowLeft.style.left="0pt";
this.mapShadowLeft.style.position="absolute";
this.mapShadowLeft.style.top="0pt";
this.mapShadowLeft.style.width="16px";
this.mapShadowLeft.style.zIndex="20";
this.mapShadowLeft.style.display="none";
this.div1.appendChild(this.mapShadowLeft);
this.surface=null;
this.overlayOffsetX=null;
this.overlayOffsetY=null;
this.poisurface=null;
this.poiLineOffsetX=null;
this.poiLineOffsetY=null;
this.traffic=null;
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
this.canvasOffsetX=null;
this.canvasOffsetY=null;
this.infowindow=new MQA.InfoWindow(this);
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow=new MQA.RolloverWindow(this);
this.rolloversEnabled=true;
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.div1,"click",this.eClick);
MQA._prEvent.observe(this.div1,"dblclick",this.eDoubleClick);
this.savedCenter=null;
this.savedZoomLevel=null;
this.savedMapType=null;
this.saveState();
MQA.incrTileMapCount();
this.uniqueMapID=MQA.getTileMapCount();
this.startDragPoint=new MQA.Point(0,0);
this.endDragPoint=new MQA.Point(0,0);
this.draggedObject=null;
this.staticMapEnabled=false;
this.turnEventsOff=false;
this.batchCount=0;
if(_5!=null){
this.showDraggableMap();
}
};
MQA.TileMap.prototype.getTileLayerById=function(id){
return this.tileLayers.getById(id);
};
MQA.TileMap.prototype.removeAllTileLayers=function(){
var y=this.tileLayers.getSize();
for(var x=3;x<y;x++){
this.tileLayers.getAt(x).remove();
var mqe=new MQA.Event("MQA.TileMap.layerRemoved");
mqe.layer=this.tileLayers.getAt(x);
this.onLayerRemoved(mqe);
}
for(var y=this.tileLayers.getSize();y>3;y--){
this.tileLayers.remove(y-1);
}
};
MQA.TileMap.prototype.removeTileLayer=function(_11){
this.sendTransactions();
if(_11.isMQLayer){
this.hideLoadingDiv();
this.addTileLayer(this.blankLayer);
if(_11.tileLayerDiv){
_11.hide();
}
}else{
var _12=_11.getValue("className");
if(_12=="MQA.NorthAmericanLayer"||_12=="MQA.APACLayer"){
_11=_11.getValue("tileLayer");
}
_11.remove();
this.tileLayers.removeItem(_11);
}
_11.isAdded=false;
_11.visible=false;
this.tileMode=this.calculateMapType();
var mqe=new MQA.Event("MQA.TileMap.layerRemoved");
mqe.layer=_11;
this.onLayerRemoved(mqe);
};
MQA.TileMap.prototype.addTileLayer=function(_14){
if(_14.isMQLayer&&_14.getValue("className")!="MQA.BlankTileLayer"&&_14.getValue("className")!="MQA.StrlblTileLayer"){
this.showLoadingDiv();
}
var _15=_14.getValue("className");
if(_15=="MQA.NorthAmericanLayer"||_15=="MQA.APACLayer"){
_14=_14.getValue("tileLayer");
}
if(!_14.isMQLayer){
this.tileLayers.add(_14);
}else{
if(_14.getValue("className")!="MQA.StrlblTileLayer"&&_14.getValue("className")!="MQA.BlankTileLayer"){
this.showLoadingDiv();
}
}
_14.isAdded=true;
_14.draw();
if(_14!=this.blankLayer&&(this.mapLayer.visible||this.satLayer.visible||this.strlblLayer.visible)){
if(this.blankLayer.visible){
this.removeTileLayer(this.blankLayer);
}
}
this.tileMode=this.calculateMapType();
var mqe=new MQA.Event("MQA.TileMap.layerAdded");
mqe.layer=_14;
this.onLayerAdded(mqe);
};
MQA.TileMap.prototype.addTileLayers=function(_17){
if(_17){
var h=_17.getSize();
for(i=0;i<h;i++){
this.addTileLayer(_17.getAt(i));
}
}
};
MQA.TileMap.prototype.replaceTileLayers=function(_19){
this.removeAllTileLayers();
this.addTileLayers(_19);
};
MQA.TileMap.prototype.onLayerDrawn=function(e){
MQA.EventManager.trigger(this,"layerdrawn",e);
};
MQA.TileMap.prototype.onLayerAdded=function(e){
MQA.EventManager.trigger(this,"layeradded",e);
};
MQA.TileMap.prototype.onLayerRemoved=function(e){
MQA.EventManager.trigger(this,"layerremoved",e);
};
MQA.TileMap.prototype._subDispose=function(){
for(var k in this){
try{
delete this[k];
}
catch(e){
}
}
};
MQA.TileMap.prototype.setBatchMode=function(_1e){
if(_1e){
this.batchCount+=1;
}else{
this.batchCount-=1;
if(this.batchCount<0){
this.batchCount=0;
}
if(this.batchCount==0){
var dc=this.getDeclutter();
if(dc){
dc.setDeclutterMode(dc.getDeclutterMode());
}
}
}
};
MQA.TileMap.prototype.getDragOffset=function(){
return new MQA.Point(this.m_dragoffX,this.m_dragoffY);
};
MQA.TileMap.prototype.onClick=function(e){
if((this.click)?this.click:false){
var _21=MQA.Util.getParentOffset(this.parent);
var _22=0;
var _23=0;
if(typeof (window.pageYOffset)=="number"){
_23=window.pageYOffset;
_22=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_23=document.body.scrollTop;
_22=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_23=document.documentElement.scrollTop;
_22=document.documentElement.scrollLeft;
}
}
}
var mqe=new MQA.Event();
mqe.srcObject=e.srcObject;
if(!e.clientX&&e.domEvent){
mqe.domEvent=e.domEvent;
}else{
mqe.domEvent=e;
}
var cx=(mqe.domEvent.clientX+_22)-_21.x;
var cy=(mqe.domEvent.clientY+_23)-_21.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.ll=this.pixToLL(mqe.xy);
mqe.eventName="MQA.TileMap.click";
MQA.EventManager.trigger(this,"click",mqe);
}
};
MQA.TileMap.prototype.onDoubleClick=function(e){
var _28=MQA.Util.getParentOffset(this.parent);
var _29=0;
var _2a=0;
if(typeof (window.pageYOffset)=="number"){
_2a=window.pageYOffset;
_29=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_2a=document.body.scrollTop;
_29=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_2a=document.documentElement.scrollTop;
_29=document.documentElement.scrollLeft;
}
}
}
var mqe=new MQA.Event();
mqe.srcObject=e.srcObject;
if(!e.clientX&&e.domEvent){
mqe.domEvent=e.domEvent;
}else{
mqe.domEvent=e;
}
var cx=(mqe.domEvent.clientX+_29)-_28.x;
var cy=(mqe.domEvent.clientY+_2a)-_28.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.ll=this.pixToLL(mqe.xy);
mqe.eventName="MQA.TileMap.dblclick";
MQA.EventManager.trigger(this,"dblclick",mqe);
};
MQA.TileMap.prototype.onZoomStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"zoomstart",e);
};
MQA.TileMap.prototype.onZoomEnd=function(e){
this.updateShapeCollections();
this.handleOverlays();
if(this.traffic){
this.handleTraffic(true);
}
this.updatePois();
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"zoomend",e);
};
MQA.TileMap.prototype.onMapTypeChanged=function(e){
if(this.getDragOffset().x!=this.overlayOffsetX||this.getDragOffset().y!=this.overlayOffsetY){
this.handleOverlays();
}
MQA.EventManager.trigger(this,"maptypechanged",e);
};
MQA.TileMap.prototype.onShapeAdded=function(e){
MQA.EventManager.trigger(this,"shapeadded",e);
};
MQA.TileMap.prototype.onShapeRemoved=function(e){
MQA.EventManager.trigger(this,"shaperemoved",e);
};
MQA.TileMap.prototype.onMapCleared=function(e){
MQA.EventManager.trigger(this,"mapcleared",e);
};
MQA.TileMap.prototype.onInfoWindowOpen=function(e){
MQA.EventManager.trigger(this,"infowindowopen",e);
};
MQA.TileMap.prototype.onInfoWindowClose=function(e){
MQA.EventManager.trigger(this,"infowindowclose",e);
};
MQA.TileMap.prototype.onMoveStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"movestart",e);
};
MQA.TileMap.prototype.onMove=function(e){
MQA.EventManager.trigger(this,"move",e);
};
MQA.TileMap.prototype.onMoveEnd=function(e){
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"moveend",e);
};
MQA.TileMap.prototype.handleMove=function(){
if(arguments.length==1){
var e=new MQA.Event();
var _3a=arguments[0];
if(_3a=="move"){
e.eventName="MQA.TileMap.move";
this.onMove(e);
}else{
if(_3a=="movestart"){
e.eventName="MQA.TileMap.movestart";
this.onMoveStart(e);
}else{
if(_3a=="moveend"){
e.eventName="MQA.TileMap.moveend";
this.onMoveEnd(e);
}
}
}
}
};
MQA.TileMap.prototype.onDragStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"dragstart",e);
};
MQA.TileMap.prototype.onDrag=function(e){
MQA.EventManager.trigger(this,"drag",e);
};
MQA.TileMap.prototype.onDragEnd=function(e){
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"dragend",e);
};
MQA.TileMap.prototype.handleDrag=function(){
if(arguments.length==1){
var e=new MQA.Event();
var _3f=arguments[0];
if(_3f=="drag"){
e.eventName="MQA.TileMap.drag";
this.onDrag(e);
}else{
if(_3f=="dragstart"){
e.eventName="MQA.TileMap.dragStart";
this.onDragStart(e);
}else{
if(_3f=="dragend"){
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
}else{
if(arguments.length==2){
var e=new MQA.Event();
var _3f=arguments[0];
if(_3f=="dragend"){
var _40=arguments[1];
var _41=MQA.Util.getParentOffset(this.parent);
e.clientX=_40.clientX-_41.x;
e.clientY=_40.clientY-_41.y;
this.endDragPoint=new MQA.Point(e.clientX,e.clientY);
e.dragDirection=this.direction(this.startDragPoint.x,this.startDragPoint.y,this.endDragPoint.x,this.endDragPoint.y);
var _42=this.endDragPoint.x-this.startDragPoint.x;
var _43=this.endDragPoint.y-this.startDragPoint.y;
var _44=this.percentage(0,0,_42,_43,false);
e.dragPercentage=Math.round(Math.sqrt(_44.shiftX*_44.shiftX+_44.shiftY*_44.shiftY));
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
};
MQA.TileMap.prototype.direction=function(_45,_46,_47,_48){
var _49="";
if(_48<_46){
_49="n";
}else{
if(_48>_46){
_49="s";
}
}
if(_47>_45){
_49+="e";
}else{
if(_47<_45){
_49+="w";
}
}
var _4a=MQA.Util.panAngle(_45,_46,_47,_48);
if(_49=="ne"){
if(_4a<22){
_49="e";
}else{
if(_4a>68){
_49="n";
}
}
}else{
if(_49=="nw"){
if(_4a<22){
_49="w";
}else{
if(_4a>68){
_49="n";
}
}
}else{
if(_49=="se"){
if(_4a<22){
_49="e";
}else{
if(_4a>68){
_49="s";
}
}
}else{
if(_49=="sw"){
if(_4a<22){
_49="w";
}else{
if(_4a>68){
_49="s";
}
}
}
}
}
}
return _49;
};
MQA.TileMap.prototype.percentage=function(_4b,_4c,_4d,_4e,_4f){
var _50={shiftX:0,shiftY:0};
if(parseInt(_4d)>parseInt(_4b)){
_50.shiftX=parseInt(_4d)-parseInt(_4b);
}else{
_50.shiftX=parseInt(_4b)-parseInt(_4d);
}
if(parseInt(_4e)>parseInt(_4c)){
_50.shiftY=parseInt(_4e)-parseInt(_4c);
}else{
_50.shiftY=parseInt(_4c)-parseInt(_4e);
}
if(!_4f||typeof (_4f)=="undefined"){
_50.shiftY=MQA.Util.calcPercentage(_50.shiftY,this.height);
_50.shiftX=MQA.Util.calcPercentage(_50.shiftX,this.width);
}
return _50;
};
MQA.TileMap.prototype.onTKMouseDown=function(e){
MQA.EventManager.trigger(this,"mousedown",e);
};
MQA.TileMap.prototype.onTKMouseUp=function(e){
MQA.EventManager.trigger(this,"mouseup",e);
};
MQA.TileMap.prototype.handleMouse=function(){
if(arguments.length==2){
var _53=arguments[1];
var str="";
var e=new MQA.Event();
var _56=MQA.Util.getParentOffset(this.parent);
e.button=(MQA._prEvent.isLeftClick(_53))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
e.clientX=_53.clientX-_56.x;
e.clientY=_53.clientY-_56.y;
var _57=arguments[0];
if(_57=="mousedown"){
this.startDragPoint=new MQA.Point(e.clientX,e.clientY);
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseDown";
this.onTKMouseDown(e);
}else{
if(_57=="mouseup"){
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseUp";
this.onTKMouseUp(e);
}
}
}
};
MQA.TileMap.prototype.addControl=function(_58,_59){
if(_58.controlVersion=="1.0"){
if(this.controls[_58.type]){
this.removeControl(_58);
}
_58.initialize(this);
this.controls[_58.type]=_58;
if(_59!=null){
_58.position=_59;
}
this.parent2.appendChild(_58.elem);
this.placeControl(_58);
var _5a=_58.elem.style;
_5a.display="block";
_5a.zIndex=0;
}else{
_58.map=this;
this.controls[_58.type]=_58;
if(_59!=null){
_58.position=_59;
}
_58.draw();
}
};
MQA.TileMap.prototype.removeControl=function(_5b){
this.controls[_5b.type]=null;
if(_5b.controlVersion=="1.0"){
if(_5b.destructor){
_5b.destructor();
}
}else{
_5b.dispose(false);
}
};
MQA.TileMap.prototype.updateZoom=function(_5c){
for(var _5d in this.controls){
if(this.controls[_5d]){
if(this.controls[_5d].setZoom){
this.controls[_5d].setZoom(this.getZoomLevel());
}
if(this.controls[_5d].unselectZoom){
this.controls[_5d].unselectZoom(0);
}
}
}
};
MQA.TileMap.prototype.placeControl=function(_5e){
var pos=_5e.getPosition();
if(_5e.controlVersion=="2.0"){
_5e.setValue("position",pos);
}else{
var _60=pos.getMapCorner();
var _61;
var top;
if(_60==MQA.MapCorner.TOP_LEFT){
_61=0;
top=0;
}else{
if(_60==MQA.MapCorner.TOP_RIGHT){
_61=this.width-_5e.getWidth();
top=0;
var _63=arguments;
if(typeof _63[1]=="undefined"){
pos.offsetSize.width*=-1;
}
}else{
if(_60==MQA.MapCorner.BOTTOM_LEFT){
_61=0;
top=this.height-_5e.getHeight();
var _63=arguments;
if(typeof _63[1]=="undefined"){
pos.offsetSize.height*=-1;
}
}else{
if(_60==MQA.MapCorner.BOTTOM_RIGHT){
_61=this.width-_5e.getWidth();
top=this.height-_5e.getHeight();
var _63=arguments;
if(typeof _63[1]=="undefined"){
pos.offsetSize.width*=-1;
pos.offsetSize.height*=-1;
}
}
}
}
}
_61+=pos.offsetSize.width;
top+=pos.offsetSize.height;
_5e.elem.style.left=_61+"px";
_5e.elem.style.top=top+"px";
}
};
MQA.TileMap.prototype.setLogoZindex=function(_64,_65){
var _66=parseInt(_64);
var _67=parseInt(_65);
var _68=this.logos[_66];
if(_68.style){
_68.style.zIndex=_67;
}
};
MQA.TileMap.prototype.setLogoPlacement=function(_69,_6a){
var _6b=_6a.getMapCorner();
var _6c=Math.abs(_6a.getOffsetSize().getWidth());
var _6d=Math.abs(_6a.getOffsetSize().getHeight());
var _6e=0;
var _6f=0;
if(_6b==MQA.MapCorner.TOP_LEFT){
_6e=_6c;
_6f=_6d;
}else{
if(_6b==MQA.MapCorner.TOP_RIGHT){
_6e=(-_6c);
_6f=_6d;
}else{
if(_6b==MQA.MapCorner.BOTTOM_LEFT){
_6e=_6c;
_6f=(-_6d);
}else{
if(_6b==MQA.MapCorner.BOTTOM_RIGHT){
_6e=(-_6c);
_6f=(-_6d);
}else{
return;
}
}
}
}
_69=parseInt(_69);
_6b=parseInt(_6b);
if(_69>=MQA.LOGO_MQ_LOGO&&_69<=MQA.LOGO_SAT_COPY&&_6b>=MQA.CORNER_TOPLEFT&&_6b<=MQA.CORNER_BOTTOMRIGHT){
this.logos[_69].corner=_6b;
this.logos[_69].offset=new MQA.Point(_6e,_6f);
this.setLogoPosition(this.logos[_69]);
}
};
MQA.TileMap.prototype.addShapes=function(_70){
if(_70){
var h=_70.getSize();
for(i=0;i<h;i++){
this.addShape(_70.getAt(i));
}
}
};
MQA.TileMap.prototype.addShape=function(_72,_73){
_73=(typeof (_73)=="undefined"?true:_73);
if(_72.map){
return;
}
_72.map=this;
if(!(_72 instanceof MQA.Poi)){
if(!this.surface){
this.createDrawingSurface();
}
if(!this.surface){
throw ("Overlay drawing surface does not exist.");
}
if(this.getDragOffset().x!=this.overlayOffsetX||this.getDragOffset().y!=this.overlayOffsetY){
this.overlayOffsetX=this.getDragOffset().x;
this.overlayOffsetY=this.getDragOffset().y;
this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+"px";
this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+"px";
this.redrawOverlays();
}
}
if(_73){
this._mapShapes.add(_72);
}
_72.draw();
var e=new MQA.Event("MQA.TileMap.shapeAdded");
e.shape=_72;
this.onShapeAdded(e);
e=null;
if(this.getDeclutter()&&_72.getValue("className")=="MQA.Poi"){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._addPoi=function(_75,_76,_77){
var xy=this.getLLToXY(_75);
_77.ll=_75;
_77.offset=_76;
_77.style.position="absolute";
_77.style.zIndex=90;
_77.style.left=(xy.x+_76.x-this.m_dragoffX)+"px";
_77.style.top=(xy.y+_76.y-this.m_dragoffY)+"px";
_77.oncontextmenu=MQA._prEvent.falseFunction;
this.div.poidiv.appendChild(_77);
};
MQA.TileMap.prototype.removeAllShapes=function(){
if(this.getDeclutter()){
var _79=this.getDeclutter().getDeclutterMode();
}
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
while(this._mapShapes.getSize()>0){
var _7a=false;
for(var x=1;x<this._shapeCollections.length;x++){
if(this._shapeCollections[x].contains(this._mapShapes.getAt(0))){
_7a=true;
break;
}
}
if(!_7a){
this.removeShape(this._mapShapes.getAt(0),true);
}else{
this._mapShapes._remove(0);
}
}
if(this.getDeclutter()){
if(_79!=0){
this.getDeclutter().setDeclutterMode(_79);
}
}
this.onMapCleared(new MQA.Event("MQA.TileMap.mapCleared"));
};
MQA.TileMap.prototype.createDrawingSurface=function(){
try{
if(MQA.Graphics){
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.overlayOffsetX=0;
this.overlayOffsetY=0;
this.overlaydiv=document.createElement("div");
this.overlaydiv.id="mqOverlayDiv";
var _7c=parseInt(this.div1.style.width);
var _7d=parseInt(this.div1.style.height);
var _7e=Math.ceil(_7c/this.TILESIZE)*this.TILESIZE;
var _7f=Math.ceil(_7d/this.TILESIZE)*this.TILESIZE;
var _80=_7e+(2*this.SURFACE_OFFSET);
var _81=_7f+(2*this.SURFACE_OFFSET);
var _82=-(this.SURFACE_OFFSET);
var _83=-(this.SURFACE_OFFSET);
this.overlaydiv.lt=_82+"px";
this.overlaydiv.tp=_83+"px";
this.overlaydiv.style.position="absolute";
this.overlaydiv.style.top=_83+"px";
this.overlaydiv.style.left=_82+"px";
this.overlaydiv.style.height=_81+"px";
this.overlaydiv.style.width=_80+"px";
this.overlaydiv.style.zIndex=70;
this.overlaydiv.UNSELECTABLE="on";
this.overlaydiv.style.MozUserSelect="none";
this.overlaydiv.onselectstart=MQA._prEvent.falseFunction;
this.overlaydiv.style.cursor=this.current_mousecursor;
this.overlaydiv.style.backgroundColor="transparent";
this.overlaydiv.style.background="none";
this.div.appendChild(this.overlaydiv);
this.surface=MQA.Graphics.createSurface(this.overlaydiv,_80,_81);
}else{
this.surface=null;
}
}
catch(err){
this.surface=null;
}
};
MQA.TileMap.prototype.createPoiDrawingSurface=function(){
try{
if(MQA.Graphics){
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.poiLineOffsetX=0;
this.poiLineOffsetY=0;
this.poilinediv=document.createElement("div");
this.poilinediv.id="mqPoiLineDiv";
var _84=this.div1.style.width.replace("px","");
var _85=this.div1.style.height.replace("px","");
var _86=Math.ceil(_84/this.TILESIZE)*this.TILESIZE;
var _87=Math.ceil(_85/this.TILESIZE)*this.TILESIZE;
var _88=_86+(2*this.SURFACE_OFFSET);
var _89=_87+(2*this.SURFACE_OFFSET);
var _8a=-(Math.round((_86-_84)/2)+this.SURFACE_OFFSET);
var _8b=-(Math.round((_87-_85)/2)+this.SURFACE_OFFSET);
var _8a=-(this.SURFACE_OFFSET);
var _8b=-(this.SURFACE_OFFSET);
this.poilinediv.lt=_8a+"px";
this.poilinediv.tp=_8b+"px";
this.poilinediv.style.position="absolute";
this.poilinediv.style.top=_8b+"px";
this.poilinediv.style.left=_8a+"px";
this.poilinediv.style.height=_89+"px";
this.poilinediv.style.width=_88+"px";
this.poilinediv.style.zIndex=70;
this.poilinediv.UNSELECTABLE="on";
this.poilinediv.style.MozUserSelect="none";
this.poilinediv.onselectstart=MQA._prEvent.falseFunction;
this.poilinediv.style.cursor=this.current_mousecursor;
this.poilinediv.style.backgroundColor="transparent";
this.poilinediv.style.background="none";
this.div.appendChild(this.poilinediv);
this.poisurface=MQA.Graphics.createSurface(this.poilinediv,_88,_89);
}else{
this.poisurface=null;
}
}
catch(err){
this.poisurface=null;
}
};
MQA.TileMap.prototype.createCanvas=function(){
try{
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.canvasOffsetX=0;
this.canvasOffsetY=0;
this.dcCanvasDiv=document.createElement("div");
this.dcCanvasDiv.id="mqCanvasDiv";
var _8c=this.div1.style.width.replace("px","");
var _8d=this.div1.style.height.replace("px","");
var _8e=Math.ceil(_8c/this.TILESIZE)*this.TILESIZE;
var _8f=Math.ceil(_8d/this.TILESIZE)*this.TILESIZE;
var _90=_8e+(2*this.SURFACE_OFFSET);
var _91=_8f+(2*this.SURFACE_OFFSET);
var _92=-(Math.round((_8e-_8c)/2)+this.SURFACE_OFFSET);
var _93=-(Math.round((_8f-_8d)/2)+this.SURFACE_OFFSET);
var _92=-(this.SURFACE_OFFSET);
var _93=-(this.SURFACE_OFFSET);
this.dcCanvasDiv.style.position="absolute";
this.dcCanvasDiv.style.top=_93+"px";
this.dcCanvasDiv.style.left=_92+"px";
this.dcCanvasDiv.style.height=_91+"px";
this.dcCanvasDiv.style.width=_90+"px";
this.dcCanvasDiv.style.cursor="auto";
this.dcCanvasDiv.style.zIndex=70;
this.dcCanvasDiv.UNSELECTABLE="off";
this.div.appendChild(this.dcCanvasDiv);
var c=document.createElement("canvas");
c.setAttribute("height",parseInt(this.dcCanvasDiv.style.height));
c.setAttribute("width",parseInt(this.dcCanvasDiv.style.width));
c.setAttribute("id","mqCanvas");
this.dcCanvasDiv.appendChild(c);
this.dcCanvasContext=c.getContext("2d");
}
catch(err){
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
}
};
MQA.TileMap.prototype.removeShape=function(_95,_96){
if(typeof (_95)=="undefined"){
return;
}
_96=(typeof (_96)=="undefined"?true:_96);
var i,j;
if(_95.map&&!_96){
_95.dispose(false);
}
if(_96&&this._mapShapes.contains(_95)){
_95.dispose(false);
this._mapShapes.remove(this._mapShapes.getItemIndex(_95));
}
var e=new MQA.Event("MQA.TileMap.shapeRemoved");
e.shape=_95;
this.onShapeRemoved(e);
var e=new MQA.Event("MQA.Shape.removed");
_95.onRemoved(e);
};
MQA.TileMap.prototype.replaceShapes=function(_9a){
var i;
this.removeAllShapes();
for(i=0;i<_9a.getSize();i++){
this.addShape(_9a.getAt(i));
}
};
MQA.TileMap.prototype.redrawOverlays=function(){
if(this._mapShapes.getSize()==0&&this._shapeCollections.length==1){
return;
}
var _9c=this.getShapeCollections(true,true);
for(var x=0;x<_9c.length;x++){
var _9e=_9c[x];
var j=_9e.getSize();
for(var i=0;i<j;i++){
if(!(_9e.getAt(i).isOnMap())){
continue;
}
if(!(_9e.getAt(i) instanceof MQA.Poi)){
_9e.getAt(i).draw();
}
}
}
};
MQA.TileMap.prototype.handleOverlays=function(){
if(this.surface){
this.overlayOffsetX=this.getDragOffset().x;
this.overlayOffsetY=this.getDragOffset().y;
this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+"px";
this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+"px";
this.redrawOverlays();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().adjustLeaderLineSurface();
this.getDeclutter().redrawLeaderLines();
}
}
}
};
MQA.TileMap.prototype.handlePoiLines=function(){
if(this.surface){
this.poiLineOffsetX=this.getDragOffset().x;
this.poiLineOffsetY=this.getDragOffset().y;
this.poilinediv.style.left=-(this.SURFACE_OFFSET+this.poiLineOffsetX)+"px";
this.poilinediv.style.top=-(this.SURFACE_OFFSET+this.poiLineOffsetY)+"px";
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().adjustLeaderLineSurface();
this.getDeclutter().redrawLeaderLines();
}
}
}
};
MQA.TileMap.prototype.getMapType=function(){
return this.calculateMapType();
};
MQA.TileMap.prototype.pixToLL=function(_a1){
var ll=this.getXYToLL(_a1);
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.llToPix=function(_a3){
var xy=this.getLLToXY(_a3);
return new MQA.Point(xy.x,xy.y);
};
MQA.TileMap.prototype.setMapType=function(_a5,_a6){
var _a7=this.getMapType();
if(_a7==_a5){
return;
}
var _a8="";
switch(_a5){
case MQA.MAP_TYPE.MAP:
case MQA.MAP_TYPE.SAT:
case MQA.MAP_TYPE.HYB:
case MQA.MAP_TYPE.NONE:
break;
default:
return;
}
if(_a5==MQA.MAP_TYPE.MAP||_a5==MQA.MAP_TYPE.SAT||_a5==MQA.MAP_TYPE.HYB||_a5==MQA.MAP_TYPE.NONE&&(this.tileMode!=_a5)){
this.sendTransactions();
if(_a5==MQA.MAP_TYPE.MAP){
if(!this.mapLayer.tileLayerDiv){
this.addTileLayer(this.mapLayer);
}
this.mapLayer.show();
this.mapLayer.isAdded=true;
if(this.satLayer.tileLayerDiv){
this.satLayer.hide();
this.satLayer.isAdded=false;
}
if(this.strlblLayer.tileLayerDiv){
this.strlblLayer.hide();
this.strlblLayer.isAdded=false;
}
if(this.blankLayer.tileLayerDiv){
this.blankLayer.hide();
this.blankLayer.isAdded=false;
}
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="none";
}
if(_a5==MQA.MAP_TYPE.SAT){
if(!this.satLayer.tileLayerDiv){
this.addTileLayer(this.satLayer);
}
this.satLayer.show();
this.satLayer.isAdded=true;
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
this.mapLayer.isAdded=false;
}
if(this.strlblLayer.tileLayerDiv){
this.strlblLayer.hide();
this.strlblLayer.isAdded=false;
}
if(this.blankLayer.tileLayerDiv){
this.blankLayer.hide();
this.blankLayer.isAdded=false;
}
this.logos[MQA.LOGO_MAP_COPY].style.display="none";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
}
if(_a5==MQA.MAP_TYPE.HYB){
if(!this.satLayer.tileLayerDiv){
this.addTileLayer(this.satLayer);
}
if(!this.strlblLayer.tileLayerDiv){
this.addTileLayer(this.strlblLayer);
}
this.satLayer.show();
this.satLayer.isAdded=true;
this.strlblLayer.show();
this.strlblLayer.isAdded=true;
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
}
if(this.blankLayer.tileLayerDiv){
this.blankLayer.hide();
this.blankLayer.isAdded=false;
}
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
}
if(_a5==MQA.MAP_TYPE.NONE){
this.hideLoadingDiv();
if(!this.blankLayer.tileLayerDiv){
this.addTileLayer(this.blankLayer);
}
this.blankLayer.show();
this.blankLayer.isAdded=true;
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
this.mapLayer.isAdded=false;
}
if(this.satLayer.tileLayerDiv){
this.satLayer.hide();
this.satLayer.isAdded=false;
}
if(this.strlblLayer.tileLayerDiv){
this.strlblLayer.hide();
this.strlblLayer.isAdded=false;
}
this.logos[MQA.LOGO_MAP_COPY].style.display="none";
this.logos[MQA.LOGO_SAT_COPY].style.display="none";
}
this.tileMode=_a5;
_a6=(typeof (_a6)=="undefined")?false:_a6;
if(!_a6){
var _a9=this.getCenterLatLng();
this.centerlat=_a9.lat;
this.centerlng=_a9.lng;
this.rebuildTiles();
}
}
this.redrawOverlays();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().resetDraggedPois();
this.getDeclutter().redrawLeaderLines();
}
}
if(this.controls[MQA.CONTROL_TYPE]!=null){
this.controls[MQA.CONTROL_TYPE].updateControl(_a5);
}
var evt=new MQA.Event("MQA.TileMap.mapTypeChanged");
evt.prevMapType=_a7;
evt.mapType=_a5;
this.onMapTypeChanged(evt);
};
MQA.TileMap.prototype.zoomIn=function(){
var _ab=this.getZoomLevel();
_ab++;
this.setZoomLevel(_ab);
};
MQA.TileMap.prototype.zoomOut=function(){
var _ac=this.getZoomLevel();
_ac--;
this.setZoomLevel(_ac);
};
MQA.TileMap.prototype.setZoomLevel=function(_ad){
var _ae=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_ae;
this.onZoomStart(evt);
this._setZoomLevel(_ad);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_ae;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._setZoomLevel=function(_b1){
_b1=parseInt(_b1);
if(_b1<1||_b1>16||this.drag||this.slide||_b1==this.zoom){
return;
}
var _b2=this.getCenterLatLng();
this.sendTransactions();
this.centerlat=_b2.lat;
this.centerlng=_b2.lng;
this.zoom=_b1;
this.scale=MQA.SCALES[this.zoom];
this.rebuildTiles();
};
MQA.TileMap.prototype.getZoomLevel=function(){
return this.zoom;
};
MQA.TileMap.prototype.zoomToRect=function(_b3,_b4,_b5,_b6){
var _b7=this.getZoomLevel();
if(_b4==null){
_b4=false;
}
if(_b5==null){
_b5=1;
}
if(_b6==null){
_b6=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_b7;
this.onZoomStart(evt);
this.updateZoom("off");
this._bestFit(_b3,_b4,_b5,_b6);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_b7;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype.getScale=function(){
return this.getScaleFromZoom(this.getZoomLevel());
};
MQA.TileMap.prototype.getScaleFromZoom=function(_ba){
var i=(_ba)?(((_ba>=1)&&(_ba<=16))?_ba:0):0;
return MQA.SCALES[i];
};
MQA.TileMap.prototype.bestFit=function(_bc,_bd,_be){
var _bf=this.getZoomLevel();
if(_bc==null){
_bc=false;
}
if(_bd==null){
_bd=1;
}
if(_be==null){
_be=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_bf;
this.onZoomStart(evt);
this.updateZoom("off");
var _c1=this.getShapes(true).getBoundingRect();
var _c2=this.getShapeCollections(true,false);
for(var x=1;x<_c2.length;x++){
var _c4=_c2[x];
if(_c4.getBoundingRect()!=null){
if(!_c1){
_c1=new MQA.RectLL(_c4.getAt(0).getValue("latLng"),_c4.getAt(0).getValue("latLng"));
}
_c1.extend(_c4.getBoundingRect().getUpperLeft());
_c1.extend(_c4.getBoundingRect().getLowerRight());
}
}
this._bestFit(_c1,_bc,_bd,_be);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_bf;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._bestFit=function(_c6,_c7,_c8,_c9){
var _ca,_cb,_cc,_cd,_ce,_cf;
if(_c7==null){
_c7=false;
}
if(_c8==null){
_ce=1;
}else{
_c8=parseInt(_c8);
if(_c8<1||_c8>15){
_ce=1;
}else{
_ce=_c8+1;
}
}
if(_c9==null){
_cf=16;
}else{
_c9=parseInt(_c9);
if(_c9<1||_c9>16){
_cf=16;
}else{
_cf=_c9;
}
if(_cf<_ce){
_cf=_ce+1;
}
}
if(_c6.ul.x){
_ca=new MQA.PointXY(_c6.ul.x,_c6.ul.y);
_cb=new MQA.PointXY(_c6.lr.x,_c6.lr.y);
_cc=this.getXYToLL(new MQA.PointXY(_c6.ul.x,_c6.ul.y));
_cd=this.getXYToLL(new MQA.PointXY(_c6.lr.x,_c6.lr.y));
}else{
_ca=this.getLLToXY(new MQA.PointLL(_c6.ul.lat,_c6.ul.lng));
_cb=this.getLLToXY(new MQA.PointLL(_c6.lr.lat,_c6.lr.lng));
_cc=new MQA.PointLL(_c6.ul.lat,_c6.ul.lng);
_cd=new MQA.PointLL(_c6.lr.lat,_c6.lr.lng);
}
var _d0=Math.abs(_cd.lng-_cc.lng)*(MQA.PIXERSPERLNGDEGREE/this.scale);
var _d1=Math.abs(_cd.lat-_cc.lat)*(MQA.PIXERSPERLATDEGREE/this.scale);
if(_c7==true){
var _d2=this.getCenterLatLng();
var _d3=Math.max(Math.abs(_d2.lng-_cc.lng),Math.abs(_d2.lng-_cd.lng));
var _d4=Math.max(Math.abs(_d2.lat-_cc.lat),Math.abs(_d2.lat-_cd.lat));
_d0=(_d3*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
_d1=(_d4*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
}
var _d5=(this.bestFitMargin<(this.width/2)&&this.bestFitMargin<(this.height/2)?this.bestFitMargin:Math.round(Math.min(((this.width/2)-1),((this.height/2)-1))));
var _d6=Math.max((this.scale*(_d0/(this.width-(_d5*2)))),(this.scale*(_d1/(this.height-(_d5*2)))));
while(_d6<MQA.SCALES[_ce]&&_ce<=_cf){
_ce++;
}
if(_c7==true){
this._setZoomLevel((_ce-1));
}else{
this.setCenterLatLngZoomLevel(new MQA.PointLL(((_cc.lat+_cd.lat)/2),((_cc.lng+_cd.lng)/2)),(_ce-1));
}
};
MQA.TileMap.prototype.bestFitLL=function(_d7,_d8,_d9,_da){
if(!_d7.length){
return;
}
if(_d8==null){
_d8=false;
}
if(_d9==null){
_d9=1;
}
if(_da==null){
_da=16;
}
var _db=new MQA.RectLL(_d7[0],_d7[0]);
_db.setBounds(_d7);
this.zoomToRect(_db,_d8,_d9,_da);
};
MQA.TileMap.prototype.getCenter=function(){
var ll=this.getCenterLatLng();
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.setCenter=function(_dd,_de){
if(_de==null||_de==this.getZoomLevel()){
this.setCenterLatLng(_dd);
}else{
var _df=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_df;
this.onZoomStart(evt);
this.updateZoom("off");
this.setCenterLatLngZoomLevel(_dd,_de);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_df;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
}
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
if(this.surface){
this.redrawOverlays();
}
};
MQA.TileMap.prototype.panToLatLng=function(_e2){
var pnt=this.llToPix(_e2);
if((pnt.getX()>-100&&pnt.getX()<this.width+100)||(pnt.getY()>-100&&pnt.getY()<this.height+100)){
this.slideMapToPoint(pnt);
}else{
this.setCenter(_e2);
}
};
MQA.TileMap.prototype.getRolloverWindow=function(){
return this.rolloverwindow;
};
MQA.TileMap.prototype.getInfoWindow=function(){
return this.infowindow;
};
MQA.TileMap.prototype.setInfoTitleHTML=function(_e4){
var _e5=document.createElement("div");
_e5.innerHTML="<div>"+_e4+"</div>";
this.infoWindowTitle=_e5;
};
MQA.TileMap.prototype.setInfoContentHTML=function(_e6){
var _e7=document.createElement("div");
_e7.innerHTML="<div>"+_e6+"</div>";
this.infoWindowContent=_e7;
};
MQA.TileMap.prototype.setInfoTitleElement=function(_e8){
this.infoWindowTitle=_e8;
};
MQA.TileMap.prototype.setInfoContentElement=function(_e9){
this.infoWindowContent=_e9;
};
MQA.TileMap.prototype.openInfoWindow=function(_ea){
this.div.appendChild(this.infowindow.popup);
var _eb=this.getDragOffset();
_ea.x-=_eb.x;
_ea.y-=_eb.y;
this.infowindow.modify(_ea,this.infoWindowTitle,this.infoWindowContent,new MQA.Point(-7,-14));
this.infowindow.setOpenerAndShow(this);
this.onInfoWindowOpen(new MQA.Event("MQA.TileMap.infoWindowOpen"));
};
MQA.TileMap.prototype.setRolloversEnabled=function(_ec){
this.rolloversEnabled=_ec;
};
MQA.TileMap.prototype.getRolloversEnabled=function(){
return this.rolloversEnabled;
};
MQA.TileMap.prototype.enableDragging=function(_ed){
this.disabled=(!_ed==true);
};
MQA.TileMap.prototype.getDragEnabled=function(){
return !this.disabled;
};
MQA.TileMap.prototype.getShapes=function(_ee){
_ee=(typeof (_ee)!="undefined"?_ee:false);
var _ef=new MQA.ShapeCollection;
for(var i=0,j=this._mapShapes.getSize();i<j;i++){
var _f2=this._mapShapes.getAt(i);
var _f3=((_ee&&(_f2 instanceof MQA.Poi))||!_ee);
if(_f3){
_ef.add(_f2,false);
}
}
return _ef;
};
MQA.TileMap.prototype._getAllShapes=function(_f4,_f5){
_f5=(typeof (_f5)!="undefined"?_f5:true);
_f4=(typeof (_f4)!="undefined"?_f4:false);
var _f6=new MQA.ShapeCollection;
var _f7=this.getShapeCollections(true,_f5);
for(var x=0;x<_f7.length;x++){
for(var i=0,j=_f7[x].getSize();i<j;i++){
var _fb=_f7[x].getAt(i);
var _fc=((_f4&&(_fb instanceof MQA.Poi))||!_f4);
if(_fc){
_f6.add(_fb,false);
}
}
}
return _f6;
};
MQA.TileMap.prototype.getSize=function(){
return new MQA.Size(this.div1.style.width,this.div1.style.height);
};
MQA.TileMap.prototype.setSize=function(_fd){
if(typeof (_fd)=="undefined"){
var _fd={};
}
var w=(typeof (_fd.width)=="undefined")?this.parent2.clientWidth:_fd.width;
var h=(typeof (_fd.height)=="undefined")?this.parent2.clientHeight:_fd.height;
var _100=new MQA.Size(w,h);
if(_100.width==this.width&&_100.height==this.height){
return;
}
var ptLL=this.getCenterLatLng();
this.width=parseInt(_100.width);
this.height=parseInt(_100.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
this.centerlat=ptLL.lat;
this.centerlng=ptLL.lng;
var _102=Math.ceil(this.height/this.tilesize)+2;
var _103=Math.ceil(this.width/this.tilesize)+2;
for(var x=0;x<this.tileLayers.getSize();x+=1){
var _105=this.tileLayers.getAt(x);
if(_105.tiles!=null&&(_105.tiles.length!=_103||_105.tiles[0].length!=_102)){
_105.removeAllTiles();
_105.tileLayerDiv=null;
}
}
this.maprows=_102;
this.mapcols=_103;
for(var x=0;x<this.tileLayers.getSize();x+=1){
var _105=this.tileLayers.getAt(x);
if(_105.tiles==null){
if(undefined==_105.isMQLayer||!_105.isMQLayer){
_105._createTiles();
_105.rebuildTiles();
}
}
}
this.drag=false;
this.slide=false;
this.parent.style.width=this.width+"px";
this.parent.style.height=this.height+"px";
var j=this.logos.length;
for(i=0;i<j;i++){
this.setLogoPosition(this.logos[i]);
}
if(this.showOurMaps){
this.div.ldiv.style.width=(this.mapcols*MQA.TILESIZE)+"px";
this.div.ldiv.style.height=(this.maprows*MQA.TILESIZE)+"px";
}
this.sendTransactions();
this.rebuildTiles();
var _107=this.getDeclutter().getDeclutterMode();
if(_107!=0){
this.getDeclutter().setDeclutterMode(0);
this.getDeclutter().setDeclutterMode(_107);
}
this.redrawOverlays();
for(var x=0,y=this.controls.length;x<y;x++){
if(this.controls[x]){
this.placeControl(this.controls[x],true);
}
}
};
MQA.TileMap.prototype.getRectFromMapState=function(_109){
try{
var _10a=new MQMapState();
_10a=null;
}
catch(e){
throw "The JSAPI must be included to use this function.";
return;
}
if(_109==null){
return;
}
var cLat=parseFloat(_109.getCenter().getLatitude());
var cLng=parseFloat(_109.getCenter().getLongitude());
var _10d=_109.getHeightPixels();
var _10e=_109.getWidthPixels();
var _10f=_109.getMapScale();
var _110=(_10d/2)/(MQA.PIXERSPERLATDEGREE/_10f);
var _111=(_10e/2)/(MQA.PIXERSPERLNGDEGREE/_10f);
_110=parseInt(_110*1000000)/1000000;
_111=parseInt(_111*1000000)/1000000;
var ul=new MQA.LatLng(cLat+_110,cLng-_111);
var lr=new MQA.LatLng(cLat-_110,cLng+_111);
return new MQA.RectLL(ul,lr);
};
MQA.TileMap.prototype.addRouteHighlight=function(_114,_115,_116,_117,_118,_119,_11a){
var _11b=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_11b;
this.onZoomStart(evt);
this.updateZoom("off");
this.routerect=_114;
this.rteserver=_115;
if(_116==null){
this.rtesession="";
}else{
this.rtesession=_116.toString();
}
if(this.routerect.ul.lat<this.routerect.lr.lat){
var _11d=this.routerect.ul.lat;
this.routerect.ul.lat=this.routerect.lr.lat;
this.routerect.lr.lat=_11d;
}
if(this.routerect.ul.lng>this.routerect.lr.lng){
var _11e=this.routerect.ul.lng;
this.routerect.ul.lng=this.routerect.lr.lng;
this.routerect.lr.lng=_11e;
}
this.showRte=true;
if(_117==null||_117==false){
this.getNewRouteHighlight();
}else{
if(_118==null){
_118=false;
}
if(_119==null){
_119=1;
}
if(_11a==null){
_11a=16;
}
this.bestFitRoute(_118,_119,_11a);
}
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_11b;
e.zoom=this.getZoomLevel();
if(e.prevZoom!=e.zoom){
this.onZoomEnd(e);
}
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
};
MQA.TileMap.prototype.removeRouteHighlight=function(){
this.showRte=false;
this.routerect=null;
this.rtehighlight.style.display="none";
this.rtesession="";
};
MQA.TileMap.prototype.getRouteSession=function(){
return this.rtesession;
};
MQA.TileMap.prototype.getBounds=function(){
var ulLL=this.pixToLL(new MQA.Point(0,0));
var lrLL=this.pixToLL(new MQA.Point(this.div1.style.width,this.div1.style.height));
return new MQA.RectLL(ulLL,lrLL);
};
MQA.TileMap.prototype.restoreState=function(){
this.setCenter(this.savedCenter);
this.setZoomLevel(this.savedZoomLevel);
this.setMapType(this.savedMapType);
};
MQA.TileMap.prototype.saveState=function(){
this.savedCenter=this.getCenter();
this.savedZoomLevel=this.getZoomLevel();
this.savedMapType=this.getMapType();
};
MQA.TileMap.prototype.getDeclutter=function(){
return this.mydeclutter;
};
MQA.TileMap.prototype.showDraggableMap=function(){
this.getPoiDiv().style.zIndex=90;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=70;
}
this.div1.style.zIndex=0;
if(this.staticMapEnabled){
}
if(this.getRouteSession()!=""){
var _122=(this.bestFitRect!=null)?this.bestFitRect:this.routerect;
this.addRouteHighlight(_122,this.rteserver,this.getRouteSession(),this.routebestfit);
}
};
MQA.TileMap.prototype.showDragableMap=function(){
this.showDraggableMap();
};
MQA.TileMap.prototype.showStaticMap=function(){
this.div1.style.zIndex=100;
this.setLogoZindex(MQA.MapLogo.MAPQUEST_COPYRIGHT,-100);
this.setLogoZindex(MQA.MapLogo.MAPQUEST,-100);
this.setLogoZindex(MQA.MapLogo.SCALES,-100);
this.setLogoZindex(MQA.MapLogo.ICUBED_COPYRIGHT,-100);
this.setLogoZindex(MQA.MapLogo.NAVTEQ_COPYRIGHT,-100);
this.turnEventsOff=true;
var _123={type:this.getMapType(),size:this.getSize().toString(),scale:this.getScale(),center:this.getCenter(),key:Key};
if(this.getRouteSession()!=""){
_123.session=this.getRouteSession();
}
if(IsDotCom){
this.getPoiDiv().style.zIndex=-100;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=-100;
}
this.getDeclutter().removeLeaderLines();
_123.stops=_123.pois="";
var _124=this.getPois();
for(var i=0,j=_124.getSize();i<j;i++){
var _127=_124.getAt(i);
var _128=(_127.dragLeft==null)?0:((-1*_127.dragLeft)-_127.mqMapIcon.getAnchorOffset().getX());
var _129=(_127.dragTop==null)?0:((-1*_127.dragTop)-_127.mqMapIcon.getAnchorOffset().getY());
switch(_127.getKey()){
case "mcenter":
case "scenter":
case "ecenter":
case "pcenter":
_123[_127.getKey()]=_127.getLatLng().toString()+","+_128+","+_129;
break;
default:
var _12a=_127.getKey().split("-");
switch(_12a[0]){
case "stops":
case "pois":
_123[_12a[0]]+=_12a[1].toUpperCase()+","+_127.getLatLng().toString()+","+_128+","+_129+"|";
break;
}
break;
}
}
}
var _12b=MQA.getStaticMapResources()+"?";
for(var nv in _123){
_12b+=(_123[nv]!="")?nv+"="+_123[nv]+"&":"";
}
_12b+"rand="+(Math.round((Math.random()*10000)));
if(this.staticMapImg){
var _12d=this.staticMapImg.src;
if(_12d.split("&rand=")[0]==_12b.split("&rand=")[0]){
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
return _12d;
}
}
var _12e=this.getSize().toString().split(",");
var _12f=this.getStaticMapDiv();
_12f.style.top=(0-this.getDragOffset().y)+"px";
_12f.style.left=(0-this.getDragOffset().x)+"px";
if(!this.staticMapImg){
this.staticMapImg=document.createElement("img");
this.staticMapImg.className="map-static";
this.staticMapImg.style.position="absolute";
this.staticMapImg.style.top="0";
this.staticMapImg.style.left="0";
this.staticMapImg.style.border="none";
this.staticMapImg.style.display="block";
this.staticMapImg.alt="";
_12f.appendChild(this.staticMapImg);
}
this.staticMapImg.style.width=_12e[0]+"px";
this.staticMapImg.style.height=_12e[1]+"px";
this.staticMapImg.src=_12b;
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
};
MQA.TileMap.prototype.hideStaticMap=function(){
if(!this.staticMapEnabled){
return;
}
this.turnEventsOff=false;
if(!(this.mapLayer==null)){
this.showDraggableMap();
}
if(this.staticMapImg){
this.staticMapImg.style.display="none";
this.div1.style.zIndex=0;
this.getPoiDiv().style.zIndex=90;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=70;
}
this.setLogoZindex(MQA.MapLogo.MAPQUEST_COPYRIGHT,22);
this.setLogoZindex(MQA.MapLogo.MAPQUEST,22);
this.setLogoZindex(MQA.MapLogo.SCALES,22);
this.setLogoZindex(MQA.MapLogo.ICUBED_COPYRIGHT,22);
this.setLogoZindex(MQA.MapLogo.NAVTEQ_COPYRIGHT,22);
this.getDeclutter().redrawLeaderLines();
}
this.staticMapEnabled=false;
};
MQA.TileMap.prototype.setBestFitMargin=function(_130){
this.bestFitMargin=_130;
};
MQA.TileMap.prototype.getBestFitMargin=function(){
return this.bestFitMargin;
};
MQA.TileMap.prototype.dispose=function(){
this.sendTransactions(true);
this.brokerKey=null;
this.infowindow.dispose();
this.infowindow=null;
this.iwparent=MQA.Util._deleteDOMObject(this.iwparent);
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow.dispose();
this.rolloverwindow=null;
var _131;
while(this._mapShapes.getSize()){
_131=this.getShapes().getAt(0);
this._mapShapes.remove(0);
_131.dispose(true);
_131=null;
}
this._mapShapes=null;
if(this.overlaydiv){
if(typeof (MQA.Graphics)!="undefined"){
switch(MQA.Graphics.drawMethod){
case "svg":
case "canvas":
break;
case "vml":
MQA.Graphics.vmlNamespace=MQA.Util._deleteDOMObject(MQA.Graphics.vmlNamespace);
break;
}
}
this.overlaydiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.overlaydiv);
MQA.Util._deleteDOMObject(this.overlaydiv);
this.overlaydiv=null;
}
this.traffic=null;
this.div.poidiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.poidiv);
MQA.Util._deleteDOMObject(this.div.poidiv);
this.div.poidiv=null;
if(this.surface){
this.surface=MQA.Util._deleteDOMObject(this.surface);
}
if(this.poisurface){
this.poisurface=MQA.Util._deleteDOMObject(this.poisurface);
}
if(this.dcCanvasDiv){
this.dcCanvasDiv=MQA.Util._deleteDOMObject(this.dcCanvasDiv);
}
this.mapShadowTop=MQA.Util._deleteDOMObject(this.mapShadowTop);
this.mapShadowLeft=MQA.Util._deleteDOMObject(this.mapShadowLeft);
this.rtehighlight.onload=null;
MQA._prEvent.stopObserving(document,"mousemove",this.eMouseMove);
MQA._prEvent.stopObserving(document,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(document,"mouseout",this.eMouseOut);
MQA._prEvent.stopObserving(this.parent,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.parent,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.div1,"click",this.eClick);
MQA._prEvent.stopObserving(this.div1,"dblclick",this.eDoubleClick);
this.eMouseMove=null;
this.eMouseUp=null;
this.eMouseOut=null;
this.eMouseOver=null;
this.eMouseDown=null;
this.eClick=null;
this.eDoubleClick=null;
for(var ci=0;ci<this.controls.length;ci++){
if(typeof (this.controls[ci]!="undefined")&&this.controls[ci]!=null){
this.controls[ci].dispose();
this.controls[ci]=null;
}
}
for(var i=0;i<this.logos.length;i++){
this.logos[i].src="";
if(i==1){
this.logos[i].innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.logos[i]);
}
MQA.Util._deleteDOMObject(this.logos[i]);
this.logos[i]=null;
}
this.logos=null;
this.loading=MQA.Util._deleteDOMObject(this.loading);
this.maptiler=MQA.Util._deleteDOMObject(this.maptiler);
this.hybtiler=MQA.Util._deleteDOMObject(this.hybtiler);
this.sattiler=MQA.Util._deleteDOMObject(this.sattiler);
this.rtehighlight=MQA.Util._deleteDOMObject(this.rtehighlight);
this.satLayer.dispose();
this.satLayer=null;
this.strlblLayer.dispose();
this.strlblLayer=null;
this.mapLayer.dispose();
this.mapLayer=null;
this.blankLayer.dispose();
this.blankLayer=null;
var TL;
for(var i=0;i<this.tileLayers.getSize();i++){
TL=this.tileLayers.getAt(i);
TL.dispose();
TL=null;
}
this.tileLayers=null;
this.prnstyle=MQA.Util._deleteDOMObject(this.prnstyle);
if(this.showOurMaps){
this.div.ldiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.ldiv);
MQA.Util._deleteDOMObject(this.div.ldiv);
this.div.ldiv=null;
}
this.div.staticmapdiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.staticmapdiv);
MQA.Util._deleteDOMObject(this.div.staticmapdiv);
this.div.staticmapdiv=null;
this.div.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div);
MQA.Util._deleteDOMObject(this.div);
this.div=null;
this.div1.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div1);
MQA.Util._deleteDOMObject(this.div1);
this.div1=null;
this.parent.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.parent);
MQA.Util._nukeChildren(this.parent);
this.parent=null;
MQA.Util._nukeChildren(this.parent2);
this.parent2=null;
MQA.Util._purge(this);
};
MQA.TileMap.prototype.getZoom=function(RECT,_136,_137,_138,_139,SIZE){
var SIZE=(typeof (SIZE)!="undefined")?SIZE:this.getSize();
if(_137==null){
_137=false;
}
if(_138==null){
_138=1;
}else{
_138=parseInt(_138);
if(_138<1||_138>15){
_138=1;
}
}
if(_139==null){
_139=16;
}else{
_139=parseInt(_139);
if(_139<1||_139>16){
_139=16;
}
if(_139<_138){
_139=_138+1;
}
}
var zoom=_138;
var _13c=_139;
var _13d=new MQA.PointFloatXY((RECT.ul.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.ul.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _13e=new MQA.PointFloatXY((RECT.lr.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.lr.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _13f=new MQA.PointLL(RECT.ul.lat,RECT.ul.lng);
var _140=new MQA.PointLL(RECT.lr.lat,RECT.lr.lng);
var _141=Math.abs(_140.lng-_13f.lng)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]);
var _142=Math.abs(_140.lat-_13f.lat)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]);
if(_137==true){
var ptXY=new MQA.PointFloatXY((_136.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(_136.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _144=Math.max(Math.abs(ptXY.x-_13d.x),Math.abs(ptXY.x-_13e.x));
var _145=Math.max(Math.abs(ptXY.y-_13d.y),Math.abs(ptXY.y-_13e.y));
_141=_144*2;
_142=_145*2;
}
var _146=(this.bestFitMargin<(SIZE.width/2)&&this.bestFitMargin<(SIZE.height/2)?this.bestFitMargin:Math.round(Math.min(((SIZE.width/2)-1),((SIZE.height/2)-1))));
var _147=Math.max((MQA.SCALES[zoom]*(_141/(SIZE.width-(_146*2)))),(MQA.SCALES[zoom]*(_142/(SIZE.height-(_146*2)))));
if(_147>MQA.SCALES[zoom]){
return zoom;
}
while(_147<MQA.SCALES[zoom]&&zoom<=_13c){
zoom++;
}
return zoom-1;
};
MQA.TileMap.prototype.rebuildTiles=function(_148){
this.lastlat=this.centerlat;
this.lastlng=this.centerlng;
this.m_centerX=MQA.getColTile(this.centerlng,this.scale);
this.m_centerY=MQA.getRowTile(this.centerlat,this.scale);
this.m_offsetX=MQA.getColTileOffset(this.centerlng,this.scale);
this.m_offsetY=this.tilesize-MQA.getRowTileOffset(this.centerlat,this.scale);
this.m_intoffX=Math.floor(this.m_offsetX);
this.m_intoffY=Math.floor(this.m_offsetY);
this.m_layoffX=parseInt(this.width/2)-this.m_intoffX;
this.m_layoffY=parseInt(this.height/2)-this.m_intoffY;
this.m_shiftX=0;
this.m_shiftY=0;
while(this.m_layoffX<0){
this.m_layoffX+=this.tilesize;
this.m_shiftX--;
this.m_centerX++;
}
while(this.m_layoffY<0){
this.m_layoffY+=this.tilesize;
this.m_shiftY--;
this.m_centerY--;
}
while(this.m_layoffX>2*this.tilesize){
this.m_layoffX-=this.tilesize;
this.m_shiftX++;
this.m_centerX--;
}
while(this.m_layoffY>2*this.tilesize){
this.m_layoffY-=this.tilesize;
this.m_shiftY++;
this.m_centerY++;
}
this.m_tileofX=this.m_layoffX;
this.m_tileofY=this.m_layoffY;
while(this.m_tileofX>this.tilesize){
this.m_tileofX-=this.tilesize;
}
while(this.m_tileofY>this.tilesize){
this.m_tileofY-=this.tilesize;
}
this.m_dragoffX=0;
this.m_dragoffY=0;
this.m_tileoffX=0;
this.m_tileoffY=0;
this.m_routeoffX=0;
this.m_routeoffY=0;
this.m_transoffX=0;
this.m_transoffY=0;
this.m_scrollofX=0;
this.m_scrollofY=0;
this.diffaccum=0;
this.div.lt=0;
this.div.tp=0;
this.div.style.left=this.div.lt+"px";
this.div.style.top=this.div.tp+"px";
_148=(typeof (_148)=="undefined")?false:_148;
if((this.mapLayer.tiles==null)&&(this.satLayer.tiles==null)&&(this.strlblLayer.tiles==null)&&(this.blankLayer.tiles==null)){
if(this.tileMode==MQA.MAP_TYPE.MAP||this.mapLayer.isAdded){
this.addTileLayer(this.mapLayer);
}
if(this.tileMode==MQA.MAP_TYPE.HYB||this.tileMode==MQA.MAP_TYPE.SAT||this.satLayer.isAdded){
this.addTileLayer(this.satLayer);
}
if(this.tileMode==MQA.MAP_TYPE.HYB||this.strlblLayer.isAdded){
this.addTileLayer(this.strlblLayer);
}
if(this.tileMode==MQA.MAP_TYPE.NONE||this.blankLayer.isAdded){
this.addTileLayer(this.blankLayer);
}
}else{
if(this.satLayer.tiles){
this.satLayer.isViewableTilesDrawn=false;
this.satLayer.isLayerDrawn=false;
}
if(this.strlblLayer.tiles){
this.strlblLayer.isViewableTilesDrawn=false;
this.strlblLayer.isLayerDrawn=false;
}
if(this.mapLayer.tiles){
this.mapLayer.isViewableTilesDrawn=false;
this.mapLayer.isLayerDrawn=false;
}
if(this.blankLayer.tiles){
this.blankLayer.isViewableTilesDrawn=false;
this.blankLayer.isLayerDrawn=false;
}
for(var x=0;x<this.tileLayers.getSize();x++){
this.tileLayers.getAt(x).setAllLoadingTiles();
}
for(var x=0;x<this.tileLayers.getSize();x++){
if(this.tileLayers.getAt(x).getValue("visible")||this.tileLayers.getAt(x)._checkBecomeVisible()){
this.tileLayers.getAt(x).rebuildTiles();
}
}
}
if(this.showOurMaps){
var tp=0;
var lt=0;
if(this.mapLayer.tiles){
tp=this.mapLayer.tiles[0][0].x;
lt=this.mapLayer.tiles[0][0].y;
}else{
if(this.satLayer.tiles){
tp=this.satLayer.tiles[0][0].x;
lt=this.satLayer.tiles[0][0].y;
}else{
if(this.strlblLayer.tiles){
tp=this.strlblLayer.tiles[0][0].x;
lt=this.strlblLayer.tiles[0][0].y;
}else{
if(this.blankLayer.tiles){
tp=this.blankLayer.tiles[0][0].x;
lt=this.blankLayer.tiles[0][0].y;
}
}
}
}
this.div.ldiv.tp=tp;
this.div.ldiv.lt=lt;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
this.logos[MQA.LOGO_MQ_SCALES].childNodes[0].style.marginTop=-((this.zoom-1)*parseInt(this.logos[MQA.LOGO_MQ_SCALES].height))+"px";
this.logos[MQA.LOGO_MAP_COPY].src=MQA.RESOURCES+MQA.VENDORLIST[MQA.MAPVENDORS[this.zoom]];
if(this.mapLayer.visible){
this.mapaccum1+=1;
this.mapaccum2+=1;
}
if(this.satLayer.visible){
this.sataccum1+=1;
this.sataccum2+=1;
}
if(this.strlblLayer.visible){
this.hybaccum1+=1;
this.hybaccum2+=1;
}
if(this.tileLayerClassExists("MQA.NorthAmericanLayer")){
this.naaccum1+=1;
this.naaccum2+=1;
}
if(this.tileLayerClassExists("MQA.APACLayer")){
this.apacaccum1+=1;
this.apacaccum2+=1;
}
if(this.showRte){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
if(!_148&&this._getAllShapes(true).getSize()!=0){
this.updatePois();
}
};
MQA.TileMap.prototype.setLogoPosition=function(LOGO){
var LEFT;
var TOP;
if(LOGO.corner==MQA.CORNER_TOPLEFT){
LEFT=0;
TOP=0;
}else{
if(LOGO.corner==MQA.CORNER_TOPRIGHT){
LEFT=this.width-parseInt(LOGO.width);
TOP=0;
}else{
if(LOGO.corner==MQA.CORNER_BOTTOMLEFT){
LEFT=0;
TOP=this.height-parseInt(LOGO.height);
}else{
if(LOGO.corner==MQA.CORNER_BOTTOMRIGHT){
LEFT=this.width-parseInt(LOGO.width);
TOP=this.height-parseInt(LOGO.height);
}
}
}
}
LEFT+=LOGO.offset.x;
TOP+=LOGO.offset.y;
LOGO.style.left=LEFT+"px";
LOGO.style.top=TOP+"px";
};
MQA.TileMap.prototype.sendTransactions=function(_14f){
if(this.showOurMaps){
if(this.mapLayer.visible&&this.mapaccum1>0){
this.maptiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=m&c="+(parseInt(this.mapaccum1*1000000)/1000000)+"&c2="+(parseInt(this.mapaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.mapaccum1=0;
this.mapaccum2=0;
}
if(this.satLayer.visible&&this.sataccum1>0){
this.sattiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=a&c="+(parseInt(this.sataccum1*1000000)/1000000)+"&c2="+(parseInt(this.sataccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.sataccum1=0;
this.sataccum2=0;
}
if(this.strlblLayer.visible&&this.hybaccum1>0){
this.hybtiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=h&c="+(parseInt(this.hybaccum1*1000000)/1000000)+"&c2="+(parseInt(this.hybaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.hybaccum1=0;
this.hybaccum2=0;
}
}
if(this.tileLayerClassExists("MQA.NorthAmericanLayer")){
this.natiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=pbm&c=0&c2="+(parseInt(this.naaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.naaccum1=0;
this.naaccum2=0;
}
if(this.tileLayerClassExists("MQA.APACLayer")){
this.apactiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=pbm&c=0&c2="+(parseInt(this.apacaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.apacaccum1=0;
this.apacaccum2=0;
}
this.m_transoffX=0;
this.m_transoffY=0;
if(_14f!=null&&_14f==true){
MQA.Util.pause(250);
}
};
MQA.TileMap.prototype.getNewRouteHighlight=function(){
var _150=MQA.getRowTile(this.routerect.ul.lat,this.scale);
var _151=MQA.getColTile(this.routerect.ul.lng,this.scale);
var _152=MQA.getRowTile(this.routerect.lr.lat,this.scale);
var _153=MQA.getColTile(this.routerect.lr.lng,this.scale);
this.rteoffset=-1;
this.rtethresh=2;
if(this.mapLayer==null){
this.rebuildTiles();
}
var _154=0;
var _155=0;
var _156=this.getCurrentTileLayer();
_154=_156.tiles[0][0];
_155=_156.tiles[this.mapcols-1][this.maprows-1];
if(_151>_154.gridColumn&&_150<_154.gridRow&&_153<_155.gridColumn&&_152>_155.gridRow){
this.rteoffset=0;
this.rtethresh=-1;
_154=_156.tiles[_151-_154.gridColumn][_154.gridRow-_150];
_155=_156.tiles[this.mapcols-1-(_155.gridColumn-_153)][this.maprows-1-(_152-_155.gridRow)];
}
var _157=MQA.getLatTileRowOffset(_154.gridRow+this.rteoffset*-1,255,this.scale);
var _158=MQA.getLngTileColOffset(_154.gridColumn-1+this.rteoffset*1,255,this.scale);
var _159=MQA.getLatTileRowOffset(_155.gridRow-1+this.rteoffset*1,255,this.scale);
var _15a=MQA.getLngTileColOffset(_155.gridColumn+this.rteoffset*-1,255,this.scale);
var WDTH=(1+(_155.gridColumn+this.rteoffset*-1)-(_154.gridColumn+this.rteoffset*1))*this.tilesize;
var HGHT=(1+(_154.gridRow+this.rteoffset*-1)-(_155.gridRow+this.rteoffset*1))*this.tilesize;
this.m_routeoffX=0;
this.m_routeoffY=0;
if(this.zoom<3&&_158>0&&this.centerlng<0){
_158-=360;
}
var _15d=!((_158>this.routerect.lr.lng)||(_15a<this.routerect.ul.lng)||(_159>this.routerect.ul.lat)||(_157<this.routerect.lr.lat));
if(this.rteoffset==0||_15d){
this.rtehighlight.lt=(_154.x+this.rteoffset*this.tilesize+1);
this.rtehighlight.tp=(_154.y+this.rteoffset*this.tilesize+1);
this.rtehighlight.style.left=this.rtehighlight.lt+"px";
this.rtehighlight.style.top=this.rtehighlight.tp+"px";
this.rtehighlight.style.width=WDTH+"px";
this.rtehighlight.style.height=HGHT+"px";
if(this.rtesession.length>0){
var CLAT=(_157+_159)/2;
var CLNG=(_158+_15a)/2;
this.rtehighlight.src=this.rteserver+"/?e=0&GetMapFromUpdatedSession.1=1280:"+this.rtesession+",1270:2,1190:,rtehl,"+CLAT+","+CLNG+","+(WDTH/72)+","+(HGHT/72)+","+this.scale+",1050:6,nodata,1062:1537,,,Visible+False,1062:1577,,,Visible+False,1062:1578,,,Visible+False,1062:764,,,Visible+False,1062:1279,,,polygon+brush+style+solid+color+224%2c224%2c224,1062:765,,,Visible+True+Line+Pen+Style+Solid+Size+150+Color+255%2c0%2c0+Opacity+255+CasePen+Style+Solid+Size+210+Color+255%2c255%2c255+Opacity+255,1650.1:77,72,1,1400.2:,,,"+"&rand="+Math.floor(Math.random()*99991);
}else{
this.rtehighlight.src=this.rteserver+"&latul="+_157+"&lngul="+_158+"&latlr="+_159+"&lnglr="+_15a+"&width="+WDTH+"&height="+HGHT+"&scale="+this.scale+"&rand="+Math.floor(Math.random()*99991);
}
}
};
MQA.TileMap.prototype.showRouteHighlight=function(){
this.rtehighlight.style.display="block";
};
MQA.TileMap.prototype.scrollMap=function(SX,SY){
this.moving=true;
if(SX!=0||SY!=0){
this.handleMove("move");
}
if((SX!=0||SY!=0)&&this.drag){
this.handleDrag("drag");
}
this.m_dragoffX+=SX;
this.m_dragoffY+=SY;
this.m_tileoffX+=SX;
this.m_tileoffY+=SY;
this.m_scrollofX+=SX;
this.m_scrollofY+=SY;
this.div.lt=this.div.lt+SX;
this.div.tp=this.div.tp+SY;
this.div.style.left=this.div.lt+"px";
this.div.style.top=this.div.tp+"px";
var y=this.tileLayers.getSize();
for(var x=0;x<y;x++){
if(this.tileLayers.getAt(x).visible){
this.tileLayers.getAt(x).scrollLayer();
}
}
var _164=0;
while(this.m_tileoffX+this.m_tileofX>MQA.TILESIZE){
this.m_tileoffX-=this.tilesize;
this.m_routeoffX--;
this.m_transoffX--;
_164+=(this.maprows-2);
if(this.showOurMaps){
this.div.ldiv.lt-=MQA.TILESIZE;
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
}
while(this.m_tileoffX+this.m_tileofX<0){
this.m_tileoffX+=this.tilesize;
this.m_routeoffX++;
this.m_transoffX++;
_164+=(this.maprows-2);
if(this.showOurMaps){
this.div.ldiv.lt+=MQA.TILESIZE;
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
}
while(this.m_tileoffY+this.m_tileofY>MQA.TILESIZE){
this.m_tileoffY-=this.tilesize;
this.m_routeoffY--;
this.m_transoffY--;
_164+=(this.mapcols-2);
if(this.showOurMaps){
this.div.ldiv.tp-=MQA.TILESIZE;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
}
}
while(this.m_tileoffY+this.m_tileofY<0){
this.m_tileoffY+=this.tilesize;
this.m_routeoffY++;
this.m_transoffY++;
_164+=(this.mapcols-2);
if(this.showOurMaps){
this.div.ldiv.tp+=MQA.TILESIZE;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
}
}
if(this.m_dragoffX>1*MQA.MODS[this.zoom]*this.tilesize){
this.m_dragoffX-=MQA.MODS[this.zoom]*this.tilesize;
}
if(this.m_dragoffX<-1*MQA.MODS[this.zoom]*this.tilesize){
this.m_dragoffX+=MQA.MODS[this.zoom]*this.tilesize;
}
if(_164>0){
_164=_164/((this.mapcols-2)*(this.maprows-2)*9);
if(this.mapLayer.visible){
this.mapaccum1+=_164;
}
if(this.satLayer.visible){
this.sataccum1+=_164;
}
if(this.strlblLayer.visible){
this.hybaccum1+=_164;
}
if(this.tileLayerClassExists("MQA.NorthAmericanLayer")){
this.naaccum1+=_164;
}
if(this.tileLayerClassExists("MQA.APACLayer")){
this.apacaccum1+=_164;
}
}
if(Math.abs(this.m_transoffY)>4||Math.abs(this.m_transoffX)>4){
this.sendTransactions();
}
var _165=Math.abs(this.m_dragoffX)%MQA.SURFACE_OFFSET;
var _166=Math.abs(this.m_dragoffY)%MQA.SURFACE_OFFSET;
var _167=Math.ceil(MQA.SURFACE_OFFSET/1.5);
if((_165>_167)&&this.updateOverlaysX){
this.handleOverlays();
if(this.traffic){
this.handleTraffic();
}
this.updateOverlaysX=false;
}
if((_166>_167)&&this.updateOverlaysY){
this.handleOverlays();
if(this.traffic){
this.handleTraffic();
}
this.updateOverlaysY=false;
}
if(_165<_167&&!this.updateOverlaysX){
this.updateOverlaysX=true;
}
if(_166<_167&&!this.updateOverlaysY){
this.updateOverlaysY=true;
}
if(this.showRte&&(this.rtethresh>0)&&(this.m_routeoffY>=this.rtethresh||this.m_routeoffY<=this.rtethresh*-1||this.m_routeoffX>=this.rtethresh||this.m_routeoffX<=this.rtethresh*-1)){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
};
MQA.TileMap.prototype.slideMapTimer=function(_168,_169,_16a,_16b,_16c,_16d,_16e,_16f){
var pc=_16d/_16e;
var dx=parseInt(pc*_16b)-_169;
var dy=parseInt(pc*_16c)-_16a;
this.scrollMap(dx,dy);
_169+=dx;
_16a+=dy;
_16d++;
if(_16d<=_16e){
setTimeout("MQA.MASTER_BROKER.DoSlide( "+_168+", "+_169+", "+_16a+", "+_16b+", "+_16c+", "+_16d+", "+_16e+", "+_16f+" );",_16f);
}else{
this.slide=false;
this.moving=false;
this.handleMove("moveend");
}
};
MQA.TileMap.prototype.isPoi=function(_173){
if(this._mapShapes.getSize()==0){
return false;
}
return (_173 instanceof MQA.Poi);
};
MQA.TileMap.prototype.onMouseMove=function(_174){
if(this.startingToMove){
this.startingToMove=false;
this.handleMove("movestart");
}
if(this.startingToDrag){
this.startingToDrag=false;
this.handleDrag("dragstart");
}
this.click=false;
if(this.draggedObject){
this.draggedObject.shape.style.left=this.draggedObject.shapeStartX+(_174.clientX-this.draggedObject.mouseStartX)+"px";
this.draggedObject.shape.style.top=this.draggedObject.shapeStartY+(_174.clientY-this.draggedObject.mouseStartY)+"px";
if(this.draggedObject.mqrw&&!this.draggedObject.mqrw.isHidden()&&(Math.abs(this.draggedObject.mouseStartX-_174.clientX)>3||Math.abs(this.draggedObject.mouseStartY-_174.clientY)>3)&&!this.getDeclutter().keepRolloversOnDrag){
this.draggedObject.mqrw.hide();
}
}
if(!this.drag||this.disabled){
return;
}
var _175=MQA.Util.getParentOffset(this.parent);
var cx=_174.clientX-_175.x;
var cy=_174.clientY-_175.y;
var gx=parseInt(this.width/2)-cx;
var gy=parseInt(this.height/2)-cy;
this.lastlat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
this.lastlng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX-gx,this.scale);
var difX=cx-this.lastX;
var difY=cy-this.lastY;
this.lastX=cx;
this.lastY=cy;
this.scrollMap(difX,difY);
};
MQA.TileMap.prototype.onMouseUp=function(_17c){
var _17d=(this.getDeclutter()?this.getDeclutter().getDeclutterablePois():new MQA.ShapeCollection());
var _17e=(this.getDeclutter()?this._getAllShapes(true):new MQA.ShapeCollection());
if(this.draggedObject&&_17e.contains(this.draggedObject)&&this.draggedObject.isDragging){
this.draggedObject.mqrw.hide();
this.draggedObject.finishDrag();
}
if(!this.drag||this.disabled){
return;
}
this.current_mousecursor=this.grab_mousecursor;
this.div.style.cursor=this.current_mousecursor;
if(!this.click){
var xdif=Math.abs(this.m_scrollofX-this.startX);
var ydif=Math.abs(this.m_scrollofY-this.startY);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _181=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_181){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_181){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblLayer.visible&&_181){
this.hybaccum2+=1;
this.diffaccum=0;
}
}
var _182=MQA.Util.getParentOffset(this.parent);
_17c.cx=_17c.clientX-_182.x;
_17c.cy=_17c.clientY-_182.y;
this.startingToMove=false;
if(this.moving){
this.moving=false;
this.handleMove("moveend");
}
this.startingToDrag=false;
if(this.drag&&!this.click){
this.handleDrag("dragend",_17c);
}
this.handleMouse("mouseup",_17c);
MQA._prEvent.stop(_17c);
this.drag=false;
};
MQA.TileMap.prototype.onMouseOver=function(_183){
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onMouseDown=function(_184){
this.click=true;
if(this.slide||this.disabled){
return;
}
if(this.isPoi(MQA._prEvent.element(_184))){
return;
}
var _185=MQA.Util.getParentOffset(this.parent);
this.current_mousecursor=this.grabbing_mousecursor;
this.div.style.cursor=this.current_mousecursor;
var cx=_184.clientX-_185.x;
var cy=_184.clientY-_185.y;
this.startX=this.m_scrollofX;
this.startY=this.m_scrollofY;
this.lastX=cx;
this.lastY=cy;
this.drag=true;
this.startingToMove=true;
this.startingToDrag=true;
_184.cx=cx;
_184.cy=cy;
this.handleMouse("mousedown",_184);
MQA._prEvent.stop(_184);
};
MQA.TileMap.prototype.onMouseOut=function(_188){
if(!_188.relatedTarget&&!_188.toElement){
this.onMouseUp(_188);
}
};
MQA.TileMap.prototype.onDblClick=function(_189){
this.handleClickEvent(_189,false);
};
MQA.TileMap.prototype.handleClickEvent=function(_18a,_18b){
if(this.drag||this.slide||(!this.click&&_18b)){
return;
}
this.click=false;
this.div.style.cursor="default";
var _18c=MQA.Util.getParentOffset(this.parent);
var cx=(_18a.pageX||(_18a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-_18c.x;
var cy=(_18a.pageY||(_18a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-_18c.y;
if(this.clickOper==MQA.OPER_RECENTER||this.zoom==16){
this.slideMapToPoint(new MQA.PointXY(cx,cy));
}else{
var ptLL=this.getXYToLL(new MQA.PointXY(cx,cy));
this.setCenterLatLngZoomLevel(ptLL,this.zoom+1);
}
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onWheelMouse=function(_190){
if(this.drag){
return;
}
if(_190.wheelDelta>0&&this.zoom<16){
this.zoomIn();
}
if(_190.wheelDelta<0&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.onKeyDown=function(_191){
if(this.drag){
return;
}
key=_191.which?_191.which:_191.keyCode;
if(key==107&&this.zoom<16){
this.zoomIn();
}
if(key==109&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.slideMapByOffset=function(PTXY){
if(this.slide){
return;
}
this.handleMove("movestart");
this.slide=true;
var _193=PTXY.x,_194=PTXY.y,_195=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_195,0,0,_193,_194,1,MQA.SLIDESTEPS,MQA.SLIDEDELAY);
},MQA.SLIDEDELAY);
var xdif=Math.abs(PTXY.x);
var ydif=Math.abs(PTXY.y);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _198=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_198){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_198){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblLayer.visible&&_198){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.slideMapToPoint=function(PTXY){
if(this.slide){
return;
}
this.handleMove("movestart");
var gx=parseInt(this.width/2)-PTXY.x;
var gy=parseInt(this.height/2)-PTXY.y;
this.slide=true;
var _19c=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_19c,0,0,gx,gy,1,MQA.SLIDESTEPS,MQA.SLIDEDELAY);
},MQA.SLIDEDELAY);
var xdif=Math.abs(gx);
var ydif=Math.abs(gy);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _19f=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_19f){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_19f){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblLayer.visible&&_19f){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.panNorth=function(_1a0){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)-parseInt(this.height*(_1a0/100))));
};
MQA.TileMap.prototype.panSouth=function(_1a1){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)+parseInt(this.height*(_1a1/100))));
};
MQA.TileMap.prototype.panEast=function(_1a2){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a2/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panWest=function(_1a3){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a3/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panNorthWest=function(_1a4){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a4/100)),parseInt(this.height/2)-parseInt(this.height*(_1a4/100))));
};
MQA.TileMap.prototype.panSouthWest=function(_1a5){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_1a5/100)),parseInt(this.height/2)+parseInt(this.height*(_1a5/100))));
};
MQA.TileMap.prototype.panNorthEast=function(_1a6){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a6/100)),parseInt(this.height/2)-parseInt(this.height*(_1a6/100))));
};
MQA.TileMap.prototype.panSouthEast=function(_1a7){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a7/100)),parseInt(this.height/2)+parseInt(this.height*(_1a7/100))));
};
MQA.TileMap.prototype.setCenterLatLng=function(LL){
this.centerlat=parseInt(LL.lat*1000000)/1000000;
this.centerlng=parseInt(LL.lng*1000000)/1000000;
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.setCenterLatLngZoomLevel=function(LL,ZOOM){
ZOOM=parseInt(ZOOM);
this.centerlat=parseInt(LL.lat*1000000)/1000000;
this.centerlng=parseInt(LL.lng*1000000)/1000000;
if(ZOOM<1){
ZOOM=1;
}
if(ZOOM>16){
ZOOM=16;
}
this.zoom=ZOOM;
this.scale=MQA.SCALES[ZOOM];
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.setCenterXY=function(XY){
var gx=parseInt(this.width/2)-XY.x;
var gy=parseInt(this.height/2)-XY.y;
this.centerlat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
this.centerlng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX+this.m_dragoffX-gx,this.scale);
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.getCenterLatLng=function(){
var ll=new MQA.PointLL(0,0);
ll.lat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY,this.scale);
ll.lng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX,this.scale);
return ll;
};
MQA.TileMap.prototype.getLLToXY=function(LL){
var xy=new MQA.PointXY(0,0);
var _1b1=MQA.getColTile(LL.lng,this.scale);
var _1b2=MQA.getRowTile(LL.lat,this.scale);
var _1b3=MQA.getColTileOffset(LL.lng,this.scale);
var _1b4=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_1b1)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_1b3);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_1b2)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_1b4);
xy.x=parseInt(xy.x);
xy.y=parseInt(xy.y);
return xy;
};
MQA.TileMap.prototype.getXYToLL=function(XY){
var gx=parseInt(this.width/2)-XY.x;
var gy=parseInt(this.height/2)-XY.y;
var ll=new MQA.PointLL(0,0);
ll.lat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
ll.lng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX-gx,this.scale);
return ll;
};
MQA.TileMap.prototype.updatePois=function(){
if(this._mapShapes.getSize()==0&&this._shapeCollections.length==1){
return;
}
var _1b9=this.getZoomLevel();
var _1ba=this.getShapeCollections(true,true);
for(var x=0;x<_1ba.length;x++){
var _1bc=_1ba[x];
if(_1bc.getAt(0)&&!(_1bc.getAt(0).map)){
continue;
}
var j=_1bc.getSize();
for(var i=0;i<j;i++){
var _1bf=_1bc.getAt(i);
if(_1bf instanceof MQA.Poi){
if(_1bf.getValue("visible")==true){
var _1c0=(_1b9>=_1bf.minZoomLevel&&_1b9<=_1bf.maxZoomLevel);
var _1c1=_1bf.getValue("visible");
_1bf.setValue("visible",_1c0);
_1bf.visible=_1c1;
}
var _1c2=_1bf._getCurrentInfo();
var xy=this.llToPix(_1bf.getValue("latLng"));
_1bf.shape.style.left=(xy.x+_1c2.offset.x)+"px";
_1bf.shape.style.top=(xy.y+_1c2.offset.y)+"px";
}
}
}
};
MQA.TileMap.prototype.updateShapeCollections=function(){
var _1c4=this.getShapeCollections(false,true);
var _1c5=this.getZoomLevel();
for(var i=0;i<_1c4.length;i++){
if(_1c4[i].getMinZoomLevel()>_1c5||_1c4[i].getMaxZoomLevel()<_1c5){
if(!this.getInfoWindow().isHidden()){
this.infowindow.hide();
}
var _1c7=this.getDeclutter().getDeclutterMode();
if(_1c7!=0){
this.getDeclutter().setDeclutterMode(0);
}
for(var k=0;k<_1c4[i].getSize();k++){
if(!(_1c4[i].getAt(k).isOnMap())){
continue;
}
this.removeShape(_1c4[i].getAt(k),false);
}
if(_1c7!=0){
this.getDeclutter().setDeclutterMode(_1c7);
}
}else{
var _1c7=this.getDeclutter().getDeclutterMode();
if(_1c7!=0){
this.getDeclutter().setDeclutterMode(0);
}
for(var k=0;k<_1c4[i].getSize();k++){
this.addShape(_1c4[i].getAt(k),false);
}
if(_1c7!=0){
this.getDeclutter().setDeclutterMode(_1c7);
}
}
}
};
MQA.TileMap.prototype.getLoadingDiv=function(){
return this.div.ldiv;
};
MQA.TileMap.prototype.hideLoadingDiv=function(){
this.div.ldiv.style.display="none";
};
MQA.TileMap.prototype.showLoadingDiv=function(){
this.div.ldiv.style.display="block";
};
MQA.TileMap.prototype.getStaticMapDiv=function(){
return this.div.staticmapdiv;
};
MQA.TileMap.prototype.getOverlayDiv=function(){
return this.div.overlaydiv;
};
MQA.TileMap.prototype.getPoiDiv=function(){
return this.div.poidiv;
};
MQA.TileMap.prototype.bestFitRoute=function(_1c9,_1ca,_1cb){
if(this.routerect){
if(_1c9==null){
_1c9=false;
}
if(_1ca==null){
_1ca=1;
}
if(_1cb==null){
_1cb=16;
}
this._bestFit(this.routerect,_1c9,_1ca,_1cb);
}
};
MQA.TileMap.prototype.addShapeCollection=function(_1cc){
_1cc.map=this;
this._shapeCollections.push(_1cc);
var _1cd=this.getZoomLevel();
if(_1cd>_1cc.getMaxZoomLevel()||_1cd<_1cc.getMinZoomLevel()){
return;
}
var _1ce=0;
if(this.getDeclutter()&&_1cc.getSize()>0){
_1ce=this.getDeclutter().getDeclutterMode();
if(_1ce!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
for(var i=0;i<_1cc.getSize();i++){
this.addShape(_1cc.getAt(i),false);
}
if(_1ce!=0){
this.getDeclutter().setDeclutterMode(_1ce);
}
};
MQA.TileMap.prototype.removeShapeCollection=function(_1d0){
var _1d1=this.getShapeCollection(_1d0);
if(_1d1){
var _1d2=0;
if(this.getDeclutter()&&_1d1.getSize()>0){
_1d2=this.getDeclutter().getDeclutterMode();
if(_1d2!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
for(var i=0;i<_1d1.getSize();i++){
var _1d4=false;
for(var x=0;x<this._shapeCollections.length;x++){
if(this._shapeCollections[x].contains(_1d1.getAt(i))&&this._shapeCollections[x].guid!=_1d1.guid){
_1d4=true;
break;
}
}
if(!_1d4){
this.removeShape(_1d1.getAt(i),false);
}
}
for(var i=0;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].guid==_1d1.guid){
this._shapeCollections.splice(i,1);
break;
}
}
_1d1.map=null;
if(_1d2!=0){
this.getDeclutter().setDeclutterMode(_1d2);
}
return true;
}else{
return false;
}
};
MQA.TileMap.prototype.replaceShapeCollection=function(_1d6,_1d7){
var _1d8=this.getShapeCollection(_1d7);
if(_1d8){
this.removeShapeCollection(_1d7);
this.addShapeCollection(_1d6);
return true;
}else{
return false;
}
};
MQA.TileMap.prototype.getShapeCollection=function(_1d9){
var _1da=null;
for(var i=0;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName()==_1d9){
_1da=this._shapeCollections[i];
break;
}
}
return _1da;
};
MQA.TileMap.prototype.getShapeCollections=function(_1dc,_1dd){
var _1dc=(typeof (_1dc)=="undefined"?false:_1dc);
var _1dd=(typeof (_1dd)=="undefined"?false:_1dd);
var _1de=(_1dc?0:1);
var _1df=[];
for(var i=_1de;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName().substr(0,4)!="mqa."||_1dd){
_1df.push(this._shapeCollections[i]);
}
}
return _1df;
};
MQA.TileMap.prototype.getShapeCollectionNames=function(_1e1,_1e2){
var _1e1=(typeof (_1e1)=="undefined"?false:_1e1);
var _1e2=(typeof (_1e2)=="undefined"?false:_1e2);
var _1e3=(_1e1?0:1);
var _1e4=[];
for(var i=_1e3;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName().substr(0,4)!="mqa."||_1e2){
_1e4.push(this._shapeCollections[i].getName());
}
}
return _1e4;
};
MQA.TileMap.prototype.getShapeCollectionCount=function(_1e6,_1e7){
var _1e8;
var _1e6=(typeof (_1e6)=="undefined"?false:_1e6);
var _1e7=(typeof (_1e7)=="undefined"?false:_1e7);
_1e8=this.getShapeCollectionNames(_1e6,_1e7).length;
return _1e8;
};
MQA.TileMap.prototype.getShapeByKey=function(key){
var _1ea=false;
for(var x=0;x<this._shapeCollections.length;x++){
for(var i=0;i<this._shapeCollections[x].getSize();i++){
if(key==this._shapeCollections[x].getAt(i).getValue("key")){
_1ea=this._shapeCollections[x].getAt(i);
break;
}
}
if(_1ea){
break;
}
}
if(_1ea){
return _1ea;
}else{
return false;
}
};
MQA.TileMap.prototype.setMapShadowState=function(b){
if(b){
this.mapShadowLeft.style.display="block";
this.mapShadowTop.style.display="block";
}else{
this.mapShadowLeft.style.display="none";
this.mapShadowTop.style.display="none";
}
};
MQA.TileMap.prototype.getMapShadowState=function(){
return (this.mapShadowLeft.style.display=="block");
};
MQA.TileMap.prototype.getByKey=function(key,_1ef){
var _1f0=null;
var _1ef=(typeof (_1ef)=="undefined"?false:_1ef);
var _1f1=this.getShapeCollections(true,_1ef);
for(var i=0;i<_1f1.length;i++){
for(var k=0;k<_1f1[i].getSize();k++){
if(_1f1[i].getAt(k).getValue("key")==key){
_1f0=_1f1[i].getAt(k);
break;
}
}
if(_1f0){
break;
}
}
return _1f0;
};
MQA.TileMap.prototype.addPoi=function(poi){
this.addShape(poi);
};
MQA.TileMap.prototype.removePoi=function(poi){
this.removeShape(poi);
};
MQA.TileMap.prototype.addOverlay=function(_1f6){
this.addShape(_1f6);
};
MQA.TileMap.prototype.removeOverlay=function(_1f7){
this.removeShape(_1f7);
};
MQA.TileMap.prototype.getCurrentTileLayer=function(){
if(this.tileMode==MQA.MAP_TYPE.MAP){
return this.mapLayer;
}else{
if(this.tileMode==MQA.MAP_TYPE.SAT){
return this.satLayer;
}else{
if(this.tileMode==MQA.MAP_TYPE.HYB){
return this.strlblLayer;
}else{
for(var i=0;i<this.tileLayers.getSize();i++){
if(this.tileLayers.getAt(i).getValue("visible")){
var _1f9=this.tileLayers.getAt(i).getValue("className");
if(_1f9=="MQA.NorthAmericalLayer"||_1f9=="MQA.APACLayer"){
return this.tileLayers.getAt(i).tileLayer;
}else{
return this.tileLayers.getAt(i);
}
}
}
}
}
}
};
MQA.TileMap.prototype.calculateMapType=function(){
var _1fa=null;
var _1fb=this.tileLayers.getSize();
if(_1fb>4){
_1fa="custom";
}else{
if(this.mapLayer.getValue("visible")){
_1fa="map";
}else{
if(this.satLayer.getValue("visible")&&!this.strlblLayer.getValue("visible")){
_1fa="sat";
}else{
if(this.satLayer.getValue("visible")&&this.strlblLayer.getValue("visible")){
_1fa="hyb";
}else{
if(!this.satLayer.getValue("visible")&&!this.strlblLayer.getValue("visible")){
_1fa="none";
}else{
_1fa="custom";
}
}
}
}
}
return _1fa;
};
MQA.TileMap.prototype.tileLayerExists=function(_1fc){
result=false;
for(var i=0;i<this.tileLayers.getSize();i++){
if(_1fc==this.tileLayers.getAt(i)){
result=true;
break;
}
}
return result;
};
MQA.TileMap.prototype.tileLayerClassExists=function(_1fe){
result=false;
for(var i=0;i<this.tileLayers.getSize();i++){
if(_1fe==this.tileLayers.getAt(i).getValue("className")){
result=true;
break;
}
}
return result;
};
MQA.TileMap.prototype.centerInBounds=function(_200){
return MQA.Util.inBounds(_200,this.getCenter());
};
MQA.TileMap.prototype.mapInBounds=function(_201){
return MQA.Util.inBounds(_201,this.getBounds());
};

MQA.SlideBroker=function(){
this.mapList=new Array();
};
MQA.SlideBroker.prototype={addListener:function(_1){
var _2=this.mapList.length;
this.mapList[_2]=_1;
return _2;
},DoSlide:function(_3,_4,_5,_6,_7,_8,_9,_a){
this.mapList[_3].slideMapTimer(_3,_4,_5,_6,_7,_8,_9,_a);
}};

MQA.BaseTile=function(_1,_2,_3,_4,_5,_6,_7,_8,_9){
this.parent=_1;
this.size=_8;
this.gridColumn=_4;
this.gridRow=_5;
this.x=_2;
this.y=_3;
this.opacity=_9;
this.scale=_6;
this.zoom=_7;
this.isDrawing=false;
this.isDrawn=false;
this.isLoading=false;
this.eTileDrawn=MQA._prEvent.EventCallback(this,"onTileDrawn");
this.getUrl=function(){
};
this.draw=function(){
},this.show=function(){
},this.hide=function(){
},this.updateTile=function(_a,_b,_c,_d,_e,_f){
},this.isPng=function(){
return false;
},this.loadingTile=function(){
},this.dispose=function(){
};
this.onTileDrawn=function(){
};
};
MQA.ImageTile=function(_10,_11,top,_13,_14,_15,_16,_17,_18,_19){
MQA.BaseTile.call(this,_10,_11,top,_13,_14,_15,_16,_17,_18,_19);
this.tileImageImg=null;
this.visible=true;
this.usePngFilter=true;
this.setPngFilter=function(b){
this.usePngFilter=b;
};
this.getPngFilter=function(){
return this.usePngFilter;
};
this.isVisible=function(){
return this.visible;
};
this.setVisible=function(_1b){
this.visible=_1b;
};
this._setShowing=function(){
if(this.visible){
this.show();
}else{
this.hide();
}
};
this._createImageObject=function(url){
this.tileImageImg.image=MQA.Util.createImage(url,this.x,this.y,this.size,this.size,0);
this.tileImageImg.image.onload=MQA._prEvent.hitch(this,"_setShowing");
this.tileImageImg.image.id="tileImg";
MQA._prEvent.observe(this.tileImageImg.image,"load",this.eTileDrawn);
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
if(this.usePngFilter){
this.tileImageImg.image.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='scale') ";
}
}
}else{
if(MQA.browser.name=="msie"){
this.tileImageImg.image.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
this.tileImageImg.image.style.MozOpacity=this.opacity;
this.tileImageImg.image.style.opacity=this.opacity;
this.parent.tileLayerDiv.appendChild(this.tileImageImg.image);
this.hide();
};
this.loadingTile=function(){
this.isLoading=true;
var _1d=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
if(!this.tileImageImg){
this._createImageObject(_1d);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_1d;
}
};
this.draw=function(){
this.isDrawing=true;
this.isDrawn=false;
this.isLoading=false;
if(this.tileImageImg==null){
this.tileImageImg=new MQA.Image();
}
var _1e=this.getUrl();
var _1f=((this.parent.tileId==MQA.TILE_LAYER_ID.SAT)||(this.parent.tileId==MQA.TILE_LAYER_ID.HYB)||(this.parent.tileId==MQA.TILE_LAYER_ID.MAP))?true:false;
if(this.tileImageImg.image==null){
this._createImageObject(_1e);
}else{
this.tileImageImg.image.src=_1e;
if(this.tileImageImg.image.style.opacity!=this.opacity){
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
if(this.usePngFilter){
this.tileImageImg.image.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_1e+"', sizingMethod='scale') ";
}
}
}else{
if(MQA.browser.name=="msie"){
this.tileImageImg.image.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
this.tileImageImg.image.style.MozOpacity=this.opacity;
this.tileImageImg.image.style.opacity=this.opacity;
}
}
if(MQA.browser.name=="msie"){
this._setShowing();
}
};
this.dispose=function(){
MQA._prEvent.stopObserving(this.tileImageImg.image,"load",this.eTileDrawn);
this.tileImageImg.image.onload=null;
this.tileImageImg.image=MQA.Util._deleteDOMObject(this.tileImageImg.image);
this.tileImageImg.innerHTML=null;
this.tileImageImg=null;
this.parent=null;
};
this.show=function(){
if(this.tileImageImg.image){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
}
this.visible=true;
};
this.hide=function(){
if(this.tileImageImg.image){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
}
this.visible=false;
};
this.updateTile=function(_20,top,_22,_23,_24,_25){
this.isDrawing=true;
this.isDrawn=false;
this.isLoading=false;
var _26=parseInt(_22/1000);
var _27=parseInt(_23/1000);
this.x=_20;
this.y=top;
this.gridColumn=_22;
this.gridRow=_23;
this.scale=_24;
this.zoom=_25;
while(_22<0){
_22+=MQA.MODS[_25];
}
while(_22>=MQA.MODS[_25]){
_22-=MQA.MODS[_25];
}
_26=parseInt(_22/1000);
_27=parseInt(_23/1000);
var _28=this.getUrl();
this.tileImageImg.image.src=_28;
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
if(this.usePngFilter){
this.tileImageImg.image.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_28+"', sizingMethod='scale') ";
}
}
}
this.tileImageImg.image.lt=this.x;
this.tileImageImg.image.tp=this.y;
this.tileImageImg.image.style.left=MQA.Util.asPix(this.x);
this.tileImageImg.image.style.top=MQA.Util.asPix(this.y);
};
this.onTileDrawn=function(e){
if(this.isLoading){
return;
}
this.isDrawing=false;
this.isDrawn=true;
this.parent.onTileDrawn(this);
MQA._prEvent.stop(e);
};
};
MQA.MapImageTile=function(_2a,_2b,top,_2d,_2e,_2f,_30,_31,_32,_33){
MQA.ImageTile.call(this,_2a,_2b,top,_2d,_2e,_2f,_30,_31,_32,_33);
this.url=MQA.PROTOCOL+"//%1/map/Scale%2/%3/%4/%5/%6.gif";
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _36=parseInt(this.gridColumn/1000);
var _37=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_36=parseInt(X/1000);
_37=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_37).replace(/%4/,(Y-_37*1000)).replace(/%5/,_36).replace(/%6/,(X-_36*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _38=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_38);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_38;
}
};
};
MQA.StrlblImageTile=function(_39,_3a,top,_3c,_3d,_3e,_3f,_40,_41,_42){
MQA.ImageTile.call(this,_39,_3a,top,_3c,_3d,_3e,_3f,_40,_41,_42);
this.url=MQA.PROTOCOL+"//%1/hyb/Scale%2/%3/%4/%5/%6.gif";
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _45=parseInt(this.gridColumn/1000);
var _46=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_45=parseInt(X/1000);
_46=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_46).replace(/%4/,(Y-_46*1000)).replace(/%5/,_45).replace(/%6/,(X-_45*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _47=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_47);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_47;
}
};
};
MQA.SatImageTile=function(_48,_49,top,_4b,_4c,_4d,_4e,_4f,_50,_51){
MQA.ImageTile.call(this,_48,_49,top,_4b,_4c,_4d,_4e,_4f,_50,_51);
this.url=MQA.PROTOCOL+"//%1/sat/Scale%2/%3/%4/%5/%6.jpg";
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _54=parseInt(this.gridColumn/1000);
var _55=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_54=parseInt(X/1000);
_55=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_55).replace(/%4/,(Y-_55*1000)).replace(/%5/,_54).replace(/%6/,(X-_54*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _56=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_56);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_56;
}
};
};
MQA.BlankImageTile=function(_57,_58,top,_5a,_5b,_5c,_5d,_5e,_5f,_60){
MQA.ImageTile.call(this,_57,_58,top,_5a,_5b,_5c,_5d,_5e,_5f,_60);
this.url="http://tile21.mqcdn.com/res/blank.gif";
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
return this.url;
};
this.loadingTile=function(){
this.isLoading=true;
var _61=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_61);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_61;
}
};
};
MQA.BaseTileLayer=function(map,_63,_64,_65,_66,_67,_68,_69,_6a,_6b){
MQA.Base.call(this);
this.className="MQA.BaseTileLayer";
this.map=map;
this.tiles=null;
this.tileLayerDiv=null;
this.customLayer=false;
this.tileLayerId=(typeof (_63)=="undefined")?"bogusID":_63;
this.bounds=(_66!=null)?MQA.Util._cloneValue(_66):new MQA.RectLL(new MQA.PointLL(90,-180),new MQA.PointLL(-90,180));
this.minZoom=(_67==null)?1:_67;
this.maxZoom=(_68==null)?16:_68;
this.opacity=(_69==null)?"1.0":_69;
this.zindex=(_6a==null)?"0":_6a;
this.tileClass=_64;
this.copyrights=null;
if(_6b!=null){
var _6c=new MQA.CopyrightCollection;
_6c.add(_6b);
this.copyrights=_6c;
}
this.copyrightLayerDivs=null;
this.options=_65;
this.visible=false;
this.userHidden=false;
this.urlTemplate="";
this.isLayerDrawn=false;
this.viewableTiles=0;
this.viewableTilesCount=0;
this.isViewableTilesDrawn=false;
this.isAdded=false;
this._facio=function(key,_6e){
switch(key){
case "copyright":
this._setCopyright(_6e);
break;
case "bounds":
this._setBounds();
break;
case "minZoom":
this._setMinZoom();
break;
case "maxZoom":
this._setMaxZoom();
break;
case "opacity":
this._setOpacity(_6e);
break;
case "zindex":
this._setZindex();
break;
case "tileClass":
this._setTileClass();
break;
case "visible":
this._setVisible(_6e);
break;
case "urlTemplate":
this._setUrlTemplate(_6e);
break;
}
};
this._duco=function(key){
switch(key){
case "urlTemplate":
return this._getUrlTemplate(key);
break;
}
};
this._setCopyright=function(_70){
var _71=new MQA.CopyrightCollection;
_71.add(_70);
this.copyrights=_71;
};
this._getUrlTemplate=function(_72){
if(this.urlTemplate!=""){
return this.urlTemplate;
}else{
if(this.tiles){
return this.tiles[0][0].url;
}else{
return "";
}
}
};
this._setUrlTemplate=function(_73){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].url=_73;
this.tiles[a][b].draw();
}
}
}
};
this._setVisible=function(_76){
if(this.isAdded){
if(_76){
if((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom)){
this.show();
}
this.userHidden=false;
}else{
this.hide();
this.userHidden=true;
}
}
};
this._setZindex=function(){
if(this.tileLayerDiv){
this.tileLayerDiv.style.zIndex=this.zindex;
}
};
this._setTileClass=function(){
this.remove();
this.draw();
};
this._setOpacity=function(_77){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].opacity=_77;
this.tiles[a][b].draw();
}
}
this.draw();
}
};
this._setBounds=function(){
this.draw();
};
this._setMinZoom=function(){
this.draw();
};
this._setMaxZoom=function(){
this.draw();
};
this._createTiles=function(){
if(this.tileLayerDiv==null){
this.tileLayerDiv=MQA.Util.createParentDiv(this.tileLayerId,0,0,"absolute",0,0,this.zindex,null,null);
}
this.map.div.appendChild(this.tileLayerDiv);
if(this.copyrights){
var y=this.copyrights.getSize();
this.copyrightLayerDivs=new Array();
for(var x=0;x<y;x++){
var _7c=this.copyrights.getAt(x);
this.copyrightLayerDivs[x]=_7c.draw();
this.map.parent.appendChild(this.copyrightLayerDivs[x]);
}
}
this.tiles=new Array(this.map.mapcols);
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a]=new Array(this.map.maprows);
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b]=new this.tileClass(this,(a-2)*this.map.tilesize+this.map.m_layoffX-this.map.m_dragoffX+this.map.m_tileoffX,(b-2)*this.map.tilesize+this.map.m_layoffY-this.map.m_dragoffY+this.map.m_tileoffY,this.map.m_centerX-2+a,this.map.m_centerY+2-b,this.map.scale,this.map.zoom,this.map.tilesize,this.opacity,this.options);
this.tiles[a][b].draw();
}
}
};
this.getId=function(){
return this.tileLayerId;
};
this.remove=function(){
this.urlTemplate="";
this.removeAllTiles();
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).remove();
}
}
if(this.tileLayerDiv){
MQA.Util._purge(this.tileLayerDiv);
MQA.Util._nukeChildren(this.tileLayerDiv);
this.tileLayerDiv.parentNode.removeChild(this.tileLayerDiv);
this.isLayerDrawn=false;
this.isViewableTilesDrawn=false;
}
};
this.dispose=function(){
this.removeAllTiles();
this.map=null;
this.bounds=null;
this.tileClass=null;
if(this.tileLayerDiv){
this.tileLayerDiv.innerHTML=null;
this.tileLayerDiv.outerHTML="";
MQA.Util._deleteDOMObject(this.tileLayerDiv);
this.tileLayerDiv=null;
}
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).dispose();
this.copyrights.remove(x);
this.copyrightLayerDivs[x].innerHTML=null;
this.copyrightLayerDivs[x].outerHTML="";
this.copyrightLayerDivs[x]=null;
}
this.copyrightLayerDivs=null;
this.copyrights=null;
}
};
this.removeCopyright=function(_83){
if(this.copyrights){
_83.dispose();
}
};
this.removeAllCopyrights=function(){
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.removeCopyright(this.copyrights.getAt(x));
}
this.copyrightLayerDivs=null;
this.copyrights=null;
}
};
this.removeCopyrights=function(_86){
if(_86){
var y=_86.getSize();
for(var x=0;x<y;x++){
this.removeCopyright(_86.getAt(x));
}
}
};
this.replaceCopyrights=function(_89){
this.removeCopyrights(_89);
this.addCopyrights(_89);
};
this.addCopyright=function(_8a){
var _8b=0;
if(!this.copyrightLayerDivs){
this.copyrightLayerDivs=new Array();
}else{
_8b=this.copyrightLayerDivs.length+1;
}
if(!this.copyrights){
this.copyrights=new MQA.CopyrightCollection;
}
this.copyrights.add(_8a);
this.copyrightLayerDivs[_8b]=_8a.draw();
this.map.parent.appendChild(this.copyrightLayerDivs[_8b]);
};
this.addCopyrights=function(_8c){
var y=_8c.getSize();
for(var x=0;x<y;x++){
this.addCopyright(_8c.getAt(x));
}
};
this.removeAllTiles=function(){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].dispose();
this.tiles[a][b]=null;
}
}
this.tiles=null;
}
};
this.draw=function(){
};
this.rebuildTiles=function(){
this.isViewableTilesDrawn=false;
this.isLayerDrawn=false;
var _91,_92,top;
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
this.show();
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
var _92=(a-2)*this.map.tilesize+this.map.m_layoffX;
var top=(b-2)*this.map.tilesize+this.map.m_layoffY;
var _96=this.map.m_centerX-2+a;
var _97=this.map.m_centerY+2-b;
this.rebuildTile(this.tiles[a][b],_92,top,_96,_97);
}
}
}else{
this.hide();
}
};
this.rebuildTile=function(_98,_99,top,_9b,_9c){
_9b=(typeof (_9b)=="undefined")?_98.gridColumn:_9b;
_9c=(typeof (_9c)=="undefined")?_98.gridRow:_9c;
_98.updateTile(_99,top,_9b,_9c,this.map.scale,this.map.zoom);
this.tileDisplay(_98);
};
this.itterateTileDisplay=function(){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tileDisplay(this.tiles[a][b]);
}
}
};
this.tileDisplay=function(_9f){
var _a0=new MQA.PointXY((_9f.x+this.map.m_dragoffX),(_9f.y+this.map.m_dragoffY));
var _a1=new MQA.PointXY((_9f.x+this.map.m_dragoffX)+256,(_9f.y+this.map.m_dragoffY)+256);
var _a2=new MQA.RectXY(_a0,_a1);
var _a3=new MQA.RectXY(new MQA.PointXY(0,0),new MQA.PointXY(this.map.div1.style.width,this.map.div1.style.height));
if(MQA.Util.isIntersectedXY(_a2,_a3)){
this.viewableTiles++;
}
var _a4=this.map.getLLToXY(this.bounds.ul);
var _a5=this.map.getLLToXY(this.bounds.lr);
var _a6=new MQA.RectXY(_a4,_a5);
if(MQA.Util.isIntersectedXY(_a2,_a6)){
if(!this.isLayerDrawn){
_9f.setVisible(true);
}else{
_9f.show();
}
}else{
if(!this.isLayerDrawn){
_9f.setVisible(false);
}else{
_9f.hide();
}
}
};
this.loadingTile=function(_a7){
_a7.loadingTile();
};
this.setAllLoadingTiles=function(){
if(this.visible){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.loadingTile(this.tiles[a][b]);
}
}
}
};
this.show=function(){
this.tileLayerDiv.style.visibility="visible";
this.tileLayerDiv.style.display="block";
this.visible=true;
if(this.copyrights!=null){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).show();
}
}
};
this.hide=function(){
this.tileLayerDiv.style.visibility="hidden";
this.tileLayerDiv.style.display="none";
this.visible=false;
if(this.copyrights!=null){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).hide();
}
}
};
this.getTileCenterLatLng=function(_ae,top,_b0){
var _b1=this.map.getDragOffset();
_ae+=_b1.x+(_b0/2);
top+=_b1.y+(_b0/2);
var _b2=this.map.getXYToLL(new MQA.PointXY(_ae,top));
return (_b2);
};
this.scrollLayer=function(){
var _b3=this.map.m_tileoffX;
var _b4=this.map.m_tileofX;
var _b5=this.map.m_tileoffY;
var _b6=this.map.m_tileofY;
while(_b3+_b4>MQA.TILESIZE){
this.tiles.unshift(this.tiles.pop());
for(var b=0;b<this.map.maprows;b++){
this.tiles[0][b].loadingTile();
}
for(var b=0;b<this.map.maprows;b++){
var _b8=this.tiles[0][b];
var _b9=this.tiles[1][b];
_b8.updateTile(_b9.x-this.map.tilesize,_b8.y,_b9.gridColumn-1,_b8.gridRow,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_b8);
}
}
_b3-=this.map.tilesize;
}
while(_b3+_b4<0){
this.tiles.push(this.tiles.shift());
for(var b=0;b<this.map.maprows;b++){
this.loadingTile(this.tiles[this.map.mapcols-1][b]);
}
for(var b=0;b<this.map.maprows;b++){
var _b8=this.tiles[this.map.mapcols-1][b];
var _b9=this.tiles[this.map.mapcols-2][b];
_b8.updateTile(_b9.x+this.map.tilesize,_b8.y,_b9.gridColumn+1,_b8.gridRow,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_b8);
}
}
_b3+=this.map.tilesize;
}
while(_b5+_b6>MQA.TILESIZE){
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a].unshift(this.tiles[a].pop());
this.loadingTile(this.tiles[a][0]);
}
for(var a=0;a<this.map.mapcols;a++){
var _b8=this.tiles[a][0];
var _b9=this.tiles[a][1];
_b8.updateTile(_b8.x,_b9.y-this.map.tilesize,_b8.gridColumn,_b9.gridRow+1,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_b8);
}
}
_b5-=this.map.tilesize;
}
while(_b5+_b6<0){
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a].push(this.tiles[a].shift());
this.loadingTile(this.tiles[a][this.map.maprows-1]);
}
for(var a=0;a<this.map.mapcols;a++){
var _b8=this.tiles[a][this.map.maprows-1];
var _b9=this.tiles[a][this.map.maprows-2];
_b8.updateTile(_b8.x,_b9.y+this.map.tilesize,_b8.gridColumn,_b9.gridRow-1,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_b8);
}
}
_b5+=this.map.tilesize;
}
};
this.onTileDrawn=function(_bb){
var mqe=new MQA.Event("MQA.TileLayer.tileDrawn");
mqe.srcObject=_bb;
MQA.EventManager.trigger(this,"tiledrawn",mqe);
this.onViewableTilesDrawn(_bb);
this.onLayerDrawn(mqe);
};
this.onViewableTilesDrawn=function(_bd){
if(this.isViewableTilesDrawn){
return;
}
var _be,_bf,_c0;
var _c1=new MQA.RectXY(new MQA.PointXY(0,0),new MQA.PointXY(this.map.div1.style.width,this.map.div1.style.height));
_be=new MQA.PointXY((_bd.x+this.map.m_dragoffX),(_bd.y+this.map.m_dragoffY));
_bf=new MQA.PointXY((_bd.x+this.map.m_dragoffX)+256,(_bd.y+this.map.m_dragoffY)+256);
_c0=new MQA.RectXY(_be,_bf);
if(MQA.Util.isIntersectedXY(_c0,_c1)){
this.viewableTilesCount++;
}
if(this.viewableTilesCount>=this.viewableTiles){
this.isViewableTilesDrawn=true;
this.viewableTilesCount=0;
var e=new MQA.Event("MQA.TileLayer.viewableTilesDrawn");
e.srcObject=_bd;
MQA.EventManager.trigger(this,"viewabletilesdrawn",e);
}
};
this.onLayerDrawn=function(mqe){
if(this.isLayerDrawn){
return;
}
var _c4=true;
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
if(!this.tiles[a]||!this.tiles[a][b]||this.tiles[a][b].isDrawn==false){
_c4=false;
break;
}
}
}
if(_c4){
this.isLayerDrawn=true;
var e=new MQA.Event("MQA.TileLayer.layerDrawn");
e.srcObject=this;
MQA.EventManager.trigger(this,"layerdrawn",e);
this.map.onLayerDrawn(e);
}
};
this._checkBecomeVisible=function(){
if(!this.customLayer){
return false;
}
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
return true;
}else{
return false;
}
};
};
MQA.MapTileLayer=function(map,_c9,_ca,_cb,_cc,_cd,_ce,_cf,_d0,_d1){
MQA.BaseTileLayer.call(this,map,_c9,_ca,_cb,_cc,_cd,_ce,_cf,_d0,_d1);
this.className="MQA.MapTileLayer";
this.isMQLayer=true;
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.SatTileLayer=function(map,_d3,_d4,_d5,_d6,_d7,_d8,_d9,_da,_db){
MQA.BaseTileLayer.call(this,map,_d3,_d4,_d5,_d6,_d7,_d8,_d9,_da,_db);
this.className="MQA.SatTileLayer";
this.isMQLayer=true;
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.StrlblTileLayer=function(map,_dd,_de,_df,_e0,_e1,_e2,_e3,_e4,_e5){
MQA.BaseTileLayer.call(this,map,_dd,_de,_df,_e0,_e1,_e2,_e3,_e4,_e5);
this.className="MQA.StrlblTileLayer";
this.isMQLayer=true;
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.BlankTileLayer=function(map,_e7,_e8,_e9,_ea,_eb,_ec,_ed,_ee,_ef){
MQA.BaseTileLayer.call(this,map,_e7,_e8,_e9,_ea,_eb,_ec,_ed,_ee,_ef);
this.className="MQA.BlankTileLayer";
this.isMQLayer=true;
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.TileLayer=function(map,_f1,_f2,_f3,_f4,_f5,_f6,_f7,_f8,_f9){
MQA.BaseTileLayer.call(this,map,_f1,_f2,_f3,_f4,_f5,_f6,_f7,_f8,_f9);
this.className="MQA.TileLayer";
this.customLayer=true;
this.draw=function(){
if(this.isAdded){
if(this.tiles==null){
this._createTiles();
}
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
this.show();
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tileDisplay(this.tiles[a][b]);
}
}
}else{
this.hide();
}
}
};
};
MQA.TileLayerCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.TileLayerCollection.prototype=new MQA.TKObjectCollection();
MQA.TileLayerCollection.prototype.constructor=MQA.TileLayerCollection;

MQA.PLACEBASECONSTANT={KEY:"A8C2B4DB310FF6A1987E1C06FCE83516",INCHESPERUNIT:39.3701,DPI:72,STDPARALLEL:37.5,OFFSET:new Array({x:0,y:0},{x:0,y:67},{x:0,y:-56},{x:0,y:88},{x:0,y:-125},{x:0,y:-67},{x:0,y:48},{x:0,y:-106},{x:-1,y:-13},{x:-3,y:44},{x:117,y:-111},{x:-22,y:34},{x:-44,y:69},{x:47,y:126},{x:-107,y:-111},{x:-8,y:-100},{x:116,y:105}),TILESIZE:256};
MQA.PlaceBaseTile=function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
MQA.ImageTile.call(this,_1,_2,_3,_4,_5,_6,_7,_8,_9,_a);
this.options=_a;
this.url="http://"+PCIMAGESERVER+"/tilecache/prod:ts_%1:dpi_%2:off_%3,%4/%5/merged/%6/meta_t%7/t%8l%9/t%10l%11.png?mqkey=%12&key=%13";
this.getUrl=function(){
var _b=this.scale;
var _c=this.parent.getTileCenterLatLng(this.x,this.y,this.size);
var _d=new Proj();
var _e=new Object();
_e.x=_c.lng;
_e.y=_c.lat;
var _f=_d.projectEquirectangular(_e,MQA.PLACEBASECONSTANT.STDPARALLEL);
var _10=(_f.x*MQA.PLACEBASECONSTANT.INCHESPERUNIT/_b*MQA.PLACEBASECONSTANT.DPI);
var _11=-(_f.y*MQA.PLACEBASECONSTANT.INCHESPERUNIT/_b*MQA.PLACEBASECONSTANT.DPI);
var _12=Math.floor(_11/1280)*1280;
var _13=Math.floor(_10/1280)*1280;
var top=Math.floor(_11/256)*256;
var _15=Math.floor(_10/256)*256;
var _16=this.url.replace(/%1/,MQA.PLACEBASECONSTANT.TILESIZE).replace(/%2/,MQA.PLACEBASECONSTANT.DPI).replace(/%3/,MQA.PLACEBASECONSTANT.OFFSET[this.zoom].x).replace(/%4/,MQA.PLACEBASECONSTANT.OFFSET[this.zoom].y).replace(/%5/,_b).replace(/%6/,this.options.layerSpec).replace(/%7/,_12).replace(/%8/,_12).replace(/%9/,_13).replace(/%10/,top).replace(/%11/,_15).replace(/%12/,Key).replace(/%13/,this.options.key);
return (_16);
},this.isPng=function(){
return true;
};
};
MQA.PlaceBaseTile.prototype=new MQA.ImageTile();
MQA.PlaceBaseTile.prototype.constructor=MQA.PlaceBaseTile;
Proj=function(){
};
Proj.prototype.earthRadius=6378160.187;
Proj.prototype.eccentricity=0.08181919131087181;
Proj.prototype.meters2rad=function(m){
return m/this.earthRadius;
};
Proj.prototype.rad2meters=function(r){
return this.earthRadius*r;
};
Proj.prototype.deg2rad=function(d){
return d*Math.PI/180;
};
Proj.prototype.rad2deg=function(r){
return r*180/Math.PI;
};
alertp=function(_1b){
alert(_1b.x+" "+_1b.y);
};
Proj.prototype.projectMiller=function(_1c){
var ret=new Object();
ret.x=this.deg2rad(_1c.x);
ret.y=this.deg2rad(_1c.y);
ret=this.projectMillerRad(ret);
ret.x=this.rad2meters(ret.x);
ret.y=this.rad2meters(ret.y);
return ret;
};
Proj.prototype.projectMerc=function(_1e){
var ret=new Object();
ret.x=this.deg2rad(_1e.x);
ret.y=this.deg2rad(_1e.y);
ret=this.projectMercRad(ret);
ret.x=this.rad2meters(ret.x);
ret.y=this.rad2meters(ret.y);
return ret;
};
Proj.prototype.projectEquirectangular=function(_20,_21){
var rc;
var ret=new Object();
if(_21==null||_21==37.5){
rc=0.793353340291235;
}else{
rc=Math.cos(this.deg2rad(_21));
}
ret.y=this.deg2rad(_20.y)*this.earthRadius;
ret.x=this.deg2rad(_20.x)*rc*this.earthRadius;
return ret;
};
Proj.prototype.unprojectEquirectangular=function(_24,_25){
var rc;
var ret=new Object();
if(_25==null||_25==37.5){
rc=0.793353340291235;
}else{
rc=Math.cos(this.deg2rad(_25));
}
ret.y=this.rad2deg(_24.y/this.earthRadius);
ret.x=this.rad2deg(_24.x/this.earthRadius/rc);
return ret;
};
Proj.prototype.projectDefault=function(_28){
var ret=new Object();
ret.x=this.rad2meters(this.deg2rad(_28.x));
ret.y=this.rad2meters(this.deg2rad(_28.y));
return ret;
};
Proj.prototype.unprojectDefault=function(_2a){
var ret=new Object();
ret.x=this.rad2deg(this.meters2rad(_2a.x));
ret.y=this.rad2deg(this.meters2rad(_2a.y));
return ret;
};
Proj.prototype.unprojectMiller=function(_2c){
var ret=new Object();
ret.x=this.meters2rad(_2c.x);
ret.y=this.meters2rad(_2c.y);
ret=this.unprojectMillerRad(ret);
ret.x=this.rad2deg(ret.x);
ret.y=this.rad2deg(ret.y);
return ret;
};
Proj.prototype.unprojectMerc=function(_2e){
var ret=new Object();
ret.x=this.meters2rad(_2e.x);
ret.y=this.meters2rad(_2e.y);
ret=this.unprojectMercRad(ret);
ret.x=this.rad2deg(ret.x);
ret.y=this.rad2deg(ret.y);
return ret;
};
Proj.prototype.projectMillerRad=function(_30){
var ret=new Object();
ret.x=_30.x;
ret.y=Math.log(Math.tan(Math.PI*0.25+_30.y*0.4))*1.25;
return ret;
};
Proj.prototype.projectMercRad=function(_32){
var ret=new Object();
var _34=Math.pow(((1-this.eccentricity*Math.sin(_32.y))/(1+this.eccentricity*Math.sin(_32.y))),this.eccentricity*0.5);
ret.x=_32.x;
ret.y=Math.log(Math.tan(Math.PI*0.25+_32.y*0.5)*_34);
return ret;
};
Proj.prototype.unprojectMillerRad=function(_35){
var ret=new Object();
ret.x=_35.x;
ret.y=2.5*(Math.atan(Math.exp(0.8*_35.y))-Math.PI*0.25);
return ret;
};
Proj.prototype.unprojectMercRad=function(_37){
var ret=new Object();
var es=this.eccentricity*this.eccentricity;
var es2=es*es;
var es3=es2*es;
var es4=es3*es;
var _3d=es*0.5+5*es2/24+es3/12+13*es4/360;
var _3e=7*es2/48+29*es3/240+811*es4/11520;
var _3f=7*es3/120+81*es4/1120;
var _40=4279*es4/161280;
var _41=Math.PI*0.5-2*Math.atan(1/Math.exp(_37.y));
ret.y=_41+_3d*Math.sin(2*_41)+_3e*Math.sin(4*_41)+_3f*Math.sin(6*_41)+_40*Math.sin(8*_41);
ret.x=_37.x;
return ret;
};

if(typeof (MQCompatibilityMode)!="undefined"){
if(MQCompatibilityMode=="5.2.0"){
MQControl=MQA.Control;
MQLargeZoomControl=MQA.LargeZoomControl;
MQPanControl=MQA.PanControl;
MQZoomControl=MQA.ZoomControl;
MQViewControl=MQA.ViewControl;
MQEvent=MQA.Event;
MQEventManager=MQA.EventManager;
MQEventCallback=MQA._prEvent.EventCallback;
MQInfoWindow=MQA.InfoWindow;
PointFloatXY=MQA.PointFloatXY;
PointXY=MQA.PointXY;
PointLL=MQA.PointLL;
RectLL=MQA.RectLL;
RectXY=MQA.RectXY;
Tile=MQA.Tile;
MQTKObjectCollection=MQA.TKObjectCollection;
MQMapLogo=MQA.MapLogo;
MQMapCorner=MQA.MapCorner;
MQMapCornerPlacement=MQA.MapCornerPlacement;
MQRectLL=MQA.RectLL;
MQRectXY=MQA.RectXY;
MQSize=MQA.Size;
MQClip=MQA.Clip;
MQMapInit=MQA.MapInit;
MQInitOverlays=MQA.InitOverlays;
MQShapeOverlay=MQA.ShapeOverlay;
MQRectangleOverlay=MQA.RectangleOverlay;
MQLineOverlay=MQA.LineOverlay;
MQPolygonOverlay=MQA.PolygonOverlay;
MQEllipseOverlay=MQA.EllipseOverlay;
MQImageOverlay=MQA.ImageOverlay;
MQOverlayCollection=MQA.OverlayCollection;
MQPoiCollection=MQA.PoiCollection;
MQMapIcon=MQA.MapIcon;
MQPoi=MQA.Poi;
MQLeaderLineDotImage=MQA.LeaderLineDotImage;
MQLeaderLineDotIcon=MQA.LeaderLineDotIcon;
MQDeclutter=MQA.Declutter;
MQDeclutterPoi=MQA.DeclutterPoi;
MQPageMarkIcon=MQA.PageMarkIcon;
MQPrevNextIcon=MQA.PrevNextIcon;
MQDeclutterIcon=MQA.DeclutterIcon;
MQRolloverWindow=MQA.RolloverWindow;
SlideBroker=MQA.SlideBroker;
MQTileMap=MQA.TileMap;
pause=MQA.Util.pause;
asPix=MQA.Util.asPix;
createImage=MQA.Util.createImage;
calcPercentage=MQA.Util.calcPercentage;
stripHTMLTags=MQA.Util.stripHTMLTags;
panAngle=MQA.Util.panAngle;
isOverLimit=MQA.Util.isOverLimit;
MQInitDojo=MQA.Util.InitDojo;
getWindowScrollXY=MQA.Util.getWindowScrollXY;
getHTMLSubstring=MQA.Util.getHTMLSubstring;
getBrowserSize=MQA.Util.getBrowserSize;
isSupportedBrowser=MQA.Util.isSupportedBrowser;
getBrowserInfo=MQA.Util.getBrowserInfo;
mqBrowserInfo=MQA.Util.getBrowserInfo;
PIXERSPERLATDEGREE=MQA.PIXERSPERLATDEGREE;
PIXERSPERLNGDEGREE=MQA.PIXERSPERLNGDEGREE;
TILESIZE=MQA.TILESIZE;
SLIDESTEPS=MQA.SLIDESTEPS;
SLIDEDELAY=MQA.SLIDEDELAY;
SCALES=MQA.SCALES;
MODS=MQA.MODS;
VENDORLIST=MQA.VENDORLIST;
MAPVENDORS=MQA.MAPVENDORS;
RESOURCES=MQA.RESOURCES;
STATICRESOURCES=MQA.STATICRESOURCES;
CORNER_TOPLEFT=MQA.CORNER_TOPLEFT;
CORNER_TOPRIGHT=MQA.CORNER_TOPRIGHT;
CORNER_BOTTOMLEFT=MQA.CORNER_BOTTOMLEFT;
CORNER_BOTTOMRIGHT=MQA.CORNER_BOTTOMRIGHT;
LOGO_MQ_LOGO=MQA.LOGO_MQ_LOGO;
LOGO_MQ_SCALES=MQA.LOGO_MQ_SCALES;
LOGO_MQ_COPY=MQA.LOGO_MQ_COPY;
LOGO_NT_COPY=MQA.LOGO_NT_COPY;
LOGO_I3_COPY=MQA.LOGO_I3_COPY;
LOGO_MAP_COPY=MQA.LOGO_MAP_COPY;
LOGO_SAT_COPY=MQA.LOGO_SAT_COPY;
EVENT_NONE=MQA.EVENT_NONE;
EVENT_CLICK=MQA.EVENT_CLICK;
EVENT_DBLCLICK=MQA.EVENT_DBLCLICK;
OPER_RECENTER=MQA.OPER_RECENTER;
OPER_RECENTERZOOM=MQA.OPER_RECENTERZOOM;
MAXMAPHEIGHT=MQA.MAXMAPHEIGHT;
MAXMAPWIDTH=MQA.MAXMAPWIDTH;
BUTTON_MQ_LEFT=MQA.BUTTON_MQ_LEFT;
BUTTON_MQ_MIDDLE=MQA.BUTTON_MQ_MIDDLE;
BUTTON_MQ_RIGHT=MQA.BUTTON_MQ_RIGHT;
MASTER_BROKER=MQA.MASTER_BROKER;
SAFARI_BROWSER=MQA.SAFARI_BROWSER;
PAN_NORTH=MQA.PAN_NORTH;
PAN_SOUTH=MQA.PAN_SOUTH;
PAN_EAST=MQA.PAN_EAST;
PAN_WEST=MQA.PAN_WEST;
CONTROL_PANZOOM=MQA.CONTROL_PANZOOM;
CONTROL_PAN=MQA.CONTROL_PAN;
CONTROL_ZOOM=MQA.CONTROL_ZOOM;
CONTROL_TYPE=MQA.CONTROL_TYPE;
SURFACE_OFFSET=MQA.SURFACE_OFFSET;
NOTHING=MQA.NOTHING;
MQA.TileLayer.prototype.setMinZoom=function(_1){
this.setValue("minZoom",_1);
};
MQA.TileLayer.prototype.setMaxZoom=function(_2){
this.setValue("maxZoom",_2);
};
MQA.TileLayer.prototype.setBounds=function(_3){
this.setValue("bounds",_3);
};
MQA.TileLayer.prototype.setOpacity=function(_4){
this.setValue("opacity",_4);
};
MQA.TileLayer.prototype.setZindex=function(_5){
this.setValue("zindex",_5);
};
MQA.TileLayer.prototype.setTileClass=function(_6){
this.setValue("tileClass",_6);
};
MQA.TileLayer.prototype.getMinZoom=function(){
return this.getValue("minZoom");
};
MQA.TileLayer.prototype.getMaxZoom=function(){
return this.getValue("maxZoom");
};
MQA.TileLayer.prototype.getBounds=function(){
return this.getValue("bounds");
};
MQA.TileLayer.prototype.getOpacity=function(){
return this.getValue("opacity");
};
MQA.TileLayer.prototype.getZindex=function(){
return this.getValue("zindex");
};
MQA.TileLayer.prototype.getTileClass=function(){
return this.getValue("tileClass");
};
}
}

MQA.Graphics=new function(){
this.vmlNamespace=null;
this.vmlStyleRule=false;
this.setDrawMethod=function(){
var _1=MQA.browser.name;
var _2=MQA.browser.version;
if(_1=="msie"){
this.drawMethod="vml";
this.eventsActive=true;
}else{
if(_1=="safari"){
this.drawMethod="canvas";
this.eventsActive=false;
}else{
this.drawMethod="svg";
this.eventsActive=true;
}
}
};
this.toHex=function(n){
var _4=n.toString(16).toUpperCase();
return (_4.length==1?"0"+_4:_4);
};
this.normalizeColor=function(c){
var p=new Object();
if(typeof (c)=="object"){
p.rgb=c;
p.hex="#"+this.toHex(c[0])+this.toHex(c[1])+this.toHex(c[2]);
}else{
if(c.substring(0,1)=="#"){
p.rgb=new Array();
p.rgb[0]=parseInt("0x"+c.substring(1,3));
p.rgb[1]=parseInt("0x"+c.substring(3,5));
p.rgb[2]=parseInt("0x"+c.substring(5,7));
p.hex=c;
}else{
throw new Error("Invalid color value. Use hex or 3-value RGB array");
}
}
return p;
};
this.createSurface=function(_7,_8,_9){
var _a;
switch(this.drawMethod){
case "svg":
_a=document.createElementNS("http://www.w3.org/2000/svg","svg");
_a.setAttribute("height",_9);
_a.setAttribute("width",_8);
_a.setAttribute("xmlns","http://www.w3.org/2000/svg");
_a.setAttribute("version","1.1");
_a.setAttribute("viewBox","0 0 "+_8+" "+_9);
var _b=document.createElement("defs");
_a.appendChild(_b);
break;
case "vml":
this.vmlNamespace=document.namespaces.add("v","urn:schemas-microsoft-com:vml");
var _c=document.styleSheets[0];
if(!this.vmlStyleRule){
_c.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;");
this.vmlStyleRule=true;
}
_a=document.createElement("v:group");
_a.setAttribute("coordsize",_8+" "+_9);
_a.setAttribute("coordorigin","0 0");
_a.style.position="absolute";
_a.style.width=_8+"px";
_a.style.height=_9+"px";
_a.style.visibility="visible";
break;
case "canvas":
_a=document.createElement("div");
_a.style.left="0px";
_a.style.top="0px";
_a.style.position="relative";
_a.style.width=_8+"px";
_a.style.height=_9+"px";
_a.style.visibility="visible";
break;
}
this.surfaceWidth=_8;
this.surfaceHeight=_9;
_7.appendChild(_a);
return _a;
};
this.remove=function(_d,_e){
switch(this.drawMethod){
case "svg":
case "canvas":
break;
case "vml":
MQA.Util._nukeChildren(_e);
break;
}
_e.parentNode.removeChild(_e);
return null;
};
this.drawPolygon=function(_f,_10,_11,_12,_13,_14,_15){
var _16;
var bc=this.normalizeColor(_10);
var fc=this.normalizeColor(_13);
var s="M "+_f[0].x+" "+_f[0].y;
if(this.drawMethod=="svg"){
for(var i=1;i<_f.length;i++){
s+=" L "+_f[i].x+" "+_f[i].y;
}
s+=" z";
}else{
s+=" l ";
for(var i=1;i<_f.length;i++){
s+=_f[i].x+","+_f[i].y+" ";
}
s+=" x e";
}
switch(this.drawMethod){
case "svg":
var _16=document.createElementNS("http://www.w3.org/2000/svg","path");
_16.setAttribute("d",s);
_16.setAttribute("stroke",bc.hex);
_16.setAttribute("stroke-width",_12);
_16.setAttribute("stroke-opacity",_11);
_16.setAttribute("fill",fc.hex);
_16.setAttribute("fill-opacity",_14);
break;
case "vml":
var _16=document.createElement("v:shape");
_16.style.width=this.surfaceWidth+"px";
_16.style.height=this.surfaceHeight+"px";
_16.style.position="absolute";
_16.setAttribute("stroked","true");
_16.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_16.setAttribute("coordorigin","0 0");
var _1b=document.createElement("v:fill");
_1b.setAttribute("opacity",_14);
_1b.setAttribute("color",fc.hex);
_16.appendChild(_1b);
var _1c=document.createElement("v:stroke");
_1c.setAttribute("miterlimit","8.0");
_1c.setAttribute("joinstyle","miter");
_1c.setAttribute("endcap","flat");
_1c.setAttribute("opacity",_11);
_1c.setAttribute("color",bc.hex);
_1c.setAttribute("weight",_12);
_16.appendChild(_1c);
var _1d=document.createElement("v:path");
_1d.setAttribute("v",s);
_16.appendChild(_1d);
break;
case "canvas":
var _16=document.createElement("canvas");
_16.setAttribute("width",this.surfaceWidth);
_16.setAttribute("height",this.surfaceHeight);
_16.style.position="absolute";
_16.style.left="0px";
_16.style.top="0px";
var ctx=_16.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_14+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_11+")";
ctx.lineWidth=_12;
ctx.beginPath();
ctx.moveTo(_f[0].x,_f[0].y);
for(var i=1;i<_f.length;i++){
ctx.lineTo(_f[i].x,_f[i].y);
}
ctx.closePath();
ctx.fill();
ctx.stroke();
break;
}
_16.style.display=(_15?"inline":"none");
return _16;
};
this.drawRectangle=function(_1f,_20,_21,_22,_23,_24,_25){
var _26;
var bc=this.normalizeColor(_20);
var fc=this.normalizeColor(_23);
switch(this.drawMethod){
case "svg":
_26=document.createElementNS("http://www.w3.org/2000/svg","rect");
_26.setAttribute("x",_1f[0].x);
_26.setAttribute("y",_1f[0].y);
_26.setAttribute("width",_1f[1].x-_1f[0].x);
_26.setAttribute("height",_1f[1].y-_1f[0].y);
_26.setAttribute("stroke",bc.hex);
_26.setAttribute("stroke-width",_22);
_26.setAttribute("stroke-opacity",_21);
_26.setAttribute("fill",fc.hex);
_26.setAttribute("fill-opacity",_24);
break;
case "vml":
_26=document.createElement("v:rect");
_26.style.left=_1f[0].x+"px";
_26.style.top=_1f[0].y+"px";
_26.style.width=_1f[1].x-_1f[0].x+"px";
_26.style.height=_1f[1].y-_1f[0].y+"px";
_26.style.position="absolute";
_26.setAttribute("stroked","true");
var _29=document.createElement("v:fill");
_29.setAttribute("opacity",_24);
_29.setAttribute("color",fc.hex);
_26.appendChild(_29);
var _2a=document.createElement("v:stroke");
_2a.setAttribute("miterlimit","8.0");
_2a.setAttribute("joinstyle","miter");
_2a.setAttribute("endcap","flat");
_2a.setAttribute("opacity",_21);
_2a.setAttribute("color",bc.hex);
_2a.setAttribute("weight",_22);
_26.appendChild(_2a);
break;
case "canvas":
var _26=document.createElement("canvas");
_26.setAttribute("width",this.surfaceWidth);
_26.setAttribute("height",this.surfaceHeight);
_26.style.position="absolute";
_26.style.left="0px";
_26.style.top="0px";
var ctx=_26.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_24+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_21+")";
ctx.lineWidth=_22;
ctx.fillRect(_1f[0].x,_1f[0].y,_1f[1].x-_1f[0].x,_1f[1].y-_1f[0].y);
ctx.strokeRect(_1f[0].x,_1f[0].y,_1f[1].x-_1f[0].x,_1f[1].y-_1f[0].y);
break;
}
_26.style.display=(_25?"inline":"none");
return _26;
};
this.drawEllipse=function(_2c,_2d,_2e,_2f,_30,_31,_32){
var _33;
var bc=this.normalizeColor(_2d);
var fc=this.normalizeColor(_30);
var _36=_2c[1].x-_2c[0].x;
var _37=_2c[1].y-_2c[0].y;
var _38=parseInt(_36/2);
var _39=parseInt(_37/2);
var _3a=_2c[1].x-_38;
var _3b=_2c[1].y-_39;
switch(this.drawMethod){
case "svg":
_33=document.createElementNS("http://www.w3.org/2000/svg","ellipse");
_33.setAttribute("cx",_3a);
_33.setAttribute("cy",_3b);
_33.setAttribute("rx",_38);
_33.setAttribute("ry",_39);
_33.setAttribute("stroke",bc.hex);
_33.setAttribute("stroke-width",_2f);
_33.setAttribute("stroke-opacity",_2e);
_33.setAttribute("fill",fc.hex);
_33.setAttribute("fill-opacity",_31);
break;
case "vml":
_33=document.createElement("v:oval");
_33.style.left=_2c[0].x+"px";
_33.style.top=_2c[0].y+"px";
_33.style.width=_36+"px";
_33.style.height=_37+"px";
_33.style.position="absolute";
_33.setAttribute("stroked","true");
var _3c=document.createElement("v:fill");
_3c.setAttribute("opacity",_31);
_3c.setAttribute("color",fc.hex);
_33.appendChild(_3c);
var _3d=document.createElement("v:stroke");
_3d.setAttribute("miterlimit","8.0");
_3d.setAttribute("joinstyle","miter");
_3d.setAttribute("endcap","flat");
_3d.setAttribute("opacity",_2e);
_3d.setAttribute("color",bc.hex);
_3d.setAttribute("weight",_2f);
_33.appendChild(_3d);
break;
case "canvas":
var _33=document.createElement("canvas");
_33.setAttribute("width",this.surfaceWidth);
_33.setAttribute("height",this.surfaceHeight);
_33.style.position="absolute";
_33.style.left="0px";
_33.style.top="0px";
var ctx=_33.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_31+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_2e+")";
ctx.lineWidth=_2f;
if((_2c[1].x-_2c[0].x)!=(_2c[1].y-_2c[0].y)){
var _3f=Math.round((_2c[1].y-_2c[0].y)/4);
var _40=Math.round((_2c[1].x-_2c[0].x)/4);
ctx.moveTo(_2c[0].x,_2c[0].y+(2*_3f));
ctx.bezierCurveTo(_2c[0].x,_2c[0].y+_3f,_2c[0].x+_40,_2c[0].y,_2c[0].x+(2*_40),_2c[0].y);
ctx.bezierCurveTo(_2c[0].x+(3*_40),_2c[0].y,_2c[1].x,_2c[0].y+_3f,_2c[1].x,_2c[0].y+(2*_3f));
ctx.bezierCurveTo(_2c[1].x,_2c[1].y-_3f,_2c[1].x-_40,_2c[1].y,_2c[0].x+(2*_40),_2c[1].y);
ctx.bezierCurveTo(_2c[0].x+_40,_2c[1].y,_2c[0].x,_2c[1].y-_3f,_2c[0].x,_2c[0].y+(2*_3f));
}else{
var _41=_2c[0].x+Math.round((_2c[1].x-_2c[0].x)/2);
var _42=_2c[0].y+Math.round((_2c[1].y-_2c[0].y)/2);
ctx.arc(_41,_42,Math.round((_2c[1].x-_2c[0].x)/2),0,360,false);
}
ctx.fill();
ctx.stroke();
break;
}
_33.style.display=(_32?"inline":"none");
return _33;
};
this.drawLine=function(_43,_44,_45,_46,_47){
var _48;
var bc=this.normalizeColor(_44);
var s="";
for(var i=0;i<_43.length;i++){
s+=_43[i].x+","+_43[i].y+" ";
}
switch(this.drawMethod){
case "svg":
_48=document.createElementNS("http://www.w3.org/2000/svg","polyline");
_48.setAttribute("points",s);
_48.setAttribute("stroke",bc.hex);
_48.setAttribute("stroke-width",_46);
_48.setAttribute("stroke-opacity",_45);
_48.setAttribute("fill","none");
break;
case "vml":
_48=document.createElement("v:polyline");
_48.style.width=this.surfaceWidth+"px";
_48.style.height=this.surfaceHeight+"px";
_48.style.position="absolute";
_48.setAttribute("stroked","true");
_48.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_48.setAttribute("points",s);
_48.setAttribute("fill","false");
var _4c=document.createElement("v:fill");
_4c.setAttribute("opacity",0);
_48.appendChild(_4c);
var _4d=document.createElement("v:stroke");
_4d.setAttribute("miterlimit","8.0");
_4d.setAttribute("joinstyle","miter");
_4d.setAttribute("endcap","flat");
_4d.setAttribute("opacity",_45);
_4d.setAttribute("color",bc.hex);
_4d.setAttribute("weight",_46);
_48.appendChild(_4d);
break;
case "canvas":
var _48=document.createElement("canvas");
_48.setAttribute("width",this.surfaceWidth);
_48.setAttribute("height",this.surfaceHeight);
_48.style.position="absolute";
_48.style.left="0px";
_48.style.top="0px";
var ctx=_48.getContext("2d");
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_45+")";
ctx.lineWidth=_46;
ctx.beginPath();
ctx.moveTo(_43[0].x,_43[0].y);
for(var i=1;i<_43.length;i++){
ctx.lineTo(_43[i].x,_43[i].y);
}
ctx.stroke();
break;
}
_48.style.display=(_47?"inline":"none");
return _48;
};
};
MQA.Graphics.setDrawMethod();

MQA.Base=function(){
this.guid=MQA.Util._getRandomGUID(10);
this.className="MQA.Base";
this.reservedProperties="guid,className,parentCollections";
this.parentCollections=[];
this.setValue=function(_1,_2){
if(typeof (this[_1])!="undefined"){
if(this.reservedProperties.search(_1)!=-1){
return false;
}
this[_1]=MQA.Util._cloneValue(_2);
if(typeof (this[_1+"_override"])=="undefined"){
this._facio(_1,this[_1]);
}
this.facio(_1,this[_1]);
return true;
}else{
return false;
}
};
this.getValue=function(_3){
var _4;
if(typeof (this[_3])!="undefined"){
_4=this.duco(_3);
if(typeof (_4)=="undefined"){
_4=this._duco(_3);
if(typeof (_4)=="undefined"){
_4=this[_3];
}
}
return _4;
}
};
this.setValues=function(_5){
var _6=0;
for(key in _5){
if(typeof (this[key])!="undefined"){
if(this.setValue(key,_5[key])){
_6++;
}
}
}
return _6;
};
this.override=function(_7){
if(!(_7 instanceof Array)){
_7=[_7];
}
for(var i=0;i<_7.length;i++){
this[_7[i]+"_override"]=1;
}
};
this._facio=function(_9,_a){
};
this.facio=function(_b,_c){
};
this._duco=function(_d){
};
this.duco=function(_e){
};
this.draw=function(){
};
this.dispose=function(){
};
};

MQA.Control=function(){
this.controlVersion="1.0";
};
MQA.Control.prototype={initialize:function(_1){
this.map=_1;
},getPosition:function(){
return this.position;
},getHeight:function(){
return this.getHeightInternal(this.elem);
},getHeightInternal:function(_2){
var _3=_2.childNodes;
var _4=0;
for(var i=0,j=_3.length;i<j;i++){
if(_3[i].childNodes.length>0&&_3[i].style.overflow!="hidden"){
childHeight=this.getHeightInternal(_3[i]);
if(childHeight>_4){
_4=childHeight;
}
}
if(_3[i].offsetHeight>_4){
_4=_3[i].offsetHeight;
}
}
return _4;
},getWidth:function(){
return this.getWidthInternal(this.elem);
},getWidthInternal:function(_7){
var _8=_7.childNodes;
var _9=0;
for(var i=0,j=_8.length;i<j;i++){
if(_8[i].childNodes.length>0&&_8[i].style.overflow!="hidden"){
childWidth=this.getWidthInternal(_8[i]);
if(childWidth>_9){
_9=childWidth;
}
}
if(_8[i].offsetWidth>_9){
_9=_8[i].offsetWidth;
}
}
return _9;
}};

MQA.RemoteCollectionResponseHandler=new function(){
this.collectionContainer=Array();
this.getCallback=function(rc){
return this.onDataReturn;
};
this.onDataReturn=function(_2){
for(var i=0;i<this.collectionContainer.length;i++){
if(this.collectionContainer[i].guid==_2){
this.collectionContainer[i].onDataReturn();
break;
}
}
};
this.onDataRequestTimeout=function(_4){
for(var i=0;i<this.collectionContainer.length;i++){
if(this.collectionContainer[i].guid==_4){
this.collectionContainer[i].onDataRequestTimeout();
break;
}
}
};
this.addInstance=function(rc){
this.collectionContainer.push(rc);
};
};
MQA.RemoteCollection=function(_7,_8,_9){
MQA.ShapeCollection.call(this);
this._returnData=null;
this._xmlHTTP=null;
this.deserializer=_8;
this.url=_7;
this.timeoutDuration=(typeof (_9)!="undefined"?_9:10000);
this.dataRequestTimer=null;
this.jsonScript=null;
this.scriptReturned=false;
this.eventHandlers=[];
EventHolder=function(){
this.eventName;
this.handler;
};
this.requestData=function(_a){
clearTimeout(this.dataRequestTimer);
this.scriptReturned=false;
if(!(this.deserializer instanceof MQA.JSONDeserializer)){
if(window.XMLHttpRequest){
this._xmlHTTP=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
this._xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
}
}
var _b=Array();
_b.push(this.guid);
this._xmlHTTP.onreadystatechange=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
if(_a.indexOf("?")==-1){
_a+="?mqarand="+Math.random();
}else{
_a+="&mqarand="+Math.random();
}
this._xmlHTTP.open("GET",_a,true);
this._xmlHTTP.send(null);
}else{
this.jsonScript=document.createElement("script");
this.jsonScript.id="jsonScript";
this.jsonScript.src=_a;
this.jsonScript.type="text/javascript";
var _b=Array();
_b.push(this.guid);
if(this.deserializer.isIE){
this.jsonScript.onreadystatechange=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
}else{
this.jsonScript.onload=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
}
document.body.appendChild(this.jsonScript);
}
this.dataRequestTimer=setTimeout("MQA.RemoteCollectionResponseHandler.onDataRequestTimeout(\""+this.guid+"\")",this.timeoutDuration);
};
this.onDataReturn=function(){
if(!(this.deserializer instanceof MQA.JSONDeserializer)){
if(this._xmlHTTP.readyState==4){
if(this._xmlHTTP.status==200){
if(document.implementation&&document.implementation.createDocument){
var _c=new DOMParser();
this._returnData=_c.parseFromString(this._xmlHTTP.responseText,"text/xml");
}else{
this._returnData=new ActiveXObject("Microsoft.XMLDOM");
this._returnData.async="false";
this._returnData.loadXML(this._xmlHTTP.responseText);
}
clearTimeout(this.dataRequestTimer);
this._processData();
}
}
}else{
if((this.deserializer.isIE&&(this.jsonScript.readyState=="complete"||this.jsonScript.readyState=="loaded"))||!this.deserializer.isIE){
this.scriptReturned=true;
try{
document.body.removeChild(this.jsonScript);
}
catch(e){
}
this.jsonScript=null;
clearTimeout(this.dataRequestTimer);
this._processData();
}
}
};
this.onDataRequestTimeout=function(){
clearTimeout(this.dataRequestTimer);
if(this.deserializer instanceof MQA.JSONDeserializer){
try{
document.body.removeChild(this.jsonScript);
this.jsonScript=null;
}
catch(e){
}
}
this.dataRequestTimer=null;
var _d=new MQA.Event("MQA.RemoteCollection.dataTimeout");
_d.srcObject=this;
this.onDataTimeout(_d);
};
this._processData=function(){
var _e=this.deserializer.deserializeData(this._returnData);
for(var k=0;k<_e.length;k++){
this.add(_e[k]);
}
this.activateEventListeners();
var mqe=new MQA.Event("MQA.RemoteCollection.dataLoaded");
mqe.srcObject=this;
this.onDataLoaded(mqe);
};
this.update=function(){
this.deactivateEventListeners();
this.removeAll();
this.requestData(this.url);
};
this.getData=function(){
return this._returnData;
};
this.setTimeoutDuration=function(x){
this.timeoutDuration=x;
};
this.getTimeoutDuration=function(){
return this.timeoutDuration;
};
this.addEventListeners=function(_12,_13){
_12=_12.toLowerCase();
this.eventHandlers.push({eventName:_12,handler:_13,active:false});
this.activateEventListeners();
};
this.removeEventListeners=function(_14){
_14=_14.toLowerCase();
for(var x=0;x<this.eventHandlers.length;x++){
if(this.eventHandlers[x].eventName==_14){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.removeListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
this.eventHandlers.splice(x,1);
}
}
};
this.activateEventListeners=function(){
for(var x=0;x<this.eventHandlers.length;x++){
if(!this.eventHandlers[x].active){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.addListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
if(this.getSize()>0){
this.eventHandlers[x].active=true;
}
}
}
};
this.deactivateEventListeners=function(){
for(var x=0;x<this.eventHandlers.length;x++){
if(this.eventHandlers[x].active){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.removeListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
if(this.getSize()>0){
this.eventHandlers[x].active=false;
}
}
}
};
this.onDataLoaded=function(mqe){
MQA.EventManager.trigger(this,"dataloaded",mqe);
};
this.onDataTimeout=function(mqe){
MQA.EventManager.trigger(this,"datatimeout",mqe);
};
MQA.RemoteCollectionResponseHandler.addInstance(this);
this.requestData(_7);
};

MQA.BaseDeserializer=function(){
var _1=null;
var _2=null;
this.isIE=(MQA.Util.getBrowserInfo().name=="msie");
this.deserializeData=function(_3){
return null;
};
this.getTextValue=function(_4){
if(MQA.Util.getBrowserInfo().name=="msie"){
return _4.text;
}else{
return _4.textContent;
}
};
};

MQA.KMLDeserializer=function(){
MQA.BaseDeserializer.call(this);
this.data=null;
this.deserializeData=function(_1){
var p;
this.data=_1;
var _3=Array();
var _4=_1.getElementsByTagName("Placemark");
for(var i=0;i<_4.length;i++){
if(_4[i].getElementsByTagName("Point").length>0){
p=this.createPois(_4[i]);
for(var x=0;x<p.length;x++){
_3.push(p[x]);
}
}else{
if(_4[i].getElementsByTagName("Polygon").length>0){
p=this.createPolygons(_4[i]);
for(var x=0;x<p.length;x++){
_3.push(p[x]);
}
}else{
if(_4[i].getElementsByTagName("LineString").length>0){
p=this.createLines(_4[i]);
for(var x=0;x<p.length;x++){
_3.push(p[x]);
}
}
}
}
}
return _3;
};
this.createPois=function(_7){
var _8=null;
var _9=Array();
var _a=MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("coordinates")[0])).split(",");
var _b=new MQA.Poi(new MQA.LatLng(_a[1],_a[0]));
if(_7.getElementsByTagName("name").length>0){
_b.setValue("infoTitleHTML",this.getTextValue(_7.getElementsByTagName("name")[0]));
}
if(_7.getElementsByTagName("description").length>0){
var _c=this.getTextValue(_7.getElementsByTagName("description")[0]);
_c=_c.replace("<![CDATA[","");
_c=_c.replace("&lt;![CDATA[","");
_c=_c.replace("]]>","");
_c=_c.replace("]]&gt;","");
_b.setValue("infoContentHTML",_c);
}
if(_7.getElementsByTagName("styleUrl").length>0){
var _d=this.getStyleInfo(this.getTextValue(_7.getElementsByTagName("styleUrl")[0]));
if(typeof (_d)!="string"){
if(_d.getElementsByTagName("Icon").length>0){
if(_d.getElementsByTagName("Icon")[0].getElementsByTagName("href").length>0){
_8=this.getTextValue(_d.getElementsByTagName("Icon")[0].getElementsByTagName("href")[0]);
}else{
if(1==2){
}else{
_8=null;
}
}
}else{
_8=null;
}
}else{
_8=_d;
}
if(_8){
_b.setValue("icon",new MQA.Icon(_8,0,0));
}
}
_9.push(_b);
return _9;
};
this.createPolygons=function(_e){
var _f,_10,_11,_12,_13;
var _14=Array();
var _15=_e.getElementsByTagName("Polygon");
for(var x=0;x<_15.length;x++){
var _17=new MQA.PolygonOverlay();
var _18=new MQA.LatLngCollection();
var _19=_e.getElementsByTagName("outerBoundaryIs");
if(_19.length>0){
var _1a=this.getTextValue(_19[0].getElementsByTagName("coordinates")[0]);
_1a=MQA.Util._trim(_1a);
_1a=_1a.split(/ +|\n+/);
if(_1a.length>0){
for(var i=0;i<_1a.length;i++){
_f=MQA.Util._trim(_1a[i]);
_f=_f.split(",");
if(_f!=""){
_18.add(new MQA.LatLng(_f[1],_f[0]));
}
}
}else{
return null;
}
}
_17.setValue("shapePoints",_18);
if(_e.getElementsByTagName("styleUrl").length>0){
_10=this.getStyleInfo(this.getTextValue(_e.getElementsByTagName("styleUrl")[0]));
if(_10){
var _1c=Array("LineStyle","PolyStyle");
for(var i=0;i<_1c.length;i++){
if(_10.getElementsByTagName(_1c[i]).length>0){
_11=_10.getElementsByTagName(_1c[i])[0];
if(_11.getElementsByTagName("width").length>0){
_12=this.getTextValue(_11.getElementsByTagName("width")[0]);
if(_12){
_17.setValue("borderWidth",_12);
}
}
if(_11.getElementsByTagName("color").length>0){
_13=this.getTextValue(_11.getElementsByTagName("color")[0]);
if(_13){
var _1d=(_1c[i]=="LineStyle"?"color":"fillColor");
var _1e=(_1c[i]=="LineStyle"?"colorAlpha":"fillColorAlpha");
var c=_13.substr(6,2)+_13.substr(4,2)+_13.substr(2,2);
_17.setValue(_1d,"#"+c);
_17.setValue(_1e,parseInt("0x"+_13.substr(0,2))/255);
}
}
}
}
}
}
_14.push(_17);
}
return _14;
};
this.createLines=function(_20){
var _21,_22,_23,_24,_25;
var _26=Array();
var _27=_20.getElementsByTagName("LineString");
for(var z=0;z<_27.length;z++){
var _29=new MQA.LineOverlay();
var _2a=new MQA.LatLngCollection();
var _2b=this.getTextValue(_27[z].getElementsByTagName("coordinates")[0]);
_2b=MQA.Util._trim(_2b);
_2b=_2b.split(/ +|\n+/);
if(_2b.length>0){
for(var i=0;i<_2b.length;i++){
_21=MQA.Util._trim(_2b[i]);
_21=_21.split(",");
if(_21!=""){
_2a.add(new MQA.LatLng(_21[1],_21[0]));
}
}
}else{
}
_29.setValue("shapePoints",_2a);
if(_20.getElementsByTagName("styleUrl").length>0){
_22=this.getStyleInfo(this.getTextValue(_20.getElementsByTagName("styleUrl")[0]));
if(_22){
var _2d=_22.getElementsByTagName("LineStyle");
if(_2d.length>0){
_23=_2d[0];
if(_23.getElementsByTagName("width").length>0){
_24=this.getTextValue(_23.getElementsByTagName("width")[0]);
if(_24){
_29.setValue("borderWidth",_24);
}
}
if(_23.getElementsByTagName("color").length>0){
_25=this.getTextValue(_23.getElementsByTagName("color")[0]);
if(_25){
var c=_25.substr(6,2)+_25.substr(4,2)+_25.substr(2,2);
_29.setValue("color","#"+c);
_29.setValue("colorAlpha",parseInt("0x"+_25.substr(0,2))/255);
}
}
}
}
}
_26.push(_29);
}
return _26;
};
this.getStyleInfo=function(_2f){
var _30=null;
if(_2f.substring(0,1)!="#"){
_30=_2f;
}else{
_2f=_2f.substring(1);
var _30=this.getNodeById("Style",_2f);
}
return _30;
};
this.getNodeById=function(_31,id){
var _33=null;
var _34=this.data.getElementsByTagName(_31);
for(var i=0;i<_34.length;i++){
if(_34[i].getAttribute("id")==id){
_33=_34[i];
break;
}
}
return _33;
};
};

MQA.GeoRSSDeserializer=function(){
MQA.BaseDeserializer.call(this);
this.data=null;
this.feedVersion=null;
this.geo="http://www.w3.org/2003/01/geo/wgs84_pos#";
this.geoRSS="http://www.georss.org/georss";
this.gml="http://www.opengis.net/gml";
this.deserializeData=function(_1){
var _2,_3,_4;
var _5=Array();
this.data=_1;
this.feedVersion=this.getFeedVersion();
_2=this.data.getElementsByTagName("item");
if(_2.length==0){
_2=this.data.getElementsByTagName("entry");
}
if(this.feedVersion=="geo"){
for(var i=0;i<_2.length;i++){
_3=this.getElements(_2[i],"lat");
_4=this.getElements(_2[i],"long");
if(_3.length>0&&_4.length>0){
_5.push(this.createPoi(_2[i]));
}
}
}else{
if(this.feedVersion=="georss"){
for(var i=0;i<_2.length;i++){
if(this.getElements(_2[i],"point").length>0){
_5.push(this.createPoi(_2[i]));
}else{
if(this.getElements(_2[i],"line").length>0){
_5.push(this.createLine(_2[i]));
}else{
if(this.getElements(_2[i],"polygon").length>0){
_5.push(this.createPolygon(_2[i]));
}else{
if(this.getElements(_2[i],"box").length>0){
_5.push(this.createRectangle(_2[i]));
}
}
}
}
}
}else{
for(var i=0;i<_2.length;i++){
if(this.getElements(_2[i],"Point").length>0){
_5.push(this.createPoi(_2[i]));
}else{
if(this.getElements(_2[i],"LineString").length>0){
_5.push(this.createLine(_2[i]));
}else{
if(this.getElements(_2[i],"Polygon").length>0){
_5.push(this.createPolygon(_2[i]));
}else{
if(this.getElements(_2[i],"Envelope").length>0){
_5.push(this.createRectangle(_2[i]));
}
}
}
}
}
}
}
return _5;
};
this.createPoi=function(_7){
var _8,_9;
var _a=null;
if(this.feedVersion=="geo"){
_8=MQA.Util._trim(this.getTextValue(this.getElements(_7,"lat")[0]));
_9=MQA.Util._trim(this.getTextValue(this.getElements(_7,"long")[0]));
_a=new MQA.Poi(new MQA.LatLng(_8,_9));
if(_7.getElementsByTagName("title").length>0){
_a.setValue("infoTitleHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("title")[0])));
}
if(_7.getElementsByTagName("description").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("description")[0])));
}else{
if(_7.getElementsByTagName("summary").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("summary")[0])));
}
}
}else{
if(this.feedVersion=="georss"){
var _b=this.getTextValue(this.getElements(_7,"point")[0]).split(/ +|\n+/);
_a=new MQA.Poi(new MQA.LatLng(_b[0],_b[1]));
if(_7.getElementsByTagName("title").length>0){
_a.setValue("infoTitleHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("title")[0])));
}
if(_7.getElementsByTagName("description").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("description")[0])));
}else{
if(_7.getElementsByTagName("summary").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("summary")[0])));
}
}
}else{
var _b=this.getTextValue(this.getElements(_7,"pos")[0]).split(/ +|\n+/);
_a=new MQA.Poi(new MQA.LatLng(_b[0],_b[1]));
if(_7.getElementsByTagName("title").length>0){
_a.setValue("infoTitleHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("title")[0])));
}
if(_7.getElementsByTagName("description").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("description")[0])));
}else{
if(_7.getElementsByTagName("summary").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("summary")[0])));
}
}
}
}
return _a;
};
this.createLine=function(_c){
var _d=null;
var _e=new MQA.LatLngCollection();
if(this.feedVersion=="georss"){
var _f=MQA.Util._trim(this.getTextValue(this.getElements(_c,"line")[0])).split(/ +|\n+/);
for(var i=0;i<_f.length;i=i+2){
_e.add(new MQA.LatLng(MQA.Util._trim(_f[i]),MQA.Util._trim(_f[i+1])));
}
_d=new MQA.LineOverlay();
_d.setValue("shapePoints",_e);
}else{
var _f=MQA.Util._trim(this.getTextValue(this.getElements(_c,"posList")[0])).split(/ +|\n+/);
for(var i=0;i<_f.length;i=i+2){
_e.add(new MQA.LatLng(MQA.Util._trim(_f[i]),MQA.Util._trim(_f[i+1])));
}
_d=new MQA.LineOverlay();
_d.setValue("shapePoints",_e);
}
return _d;
};
this.createPolygon=function(_11){
var _12=null;
var _13=new MQA.LatLngCollection();
if(this.feedVersion=="georss"){
var _14=MQA.Util._trim(this.getTextValue(this.getElements(_11,"polygon")[0])).split(/ +|\n+/);
for(var i=0;i<_14.length;i=i+2){
_13.add(new MQA.LatLng(MQA.Util._trim(_14[i]),MQA.Util._trim(_14[i+1])));
}
_12=new MQA.PolygonOverlay();
_12.setValue("shapePoints",_13);
}else{
var _16=this.getElements(_11,"exterior");
if(_16.length>0){
var _14=MQA.Util._trim(this.getTextValue(this.getElements(_16[0],"posList")[0])).split(/ +|\n+/);
for(var i=0;i<_14.length;i=i+2){
_13.add(new MQA.LatLng(MQA.Util._trim(_14[i]),MQA.Util._trim(_14[i+1])));
}
_12=new MQA.PolygonOverlay();
_12.setValue("shapePoints",_13);
}
}
return _12;
};
this.createRectangle=function(_17){
var _18=null;
var _19=new MQA.LatLngCollection();
if(this.feedVersion=="georss"){
var _1a=MQA.Util._trim(this.getTextValue(this.getElements(_17,"box")[0])).split(/ +|\n+/);
for(var i=0;i<_1a.length;i=i+2){
_19.add(new MQA.LatLng(MQA.Util._trim(_1a[i]),MQA.Util._trim(_1a[i+1])));
}
_18=new MQA.RectangleOverlay();
_18.setValue("shapePoints",_19);
}else{
var _1c=MQA.Util._trim(this.getTextValue(this.getElements(_17,"lowerCorner")[0])).split(/ +|\n+/);
var _1d=MQA.Util._trim(this.getTextValue(this.getElements(_17,"upperCorner")[0])).split(/ +|\n+/);
_19.add(new MQA.LatLng(MQA.Util._trim(_1c[0]),MQA.Util._trim(_1c[1])));
_19.add(new MQA.LatLng(MQA.Util._trim(_1d[0]),MQA.Util._trim(_1d[1])));
_18=new MQA.RectangleOverlay();
_18.setValue("shapePoints",_19);
}
return _18;
};
this.getFeedVersion=function(){
var _1e=null;
var f=this.data.getElementsByTagName("feed");
if(f.length==0){
f=this.data.getElementsByTagName("rss");
}
if(f[0].getAttribute("xmlns:georss")){
if(f[0].getAttributeNode("xmlns:gml")){
_1e="gml";
}else{
_1e="georss";
}
}else{
if(f[0].getAttributeNode("xmlns:geo")){
_1e="geo";
}
}
return _1e;
};
this.getElements=function(_20,_21){
var _22="";
var _23=null;
var _24=null;
switch(this.feedVersion){
case "geo":
_22="geo:";
_23=this.geo;
break;
case "georss":
_22="georss:";
_23=this.geoRSS;
break;
case "gml":
_22=(_21=="where"?"georss:":"gml:");
_23=(_21=="where"?this.geoRSS:this.gml);
break;
default:
_22="";
_23=null;
break;
}
if(this.isIE){
_24=_20.getElementsByTagName(_22+_21);
}else{
_24=_20.getElementsByTagNameNS(_23,_21);
}
return _24;
};
};

MQA.JSONDeserializer=function(_1){
MQA.BaseDeserializer.call(this);
this._data=null;
if(typeof (_1)=="undefined"){
this._dataProcessor=function(_2){
return null;
};
}else{
this._dataProcessor=_1;
}
this.deserializeData=function(_3){
var _4,_5,_6;
var _7=Array();
this._data=_3;
_7=this._dataProcessor(this._data);
return _7;
};
this.setDataProcessor=function(fn){
this._dataProcessor=fn;
};
};

MQA.LargeZoomControl=function(){
browser=MQA.browser;
this.pan=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(5,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.ePanClick=new Array();
this.ePanMouseover=new Array();
this.ePanMouseout=new Array();
this.eZoominClick=null;
this.eZoominMouseover=null;
this.eZoominMouseout=null;
this.eZoomoutClick=null;
this.eZoomoutMouseover=null;
this.eZoomoutMouseout=null;
this.eZoomareaClick=new Array();
this.eZoomareaMouseover=new Array();
this.eZoomboxMouseout=null;
temp=document.createElement("div");
temp.className="map-controls-bg screen";
this.elem.appendChild(temp);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="45px";
temp1.style.margin="0";
temp1.style.padding="0 1px";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-top-bg.png', sizingMethod='image');";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-top-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="no-repeat";
}
temp.appendChild(temp1);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="236px";
temp1.style.margin="0";
temp1.style.padding="5px 0 0";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-middle-bg.png', sizingMethod='crop')";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-middle-short-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="repeat-y";
}
if(browser.name=="msie"){
temp1.style.height="241px";
}
temp.appendChild(temp1);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="18px";
temp1.style.margin="0";
temp1.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png', sizingMethod='image')";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="no-repeat";
}
temp.appendChild(temp1);
temp=document.createElement("ul");
temp.className="map-controls screen";
this.elem.appendChild(temp);
temp1=document.createElement("li");
temp1.className="map-compass-wrapper";
temp.appendChild(temp1);
temp2=document.createElement("div");
temp2.className="map-compass";
temp1.appendChild(temp2);
temp3=document.createElement("img");
temp3.border=0;
if(browser.name=="msie"&&browser.version<7){
temp3.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/map-compassrose.png', sizingMethod='image')";
}else{
temp3.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-compassrose.png";
}
temp3.alt="compass rose";
temp3.className="";
temp2.appendChild(temp3);
this.compassrose=temp3;
temp3=document.createElement("img");
temp3.border=0;
temp3.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
temp3.className="map-compass-links";
temp3.useMap="#mq-zoomcontrol-linkmap";
temp2.appendChild(temp3);
this.compassroseimg=temp3;
temp3=document.createElement("map");
temp3.name="mq-zoomcontrol-linkmap";
temp3.id="mq-zoomcontrol-linkmap";
temp2.appendChild(temp3);
this.compassrosemap=temp3;
temp3.appendChild(MQA.Util.createArea("poly","14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21","#center"));
temp4=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
temp3.appendChild(temp4);
this.pan[MQA.PAN_NORTH]=temp4;
temp4=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
temp3.appendChild(temp4);
this.pan[MQA.PAN_EAST]=temp4;
temp4=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
temp3.appendChild(temp4);
this.pan[MQA.PAN_WEST]=temp4;
temp4=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
temp3.appendChild(temp4);
this.pan[MQA.PAN_SOUTH]=temp4;
temp1=document.createElement("li");
temp1.className="map-zoom";
temp.appendChild(temp1);
temp2=document.createElement("div");
temp2.className="io map-zoom-in";
temp1.appendChild(temp2);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";
}else{
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png";
}
temp2.appendChild(this.zoomin);
var _1=document.createElement("div");
_1.className="map-zoombox";
var _2=document.createElement("img");
_2.border=0;
if(browser.name=="msie"&&browser.version<7){
_2.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
_2.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/zoombar.png', sizingMethod='image')";
}else{
_2.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/zoombar.png";
}
_1.appendChild(_2);
strHtm="<img src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a' border='0' class='map-zoom-links'/>";
strHtm+="<img src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/z-on.png' border='0' class='map-zoom-on'/>";
strHtm+="<map>";
var _3=1;
var _4=10;
for(var i=0;i<16;i++){
strHtm+="<area alt='Zoom to level "+(16-i)+"' title='Zoom to level "+(16-i)+"' shape='rect' coords='1, "+(_3+i*12)+", 22, "+(_4+i*12)+"' />";
}
strHtm+="</map>";
_1.innerHTML+=strHtm;
this.zoombox=_1;
this.zoomarea=_1.childNodes[3].childNodes;
temp1.appendChild(_1);
temp2=document.createElement("div");
temp2.className="io map-zoom-out";
temp1.appendChild(temp2);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";
}else{
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png";
}
temp2.appendChild(this.zoomout);
};
MQA.LargeZoomControl.prototype=new MQA.Control();
MQA.LargeZoomControl.prototype.constructor=MQA.LargeZoomControl;
MQA.LargeZoomControl.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.delDtor(this._dth);
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.eZoomboxMouseout);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_NORTH]);
this.pan[MQA.PAN_NORTH]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_EAST]);
this.pan[MQA.PAN_EAST]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_WEST]);
this.pan[MQA.PAN_WEST]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_SOUTH]);
this.pan[MQA.PAN_SOUTH]=null;
this.pan=null;
for(var i=0;i<16;i++){
MQA.Util._deleteDOMObject(this.zoomarea[0]);
}
this.zoomarea=null;
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoombox.innerHTML=null;
this.zoombox.outerHTML="";
MQA.Util._deleteDOMObject(this.zoombox);
this.zoombox=null;
this.compassroseimg.src="";
MQA.Util._deleteDOMObject(this.compassroseimg);
this.compassroseimg=null;
this.compassrose.src="";
MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.compassrosemap.innerHTML=null;
this.compassrosemap.outerHTML="";
MQA.Util._deleteDOMObject(this.compassrosemap);
this.compassrosemap=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.LargeZoomControl.prototype.destructor=function(){
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.eZoomboxMouseout);
this.elem.parentNode.removeChild(this.elem);
};
MQA.LargeZoomControl.prototype.initialize=function(_8){
this.map=_8;
this.type=MQA.CONTROL_PANZOOM;
this.setZoom(this.map.getZoomLevel());
this.compassroseimg.useMap="#mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.name="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.id="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.zoombox.childNodes[1].useMap="#zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].name="zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].id="zoompositions"+this.map.uniqueMapID;
for(var i=0;i<4;i++){
this.ePanClick[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.ePanMouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.ePanMouseout[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.observe(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.observe(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
this.eZoominClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.observe(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.eZoominMouseout);
this.eZoomoutClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.observe(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
this.eZoomareaClick[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomareaMouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.observe(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
this.eZoomboxMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoombox,"mouseout",this.eZoomboxMouseout);
};
MQA.LargeZoomControl.prototype.eventmonitor=function(_a){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(_a)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_a)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(_a)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(_a)==this.zoomarea[i]){
eventId=16-i;
break;
}
}
switch(_a.type){
case "click":
switch(eventId){
case "in":
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
this.map.zoomOut();
break;
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
case "nil":
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(_a).className="o";
break;
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
default:
this.selectZoom(eventId);
break;
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
if(MQA._prEvent.element(_a).className!="o"){
return;
}
MQA._prEvent.element(_a).className="";
break;
case "n":
case "s":
case "e":
case "w":
this.compassrose.className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
this.unselectZoom(eventId);
}
break;
}
break;
}
};
MQA.LargeZoomControl.prototype.setZoom=function(_c){
var z=this.zoombox.childNodes[2];
z.style.top=((16-_c)*12+1)+"px";
z.alt="Zoom to level "+(_c);
z.title="Zoom to level "+(_c);
};
MQA.LargeZoomControl.prototype.selectZoom=function(_e){
this.zoombox.childNodes[0].style.left=0-((17-_e)*25)+"px";
};
MQA.LargeZoomControl.prototype.unselectZoom=function(_f){
this.zoombox.childNodes[0].style.left="0";
};
MQA.LargeZoomControl.prototype.getHeight=function(){
return 298;
};
MQA.LargeZoomControl.prototype.getWidth=function(){
return 45;
};
MQA.PanControl=function(){
browser=MQA.browser;
this.pans=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.bgdiv=document.createElement("div");
this.bgdiv.className="map-controls-bg screen";
this.elem.appendChild(this.bgdiv);
this.boxdiv=document.createElement("div");
this.boxdiv.style.position="relative";
this.boxdiv.style.width="48px";
this.boxdiv.style.height="52px";
this.boxdiv.style.margin="0";
this.boxdiv.style.padding="0 3px";
if(browser.name=="msie"&&browser.version<7){
this.boxdiv.style.backgroundImage="none";
this.boxdiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-box-bg.png', sizingMethod='image')";
}else{
this.boxdiv.style.backgroundColor="transparent";
this.boxdiv.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-box-bg.png)";
this.boxdiv.style.backgroundPosition="0 0";
this.boxdiv.style.backgroundRepeat="no-repeat";
}
this.bgdiv.appendChild(this.boxdiv);
this.ul=document.createElement("ul");
this.ul.className="map-controls screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-box-wrapper";
this.ul.appendChild(this.li1);
this.mapcompass=document.createElement("div");
this.mapcompass.className="map-compass";
this.li1.appendChild(this.mapcompass);
this.roseimg=document.createElement("img");
this.roseimg.border=0;
if(browser.name=="msie"&&browser.version<7){
this.roseimg.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.roseimg.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-compassrose.png', sizingMethod='image')";
}else{
this.roseimg.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-compassrose.png";
}
this.roseimg.alt="compass rose";
this.roseimg.className="";
this.mapcompass.appendChild(this.roseimg);
this.compassrose=this.roseimg;
this.mapimg=document.createElement("img");
this.mapimg.border=0;
this.mapimg.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.mapimg.className="map-compass-links";
this.mapimg.useMap="#mq-pancontrol-linkmap";
this.mapcompass.appendChild(this.mapimg);
this.mapitem=document.createElement("map");
this.mapitem.id="mq-pancontrol-linkmap";
this.mapitem.name="mq-pancontrol-linkmap";
this.mapcompass.appendChild(this.mapitem);
this.area1=MQA.Util.createArea("poly","14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21","#center");
this.mapitem.appendChild(this.area1);
this.pans[MQA.PAN_NORTH]=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
this.mapitem.appendChild(this.pans[MQA.PAN_NORTH]);
this.pans[MQA.PAN_EAST]=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
this.mapitem.appendChild(this.pans[MQA.PAN_EAST]);
this.pans[MQA.PAN_WEST]=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
this.mapitem.appendChild(this.pans[MQA.PAN_WEST]);
this.pans[MQA.PAN_SOUTH]=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
this.mapitem.appendChild(this.pans[MQA.PAN_SOUTH]);
};
MQA.PanControl.prototype=new MQA.Control();
MQA.PanControl.prototype.constructor=MQA.PanControl;
MQA.PanControl.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
this.pans[MQA.PAN_NORTH]=null;
this.pans[MQA.PAN_SOUTH]=null;
this.pans[MQA.PAN_EAST]=null;
this.pans[MQA.PAN_WEST]=null;
this.pans=null;
MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.mapitem.innerHTML=null;
this.mapitem.outerHTML="";
MQA.Util._deleteDOMObject(this.mapitem);
this.mapitem=null;
this.roseimg.src="";
MQA.Util._deleteDOMObject(this.roseimg);
this.roseimg=null;
this.mapimg.src="";
MQA.Util._deleteDOMObject(this.mapimg);
this.mapimg=null;
this.mapcompass.innerHTML=null;
this.mapcompass.outerHTML="";
MQA.Util._deleteDOMObject(this.mapcompass);
this.mapcompass=null;
this.area1.outerHTML="";
MQA.Util._deleteDOMObject(this.area1);
this.area1=null;
this.boxdiv.innerHTML=null;
this.boxdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.boxdiv);
this.boxdiv=null;
this.bgdiv.innerHTML=null;
this.bgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.bgdiv);
this.bgdiv=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.PanControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
this.elem.parentNode.removeChild(this.elem);
};
MQA.PanControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_PAN;
this.ePanNorthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanNorthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanNorthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
this.ePanSouthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
this.ePanEastClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
this.ePanWestClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanWestMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanWestMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
};
MQA.PanControl.prototype.eventmonitors=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_WEST]){
eventId="w";
}
switch(evt.type){
case "click":
switch(eventId){
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
}
break;
case "mouseover":
switch(eventId){
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
}
break;
case "mouseout":
this.compassrose.className="";
break;
}
};
MQA.PanControl.prototype.getHeight=function(){
return 48;
};
MQA.PanControl.prototype.getWidth=function(){
return 47;
};
MQA.ZoomControl=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.eZoominClick=null;
this.eZoominMouseover=null;
this.eZoominMouseout=null;
this.eZoomoutClick=null;
this.eZoomoutMouseover=null;
this.eZoomoutMouseout=null;
this.bgdiv=document.createElement("div");
this.bgdiv.className="map-controls-bg screen";
this.bgdiv.style.width="60px";
this.elem.appendChild(this.bgdiv);
this.imgdiv=document.createElement("div");
this.imgdiv.style.position="relative";
this.imgdiv.style.width="60px";
this.imgdiv.style.height="45px";
this.imgdiv.style.margin="0";
this.imgdiv.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
this.imgdiv.style.backgroundImage="none";
this.imgdiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/zoom-bg-tilemap.png', sizingMethod='image')";
}else{
this.imgdiv.style.backgroundColor="transparent";
this.imgdiv.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/zoom-bg-tilemap.png)";
this.imgdiv.style.backgroundPosition="0 0";
this.imgdiv.style.backgroundRepeat="no-repeat";
}
this.bgdiv.appendChild(this.imgdiv);
this.ul=document.createElement("ul");
this.ul.className="map-controls screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-zoom";
this.li1.style.width="60px";
this.li1.style.height="50px";
this.ul.appendChild(this.li1);
this.indiv=document.createElement("div");
this.indiv.style.position="absolute";
this.indiv.style.left="6px";
this.indiv.style.top="8px";
this.indiv.style.width="22px";
this.indiv.className="io map-zoom-in";
this.li1.appendChild(this.indiv);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";
}else{
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png";
}
this.indiv.appendChild(this.zoomin);
this.outdiv=document.createElement("div");
this.outdiv.style.position="absolute";
this.outdiv.style.left="29px";
this.outdiv.style.top="6px";
this.outdiv.style.width="22px";
this.outdiv.className="io map-zoom-out";
this.li1.appendChild(this.outdiv);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";
}else{
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png";
}
this.outdiv.appendChild(this.zoomout);
};
MQA.ZoomControl.prototype=new MQA.Control();
MQA.ZoomControl.prototype.constructor=MQA.ZoomControl;
MQA.ZoomControl.prototype.dispose=function(){
this.map=null;
this.type=null;
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
this.outdiv.innerHTML=null;
this.outdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.outdiv);
this.outdiv=null;
this.zoomout.src="";
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoomin.src="";
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1="";
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul="";
this.imgdiv.innerHTML=null;
this.imgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.imgdiv);
this.imgdiv="";
this.bgdiv.innerHTML=null;
this.bgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.bgdiv);
this.bgdiv="";
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem="";
};
MQA.ZoomControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
this.elem.parentNode.removeChild(this.elem);
};
MQA.ZoomControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_ZOOM;
this.eZoominClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.observe(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.eZoominMouseout);
this.eZoomoutClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.observe(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.eZoomoutMouseout);
};
MQA.ZoomControl.prototype.eventmonitor=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(evt)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(evt)==this.zoomout){
eventId="out";
}
switch(evt.type){
case "click":
switch(eventId){
case "in":
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
this.map.zoomOut();
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(evt).className="o";
break;
default:
MQA._prEvent.element(evt).src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/z-on.png";
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(evt).className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
MQA._prEvent.element(evt).src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/z-"+eventId+".png";
}
}
break;
}
};
MQA.ZoomControl.prototype.getHeight=function(){
return 40;
};
MQA.ZoomControl.prototype.getWidth=function(){
return 62;
};
MQA.ViewControl=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(150,0));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.ul=document.createElement("ul");
this.ul.className="map-view screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-view-street";
this.ul.appendChild(this.li1);
this.streetview=document.createElement("img");
this.streetview.className="";
this.streetview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.streetview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.streetview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-street-view.png', sizingMethod='image')";
}else{
this.streetview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-street-view.png";
}
this.streetview.alt="View Street Map";
this.streetview.title="View Street Map";
this.li1.appendChild(this.streetview);
this.li2=document.createElement("li");
this.li2.className="map-view-aerial";
this.ul.appendChild(this.li2);
this.aerialview=document.createElement("img");
this.aerialview.className="";
this.aerialview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.aerialview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.aerialview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-aerial-view.png', sizingMethod='image')";
}else{
this.aerialview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-aerial-view.png";
}
this.aerialview.alt="View Aerial Image";
this.aerialview.title="View Aerial Image";
this.li2.appendChild(this.aerialview);
this.li3=document.createElement("li");
this.li3.className="map-view-hybrid";
this.ul.appendChild(this.li3);
this.hybridview=document.createElement("img");
this.hybridview.className="";
this.hybridview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.hybridview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.hybridview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png', sizingMethod='image')";
}else{
this.hybridview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png";
}
this.hybridview.alt="View Hybrid Map";
this.hybridview.title="View Hybrid Map";
this.li3.appendChild(this.hybridview);
};
MQA.ViewControl.prototype=new MQA.Control();
MQA.ViewControl.prototype.constructor=MQA.ViewControl;
MQA.ViewControl.prototype.dispose=function(){
this.map=null;
this.type=null;
this.position=null;
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.eHybridMouseOut);
this.streetview.src="";
MQA.Util._deleteDOMObject(this.streetview);
this.streetview=null;
this.aerialview.src="";
MQA.Util._deleteDOMObject(this.aerialview);
this.aerialview=null;
this.hybridview.src="";
MQA.Util._deleteDOMObject(this.hybridview);
this.hybridview=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.li2.innerHTML=null;
this.li2.outerHTML="";
MQA.Util._deleteDOMObject(this.li2);
this.li2=null;
this.li3.innerHTML=null;
this.li3.outerHTML="";
MQA.Util._deleteDOMObject(this.li3);
this.li3=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.ViewControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.eHybridMouseOut);
this.elem.parentNode.removeChild(this.elem);
};
MQA.ViewControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
this.eStreetClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.streetview,"click",this.eStreetClick);
MQA._prEvent.observe(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.observe(this.streetview,"mouseout",this.eStreetMouseOut);
this.eArialClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.aerialview,"click",this.eArialClick);
MQA._prEvent.observe(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.eArialMouseOut);
this.eHybridClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.observe(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.observe(this.hybridview,"mouseout",this.eHybridMouseOut);
if(this.map.getMapType()==MQA.MAP_TYPE.MAP){
this.streetview.className="a";
}
if(this.map.getMapType()==MQA.MAP_TYPE.SAT){
this.aerialview.className="a";
}
if(this.map.getMapType()==MQA.MAP_TYPE.HYB){
this.hybridview.className="a";
}
};
MQA.ViewControl.prototype.eventmonitor=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
var _16=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
if(_16==this.streetview){
this.selectMode("street");
}
if(_16==this.aerialview){
this.selectMode("aerial");
}
if(_16==this.hybridview){
this.selectMode("hybrid");
}
break;
case "mouseover":
if(_16.className!="a"){
_16.className="o";
}
break;
case "mouseout":
if(_16.className!="a"){
_16.className="";
}
break;
}
};
MQA.ViewControl.prototype.updateControl=function(_17){
switch(_17){
case MQA.MAP_TYPE.MAP:
this.aerialview.className="";
this.hybridview.className="";
this.streetview.className="a";
break;
case MQA.MAP_TYPE.SAT:
this.hybridview.className="";
this.streetview.className="";
this.aerialview.className="a";
break;
case MQA.MAP_TYPE.HYB:
this.aerialview.className="";
this.streetview.className="";
this.hybridview.className="a";
break;
}
};
MQA.ViewControl.prototype.selectMode=function(_18){
var _19=this.map.getMapType();
var _1a="noChange";
if(_18=="street"&&_19!=MQA.MAP_TYPE.MAP){
_1a=MQA.MAP_TYPE.MAP;
}
if(_18=="aerial"&&_19!=MQA.MAP_TYPE.SAT){
_1a=MQA.MAP_TYPE.SAT;
}
if(_18=="hybrid"&&_19!=MQA.MAP_TYPE.HYB){
_1a=MQA.MAP_TYPE.HYB;
}
if(_1a!="noChange"){
this.map.setMapType(_1a);
}
};
MQA.ViewControl.prototype.getHeight=function(){
return 22;
};
MQA.ViewControl.prototype.getWidth=function(){
return 209;
};

