var a;if(typeof MQA=="undefined")MQA={};if(typeof MQA.Common=="undefined")MQA.Common={};MQA.createXMLDoc=function(b){var c;if(document.implementation.createDocument){c=new window.DOMParser;if(MQA.BrowserInfo.isSafari)b=b.replace(/&/g,"&amp;");c=c.parseFromString(b,"text/xml")}else if(window.ActiveXObject){c=new window.ActiveXObject("Microsoft.XMLDOM");c.async="false";c.loadXML(b)}return c};mqCreateXMLDoc=MQA.createXMLDoc;
MQA.createXMLDocFromNode=function(b){var c;b=b.documentElement;if(document.implementation.createDocument){c=document.implementation.createDocument("","",null);try{c.appendChild(c.importNode(b,true))}catch(h){alert(h);alert(b.nodeName)}}else if(window.ActiveXObject){c=new ActiveXObject("Microsoft.XMLDOM");c.async="false";c.loadXML(b.xml)}return c};mqCreateXMLDocFromNode=MQA.createXMLDocFromNode;
MQA.Browser=function(){this.platform=this.isSafari=this.isDOM=this.isIE5=this.isIE4=this.isIE=this.isNS6=this.isNS4=this.isNS=this.vMajor=this.appVersion=this.appname=this.os=this.version=this.name=null};MQBrowser=MQA.Browser;
MQA.getBrowserInfo=function(){var b=new MQA.Browser;b.name=b.version=b.os="unknown";var c=window.navigator.userAgent.toLowerCase(),h=window.navigator.appName,i=window.navigator.appVersion,e=new Array("firefox","msie","netscape","opera","safari"),f=new Array("linux","mac","windows","x11"),g=e.length,d="",j=0;for(g=g;j<g;j++){d=c.indexOf(e[j])+1;if(d>0){b.name=e[j];d=d+b.name.length;var n=b.name=="safari"||c.charAt(d+4)>0&&c.charAt(d+4)<9?5:3;b.version=c.substring(d,d+n)}}d=f.length;e=0;for(j=d;e<j;e++){d=
c.indexOf(f[e])+1;if(d>0)b.os=f[e]}if(h=="Netscape")b.appname="ns";else if(h=="Microsoft Internet Explorer")b.appname="ie";b.appVersion=i;b.vMajor=parseInt(b.appVersion);b.isNS=b.appname=="ns"&&b.vMajor>=4;b.isNS4=b.appname=="ns"&&b.vMajor==4;b.isNS6=b.appname=="ns"&&b.vMajor==5;b.isIE=b.appname=="ie"&&b.vMajor>=4;b.isIE4=b.appVersion.indexOf("MSIE 4")>0;b.isIE5=b.appVersion.indexOf("MSIE 5")>0;b.isDOM=document.createElement&&document.appendChild&&document.getElementsByTagName?true:false;b.isSafari=
b.name=="safari";b.platform=c.indexOf("win")>-1?"win":c.indexOf("mac")>-1?"mac":"other";return b};mqGetBrowserInfo=MQA.getBrowserInfo;MQA.BrowserInfo=MQA.getBrowserInfo();MQA.Object=function(){var b=null;this.getM_XmlDoc=function(){return b};this.setM_XmlDoc=function(h){b=h};var c=null;this.getM_Xpath=function(){return c};this.setM_Xpath=function(h){c=h}};a=MQA.Object.prototype;a.getClassName=function(){return"MQObject"};a.getObjectVersion=function(){return 0};
a.setProperty=function(b,c){var h;h=b!==null?"/"+this.getM_Xpath()+"/"+b:"/"+this.getM_Xpath();var i=mqSetNodeText(this.getM_XmlDoc(),h,c);if(i===null){b=this.getM_XmlDoc().createElement(b);b=this.getM_XmlDoc().documentElement.appendChild(b);i=mqSetNodeText(this.getM_XmlDoc(),h,c)}return i};a.getProperty=function(b){b=b!==null?"/"+this.getM_Xpath()+"/"+b:"/"+this.getM_Xpath();return mqGetXPathNodeText(this.getM_XmlDoc(),b)};a.copy=function(){var b=new this.constructor;b.loadXml(this.saveXml());return b};
a.internalCopy=function(b){var c="<"+b.getM_Xpath();if(this.getObjectVersion()>0)c=c+' Version="'+this.getObjectVersion()+'"';c+=">";var h=this.getM_XmlDoc().documentElement;h=h.childNodes;for(var i=h.length,e=0;e<i;e++)c+=mqXmlToStr(h[e]);c=c+"</"+b.getM_Xpath()+">";b=new this.constructor;b.loadXml(c);return b};MQObject=MQA.Object;
MQA.Point=function(b,c){this.y=this.x=0;this.setM_Xpath("Point");if(arguments.length==1)this.setM_Xpath(b);else if(arguments.length==2){this.x=parseInt(b);this.y=parseInt(c);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;a=MQA.Point.prototype;a.constructor=MQA.Point;
a.getClassName=function(){return"MQPoint"};a.getObjectVersion=function(){return 0};a.loadXml=function(b){if("undefined"!==typeof mqutils){this.setM_XmlDoc(MQA.createXMLDoc(b));this.x=this.getProperty("X");this.y=this.getProperty("Y")}};a.saveXml=function(){return"<"+this.getM_Xpath()+"><X>"+this.x+"</X><Y>"+this.y+"</Y></"+this.getM_Xpath()+">"};a.setX=function(b){this.x=parseInt(b);if(isNaN(this.x))throw new Error("MQPoint.setX called with invalid parameter");};a.getX=function(){return this.x};
a.setY=function(b){this.y=parseInt(b);if(isNaN(this.y))throw new Error("MQPoint.setY called with invalid parameter");};a.getY=function(){return this.y};a.setXY=function(b,c){this.x=parseInt(b);this.y=parseInt(c);if(isNaN(this.x)||isNaN(this.y))throw new Error("MQPoint.setXY called with invalid parameter");};a.valid=function(){if("undefined"!==typeof mqutils)return Math.abs(this.x!=MQCONSTANT.MQPOINT_INVALID)&&Math.abs(this.y!=MQCONSTANT.MQPOINT_INVALID);return false};
a.equals=function(b){if(b)return this.x===b.x&&this.y===b.y;return false};a.toString=function(){return this.x+","+this.y};MQPoint=MQA.Point;
MQA.LatLng=function(b,c){MQA.Object.call(this);this.lng=this.lat=0;this.setM_Xpath("LatLng");if(arguments.length==1)this.setM_Xpath(b);else if(arguments.length==2){this.lat=parseFloat(b);this.lng=parseFloat(c);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;
a=MQA.LatLng.prototype;a.constructor=MQA.LatLng;a.getClassName=function(){return"MQLatLng"};a.getObjectVersion=function(){return 0};a.loadXml=function(b){if("undefined"!==typeof mqutils){this.setM_XmlDoc(MQA.createXMLDoc(b));this.lat=this.getProperty("Lat");this.lng=this.getProperty("Lng")}};a.saveXml=function(){return"<"+this.getM_Xpath()+"><Lat>"+this.lat+"</Lat><Lng>"+this.lng+"</Lng></"+this.getM_Xpath()+">"};
a.setLatitude=function(b){this.lat=parseFloat(b);if(isNaN(this.lat))throw new Error("MQA.LatLng.setLatitude called with invalid parameter");};a.getLatitude=function(){return this.lat};a.setLongitude=function(b){this.lng=parseFloat(b);if(isNaN(this.lng))throw new Error("MQA.LatLng.setLongitude called with invalid parameter");};a.getLongitude=function(){return this.lng};
a.setLatLng=function(b,c){this.lat=parseFloat(b);this.lng=parseFloat(c);if(isNaN(this.lat)||isNaN(this.lng))throw new Error("MQA.LatLng.setLatLng called with invalid parameter");};
a.arcDistance=function(b,c){if("undefined"!==typeof mqutils){if(b){if(b.getClassName()!=="MQLatLng"){alert("failure in arcDistance");throw"failure in arcDistance";}}else{alert("failure in arcDistance");throw"failure in arcDistance";}if(c)mqIsClass("MQDistanceUnits",c,false);else c=new MQDistanceUnits(MQCONSTANT.MQDISTANCEUNITS_MILES);if(this.getLatitude()==b.getLatitude()&&this.getLongitude()==b.getLongitude())return 0;var h=b.getLongitude()-this.getLongitude(),i=MQCONSTANT.MQLATLNG_RADIANS*(90-this.getLatitude());
b=MQCONSTANT.MQLATLNG_RADIANS*(90-b.getLatitude());h=Math.cos(i)*Math.cos(b)+Math.sin(i)*Math.sin(b)*Math.cos(MQCONSTANT.MQLATLNG_RADIANS*h);c=c.getValue()===MQCONSTANT.MQDISTANCEUNITS_MILES?3963.205:6378.160187;return h<-1?MQCONSTANT.PI*c:h>=1?0:Math.acos(h)*c}return-1};
a.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};a.equals=function(b){if(b!==null)return this.getLongitude()===b.getLongitude()&&this.getLatitude()===b.getLatitude();return false};a.toString=function(){return this.lat+","+this.lng};MQLatLng=MQA.LatLng;
MQA.XMLDOC=function(){this.ZOOMTORECTLATLNG=this.ZOOMTORECT=this.ZOOMTO=this.ZOOMOUT=this.ZOOMIN=this.PAN=this.CENTERLATLNG=this.CENTER=this.BESTFITLL=this.BESTFIT=this.FEATURESPECIFIER=this.DTFEATURESTYLEEX=this.DTSTYLEEX=this.DTSTYLE=this.SESSIONID=this.SESSION=this.MAPSTATE=this.RECORDSET=this.COVERAGESTYLE=this.GEOCODEOPTIONSCOLLECTION=this.FEATURESPECIFIERCOLLECTION=this.TREKROUTECOLLECTION=this.POINTCOLLECTION=this.PRIMITIVECOLLECTION=this.FEATURECOLLECTION=this.STRCOLCOLLECTION=this.STRINGCOLLECTION=
this.SIGNCOLLECTION=this.MANEUVERCOLLECTION=this.LOCATIONCOLLECTIONCOLLECTION=this.LOCATIONCOLLECTION=this.LATLNGCOLLECTION=this.DTCOLLECTION=this.INTCOLLECTION=this.TREKROUTE=this.SIGN=this.CORRIDORSEARCHCRITERIA=this.POLYSEARCHCRITERIA=this.RECTSEARCHCRITERIA=this.RADIUSSEARCHCRITERIA=this.ROUTEMATRIXRESULTS=this.ROUTERESULTS=this.ROUTEOPTIONS=this.MANEUVER=this.GEOCODEOPTIONS=this.GEOADDRESS=this.SINGLELINEADDRESS=this.ADDRESS=this.LOCATION=this.POLYGONFEATURE=this.LINEFEATURE=this.POINTFEATURE=
this.POINT=this.LATLNG=this.SYMBOLPRIMITIVE=this.TEXTPRIMITIVE=this.ELLIPSEPRIMITIVE=this.RECTANGLEPRIMITIVE=this.POLYGONPRIMITIVE=this.LINEPRIMITIVE=this.DBLAYERQUERY=this.AUTOMAPCOVSWITCH=this.AUTOROUTECOVSWITCH=this.AUTOGEOCODECOVSWITCH=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(b){MQA.Object.call(this);var c=[];this.getM_Items=function(){return c};var h=b!==null?b:-1,i="MQObject";this.getValidClassName=function(){return i};this.setValidClassName=function(f){i=f};this.add=function(f){if(this.isValidObject(f))if(!(h!==-1&&c.length===b)){c.push(f);return c.length}};this.getSize=function(){return c.length};this.get=function(f){return c[f]};this.remove=function(f){return c.splice(f,1)};this.removeAll=function(){c=null;c=[]};this.contains=function(f){for(var g=
this.getSize(),d=0;d<g;d++)if(c[d]===f)return true;return false};this.append=function(f){if(this.getClassName()===f.getClassName())c=c.concat(f.getM_Items());else{alert("Invalid attempt to append "+this.getClassName()+" to "+f.getClassName()+"!");throw"Invalid attempt to append "+this.getClassName()+" to "+f.getClassName()+"!";}};this.set=function(f,g){var d=get(f);c[f]=g;return d};this.isValidObject=function(f){if(f!==null)if(i==="ALL")return true;else if(i==="MQObject")return true;else if(i==="String")return true;
else if(i==="int")if(isNaN(f))return false;else{if(f===Math.floor(f))return true}else if(f.getClassName()===i)return true;return false};var e="Item";this.getM_itemXpath=function(){return e};this.setM_itemXpath=function(f){e=f};this.getById=function(f){try{for(var g=0;g<this.getSize();g++)if(c[g].getId()==f)return c[g]}catch(d){}return null};this.removeItem=function(f){for(var g=0;g<c.length;g++)if(c[g]==f){this.remove(g);g=c.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(b){return this.get(b)};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);a=MQA.LatLngCollection.prototype;a.constructor=MQA.LatLngCollection;a.getClassName=function(){return"MQLatLngCollection"};a.getObjectVersion=function(){return 1};a.loadXml=function(b){this.removeAll();b=MQA.createXMLDoc(b);this.setM_XmlDoc(b);b!==null&&this._loadCollection(b)};a.loadXmlFromNode=function(b){this.removeAll();b=mqCreateXMLDocImportNode(b);this.setM_XmlDoc(b);b!==null&&this._loadCollection(b)};
a._loadCollection=function(b){b=b.documentElement;b=b.childNodes;var c=b.length;c=c<32678?c:32678;var h=0,i=0,e=0,f=0,g=null;if(this.getValidClassName()==="MQLatLng")for(var d=0;d<c;d++){if(d==0){if(b[d].firstChild!==null)e=b[d].firstChild.nodeValue/1000000;d++;if(b[d].firstChild!==null)f=b[d].firstChild.nodeValue/1000000}else{if(b[d].firstChild!==null)e=h+b[d].firstChild.nodeValue/1000000;d++;if(b[d].firstChild!==null)f=i+b[d].firstChild.nodeValue/1000000}h=e;i=f;g=new MQA.LatLng(e,f);this.add(g)}};
a.saveXml=function(){var b="<"+this.getM_Xpath()+' Version="'+this.getObjectVersion()+'" Count="'+this.getSize()+'">',c=parseInt(this.getSize());if(c>=1)for(var h=nLng=nPrevLat=nPrevLng=nDeltaLat=nDeltaLng=0,i=null,e=0;e<c;e++){i=this.getAt(e);h=parseInt(i.getLatitude()*1000000);nLng=parseInt(i.getLongitude()*1000000);nDeltaLat=h-nPrevLat;nDeltaLng=nLng-nPrevLng;b+="<Lat>"+nDeltaLat+"</Lat>";b+="<Lng>"+nDeltaLng+"</Lng>";nPrevLat=h;nPrevLng=nLng}return b=b+"</"+this.getM_Xpath()+">"};
a.generalize=function(b){function c(){this.pLL=null;this.dPriorLength=this.dSegmentLength=0}function h(){this.pLL=null;this.ulOriginalPoint=0}mqllAnchor=null;var i,e;i=0;var f=this.getSize(),g=new Array(f),d=new Array(f),j=0;if(!(f<2)){for(e=0;e<f;e++){g[e]=new c;d[e]=new h;g[e].pLL=this.getAt(e)}for(e=0;e<f-1;e++){g[e].dSegmentLength=g[e].pLL.arcDistance(g[e+1].pLL);g[e].dPriorLength=e==0?0:i;i+=g[e].dSegmentLength}mqllAnchor=g[0].pLL;i=0;d[0].pLL=mqllAnchor;d[0].ulOriginalPoint=0;j=1;for(e=2;e<
f;e++)if(!this.isEverybodyWithinDeviation(g,i,e,b)){mqllAnchor=g[e-1].pLL;i=e-1;d[j].pLL=mqllAnchor;d[j].ulOriginalPoint=e-1;j++}d[j].pLL=g[f-1].pLL;d[j].ulOriginalPoint=f-1;j++;b=f;for(j=j-1;j>=0;j--)if(b-1!=d[j].ulOriginalPoint){for(b=b-1;b>d[j].ulOriginalPoint;b--)try{this.remove(b)}catch(n){}b=d[j].ulOriginalPoint}else b--;d=g=null}};
a.isEverybodyWithinDeviation=function(b,c,h,i){var e=0,f=0,g=null,d=null,j=0,n=d=0,l=null,k=0,m=0;l=k=m=k=k=l=0;e=MQA.DistanceApproximation.getMilesPerLngDeg(b[c].pLL.getLatitude());f=i*i;g=b[c].pLL;d=b[h].pLL;j=(d.getLatitude()-g.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;d=(d.getLongitude()-g.getLongitude())*e;n=j*j+d*d;for(c=c+1;c<h;c++){l=b[c].pLL;k=(l.getLatitude()-g.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;m=(l.getLongitude()-g.getLongitude())*e;l=k*k+m*m;
k=j*k+d*m;m=j*j+d*d;k=m==0?0:k/m;k=k*k*n;l=l-k;if(l>f)return false}return true};MQLatLngCollection=MQA.LatLngCollection;
MQA.DistanceApproximation=new (function(){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(b){return Math.abs(b)<=90?this.m_milesPerLngDeg[parseInt(Math.abs(b)+0.5)]:69.170976}});DistanceApproximation=MQA.DistanceApproximation;