/*
 WEB-GIS PRO-GOROD ver. 0.2.2. Author Titov.V. All rights reserved.
*/
var swfobject=function(){function e(){if(!Q){try{var b=s.getElementsByTagName("body")[0].appendChild(A("span"));b.parentNode.removeChild(b)}catch(c){return}Q=true;b=U.length;for(var f=0;f<b;f++)U[f]()}}function d(b){if(Q)b();else U[U.length]=b}function m(b){if(typeof H.addEventListener!=r)H.addEventListener("load",b,false);else if(typeof s.addEventListener!=r)s.addEventListener("load",b,false);else if(typeof H.attachEvent!=r)E(H,"onload",b);else if(typeof H.onload=="function"){var c=H.onload;H.onload=
function(){c();b()}}else H.onload=b}function w(){da?t():n()}function t(){var b=s.getElementsByTagName("body")[0],c=A(I);c.setAttribute("type",V);var f=b.appendChild(c);if(f){var j=0;(function(){if(typeof f.GetVariable!=r){var k=f.GetVariable("$version");if(k){k=k.split(" ")[1].split(",");l.pv=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)]}}else if(j<10){j++;setTimeout(arguments.callee,10);return}b.removeChild(c);f=null;n()})()}else n()}function n(){var b=M.length;if(b>0)for(var c=0;c<b;c++){var f=
M[c].id,j=M[c].callbackFn,k={success:false,id:f};if(l.pv[0]>0){var p=v(f);if(p)if(F(M[c].swfVersion)&&!(l.wk&&l.wk<312)){a(f,true);if(j){k.success=true;k.ref=D(f);j(k)}}else if(M[c].expressInstall&&J()){k={};k.data=M[c].expressInstall;k.width=p.getAttribute("width")||"0";k.height=p.getAttribute("height")||"0";if(p.getAttribute("class"))k.styleclass=p.getAttribute("class");if(p.getAttribute("align"))k.align=p.getAttribute("align");var q={};p=p.getElementsByTagName("param");for(var z=p.length,C=0;C<
z;C++)if(p[C].getAttribute("name").toLowerCase()!="movie")q[p[C].getAttribute("name")]=p[C].getAttribute("value");B(k,q,f,j)}else{x(p);j&&j(k)}}else{a(f,true);if(j){if((f=D(f))&&typeof f.SetVariable!=r){k.success=true;k.ref=f}j(k)}}}}function D(b){var c=null;if((b=v(b))&&b.nodeName=="OBJECT")if(typeof b.SetVariable!=r)c=b;else if(b=b.getElementsByTagName(I)[0])c=b;return c}function J(){return!W&&F("6.0.65")&&(l.win||l.mac)&&!(l.wk&&l.wk<312)}function B(b,c,f,j){W=true;ba=j||null;ea={success:false,
id:f};var k=v(f);if(k){if(k.nodeName=="OBJECT"){S=u(k);X=null}else{S=k;X=f}b.id=fa;if(typeof b.width==r||!/%$/.test(b.width)&&parseInt(b.width,10)<310)b.width="310";if(typeof b.height==r||!/%$/.test(b.height)&&parseInt(b.height,10)<137)b.height="137";s.title=s.title.slice(0,47)+" - Flash Player Installation";j=l.ie&&l.win?"ActiveX":"PlugIn";j="MMredirectURL="+H.location.toString().replace(/&/g,"%26")+"&MMplayerType="+j+"&MMdoctitle="+s.title;if(typeof c.flashvars!=r)c.flashvars+="&"+j;else c.flashvars=
j;if(l.ie&&l.win&&k.readyState!=4){j=A("div");f+="SWFObjectNew";j.setAttribute("id",f);k.parentNode.insertBefore(j,k);k.style.display="none";(function(){k.readyState==4?k.parentNode.removeChild(k):setTimeout(arguments.callee,10)})()}y(b,c,f)}}function x(b){if(l.ie&&l.win&&b.readyState!=4){var c=A("div");b.parentNode.insertBefore(c,b);c.parentNode.replaceChild(u(b),c);b.style.display="none";(function(){b.readyState==4?b.parentNode.removeChild(b):setTimeout(arguments.callee,10)})()}else b.parentNode.replaceChild(u(b),
b)}function u(b){var c=A("div");if(l.win&&l.ie)c.innerHTML=b.innerHTML;else if(b=b.getElementsByTagName(I)[0])if(b=b.childNodes)for(var f=b.length,j=0;j<f;j++)!(b[j].nodeType==1&&b[j].nodeName=="PARAM")&&b[j].nodeType!=8&&c.appendChild(b[j].cloneNode(true));return c}function y(b,c,f){var j,k=v(f);if(l.wk&&l.wk<312)return j;if(k){if(typeof b.id==r)b.id=f;if(l.ie&&l.win){var p="";for(var q in b)if(b[q]!=Object.prototype[q])if(q.toLowerCase()=="data")c.movie=b[q];else if(q.toLowerCase()=="styleclass")p+=
' class="'+b[q]+'"';else if(q.toLowerCase()!="classid")p+=" "+q+'="'+b[q]+'"';q="";for(var z in c)if(c[z]!=Object.prototype[z])q+='<param name="'+z+'" value="'+c[z]+'" />';k.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+p+">"+q+"</object>";Y[Y.length]=b.id;j=v(b.id)}else{z=A(I);z.setAttribute("type",V);for(p in b)if(b[p]!=Object.prototype[p])if(p.toLowerCase()=="styleclass")z.setAttribute("class",b[p]);else p.toLowerCase()!="classid"&&z.setAttribute(p,b[p]);for(var C in c)c[C]!=
Object.prototype[C]&&C.toLowerCase()!="movie"&&G(z,C,c[C]);k.parentNode.replaceChild(z,k);j=z}}return j}function G(b,c,f){var j=A("param");j.setAttribute("name",c);j.setAttribute("value",f);b.appendChild(j)}function o(b){var c=v(b);if(c&&c.nodeName=="OBJECT")if(l.ie&&l.win){c.style.display="none";(function(){c.readyState==4?g(b):setTimeout(arguments.callee,10)})()}else c.parentNode.removeChild(c)}function g(b){if(b=v(b)){for(var c in b)if(typeof b[c]=="function")b[c]=null;b.parentNode.removeChild(b)}}
function v(b){var c=null;try{c=s.getElementById(b)}catch(f){}return c}function A(b){return s.createElement(b)}function E(b,c,f){b.attachEvent(c,f);R[R.length]=[b,c,f]}function F(b){var c=l.pv;b=b.split(".");b[0]=parseInt(b[0],10);b[1]=parseInt(b[1],10)||0;b[2]=parseInt(b[2],10)||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false}function N(b,c,f,j){if(!(l.ie&&l.mac)){var k=s.getElementsByTagName("head")[0];if(k){f=f&&typeof f=="string"?f:"screen";if(j)ca=K=null;
if(!K||ca!=f){j=A("style");j.setAttribute("type","text/css");j.setAttribute("media",f);K=k.appendChild(j);if(l.ie&&l.win&&typeof s.styleSheets!=r&&s.styleSheets.length>0)K=s.styleSheets[s.styleSheets.length-1];ca=f}if(l.ie&&l.win)K&&typeof K.addRule==I&&K.addRule(b,c);else K&&typeof s.createTextNode!=r&&K.appendChild(s.createTextNode(b+" {"+c+"}"))}}}function a(b,c){if(ga){c=c?"visible":"hidden";if(Q&&v(b))v(b).style.visibility=c;else N("#"+b,"visibility:"+c)}}function h(b){return/[\\\"<>\.;]/.exec(b)!=
null&&typeof encodeURIComponent!=r?encodeURIComponent(b):b}var r="undefined",I="object",V="application/x-shockwave-flash",fa="SWFObjectExprInst",H=window,s=document,O=navigator,da=false,U=[w],M=[],Y=[],R=[],S,X,ba,ea,Q=false,W=false,K,ca,ga=true,l=function(){var b=typeof s.getElementById!=r&&typeof s.getElementsByTagName!=r&&typeof s.createElement!=r,c=O.userAgent.toLowerCase(),f=O.platform.toLowerCase(),j=f?/win/.test(f):/win/.test(c);f=f?/mac/.test(f):/mac/.test(c);c=/webkit/.test(c)?parseFloat(c.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,
"$1")):false;var k=!+"\u000b1",p=[0,0,0],q=null;if(typeof O.plugins!=r&&typeof O.plugins["Shockwave Flash"]==I){if((q=O.plugins["Shockwave Flash"].description)&&!(typeof O.mimeTypes!=r&&O.mimeTypes[V]&&!O.mimeTypes[V].enabledPlugin)){da=true;k=false;q=q.replace(/^.*\s+(\S+\s+\S+$)/,"$1");p[0]=parseInt(q.replace(/^(.*)\..*$/,"$1"),10);p[1]=parseInt(q.replace(/^.*\.(.*)\s.*$/,"$1"),10);p[2]=/[a-zA-Z]/.test(q)?parseInt(q.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof H.ActiveXObject!=r)try{var z=
new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(z)if(q=z.GetVariable("$version")){k=true;q=q.split(" ")[1].split(",");p=[parseInt(q[0],10),parseInt(q[1],10),parseInt(q[2],10)]}}catch(C){}return{w3:b,pv:p,wk:c,ie:k,win:j,mac:f}}();(function(){if(l.w3){if(typeof s.readyState!=r&&s.readyState=="complete"||typeof s.readyState==r&&(s.getElementsByTagName("body")[0]||s.body))e();if(!Q){typeof s.addEventListener!=r&&s.addEventListener("DOMContentLoaded",e,false);if(l.ie&&l.win){s.attachEvent("onreadystatechange",
function(){if(s.readyState=="complete"){s.detachEvent("onreadystatechange",arguments.callee);e()}});H==top&&function(){if(!Q){try{s.documentElement.doScroll("left")}catch(b){setTimeout(arguments.callee,0);return}e()}}()}l.wk&&function(){Q||(/loaded|complete/.test(s.readyState)?e():setTimeout(arguments.callee,0))}();m(e)}}})();(function(){l.ie&&l.win&&window.attachEvent("onunload",function(){for(var b=R.length,c=0;c<b;c++)R[c][0].detachEvent(R[c][1],R[c][2]);b=Y.length;for(c=0;c<b;c++)o(Y[c]);for(var f in l)l[f]=
null;l=null;for(var j in swfobject)swfobject[j]=null;swfobject=null})})();return{registerObject:function(b,c,f,j){if(l.w3&&b&&c){var k={};k.id=b;k.swfVersion=c;k.expressInstall=f;k.callbackFn=j;M[M.length]=k;a(b,false)}else j&&j({success:false,id:b})},getObjectById:function(b){if(l.w3)return D(b)},embedSWF:function(b,c,f,j,k,p,q,z,C,T){var Z={success:false,id:c};if(l.w3&&!(l.wk&&l.wk<312)&&b&&c&&f&&j&&k){a(c,false);d(function(){f+="";j+="";var P={};if(C&&typeof C===I)for(var L in C)P[L]=C[L];P.data=
b;P.width=f;P.height=j;L={};if(z&&typeof z===I)for(var $ in z)L[$]=z[$];if(q&&typeof q===I)for(var aa in q)if(typeof L.flashvars!=r)L.flashvars+="&"+aa+"="+q[aa];else L.flashvars=aa+"="+q[aa];if(F(k)){$=y(P,L,c);P.id==c&&a(c,true);Z.success=true;Z.ref=$}else if(p&&J()){P.data=p;B(P,L,c,T);return}else a(c,true);T&&T(Z)})}else T&&T(Z)},switchOffAutoHideShow:function(){ga=false},ua:l,getFlashPlayerVersion:function(){return{major:l.pv[0],minor:l.pv[1],release:l.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(b,
c,f){if(l.w3)return y(b,c,f)},showExpressInstall:function(b,c,f,j){l.w3&&J()&&B(b,c,f,j)},removeSWF:function(b){l.w3&&o(b)},createCSS:function(b,c,f,j){l.w3&&N(b,c,f,j)},addDomLoadEvent:d,addLoadEvent:m,getQueryParamValue:function(b){var c=s.location.search||s.location.hash;if(c){if(/\?/.test(c))c=c.split("?")[1];if(b==null)return h(c);c=c.split("&");for(var f=0;f<c.length;f++)if(c[f].substring(0,c[f].indexOf("="))==b)return h(c[f].substring(c[f].indexOf("=")+1))}return""},expressInstallCallback:function(){if(W){var b=
v(fa);if(b&&S){b.parentNode.replaceChild(S,b);if(X){a(X,true);if(l.ie&&l.win)S.style.display="block"}ba&&ba(ea)}W=false}}}}(),json_parse=function(){var e,d,m={'"':'"',"\\":"\\","/":"/",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"},w,t=function(o){throw{name:"SyntaxError",message:o,at:e,text:w};},n=function(o){o&&o!==d&&t("Expected '"+o+"' instead of '"+d+"'");d=w.charAt(e);e+=1;return d},D=function(){var o;o="";if(d==="-"){o="-";n("-")}for(;d>="0"&&d<="9";){o+=d;n()}if(d===".")for(o+=".";n()&&d>="0"&&
d<="9";)o+=d;if(d==="e"||d==="E"){o+=d;n();if(d==="-"||d==="+"){o+=d;n()}for(;d>="0"&&d<="9";){o+=d;n()}}o=+o;if(isNaN(o))t("Bad number");else return o},J=function(){var o,g,v="",A;if(d==='"')for(;n();)if(d==='"'){n();return v}else if(d==="\\"){n();if(d==="u"){for(g=A=0;g<4;g+=1){o=parseInt(n(),16);if(!isFinite(o))break;A=A*16+o}v+=String.fromCharCode(A)}else if(typeof m[d]==="string")v+=m[d];else break}else v+=d;t("Bad string")},B=function(){for(;d&&d<=" ";)n()},x=function(){switch(d){case "t":n("t");
n("r");n("u");n("e");return true;case "f":n("f");n("a");n("l");n("s");n("e");return false;case "n":n("n");n("u");n("l");n("l");return null}t("Unexpected '"+d+"'")},u,y=function(){var o=[];if(d==="["){n("[");B();if(d==="]"){n("]");return o}for(;d;){o.push(u());B();if(d==="]"){n("]");return o}n(",");B()}}t("Bad array")},G=function(){var o,g={};if(d==="{"){n("{");B();if(d==="}"){n("}");return g}for(;d;){o=J();B();n(":");Object.hasOwnProperty.call(g,o)&&t('Duplicate key "'+o+'"');g[o]=u();B();if(d===
"}"){n("}");return g}n(",");B()}}t("Bad object")};u=function(){B();switch(d){case "{":return G();case "[":return y();case '"':return J();case "-":return D();default:return d>="0"&&d<="9"?D():x()}};return function(o,g){w=o;e=0;d=" ";o=u();B();d&&t("Syntax error");return typeof g==="function"?function v(A,E){var F,N,a=A[E];if(a&&typeof a==="object")for(F in a)if(Object.hasOwnProperty.call(a,F)){N=v(a,F);if(N!==undefined)a[F]=N;else delete a[F]}return g.call(A,E,a)}({"":o},""):o}}();
function Map(e){function d(){if(!e)throw"Map DOM object is not defined in constructor";if(typeof e=="string")throw"String is passed as argument to constructor";if(!swfobject)throw"SWF builder object is not defined in constructor";m()}function m(){var a=document.createElement("div");a.id="ProGorodMap";e.appendChild(a);var h={key:F,permalink:N},r={id:a.id,name:a.id};swfobject.switchOffAutoHideShow();swfobject.embedSWF("http://flash.tmcrussia.com/releases/0.2.2/Main.swf",a.id,"100%","100%","10.0","http://flash.tmcrussia.com/swf/expressInstall.swf",
h,{wmode:"opaque",align:"left",scale:"default",allowscriptaccess:"always"},r);FlashBridge.flashObj=document.getElementById(a.id);FlashBridge.mapObj=A;w(FlashBridge.flashObj)}function w(a){if(a){addHandler(a,"mouseover",t);addHandler(a,"mouseout",n)}}function t(a){window.addEventListener&&window.addEventListener("DOMMouseScroll",D,false);window.onmousewheel=document.onmousewheel=D}function n(a){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",D,false);window.onmousewheel=document.onmousewheel=
function(h){}}function D(a){var h=navigator.appVersion.toLowerCase().indexOf("mac")!=-1;h=navigator.appVersion.toLowerCase().indexOf("win")!=-1;h=window.opera==undefined?false:true;h=0;if(!a)a=window.event;if(a.wheelDelta)h=a.wheelDelta/120;else if(a.detail)h=-a.detail/3;h&&J(h);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();a.cancelBubble=true;a.cancel=true;a.returnValue=false}function J(a){FlashBridge.sendFlash("sendMouseWheelEvent",a)}function B(a){switch(a.type){case "point":g.points.push(a);
break;case "polyline":g.polylines.push(a);break;case "polygon":g.polygons.push(a);break;case "rectangle":g.rectangles.push(a);break;case "freeHand":g.freeHands.push(a);break}}function x(a){switch(a.type){case "point":delete g.points[a.id];break;case "polyline":delete g.polylines[a.id];break;case "polygon":delete g.polygons[a.id];break;case "rectangle":delete g.rectangles[a.id];break;case "freeHand":delete g.freeHands[a.id];break}}function u(a){if(a&&typeof a=="function")return true;return false}var y=
{lon:4187521,lat:7473956,z:10},G={slider:{enable:true,elements:{plus:"",minus:"",level:"",activeLevel:""}}},o={},g={points:[],polylines:[],polygons:[],rectangles:[],freeHands:[]};o=[];var v=[],A=this,E=false,F="e16a5f67e5cc3887282038bf6bc27657",N=null;this.mapZoomCallBack=this.mapMoveCallBack=this.freeHandCallBack=this.rectangleCallBack=this.polygonCallBack=this.polylineCallBack=this.pointCallBack=bboxCallback=null;this.sendException=function(a){alert(a);throw a;};this.getControls=function(){return G};this.setCenter=function(a){if(a&&
a.lon&&a.lat&&a.zoom){y.lon=a.lon;y.lat=a.lat;y.z=a.zoom}E&&FlashBridge.sendFlash("setCenter",y)};this.setControl=function(a,h){a=a.toString();if(a.indexOf("slider")==-1)G[a]=typeof h=="string"&&h.toString()!=""?{arg:h.toString()}:{};else for(el in h)G.slider.elements[el]=h[el]};this.unsetControl=function(a){var h=a.toString();if(G[a]!=undefined)G[a].enable=false};this.sendAjaxCallBack=function(a){var h=v[a.id];h!=undefined&&h.callBack(a.response);v[a.id]=null};this.sendCallBack=function(a){if(a.type)switch(a.type){case "point":u(this.pointCallBack)&&
this.pointCallBack(g.points);break;case "polyline":u(this.polylineCallBack)&&this.polylineCallBack(g.polylines);break;case "polygon":u(this.polygonCallBack)&&this.polygonCallBack(g.polygons);break;case "rectangle":u(this.rectangleCallBack)&&this.rectangleCallBack(g.rectangles);break;case "freeHand":u(this.freeHandCallBack)&&this.freeHandCallBack(g.freeHands);break;case "mapMove":u(this.mapMoveCallBack)&&this.mapMoveCallBack(a.coords);break;case "mapZoom":u(this.mapZoomCallBack)&&this.mapZoomCallBack(a.coords);
break;case "onPointClick":(a=g.points[a.id])&&a.onClick&&u(a.onClick)&&a.onClick(a);break;case "onPointOver":(a=g.points[a.id])&&a.onMouseOver&&u(a.onMouseOver)&&a.onMouseOver(a);break;case "onPointOut":(a=g.points[a.id])&&a.onMouseOut&&u(a.onMouseOut)&&a.onMouseOut(a);break}};this.createGeometry=function(a,h){B(a);!h&&E&&FlashBridge.sendFlash("createGeometry",a);this.sendCallBack(a)};this.deleteGeometry=function(a){if(typeof a=="string"&&a=="all"){for(el in g)for(var h=0;h<g[el].length;h++){var r=
{type:el.substring(0,el.length-1),id:h};x(r);E&&FlashBridge.sendFlash("deleteGeometry",r)}return true}else if(typeof a=="object"&&a.type!=undefined)if(a.id!=undefined){x(a);E&&FlashBridge.sendFlash("deleteGeometry",a)}else{var I=this.getGeometry(a);for(h=0;h<I.length;h++){r={type:a.type,id:h};x(r);E&&FlashBridge.sendFlash("deleteGeometry",r)}}};this.getGeometry=function(a){var h=null;if(a=="all")return g;switch(a.type){case "point":h=g.points;break;case "polyline":h=g.polylines;break;case "polygon":h=
g.polygons;break;case "rectangle":h=g.rectangles;break;case "freeHand":h=g.freeHands;break}if(h&&a.id!=undefined)h=h[a.id];return h};this.updateGeometry=function(a){id=a.id;delete a.id;switch(a.type){case "point":g.points[id]=a;break;case "polyline":g.polylines[id].points=a.points;break;case "polygon":g.polygons[id].points=a.points;break;case "rectangle":g.rectangles[id].points=a.points;break}this.sendCallBack(a)};this.hideGeometry=function(){FlashBridge.sendFlash("hideGeometry","hide")};this.showGeometry=
function(){FlashBridge.sendFlash("hideGeometry","show")};this.addPointToGeometry=function(a){var h;if(a.type=="polyline")h=g.polylines[a.id];else if(a.type=="polygon")h=g.polygons[a.id];if(h!=undefined){h.points.push({lon:a.lon,lat:a.lat});FlashBridge.sendFlash("addPointToGeometry",a);this.sendCallBack(a)}};this.updatePoint=function(a){var h;if(a.type=="polyline")h=g.polylines[a.id].points[a.pointId];else if(a.type=="poligon")h=g.poligons[a.id].points[a.pointId];else if(a.type=="point")h=g.points[a.id];
if(h){if(a.lon&&a.lat){h.lon=a.lon;h.lat=a.lat}FlashBridge.sendFlash("updatePoint",a);this.sendCallBack(a)}};this.setStyle=function(a){a&&a.type&&FlashBridge.sendFlash("setStyle",a)};this.parseLog=function(a){if(a.type&&(a.url||a.str))FlashBridge.sendFlash("logParse",a)};this.search=function(a,h){if(typeof a=="object"&&a.type){a.callBack=function(r){u(h)&&r!=null&&h(json_parse(r))};this.ajax(a)}};this.ajax=function(a){var h=v.length;a.id=h;E&&FlashBridge.sendFlash("sendRequest",a);v[h]=a};this.getPreSet=
function(){var a=null;if(E==false){a={coords:y,controls:this.getControls(),geometry:this.getGeometry("all"),requests:v};E=true}return a};this.getBboxCoords=function(){return FlashBridge.sendFlash("getBboxCoords",true)};this.screenShot=function(){};this.screenShot.getScreen=function(a){return FlashBridge.sendFlash("getScreenShot",{type:"buffer",quality:a||20})};this.screenShot.printMap=function(){FlashBridge.sendFlash("getScreenShot",true)};this.screenShot.getSVGFreeHand=function(){return FlashBridge.sendFlash("getSVGFromFreeHand",
true)};d()}function FlashBridge(){}FlashBridge.mapObj=null;FlashBridge.flashObj=null;FlashBridge.receiveFlash=function(e,d){if(this.mapObj!=null&&e!=""&&d!=null){var m=this.mapObj;switch(e.toString()){case "exception":m.sendException(d);break;case "getPreSet":return m.getPreSet();case "addGeometry":m.createGeometry(d,true);break;case "updateGeometry":m.updateGeometry(d);break;case "receiveRequest":m.sendAjaxCallBack(d);break;case "sendCallBack":m.sendCallBack(d);break}}};
FlashBridge.sendFlash=function(e,d){if(this.mapObj!=null&&this.flashObj!=null&&e!=""&&d!=null){var m=this.flashObj;switch(e.toString()){case "setCenter":m.setCenter(d);break;case "deleteGeometry":m.deleteGeometry(d);break;case "createGeometry":m.createGeometry(d);break;case "addPointToGeometry":m.addPointToGeometry(d);break;case "logParse":m.logParse(d);break;case "updatePoint":m.updatePoint(d);break;case "setStyle":m.setStyle(d);break;case "getBboxCoords":return m.getBboxCoords();case "sendMouseWheelEvent":m.sendMouseWheelEvent(d);
break;case "sendRequest":m.sendRequest(d);break;case "getScreenShot":return m.getScreenShot(d);case "getSVGFromFreeHand":return m.getSVGFromFreeHand(d);case "hideGeometry":m.hideGeometry(d);break}}};function addHandler(e,d,m){if(typeof e.addEventListener!="undefined")e.addEventListener(d,m,false);else if(typeof e.attachEvent!="undefined")e.attachEvent("on"+d,m);else throw"Incompatible browser";}
function removeHandler(e,d,m){if(typeof e.removeEventListener!="undefined")e.removeEventListener(d,m,false);else if(typeof e.detachEvent!="undefined")e.detachEvent("on"+d,m);else throw"Incompatible browser";}var PI=3.14159265358979;function deg_rad(e){return e*(PI/180)}function deg_decimal(e){return e/PI*180}function merc_x(e){return 6378137*deg_rad(e)}function from_merc_x(e){return deg_decimal(e/6378137)}
function merc_y(e){if(e>89.5)e=89.5;if(e<-89.5)e=-89.5;var d=Math.sqrt(0.006694380004260925);e=deg_rad(e);var m=Math.sin(e);m=d*m;m=Math.pow((1-m)/(1+m),0.5*d);d=Math.tan(0.5*(PI*0.5-e))/m;return 0-6378137*Math.log(d)}
function from_merc_y(e){var d=Math.sqrt(0.006694380004260925);e=Math.exp(-e/6378137);var m,w,t;m=0.5*d;w=1.5707963267948966-2*Math.atan(e);var n=15;for(t=0.1;Math.abs(t)>1.0E-7&&--n>0;){t=d*Math.sin(w);t=1.5707963267948966-2*Math.atan(e*Math.pow((1-t)/(1+t),m))-w;w+=t}return deg_decimal(w)}function TimeToDegreesLon(e){var d=new Number(e.substr(0,3));e=new Number(e.substr(3));return d+e/60}function TimeToDegreesLat(e){var d=new Number(e.substr(0,2));e=new Number(e.substr(2));return d+e/60}
function distVincenty(e,d,m,w){var t={},n={};t.lon=deg_rad(e);t.lat=deg_rad(d);n.lon=deg_rad(m);n.lat=deg_rad(w);e=1/298.257223563;d=n.lon-t.lon;t=Math.atan((1-e)*Math.tan(t.lat));w=Math.atan((1-e)*Math.tan(n.lat));n=Math.sin(t);t=Math.cos(t);m=Math.sin(w);w=Math.cos(w);for(var D=d,J=2*Math.PI,B=20;Math.abs(D-J)>1.0E-12&&--B>0;){var x=Math.sin(D),u=Math.cos(D),y=Math.sqrt(w*x*w*x+(t*m-n*w*u)*(t*m-n*w*u));if(y==0)return 0;u=n*m+t*w*u;var G=Math.atan2(y,u),o=t*w*x/y,g=1-o*o;x=u-2*n*m/g;if(isNaN(x))x=
0;var v=e/16*g*(4+e*(4-3*g));J=D;D=d+(1-v)*e*o*(G+v*y*(x+v*u*(-1+2*x*x)))}if(B==0)return NaN;g=g*2.723316066819453E11/4.0408299984087055E13;e=g/1024*(256+g*(-128+g*(74-47*g)));y=6356752.3142*(1+g/16384*(4096+g*(-768+g*(320-175*g))))*(G-e*y*(x+e/4*(u*(-1+2*x*x)-e/6*x*(-3+4*y*y)*(-3+4*x*x))));return y=y.toFixed(3)}Array.prototype.find=function(e){var d=false;for(i=0;i<this.length;i++)if(typeof e=="function"){if(e.test(this[i])){d||(d=[]);d.push(i)}}else if(this[i]===e){d||(d=[]);d.push(i)}return d};
