function VrMGG(KNIVMW,OmnDJ,R7w5Rj){ this.pNsf7=dijit.getUniqueId("insertLang"); this.OmnDJ=OmnDJ; this.R7w5Rj=R7w5Rj; this.KNIVMW=KNIVMW; this.UiH(); }; VrMGG.prototype={ Cw2: {"en":true,"it":true,"de":true,"fr":true}, HrJ267: DY1Qh, UiH: function(){ var domain=this; var KqLsE4 = { "lang": tmwLang, "id": this.pNsf7 }; this.CNCCjoj=new dijit.TooltipDialog({ "content":dojo.string.substitute(this.HrJ267, KqLsE4), "execute": dojo.hitch(this, this.setValue), "onOpen": dojo.hitch(this,this.TUUiY) }); this.Z376q = new dijit.form.DropDownButton({ "label": EDITOR_EDIT_PROPS_ADDLANG_TITLE+" (Default)", "dropDown": this.CNCCjoj },this.KNIVMW); this.Z376q.startup(); dojo.connect(dijit.byId(KqLsE4.id+"_edaddlngSelect"),"onChange",this,this.l03LLRs); }, setValue: function(O62UW,TA7YVK){ if (this.wV6Z && !TA7YVK) return; var lang, kzgG=[]; if (O62UW["chosenLang"]=="oth"){ if (O62UW["langInput"] in this.Cw2){ lang=O62UW["langInput"]; } else { lang=tmwLang; this.CNCCjoj.attr("chosenLang",tmwLang); }; } else lang=O62UW["chosenLang"]; if (this.R7w5Rj && this.dxI6oG8!==false){ var ndx=(this.dxI6oG8=="none"?"Default":this.dxI6oG8); var text=this.R7w5Rj(); this.KoKasl[ndx]=text; } if (this.OmnDJ){ var ndx=(lang=="none"?"Default":lang); this.OmnDJ(this.KoKasl[ndx]); } for(var n in this.KoKasl){ if ((this.KoKasl[n]||"").length>0){ kzgG.push(n); }; } kzgG=kzgG.join(","); this.kzgG=kzgG; if (kzgG.length>0){ kzgG="["+kzgG+"] "; } this.Z376q.attr("label",EDITOR_EDIT_PROPS_ADDLANG_TITLE+" "+kzgG+"("+ (lang=="none"?"Default":lang)+")" ); this.dxI6oG8=lang; }, TUUiY: function(){ try { dojo.byId(this.pNsf7+"_usedlang").innerHTML= (this.kzgG.length>0?this.kzgG:"n/a"); }catch(err){} }, l03LLRs: function(eR5){ var B5bh=dojo.byId(this.pNsf7+"_TRlangInput"); if (B5bh){ dojo.style(B5bh,"display",(eR5!="oth"?"none":"block")); } }, setCache: function(KoKasl){ delete this.KoKasl; this.KoKasl=KoKasl||{}; this.dxI6oG8=false; this.wV6Z=true; var ndx=false; if ((KoKasl["Default"]||"").length>0) ndx="Default"; else if ((KoKasl[tmwLang]||"").length>0) ndx=tmwLang; else { for(var n in KoKasl){ if ((KoKasl[n]||"").length>0){ ndx=n; break; }; }; } var mNJCv, K4otE; if (ndx!==false){ if (ndx=="Default"){ mNJCv="none"; K4otE=""; } else { if (ndx in this.Cw2){ mNJCv=ndx; K4otE=""; } else { mNJCv="oth"; K4otE=ndx; }; }; } else { K4otE=""; mNJCv="none"; } this.CNCCjoj.attr("langInput",K4otE); this.CNCCjoj.attr("chosenLang",mNJCv); this.setValue({ "langInput": K4otE, "chosenLang": mNJCv },true); var domain=this; setTimeout(function(){ delete domain.wV6Z; },100); }, pack: function(){ var ZYTK="",ndx,text; if (this.R7w5Rj && this.dxI6oG8!==false){ ndx=(this.dxI6oG8=="none"?"Default":this.dxI6oG8); text=this.R7w5Rj(); this.KoKasl[ndx]=text; } for(ndx in this.KoKasl){ text=(this.KoKasl[ndx]||"").replace(/^\s+|\s+$/g,""); if (text.replace(/^(\s*?\s*?\n?)*/g,"").length>0){ if (ndx=="Default"){ ZYTK+=text+"\n"; } else { ZYTK+="[LANG="+ndx+"]\n"+text+"\n[/LANG]\n"; }; }; } return ZYTK; } }; var MCHPQ={"asus":1, "newadmin":1, "balla":1},Qjhr={}, GbVLQJ="http://widget.mibbit.com/?settings=51cee107e8b2c21c54500a61d1415030&server=tophost.azzurra.org&channel=%23TraceMyWorld&nick=tmw%60${me}&autoConnect=true&delay=4&rcharset=ISO-8859-15", MkGHT=true, VRRPHT=true, BWH=true, cHLrX=120, d0bGC22="p0wel", usJT067="p0routes", tMR="p0races", TUVG="p0upload", dHlF3="p2", tracker=null, NNDV6={}, pNg47Oq, lddDKY, J47E, tmactive, U7Rc, uBB4M1, ndk, kQG6={}, _rfilter, b2j27, JWVFGJY={}, YM4NV, ouMDXD=dojo.subscribe("p0tc0-selectChild", aCPrRbi), QwM3yd=dojo.subscribe("p0weltc-selectChild", loV1Zx), e4RxOg, W4SsEt, YFSFW, PMP=null, addthis_config={ "ui_language": tmwLang, "ui_delay": 800, "data_use_flash": false, "services_compact": "twitter,facebook,gmail,google,myspace,email,digg,delicious,print,technorati" }, addthis_share={ "templates": { "twitter": ePK+": {{url}} (@tracemyworld.com)" } }, CKV13M,GFtJNB,Iryre1,a12,GaW9Jj=[]; ; function aCPrRbi(KnsE){ if (KnsE.id=="tmwrtSaverPanel" || KnsE.id=="p0msg") { } else { } if (tmactive && tmactive.C8Uc9){ tmactive.C8Uc9.M5HfPM(); tmactive=null; } switch (KnsE.id){ case "p0routes": if (!pNg47Oq) { KnsE.attr("onLoad",function(){ console.log("p1 initialized"); if (window.ZYLWS){ if (ZYLWS!=2){ var p=dojo.byId("p1bc1"); if (p){ dojo.style(p,"display","none"); }; } pNg47Oq.GQOVe4(false); } setTimeout(function(){ dijit.byId("p1bc0").layout(); dijit.byId("p1bc1").layout(); KnsE["tmwloaded"]=true; LLn5j(); tmw.util.waitForObjProp(window,"p1_storeReady",this,function(){ dojo.style(dojo.byId("p1pl0"),"display","none"); dojo.style(dojo.byId("p1wrapper"),"left","0px"); pNg47Oq.C8Uc9.Fh4u9(pNg47Oq.C8Uc9.o47sO8); },30000); },2000); delete window.ZYLWS; }); KnsE.attr("href",tmw.local.p1hr); } if (pNg47Oq && pNg47Oq.C8Uc9) { pNg47Oq.C8Uc9.r1EDRVU(); pNg47Oq.C8Uc9.Fh4u9(pNg47Oq.C8Uc9.o47sO8); tmactive=pNg47Oq; } dojo.style(dojo.byId("tmwAppDockBar2"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar1"),"display","block"); dojo.style(dojo.byId("tmwAppDockBar4"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar3"),"display","block"); tmw.util.trackPage("/app/p1"); break; case "p0races": if (!lddDKY){ KnsE.attr("onLoad",function(){ console.log("p2 initialized"); if (window.aC4p){ if (aC4p!=2){ var p=dojo.byId("p2bc1"); if (p){ dojo.style(p,"display","none"); }; } lddDKY.GQOVe4(false); } setTimeout(function(){ dijit.byId("p2bc0").layout(); dijit.byId("p2bc1").layout(); KnsE["tmwloaded"]=true; vipEX(); tmw.util.waitForObjProp(window,"p2_storeReady",this,function(){ dojo.style(dojo.byId("p2pl0"),"display","none"); dojo.style(dojo.byId("p2wrapper"),"left","0px"); lddDKY.C8Uc9.Fh4u9(lddDKY.C8Uc9.o47sO8); },30000); },2000); delete window.aC4p; }); KnsE.attr("href",tmw.local.p2hr); } if (lddDKY && lddDKY.C8Uc9) { lddDKY.C8Uc9.r1EDRVU(); lddDKY.C8Uc9.Fh4u9(lddDKY.C8Uc9.o47sO8); tmactive=lddDKY; } tmw.util.trackPage("/app/p1"); dojo.style(dojo.byId("tmwAppDockBar1"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar2"),"display","block"); dojo.style(dojo.byId("tmwAppDockBar3"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar4"),"display","block"); break; default: var yYYa6p; for(yYYa6p in JWVFGJY){ if(typeof(JWVFGJY[yYYa6p])=="function") JWVFGJY[yYYa6p](); } dojo.style(dojo.byId("tmwAppDockBar1"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar2"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar3"),"display","none"); dojo.style(dojo.byId("tmwAppDockBar4"),"display","none"); break; }; XWPXQ(KnsE.id); J47E=KnsE.id; }; function loV1Zx(KnsE){ switch (KnsE.id){ case "p0msg": if (!b75n0R.CX0VTo) { KnsE.attr("onLoad",function(){ MD6Iao(); console.log("mailsystem initialized"); }); KnsE.attr("href",tmw.local.p0msg); b75n0R.CX0VTo=true; } break; case "p0shop": if (!b75n0R.shop) { KnsE.attr("onLoad",function(){ fReOjD(); console.log("store initialized"); }); KnsE.attr("href", tmw.local.p0shop); b75n0R.shop=true; } break; case "p0vid": if (!b75n0R.Eb5Jq) { KnsE.attr("onLoad",function(){ _p0vid=new FFPH4(); console.log("p0vid initialized"); }); KnsE.attr("href", tmw.local.p0vid); b75n0R.Eb5Jq=true; } break; case "p0profile": if (!b75n0R.profile) { KnsE.attr("onLoad",function(){ RHI30=new oXWEG1(); console.log("p0profile initialized"); }); KnsE.attr("href", tmw.local.p0profile); b75n0R.profile=true; } break; case "p0statistics": if(!b75n0R.S9wCcD){ KnsE.attr("onLoad",function(){ _p0statistics=new g9aCNE(); console.log("p0statistics initialized"); }); KnsE.attr("href",tmw.local.p0statistics); b75n0R.S9wCcD=true; } default: break; }; }; function EN7y(){ var c=document.createElement("canvas"); if (c.getContext){ console.log("Canvas support OK"); VRRPHT=false; if (c.toDataURL){ MkGHT=false; console.log("Canvas toDataURL OK"); }; } delete c; }; function log(msg) { var log = dojo.byId("log"); if (log) log.innerHTML = msg+"
"+log.innerHTML; }; function ybxv(){ var kW1 = dojo.byId('loader'); if (kW1) dojo.style(kW1,"display","none"); }; function f7XiU(){ var uBj5DJD=3; if (!f7XiU.NM3yU7 || f7XiU.NM3yU7>uBj5DJD){ f7XiU.NM3yU7=0; tmw.util.trackPage("/app/ping"); } else { f7XiU.NM3yU7++; } clearTimeout(c4gUG); var content=(y43SIk.GtJfoOf? {"gs": y43SIk.GtJfoOf} :{} ); dojo.xhrPost({ url: "scripts/p.php?r="+(Math.random()+"").substr(2,5), content: content, handleAs: "text", timeout: 60000, load: function(F447L){ var data=dojo.fromJson(F447L); if (!data) return; if (!data.w){ alert(ll46); if (!window.y1tPC){ window.y1tPC=window.open("/"); } else { window.y1tPC.location.href="/"; }; } else if (y43SIk.me && data.w!=y43SIk.me){ if (confirm(h2mG)){ window.location.reload(); } else { if (!window.y1tPC){ window.y1tPC=window.open("/"); } else { window.y1tPC.location.href="/"; }; }; } try { if (data.V5HgC63) aRR(data.V5HgC63); } catch(err){console.warn(err);} try { if (data.qXGzLS) zxia3g(data.qXGzLS); } catch(err){console.warn(err);} try { W3PPQ(data); } catch(err){console.warn(err);} } }); c4gUG = setTimeout(f7XiU,cHLrX*1000); }; function OGOdLK() { var node = document.createElement("div"); dojo.body().appendChild(node); var R5188 = new dijit.Dialog({ title: "test input focus" }, node); var input = document.createElement("input"); dojo.attr(input,"tabIndex","0"); R5188.containerNode.appendChild(input); var HO77t = new dijit.form.Button({ label: "Close" }); R5188.containerNode.appendChild(HO77t.domNode); dojo.connect(HO77t, "onClick", function(){ console.log("destroying, while visible"); R5188.destroy(); }); R5188.show(); }; dojo.addOnLoad(function() { if (!dojo.byId("log")) window.log=function(){}; dojo.cookie("redirurl",null,{"expires": -1, "path": "/"}); dojo.cookie("redircnt",null,{"expires": -1, "path": "/"}); dojo.connect(window,"onmessage",onExternalMessage); var start = new Date().getTime(); c4gUG = setTimeout(f7XiU,5*1000); setTimeout(CMCp,7*1000); EN7y(); if (dojo.config["gaTracker"]) { tmw.util.tracker = new dojox.analytics.Urchin({ acct:"UA-932449-3", GAonLoad: function(){ this.inherited("GAonLoad", arguments); console.info("GA tracking enabled"); } }); } else console.info("GA tracking disabled"); dojo.parser.parse(dojo.byId('container')); log("Total parse time: " + (new Date().getTime() - start) + "ms"); dojo.byId('loaderInner').innerHTML += " done."; setTimeout(function(){ybxv();},250); c6lfaS(true,IgJ7); var KDiJ = dojo.connect(dijit.byId("mainLayoutContainer"),"resize",function(KnsE){ if (YM4NV) { var MbL7=YM4NV.selectedChildWidget; clearTimeout(this.WKyX); this.WKyX=setTimeout(function(){ h5ECxO(MbL7.id); },400); } }); var eJe=dijit.byId("p0langcntrl"); eJe.attr("value",tmwLang); setTimeout(function(){ dojo.connect(eJe, "onChange", function(eR5){ GYN7yO(this.attr("value")); }); },100); if (window._tmwaloginProfile && _tmwaloginProfile["tmf"]){ kQG6.WVYV92=_tmwaloginProfile["tmf"]; } dojox.grid._View.prototype.focus = function() { if (dojo.isIE || dojo.isWebKit || dojo.isOpera) { if (this.SAkMFW) this.SAkMFW.focus(); } else { if (this.KT5J) this.KT5J.focus(); } }; var WEYN5=dijit.layout.TabContainer.prototype.selectChild; dijit.layout.TabContainer.prototype.selectChild = function(page){ WEYN5.apply(this,arguments); if (this.id=="p0tc0"){ if ( this.selectedChildWidget && ( this.selectedChildWidget.id==usJT067 || this.selectedChildWidget.id==tMR ) ){ if (!this.selectedChildWidget["tmwloaded"]) return; }; } if (this.id=="p2bc1tc"){ var uPu; if (this.selectedChildWidget.id==page.id && page.id=="p2bc4") { uPu="24em"; } else if (this.selectedChildWidget.id==page.id && page.id=="p2bc2") { uPu="42em"; } if (uPu){ dojo.style(dojo.byId("p2bc1"),"width",uPu); dijit.byId("p2bc1").resize(); }; } }; var CXS3t=dojox.layout.FloatingPane.prototype._dock; dojox.layout.FloatingPane.prototype._dock = function(){ CXS3t.apply(this,arguments); var domain=this; var y74l=function(R3C7uc,E27g){ var node=domain._dockNode.domNode; var cls="dojoxDockNode"+R3C7uc; var AuI18="dojoxDockNode"+R3C7uc+"Hover"; if (!dojo.hasClass(node, cls)) { dojo.addClass(node,cls); dojo.connect(node, "onmouseover", function(){ dojo.addClass(node,AuI18); }); dojo.connect(node, "onmouseout", function(){ dojo.removeClass(node,AuI18); }); var CNCCjoj = new dijit.Tooltip({ label:E27g, showDelay:10, position:["above","after"], connectId:[node] }); } }; switch (this.id){ case "p0ChatContainer": y74l("Chat",HxWlfvy); break; case "p0OnlineUsers": y74l("Users",UB69); break; case "p1SpinnerFloater": y74l("Sectors",U3vBg); break; case "p2SpinnerFloater": y74l("Sectors",U3vBg); break; case "p1EleFloater": y74l("Elevation",olj); break; case "p2EleFloater": y74l("Elevation",olj); break; case "p1sshowFloater": y74l("Media",TEYG); break; case "p2sshowFloater": y74l("Media",TEYG); break; case "p1descFloater": y74l("Review",hb07vK); break; case "p2descFloater": y74l("Review",hb07vK); break; case "p2PlayersFloater": y74l("Players",q60U1D3); break; default: break; }; }; var Y951Zw,PER1B2=["p1","p2"]; var node,rPUU54V=["dnzmm","dnzmp","dntou","dnana","dnrev","dnfoc"]; var R3C7uc,lF8R1=["ZoomM","ZoomP","Tour","Analyze","Review2","Focus"]; var E27g,l1U5=[ADTWLW,QNmQP5,KRdj,T5TCF,r20,m8WNkT]; var AuI18; for (var E7Zd=0;E7Zd<2;E7Zd++){ Y951Zw=PER1B2[E7Zd]; for (var tLRCVVt=0;tLRCVVt *:first-child',this.form); if (!UPOM0VI[0]) { console.error("resetUploadBar: query not valid"); return; } var RaUTR7=dijit.byNode(UPOM0VI[0]); if (!RaUTR7) { console.error("resetUploadBar: upload bar not found"); return; } dojo.style(RaUTR7.domNode,"visibility","hidden"); RaUTR7.update({ maximum: 100, progress: 0}); console.log("resetRouteSaverAndUploadBar...Done"); }; function yA7X7(action,data){ if (action==AR50NL.prototype.lXLv7){ if (data) data.innerHTML=pKgSIH; tmw.util.trackPage("/app/fileupload"); return; } else if (action==AR50NL.prototype.rF1NOwQ){ if (b75n0R.oCLlX7){ setTimeout(function(){ b75n0R.oCLlX7.KBeKuU(true); },0); } return; } if (data.o4KP04){ data.o4KP04.innerHTML=""; } if (!b75n0R["tc"]){ console.err("Oops, cannot find the required tabcontainer container"); return; } if (b75n0R.oCLlX7){ console.log("setData"); b75n0R.oCLlX7.OKK0S(data.data); dijit.byId('uploadStackContainer').forward(); } else { dojo.connect(dijit.byId('uploadStackContainer'),"forward",function(){ dijit.byId('uploadStackContainer').resize(); }); dijit.byId('uploadStackContainer').forward(); var lx8R, MPWm, OJC6y4=["p0faketracks","p0faketrash"]; for(MPWm in OJC6y4){ lx8R=dojo.byId(OJC6y4[MPWm]); if (lx8R) lx8R.parentNode.removeChild(lx8R); dojo.style(dojo.byId("p0tracks"),"display","block"); dojo.style(dojo.byId("p0trash"),"display","block"); } b75n0R.oCLlX7=new R46WDmq(data.data, y43SIk.q51Nwg); } }; function t2H57bQ(){ if (!b75n0R.eLt3H) { var lqHntQd=dijit.byId("p0wel"); lqHntQd.attr("onLoad",function(){ b75n0R["tc"]=dijit.byId("p0weltc"); PMP=new V1VlB1(); console.log("p0wel initialized"); }); lqHntQd.attr("href", tmw.local.p0wel); b75n0R.eLt3H=true; } }; function swk(E4F3){ var iLP=dojo.byId("helpIfr"); if (!iLP) nxw02k(E4F3); else dojo.io.iframe.setSrc(iLP,tmw.local.wk+E4F3,true); dijit.byId("tooltipHelpDlg0").show(); }; function nxw02k(E4F3) { var id=dojo.byId("p0AttachIfr"); var iLP=dojo.io.iframe.create("helpIfr","initHelpIfrStyle"); if (dojo.isIE){ dojo.connect(iLP,"onreadystatechange", iLP,function(){ if(/loaded|complete/i.test(this.readyState)) zzzUEL(); }); } else { dojo.connect(iLP,"onload",zzzUEL); } setTimeout(function(){ with(iLP.style){ position = "relative"; left = top = "0px"; width = "740px"; height = "435px"; visibility = "visible"; } },2000); id.appendChild(iLP); dojo.io.iframe.setSrc(iLP,tmw.local.wk+E4F3,true); }; function zzzUEL(){ var bQHgr2S=dojo.io.iframe.doc(dojo.byId("helpIfr")); var dY7G=dojo.query("#column-one",bQHgr2S)[0]; dojo.style(dY7G,"display","none"); var Zy4E75A=dojo.query("#column-content",bQHgr2S)[0]; dojo.style(Zy4E75A,"float","none"); dojo.style(Zy4E75A,"margin","0"); Zy4E75A=dojo.query("#content",bQHgr2S)[0]; dojo.style(Zy4E75A,"margin","0"); }; function XWPXQ(id){ var mJZfJG=dijit.byId("p0HelpMenu"); if (!mJZfJG) return; mJZfJG.destroyDescendants(); switch(id){ case "p0wel": Gy5Jx(mJZfJG,"Organizing your desktop","Home_panel#Organizing_your_desktop"); Gy5Jx(mJZfJG,"next: Uploading files","Home_panel#Uploading_files"); break; case "p0upload": Gy5Jx(mJZfJG,"Uploading files","Home_panel#Uploading_files'"); Gy5Jx(mJZfJG,"Managing the content of your GPS","Home_panel#Managing_the_content_of_your_GPS"); Gy5Jx(mJZfJG,"Selecting the data","Home_panel#Selecting_the_data_to_be_saved_in_Tracemyworld"); Gy5Jx(mJZfJG,"Setting route type","Home_panel#Setting_route_type"); Gy5Jx(mJZfJG,"Merging routes","Home_panel#Merging_Routes"); Gy5Jx(mJZfJG,"Saving routes","Home_panel#Saving_your_routes"); break; }; }; function Gy5Jx(Sc211,label,vrL33gu){ Sc211.addChild(new dijit.MenuItem({ label:label, onClick:function(){swk(vrL33gu);} })); }; function LLn5j(){ pNg47Oq = new REe0([1,2,4,5],"p1","p1m10","p1map","p1m11","p1cpane" ,"p1ele","p1EleChart","p1grid",null,null ,"p1EleFloater",null,"p1SpinnerFloater","p1Loader","p1grid2" ,"p1sshowFloater"); if (!tmactive) tmactive=pNg47Oq; setTimeout(function(){ var PhQB=dijit.byId("p1EleFloater"), Ix2W=dijit.byId("p1SpinnerFloater"), vH4Y0G=dijit.byId("p1sshowFloater"), QIwQE=dijit.byId("p1descFloater"), g2QA=dijit.byId("p1cpane"), hxQVV9=dijit.byId("p1RFilter"), SSW3YF=dijit.byId("p1datapanel"), UR16Rk=dijit.byId("p1mshoweledetails"), u3aPN1=dijit.byId("p1ThumbPicker"), FRpWd=dijit.byId("p1mshowele"), GvG=dijit.byId("p1mshowspin"), M6jWDG=dijit.byId("p1mshowss"), BXCML=dijit.byId("p1mshowdesc"), Ac8By=dijit.byId("p1mshowrtp"); var EGF=dojo.byId("p1bc1"), p39U=dojo.byId("p1elem1"); var VDPQ09d=[EGF,p39U]; tmw.util.addBackgroundImage(PhQB.focusNode,"elevation.png"); tmw.util.addBackgroundImage(Ix2W.focusNode,"spinner.png"); tmw.util.addBackgroundImage(vH4Y0G.focusNode,"media.png"); tmw.util.addBackgroundImage(QIwQE.focusNode,"review.png"); g2QA.rootId=pNg47Oq; hxQVV9.attr("href","filter.html"); hxQVV9.onLoadDeferred.addCallback(function(){ if(_rfilter)_rfilter.initForm(pNg47Oq); }); var lqHntQd=vH4Y0G; var gJ0SLu=[{w:293,h:242},{w:410,h:340},{w:574,h:476},{w:804,h:666}]; var LHB0vn=u3aPN1; var tHYcqu=[283,400,564,794]; var q8bPA3=0; lqHntQd.resize(gJ0SLu[q8bPA3]); LHB0vn.size=tHYcqu[q8bPA3]; LHB0vn.postCreate(); SSW3YF.attr('open',false); SSW3YF.attr('title',Q234); pNg47Oq.cbF0IT.Os8sCP(); setTimeout(function(){ if (PhQB._isDocked) UR16Rk.attr('disabled',true); },2000); dojo.connect(dojo.byId("p1sshowzmp"),"onclick",function(){ if (q8bPA3<3) lqHntQd.resize(gJ0SLu[++q8bPA3]); LHB0vn.size=tHYcqu[q8bPA3]; LHB0vn.postCreate(); }); dojo.connect(dojo.byId("p1sshowzmm"),"onclick",function(){ if (q8bPA3>0) lqHntQd.resize(gJ0SLu[--q8bPA3]); LHB0vn.size=tHYcqu[q8bPA3]; LHB0vn.postCreate(); }); dojo.connect(lqHntQd.domNode,"onmouseenter",function(){ if (pNg47Oq && pNg47Oq.xXMD.UBs) return; dojo.fadeIn({ node:dojo.byId("p1ThumbWrapper"), duration: 750 }).play(); }); dojo.connect(lqHntQd.domNode,"onmouseleave",function(){ dojo.fadeOut({ node:dojo.byId("p1ThumbWrapper"), duration: 750 }).play(); }); var rNC7B1=function(sSG7ig){ var VINtT=parseInt(dojo.style(dojo.byId(sSG7ig.id),"zIndex")); if (VINtT<0) return; for(var n in VDPQ09d){ if (dojo.style(VDPQ09d[n],"zIndex") > 0) dojo.style(VDPQ09d[n],"zIndex",(VINtT-1)); } }; var ZmX=function(sSG7ig,bIauUh){ dojo.connect(bIauUh,"onChange",function(eR5){ if (eR5 && sSG7ig._isDocked) { sSG7ig.show(); sSG7ig.bringToTop(); } else if (!eR5 && !sSG7ig._isDocked) sSG7ig.minimize(); }); dojo.connect(sSG7ig,"show",function(){ bIauUh.attr('checked',true); if (sSG7ig.id=="p1EleFloater") { UR16Rk.attr('disabled',false); } sSG7ig.bringToTop(); rNC7B1(this); }); dojo.connect(sSG7ig,"bringToTop",function(){ rNC7B1(this); }); dojo.connect(sSG7ig,"minimize",function(){ bIauUh.attr('checked',false); if (sSG7ig.id=="p1EleFloater") UR16Rk.attr('disabled',true); }); }; ZmX(PhQB,FRpWd); ZmX(Ix2W,GvG); ZmX(vH4Y0G,M6jWDG); ZmX(QIwQE,BXCML); dojo.connect(Ac8By,"onChange",function(eR5){ var grid=EGF; var VINtT=dojo.style(grid,"zIndex"); if (eR5 && VINtT==0) { dojo.style(grid,"zIndex",1000); } else if (!eR5 && VINtT>0) dojo.style(grid,"zIndex",0); if (!pNg47Oq.HB85B) { pNg47Oq.HB85B=true; dojo.style(dojo.byId("p1mshowrtpimg"),"display","none"); } }); dojo.connect(UR16Rk,"onChange",function(eR5){ if (eR5) SSW3YF.attr('open',true); else SSW3YF.attr('open',false); }); PhQB.CY2=dojo.byId("p1ele"); dojo.connect(PhQB.focusNode,"onmousedown",function(){ dojo.style(PhQB.CY2,"display","none"); setTimeout(function(){dojo.style(PhQB.CY2,"display","block");},6000); }); dojo.connect(PhQB.focusNode,"onmouseup",function(){ dojo.style(PhQB.CY2,"display","block"); }); var QIc6NS=dojo.byId("p1SocNtwkShare"); if (QIc6NS){ QIc6NS.innerHTML=b2O(DZY00R,"",""); dojo.connect(QIc6NS,"onclick",pNg47Oq,function(){this.fMS();}); } var DOZBCq=dijit.byId("p1gridcntrlPane"); if (DOZBCq) dojo.connect(DOZBCq,"onClick",function(){pNg47Oq.GQOVe4(false);}); DOZBCq=dijit.byId("p1elem0"); if (DOZBCq){ dojo.connect(DOZBCq,"onMouseEnter",function(){ this.n4W7P=setTimeout(function(){ pNg47Oq.GQOVe4(true); },400); }); dojo.connect(DOZBCq,"onMouseLeave",function(){ clearTimeout(this.n4W7P); }); } DOZBCq=dijit.byId("p1menucntrl0Pan"); if (DOZBCq) dojo.connect(DOZBCq,"onClick",function(){ dojo.style(dojo.byId("p1elem1"),"zIndex",0); }); DOZBCq=dijit.byId("p1elem2"); if (DOZBCq){ dojo.connect(DOZBCq,"onMouseEnter",function(){ this.JhwjC5=setTimeout(function(){ dojo.style(dojo.byId("p1elem1"),"zIndex",999); },400); }); dojo.connect(DOZBCq,"onMouseLeave",function(){ clearTimeout(this.JhwjC5); }); } wbNqWB6("p1"); if (LLn5j.oG1KBP6) LLn5j.oG1KBP6(); },4000); }; function vipEX(){ lddDKY = new REe0([2],"p2","p2m10","p2map","p2m11","p2cpane" ,"p2ele","p2EleChart","p2grid","p2grid2","playersDiv" ,"p2EleFloater","p2PlayersFloater","p2SpinnerFloater","p2Loader",null ,"p2sshowFloater"); if (!tmactive) tmactive=lddDKY; setTimeout(function(){ var PhQB=dijit.byId("p2EleFloater"), Ix2W=dijit.byId("p2SpinnerFloater"), vH4Y0G=dijit.byId("p2sshowFloater"), QIwQE=dijit.byId("p2descFloater"), lBuMk6=dijit.byId("p2PlayersFloater"), g2QA=dijit.byId("p2cpane"), hxQVV9=dijit.byId("p2RFilter"), SSW3YF=dijit.byId("p2datapanel"), UR16Rk=dijit.byId("p2mshoweledetails"), u3aPN1=dijit.byId("p2ThumbPicker"), FRpWd=dijit.byId("p2mshowele"), GvG=dijit.byId("p2mshowspin"), M6jWDG=dijit.byId("p2mshowss"), BXCML=dijit.byId("p2mshowdesc"), K0g5=dijit.byId("p2mshowpla"), Ac8By=dijit.byId("p2mshowrtp"); var EGF=dojo.byId("p2bc1"), p39U=dojo.byId("p2elem1"); var VDPQ09d=[EGF,p39U]; tmw.util.addBackgroundImage(dojo.byId("p2ttpane"),"bg.png",true); tmw.util.addBackgroundImage(PhQB.focusNode,"elevation.png"); tmw.util.addBackgroundImage(lBuMk6.focusNode,"racers.png"); tmw.util.addBackgroundImage(Ix2W.focusNode,"spinner.png"); tmw.util.addBackgroundImage(vH4Y0G.focusNode,"media.png"); tmw.util.addBackgroundImage(QIwQE.focusNode,"review.png"); g2QA.rootId=lddDKY; var lqHntQd=vH4Y0G; var gJ0SLu=[{w:293,h:242},{w:410,h:340},{w:574,h:476},{w:804,h:666}]; var LHB0vn=u3aPN1; var tHYcqu=[283,400,564,794]; var q8bPA3=0; lqHntQd.resize(gJ0SLu[q8bPA3]); LHB0vn.size=tHYcqu[q8bPA3]; LHB0vn.postCreate(); SSW3YF.attr('open',false); SSW3YF.attr('title',Q234); lddDKY.cbF0IT.Os8sCP(); setTimeout(function(){ if (PhQB._isDocked) UR16Rk.attr('disabled',true); },2000); dojo.connect(dojo.byId("p2sshowzmp"),"onclick",function(){ if (q8bPA3<3) lqHntQd.resize(gJ0SLu[++q8bPA3]); LHB0vn.size=tHYcqu[q8bPA3]; LHB0vn.postCreate(); }); dojo.connect(dojo.byId("p2sshowzmm"),"onclick",function(){ if (q8bPA3>0) lqHntQd.resize(gJ0SLu[--q8bPA3]); LHB0vn.size=tHYcqu[q8bPA3]; LHB0vn.postCreate(); }); dojo.connect(lqHntQd.domNode,"onmouseenter",function(){ dojo.fadeIn({ node:dojo.byId("p2ThumbWrapper"), duration: 750 }).play(); }); dojo.connect(lqHntQd.domNode,"onmouseleave",function(){ dojo.fadeOut({ node:dojo.byId("p2ThumbWrapper"), duration: 750 }).play(); }); var rNC7B1=function(sSG7ig){ var VINtT=parseInt(dojo.style(dojo.byId(sSG7ig.id),"zIndex")); if (VINtT<0) return; for(var n in VDPQ09d){ if (dojo.style(VDPQ09d[n],"zIndex") > 0) dojo.style(VDPQ09d[n],"zIndex",(VINtT-1)); } }; var ZmX=function(sSG7ig,bIauUh){ dojo.connect(bIauUh,"onChange",function(eR5){ if (eR5 && sSG7ig._isDocked) { sSG7ig.show(); sSG7ig.bringToTop(); } else if (!eR5 && !sSG7ig._isDocked) sSG7ig.minimize(); }); dojo.connect(sSG7ig,"show",function(){ bIauUh.attr('checked',true); if (sSG7ig.id=="p2EleFloater") { UR16Rk.attr('disabled',false); } rNC7B1(this); }); dojo.connect(sSG7ig,"bringToTop",function(){ rNC7B1(this); }); dojo.connect(sSG7ig,"minimize",function(){ bIauUh.attr('checked',false); if (sSG7ig.id=="p2EleFloater") UR16Rk.attr('disabled',true); }); }; ZmX(PhQB,FRpWd); ZmX(Ix2W,GvG); ZmX(vH4Y0G,M6jWDG); ZmX(QIwQE,BXCML); ZmX(lBuMk6,K0g5); dojo.connect(Ac8By,"onChange",function(eR5){ var grid=dojo.byId("p2bc1"); var VINtT=dojo.style(grid,"zIndex"); if (eR5 && VINtT==0){ dojo.style(grid,"zIndex",1000); } else if (!eR5 && VINtT>0) dojo.style(grid,"zIndex",0); if (!lddDKY.HB85B) { lddDKY.HB85B=true; dojo.style(dojo.byId("p2mshowrtpimg"),"display","none"); } }); dojo.connect(UR16Rk,"onChange",function(eR5){ if (eR5) SSW3YF.attr('open',true); else SSW3YF.attr('open',false); }); PhQB.CY2=dojo.byId("p2ele"); dojo.connect(PhQB.focusNode,"onmousedown",function(){ dojo.style(PhQB.CY2,"display","none"); setTimeout(function(){dojo.style(PhQB.CY2,"display","block");},6000); }); dojo.connect(PhQB.focusNode,"onmouseup",function(){ dojo.style(PhQB.CY2,"display","block"); }); dojo.connect(Ix2W.focusNode,"onmousedown",function(){ var YxlP=dojo.byId("_intermediatesDiv"); dojo.style(YxlP,"display","none"); setTimeout(function(){dojo.style(YxlP,"display","block");},2000); }); dojo.connect(Ix2W.focusNode,"onmouseup",function(){ dojo.style(dojo.byId("_intermediatesDiv"),"display","block"); }); var QIc6NS=dojo.byId("p2SocNtwkShare"); if (QIc6NS){ QIc6NS.innerHTML=b2O(DZY00R,"",""); dojo.connect(QIc6NS,"onclick",lddDKY,function(){this.fMS();}); } var DOZBCq=dijit.byId("p2gridcntrlPane"); if (DOZBCq) dojo.connect(DOZBCq,"onClick",function(){lddDKY.GQOVe4(false);}); DOZBCq=dijit.byId("p2elem0"); if (DOZBCq){ dojo.connect(DOZBCq,"onMouseEnter",function(){ this.d54O9F=setTimeout(function(){ lddDKY.GQOVe4(true); },400); }); dojo.connect(DOZBCq,"onMouseLeave",function(){ clearTimeout(this.d54O9F); }); } DOZBCq=dijit.byId("p2menucntrl0Pan"); if (DOZBCq) dojo.connect(DOZBCq,"onClick",function(){ dojo.style(dojo.byId("p2elem1"),"zIndex",0); }); DOZBCq=dijit.byId("p2elem2"); if (DOZBCq){ dojo.connect(DOZBCq,"onMouseEnter",function(){ this.gJNeU4X=setTimeout(function(){ dojo.style(dojo.byId("p2elem1"),"zIndex",999); },400); }); dojo.connect(DOZBCq,"onMouseLeave",function(){ clearTimeout(this.gJNeU4X); }); } wbNqWB6("p2"); },4000); }; function bFZV0D(Y2TK6, filter, i4r1R0) { Y2TK6.nXBL1 = dojo.xhrPost({ url: "scripts/getTrackList.php", content: filter, handleAs: "text", timeout: 15000, handle: function(fr0XXAL, e4UYcT){ if(fr0XXAL instanceof Error){ if(fr0XXAL.dojoType == "cancel"){ console.debug("Request canceled."); }else if(fr0XXAL.dojoType == "timeout"){ console.debug("Request timed out."); }else{ console.error(fr0XXAL); }; }else{ try { NcTnfMp(Y2TK6,fr0XXAL); } catch(err){ alert(VhLR); } fr0XXAL=""; if (dojo.isFunction(i4r1R0)) { i4r1R0.apply(Y2TK6); } else { console.warn("getTrackList: no callback specified"); }; } return fr0XXAL; } }); }; function NcTnfMp(QNV,fr0XXAL){ QNV.OaILJo=dojo.fromJson(fr0XXAL); if (QNV.OaILJo.LrO instanceof Array){ for(var n=0;ncurr) { console.info("no more zoom levels available for current maptyp, switching to satellite view"); map.setMapType(G_SATELLITE_MAP); map.zoomIn(); } else if (G_NORMAL_MAP.getMaximumResolution()>curr){ console.info("no more zoom levels available for current maptype, switching to normal map view"); map.setMapType(G_NORMAL_MAP); map.zoomIn(); }; } else map.zoomIn(); }); GEvent.addDomListener(this.items[1].id, "click", function() { map.zoomOut(); }); map.getContainer().appendChild(this.container); return this.container; }; VW3D6.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(2,2)); }; function mcE0J7(rootId,container,xvqjP,jIyUSH,cMfu,mQCI) { this.map= null; this.D2b5PR= null; this.JgB2J= 0; this.MUG2WTO= 1; this.B4esJ= 2; this.jCR= 3; this.bIB= []; this.MNIA= [G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP,G_PHYSICAL_MAP]; this.items= []; this.container=dojo.byId(rootId+container); this.bIB.push({id:dojo.byId(rootId+xvqjP)}); this.bIB.push({id:dojo.byId(rootId+jIyUSH)}); this.bIB.push({id:dojo.byId(rootId+cMfu)}); this.bIB.push({id:dojo.byId(rootId+mQCI)}); }; mcE0J7.prototype = new GControl(); mcE0J7.prototype.initialize = function(map) { var domain=this; domain.map=map; domain.D2b5PR=domain.v2SS8(); dojo.forEach(domain.bIB, function(xS54,index){ GEvent.addDomListener(xS54.id, "click", function() { domain.setMapType(index); }); domain.items.push(new nWdQR(xS54.id)); }); map.getContainer().appendChild(domain.container); return domain.container; }; mcE0J7.prototype.setMapType = function(E7Zd) { var F0L5v=this.v2SS8(); this.map.setMapType(this.MNIA[E7Zd]); }; mcE0J7.prototype.v2SS8 = function() { var t=this.map.getCurrentMapType(); switch(t) { case G_NORMAL_MAP: return 0; break; case G_SATELLITE_MAP: return 1; break; case G_HYBRID_MAP: return 2; break; case G_PHYSICAL_MAP: default: return 3; }; }; mcE0J7.prototype.getDefaultPosition=function() { return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(2,2)); }; dojo.declare(tmw.util.sym.REe0,null,{ VjRO3o: 1, q5P: 4, wLp8: 8, A4OK5k: 16, asTV: 32, hjylXA: 64, WCM3g: 1, B1AdS: 2, YGf9N: 3, SOJPMU: 1, iVMB4: 2, wM8L: 3, ylN0: 4, lU5dDfK: 5, fP6NE: 6, mEl7r: '', I4M2: '', constructor: function (types,rootId,MEUOe2v,VRBbj,gHkIx,ZAk2 ,uLBRl,tDlJ6n,heKN,f9KF,tL8Z6T ,eQ5JJKK,jbCSNv,RbE6qru,W54,QGI ,PDN2) { this.log=null; this.LrO=[]; this.psVDYE=[]; this.W53=10; this.NnQkgv=0; this.LYMQK=null; this.EfXCH6=null; this.O3W64=false; this.R8H8=false; this.Fw14mF = {}; for(var n in types){ this.Fw14mF[types[n]]=true; } this.OaILJo = null; this.ftLK = null; this.nXBL1 = null; this.map = null; this.retry = 0; this.retryCnt = 200; this.JDHqN = null; this.rootId = rootId; this.MEUOe2v = MEUOe2v; this.VRBbj = VRBbj; this.gHkIx = gHkIx; this.ZAk2 = ZAk2; this.uLBRl = uLBRl; this.tDlJ6n = tDlJ6n; this.heKN = heKN; this.QGI = QGI; this.uEkDRn = null; this.TD3y = null; if (f9KF) this.f9KF = f9KF; this.tL8Z6T = tL8Z6T; if (tL8Z6T) this.gtJCwz=dojo.query(".player",tL8Z6T).length; this.eQ5JJKK = eQ5JJKK; this.jbCSNv = jbCSNv; this.PDN2 = PDN2; if (RbE6qru) this.RbE6qru = RbE6qru; if (W54) this.W54 = W54; this.YNHoU=true; setTimeout(dojo.hitch(this,this.init), 1000); }, init: function() { var rXdYA=dojo.contentBox(this.MEUOe2v); if (rXdYA.w*rXdYA.h == 0) { this.retry++; if (this.retry == this.retryCnt) { console.error("oops..could not set cb."); return; } setTimeout(dojo.hitch(this,this.init), 100); return; } var sC42 = document.getElementById(this.VRBbj); var map = new GMap2(sC42); this.x2gObU=[G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP,G_PHYSICAL_MAP]; map.addMapType(G_PHYSICAL_MAP); var PKYy4 = map.getDefaultUI(); PKYy4.controls.scalecontrol = true; PKYy4.zoom.scrollwheel = false; PKYy4.controls.largemapcontrol3d = false; PKYy4.controls.smallzoomcontrol3d = false; PKYy4.controls.maptypecontrol = false; PKYy4.controls.menumaptypecontrol = false; PKYy4.maptypes.normal = false; PKYy4.maptypes.satellite = false; PKYy4.maptypes.hybrid = false; PKYy4.maptypes.physical = false; map.setUI(PKYy4); this.map = map; this.xXMD=new GnszrR7(this); this.C8Uc9 = new X35QK(this,this.rootId,this.VRBbj,this.map, (this.iVMB4 in this.Fw14mF)); this.cbF0IT = new IMI5Q(this.C8Uc9,this.rootId,this.uLBRl,this.tDlJ6n,this.eQ5JJKK,this.W54); this.s = new dM8Y8s(this,this.C8Uc9,this.cbF0IT,sC42,this.ZAk2); this.C8Uc9.VIPp2C(this.cbF0IT); dojo.connect(dijit.byId(this.rootId+"m1"),"resize",this,function(){ var p=dijit.byId(this.rootId+"cpane"); if (p) p.I8S(true); }); var ubfbHVz=dojo.byId(this.rootId+"pform"); if (ubfbHVz){ var domain=this; for (var E7Zd=0;E7Zdcurr) { console.info("no more zoom levels available for current maptyp, switching to satellite view"); map.setMapType(G_SATELLITE_MAP); try { dijit.byId(domain.C8Uc9.baseName+"mapt1").attr("value",true); }catch(err){}; } else if (G_NORMAL_MAP.getMaximumResolution()>curr){ console.info("no more zoom levels available for current maptype, switching to normal map view"); map.setMapType(G_NORMAL_MAP); try { dijit.byId(domain.C8Uc9.baseName+"mapt0").attr("value",true); }catch(err){}; }; } map.zoomIn(); }; dojo.connect(dojo.byId(this.rootId+"dnzmp"),"onclick",tl4MAV); dojo.connect(dojo.byId(this.rootId+"gnc0"),"onclick",tl4MAV); UPOM0VI=dijit.byId(this.rootId+"menrtnam"); if (UPOM0VI) dojo.connect(UPOM0VI,"onClick",this,function(){ this.C8Uc9.suAmJO({sJ24FW: true, k484C3: "trackname"}); }); UPOM0VI=dijit.byId(this.rootId+"menrtdsc"); if (UPOM0VI) dojo.connect(UPOM0VI,"onClick",this,function(){ this.C8Uc9.suAmJO({sJ24FW: true, k484C3: "trackdesc"}); }); UPOM0VI=dijit.byId(this.rootId+"menrtrevw"); if (UPOM0VI) dojo.connect(UPOM0VI,"onClick",this,function(){ this.C8Uc9.suAmJO({sJ24FW: true, k484C3: "trackfulldesc"}); }); UPOM0VI=dojo.byId(this.rootId+"dnrev"); if (UPOM0VI) dojo.connect(UPOM0VI,"onclick",this,function(){ this.C8Uc9.suAmJO({sJ24FW: true, k484C3: "trackfulldesc"}); }); }, KriNIG: function(){ this.C8Uc9.l67X(); var w=dijit.byId(this.rootId+"searchnow"), cbj69=dijit.byId(this.rootId+"searchpolicy"), MNVOF=dijit.byId(this.rootId+"searchbox"), domain=this; if (w && MNVOF && cbj69){ var k8DW7=-1, PVd4m=function(KnsE){ if (KnsE) dojo.stopEvent(KnsE); var QoD26s, p=cbj69.attr("value"); if (p==k8DW7){ QoD26s={ "p":_rfilter.B94nQO, "n":MNVOF.attr("value").replace(/\s+/g,"*") }; } else { QoD26s={ "p": p }; MNVOF.attr("value",""); } if (domain.rootId=="p2"){ QoD26s=dojo.mixin(QoD26s,{"type[]":[2]}); } domain.ghMO=QoD26s; tmwSetTMFilter(QoD26s,domain.rootId=="p2"); }; ; cbj69.attr("onChange",function(eR5){ dojo.style(MNVOF.domNode,"visibility", (eR5==k8DW7)?"visible":"hidden" ); var Qx5=dojo.byId(domain.rootId+"removeBookmark"); if (Qx5){ dojo.style(Qx5,"visibility", (eR5==_rfilter.cjC)?"visible":"collapse" ); } if (eR5!=k8DW7) PVd4m(); }); w.attr("onClick",PVd4m); } else console.warn("searchbox / searchnow / searchpolicy not found"); w=dijit.byId(this.rootId+"searchadv"); if (w){ w.attr("onClick",function(){ try{ dijit.byId(domain.rootId+_rfilter.MQ7verQ).show(); }catch(err){} }); } } , KSLR: function(){ var tWY09I, ANL=this.NnQkgv++, Fu9jYV, d=new Date(), b0yWJ=(d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear(), p1H4V={ B4BZZ: "0", tracknick: y43SIk.me, trackgroup: "", trackname: "New route "+ANL+" - "+b0yWJ, trackprofile: 0, trackdesc: "New route "+ANL+" - "+b0yWJ+" - by "+y43SIk.me, j455bF: "0", g7BlGp2: "0", eUXM: "0", Y58LxFS: "0", E53H: d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate()+ " "+d.toLocaleTimeString(), pwvJvY: "1", olmJ: true, selected: false, mdiNpG: "0", props: false, filter: -1, hidden: "0", action: "", pRJJ: (4|4<<3|7<<6|1<<9) }; Fu9jYV=this.EfXCH6.newItem(p1H4V); tWY09I=this.IGj5G(p1H4V); return {E7Zd: tWY09I.index, jVT84M: Fu9jYV}; }, v6NOl08: function(fAWb) { var types=[]; for(var n in this.Fw14mF) types.push(n); var filter = fAWb || { "type[]": types }; this.ghMO=filter; bFZV0D(this, filter, this.P2VLx3); this.uDOe5X=0; }, Ol6sv: function(wCED,pW63v1) { var p8lYB=this.IGj5G(wCED); tmw.util.trackPage((this.rootId=="p2"?"/ra/":"/ed/")+wCED.B4BZZ); tmwAlert({title:"Loading route..",Yf47:true}); if (this.YNHoU){ dojo.style(dojo.byId(this.rootId+"elem1"),"zIndex",999); dijit.byId(this.rootId+"menuacc").selectChild(this.rootId+"vispanels"); dojo.style(dojo.byId(this.rootId+"mshowrtpimg"),"display","block"); this.YNHoU=false; } if (p8lYB.cxYsFSB){ Ol6sv(this, { B4BZZ: wCED.B4BZZ, ZQYo: true, hQL3G: p8lYB.index }, this.b7PCVh, pW63v1); } else { this.b7PCVh(p8lYB.index); } this.t2GA = false; }, IGj5G: function(wCED, T6hI) { var TIje=false; var B4BZZ=wCED.B4BZZ; for (var E7Zd=0;E7Zd0){ if (AKn["autoplay"]==1) illS86["as"]=true; else illS86["wu"]=true; } if (AKn["norightmenu"] && AKn["norightmenu"][0]) illS86["crm"]=true; if (AKn["noelevation"] && AKn["noelevation"][0]) illS86["ce"]=true; if (AKn["openreview"] && AKn["openreview"][0]) illS86["or"]=true; if (AKn["centermode"]>0){ if (AKn["centermode"]==1){ illS86["cs"]=true; } else { var c=this.C8Uc9.O2J42T.getCenter(); illS86["cp"]=true; illS86["lat"]=c.lat().toFixed(6); illS86["lng"]=c.lng().toFixed(6); }; } if (AKn["currzoom"] && AKn["currzoom"][0]) illS86["zl"]=this.C8Uc9.l4W4; if (AKn["currmaptype"] && AKn["currmaptype"][0]){ var F40qhK=this.C8Uc9.O2J42T.getCurrentMapType(), msLDmu5=false; for(n=0;n0){ illS86["af"]=AKn["autofocus"]-1; if ( this.rootId=="p2" && this.y0RT && this.y0RT.length>0 ){ illS86["pl"]=[]; for (n=0;n0){ dojo.disconnect(this.jM021L.events.pop()); } this.jM021L.events=null; } this.jM021L.events=[]; xBfEh=tiz+":  "; xBfEh+=''; xBfEh+=''; xBfEh+='

'; xBfEh+=n5eTG0+":  "; xBfEh+=''; xBfEh+=''; xBfEh+='

'; xBfEh+=''; xBfEh+=''; xBfEh+=''; xBfEh+=''; xBfEh+=''; xBfEh+='
'+qXBg3+':    '; xBfEh+='
'+s2AVB7+':'+d0Nk6L+':
'; xBfEh+=''; var MWH=function(){ var msg; var RrEwOD=dijit.byId("calFrom").attr('value'); var QFJGpq=dijit.byId("calTo").attr('value'); var U7P8D=dijit.byId("rb02").attr('value')?1:0; var Yvtk58=dijit.byId("rb12").attr('value')?1:0; if (QFJGpq<=RrEwOD && Yvtk58=="1"){ alert("date not correctly set"); }else{ dijit.byId('do_populate').destroy(); msg='
'+SLb+'

'; CkWINa(msg); dojo.xhrPost({ url: "scripts/msg.php" , handleAs: "text" , timeout: 50000, load: dojo.hitch(this,function(data){ var p8lYB=dojo.fromJson(data); if (p8lYB.sl9T){ i83X.U5F4=i83X.K6D7=0; i83X(p8lYB.sl9T); } else { console.log("something wrong"); } }), content:{l:dojo.toJson([{c:28, U7P8D:U7P8D, HHLsQ:id, RrEwOD:formatDate(RrEwOD), QFJGpq:formatDate(QFJGpq), Yvtk58:Yvtk58}])} }); } }; var i83X=function(sl9T){ var w4Wf=100; dojo.xhrPost({ url: "scripts/msg.php" , handleAs: "text" , timeout: 50000, load: dojo.hitch(this,function(data){ var p8lYB=dojo.fromJson(data); if (p8lYB.done){ u7nfQq("100%"); JC6V1BZ("preLoaderEntry","preLoaderEntryDone"); JC6V1BZ("preLoaderEntryLoading","mailIconOk"); setTimeout(function(){ u7nfQq(""); JC6V1BZ("preLoaderPcnt"); Qv1NNWj(dojo.fromJson(p8lYB.c7lE[id])); },1000); } else { var a57=p8lYB.p*100/p8lYB.s; u7nfQq(a57.toFixed(0)+"%"); if (p8lYB.p == i83X.U5F4) i83X.K6D7++; else i83X.K6D7=0; i83X.U5F4=p8lYB.p; if (i83X.K6D7 == w4Wf) alert("oops something went wrong.."); else setTimeout(function(){i83X(sl9T);},1500); } }), content:{l:dojo.toJson([{c:26, id:sl9T, G3KxO:1}])} }); }; var Qv1NNWj=function(MMjQ){ var SYgJS1,match,RVuhc9,CgxUP6,name,bm1d6,DXH0,d,ES74L,E7Zd,tLRCVVt,msg,n=0,msg; for (SYgJS1 in MMjQ){ if (MMjQ[SYgJS1].match){ match=dojo.fromJson(MMjQ[SYgJS1].match); RVuhc9=MMjQ[SYgJS1].B4BZZ; CgxUP6=MMjQ[SYgJS1].tracknick; d=MMjQ[SYgJS1].d; name=MMjQ[SYgJS1].trackname; for (var DZjQH=0; DZjQH80){ console.log(RVuhc9+" "+CgxUP6+" "+bm1d6+" "+DXH0+" "+name+" "+E7Zd+" "+tLRCVVt); c7lE.push({RVuhc9:RVuhc9,E7Zd:E7Zd,tLRCVVt:tLRCVVt}); n++; }; }; }; } msg='
'+R61Dpm+" "+n+" "+LZoX+'
'; CkWINa(msg); var label; if (n==0) label=U8qnk; else label=uZQVJ; msg='
    
'; CkWINa(msg); tmw.util.waitForId(["commit_populate_div","cancel_populate_div"],domain,function(){ rnAAFE=new dijit.form.Button({ label: label, onClick: U8S6 },dojo.byId("commit_populate_div")); Lr3=new dijit.form.Button({ label: Mj566V, onClick: sZPc },dojo.byId("cancel_populate_div")); }); }; var U8S6=function(){ rnAAFE.destroy(); JC6V1BZ("preLoaderEntry","preLoaderEntryDone"); var msg='
'+uZQVJ+'

'; CkWINa(msg); dojo.xhrPost({ url: "scripts/msg.php" , handleAs: "text" , timeout: 50000, load: dojo.hitch(this,function(data){ var p8lYB=dojo.fromJson(data); if (p8lYB.err && p8lYB.err!=""){ msg='
'+lXCM5PH+'
'; CkWINa(msg); HEwR(); } else { var UCRL=function(p8lYB){ u7nfQq("100%"); setTimeout(function(){ u7nfQq(""); JC6V1BZ("preLoaderEntry","preLoaderEntryDone"); JC6V1BZ("preLoaderEntryLoading","mailIconOk"); JC6V1BZ("preLoaderPcnt"); console.log(p8lYB.msg); o77ct=true; msg=CDI1U+" "+(c7lE.length-p8lYB.failed-p8lYB.duplicated)+" "+TILwI; if (p8lYB.failed>0) msg+="("+(p8lYB.failed+p8lYB.duplicated)+" "+cRI6x6+")"; msg='
'+msg+'
'; CkWINa(msg); msg='
'+n4CXB+'
'; CkWINa(msg); var e7QHVUw=b2O(QXWb,"", IP4X2P({GgXh:true})+"();tmwLoadRouteEditor("+id+",true);"); msg='
'+e7QHVUw+'
'; CkWINa(msg); HEwR(); },1000); }; var pKO1MD=function(a57){ u7nfQq(a57.toFixed(0)+"%"); }; var iCUu=new GRDB8U(p8lYB.sl9T,UCRL,pKO1MD,null); iCUu.i83X(); } }), content:{l:dojo.toJson([{c:29, HHLsQ:id, MMjQ:dojo.toJson(c7lE)}])} }); }; var sZPc=function(){ GgXh(); }; var HEwR=function(){ dijit.byId("rtOkButton").attr("label",uKyDf); dojo.style(dojo.byId("rtOkButtonDiv"),"display","block"); domain.EfXCH6.fetch({ query:{B4BZZ:OR0N3Bt+""}, onComplete:function(E7Zd){ if (!E7Zd[0]) return; domain.EfXCH6.setValue(E7Zd[0],tmw.util.props.tracktype,domain.iVMB4); } }); }; var LO2M=function(){ if (o77ct){ if (lddDKY){ bFZV0D(lddDKY,{"type[]":2},lddDKY.SS71c); }; } }; var zUe8=function(iE8uTQ){ var h98D2X=new Date(); var y=h98D2X.getFullYear(); var SYgJS1=h98D2X.getMonth(); var d=h98D2X.getDate(); var vDjLw=SYgJS1-iE8uTQ; if (vDjLw<0){ y-=1; SYgJS1=12+vDjLw; } else { SYgJS1=vDjLw; } var o6g=new Date(y,SYgJS1,d); dijit.byId("calFrom").setValue(o6g); dijit.byId("calTo").setValue(new Date()); }; var openDialog=function(){ tmwAlert({ title: tAv0QFV, message: xBfEh, w: 380, h: 460, confirm: false, i3oM: function(){LO2M();} }); tmw.util.waitForWId(["calFrom","calTo","do_populate","calPreset"],this,function(){ domain.jM021L.events.push(dojo.connect(dijit.byId("calFrom"),"onChange",function(date){ dojo.byId("dateFrom").innerHTML="["+formatDate(date)+"]"; })); domain.jM021L.events.push(dojo.connect(dijit.byId("calTo"),"onChange",function(date){ dojo.byId("dateTo").innerHTML="["+formatDate(date)+"]"; })); domain.jM021L.events.push(dojo.connect(dijit.byId("do_populate"),"onClick",function(date){ MWH(); })); domain.jM021L.events.push(dojo.connect(dijit.byId("rb12"),"onChange",function(xS54){ dojo.style(dojo.byId("calRow0"),"visibility",(xS54?"inherit":"collapse")); dojo.style(dojo.byId("calRow1"),"visibility",(xS54?"inherit":"collapse")); dojo.style(dojo.byId("calRow2"),"visibility",(xS54?"inherit":"collapse")); dojo.style(dojo.byId("calRow3"),"visibility",(xS54?"inherit":"collapse")); })); domain.jM021L.events.push(dojo.connect(dijit.byId("calPreset"),"onChange",function(eR5){ zUe8(parseInt(eR5)); })); zUe8(12); }); }; openDialog(); }, IM9: function(toggle){ if (toggle && dijit.byId(this.rootId+"togglestatus").attr("disabled")) return;; if (!toggle && dijit.byId(this.rootId+"sendinvites").attr("disabled")) return;; var k6OC=this.LYMQK.rowIndex , SYgJS1=this.LYMQK.grid.getItem(k6OC); id=this.EfXCH6.getValue(SYgJS1,tmw.util.props.B4BZZ); if (id<=0){ alert("cannot open race with this route"); return; } this.Xt68(id,toggle?toggle:false); } , Xt68: function(id,toggle){ var domain=this; dojo.xhrPost({ url: "scripts/msg.php" , handleAs: "text" , timeout: 25000, load: function(data){ var p8lYB=dojo.fromJson(data); if (p8lYB.err==""){ if (toggle){ domain.EfXCH6.fetch({ query:{B4BZZ:id+""}, onComplete:function(E7Zd){ if (p8lYB["isopen"]==1) alert(rnS2Ix); else alert(CWfVND); domain.EfXCH6.setValue(E7Zd[0],tmw.util.props.I9IJF3,p8lYB["isopen"]); } }); } else { alert(O4C08+p8lYB["invites"]); }; } else { alert("sorry, an error occurrd:"+p8lYB.err); } }, content:{l:dojo.toJson([{c:21, id:id, toggle:toggle}])} }); } , V4EGei: function(GM6k5){ try { dijit.byId("saveDialog").hide(); } catch(err){} if(GM6k5.AC6CDW>0){ tmwAlert({title:iFYm,Yf47:true}); var QoD26s={ mode:"1", w:GM6k5.AC6CDW, n:GM6k5.trackname, d:GM6k5.trackdesc, l:GM6k5.trackloct, t:GM6k5.tracktype, y9MzQO:GM6k5.trackprofile }; if (GM6k5.hpFI) QoD26s.pRJJ=GM6k5.hpFI; if (GM6k5.trackgroup) QoD26s.grp=GM6k5.trackgroup; if (GM6k5.tracksubprof) QoD26s.PG2p=GM6k5.tracksubprof; if (GM6k5.trackfulldesc) QoD26s.g37z=GM6k5.trackfulldesc; dojo.xhrPost({ url: "scripts/cp.php", handleAs: "json" , timeout: 50000, load: function(data){ tmwAlert({close:true}); if (data.LwL5Y) alert(dojo.string.substitute(oI3Q0, {"rid":data.LwL5Y})); } , content: QoD26s }); } this.jM1(this.wLp8, GM6k5.AC6CDW+"", { B4BZZ:GM6k5.AC6CDW+"", trackgroup:GM6k5.trackgroup||"", trackname:GM6k5.trackname||null, trackdesc:GM6k5.trackdesc||null, trackloct:GM6k5.trackloct||null, tracktype:GM6k5.tracktype>=0?GM6k5.tracktype:null, trackprofile:GM6k5.trackprofile||null, j455bF:GM6k5.l8l4rwf?GM6k5.l8l4rwf.b2F:null, pRJJ:GM6k5.hpFI||null }); return false; } , daT3F: function(perms,RVuhc9){ var domain=this; this.EfXCH6.fetch({ query: { pwvJvY: perms, B4BZZ: String(RVuhc9) }, onComplete: function(items, mj5NA){ dojo.forEach(items, function(item){ domain.EfXCH6.deleteItem(item); }); } }); }, JIEW: function(msg){ }, wG2B1Sq:function(jPHVSx,OM4JL){ try { this.C8Uc9.SMLYa.display( dojo.string.substitute(KMKSwB,{ "trackname":jPHVSx, "trackdate":OM4JL }), this.C8Uc9.SMLYa.EK2x ); }catch(err){} }, jM1: function(action, X2hv7, ZfhoD){ var query, store=this.EfXCH6, domain=this; query={B4BZZ: X2hv7 }; console.log("updateItems query "+query.B4BZZ); if ((action&domain.VjRO3o)!=0){ store.fetch({ query: {selected:true}, onComplete: function(items){ for(var n=0;n'+o+'
'; } else return " "; }, UPEX: function(r,item){ if (!item) return; var pRJJ=((this.EfXCH6.getValue(item,tmw.util.props.HH2XO5) & 0x4)!=0?"0":"1"); var CNCCjoj=this.EfXCH6.getValue(item,tmw.util.props.tracktype); return { "prm": pRJJ, "type": CNCCjoj, "status": this.EfXCH6.getValue(item,tmw.util.props.I9IJF3) }; }, jz9sRg: function(r,item){ if (!item) return; var id=this.EfXCH6.getValue(item,tmw.util.props.B4BZZ); return { "id" : id, "idstr": (this.EfXCH6.getValue(item,tmw.util.props.selected)?"E":"")+id, "cb": this.C8Uc9.sEbL.FNfGGX, "checked": this.EfXCH6.getValue(item,"noMiniature",false)?"":"checked=\"checked\"", "tm": this.rootId }; } , TCK: function(eR5){ if (typeof(eR5)=="object"){ var yYMq=" "; return eR5["idstr"]+ (eR5["cb"]?dojo.string.substitute(yYMq,eR5):""); ; } else return " "; } , reLPx: function(eR5){ if (typeof(eR5)=="object"){ var wN2B="${content}", r=eR5.r, SYgJS1=eR5.SYgJS1, c=eR5.c; return dojo.string.substitute(wN2B,{ "cls":(r?"":" class='grey'"), "content":UJSd5K+":"+(r?""+B9jWPQ+"":v8fMBy) })+dojo.string.substitute(wN2B,{ "cls":(SYgJS1>0?"":" class='grey'"), "content":ixsL5MR+":"+(SYgJS1>0?""+SYgJS1+"":SYgJS1) })+dojo.string.substitute(wN2B,{ "cls":(c>0?"":" class='grey'"), "content":qAQa3A+":"+(c>0?""+c+"":c) }); } else return " "; } , NQRuF: function(r,item){ if (!item || this.EfXCH6.getValue(item,tmw.util.props.B4BZZ)<=0) return; return {r:this.EfXCH6.getValue(item,tmw.util.props.FcYUx5,false)==1, SYgJS1:this.EfXCH6.getValue(item,tmw.util.props.N6KLP,"0"), c:this.EfXCH6.getValue(item,tmw.util.props.YM6Ic,"0") }; } , nQcR: function(eR5){ var map={cTCWPF: (eR5>>6)&0x7, gU3zD1x: (eR5>>3)&0x7, rVHRV: eR5&0x7 }, TBQYu="", n; for(n in map){ if (map[n]==0x6 || map[n]==0x7) TBQYu+="rw-"; else if(map[n]==0x4) TBQYu+="r--"; else if(map[n]==0x2) TBQYu+="-w-"; else TBQYu+="---"; } return TBQYu; } , AHZISA: function(KnsE){ if (KnsE && KnsE.cellIndex<2) return; var domain=this; var item=KnsE.grid.getItem(KnsE.rowIndex); var props=this.EfXCH6.getValue(item,tmw.util.props.props); var kc4V=KnsE.clientX, VqGNCk=KnsE.clientY; if (props){ clearTimeout(this.C8Uc9.sEbL.DTNiLH); clearTimeout(this.C8Uc9.sEbL.lCM6); this.C8Uc9.sEbL.DTNiLH=setTimeout(function(){ var TFHJ8, B4BZZ=domain.EfXCH6.getValue(item,tmw.util.props.B4BZZ); if (domain.EfXCH6.isItem(props)){ TFHJ8=fCg5(domain.EfXCH6,props,{intrm:true,jp:true}); TFHJ8[tmw.util.props.B4BZZ]=B4BZZ; } else { TFHJ8={}; TFHJ8[tmw.util.props.B4BZZ]=B4BZZ; TFHJ8=dojo.mixin(TFHJ8,props); } domain.C8Uc9.pPY16(kc4V,VqGNCk,TFHJ8); domain.C8Uc9.sEbL.lCM6=setTimeout(function(){ domain.C8Uc9.pPY16(); },4000); },800); } } , MSO: function(KnsE){ var domain=this; var GTK=KnsE.rowNode; clearTimeout(domain.MSO.WKyX); clearTimeout(domain.MSO.SWNs); domain.MSO.WKyX=setTimeout(function(){ if (!domain.MSO.hOcfS) domain.MSO.hOcfS=[]; else { var node; while(node=domain.MSO.hOcfS.pop()) dojo.style(node,"display","none"); } dojo.query(".imenu",GTK).forEach(function(n,E7Zd){ domain.MSO.hOcfS.push(n); dojo.style(n,"display","block"); }); domain.MSO.SWNs=setTimeout(function(){domain.QY6KI();},4000); },250); } , QY6KI: function(KnsE){ var node; if (this.MSO.hOcfS){ while(node=this.MSO.hOcfS.pop()) dojo.style(node,"display","none"); } } , mIWO25: function(KnsE){ if (KnsE.cellIndex<0) return; var domain=this; var GTK=KnsE.rowNode; clearTimeout(domain.mIWO25.WKyX); domain.mIWO25.WKyX=setTimeout(function(){ dojo.query("td[idx=1]",GTK).forEach(function(n,E7Zd){ if (!domain.mIWO25.hOcfS) domain.mIWO25.hOcfS=[]; else { var node; while(node=domain.mIWO25.hOcfS.pop()) node.innerHTML=domain.mEl7r; } domain.mIWO25.hOcfS.push(n); n.innerHTML=domain.I4M2; }); },250); } , WNs9y: function(KnsE){ var node; if (this.mIWO25.hOcfS){ while(node=this.mIWO25.hOcfS.pop()) node.innerHTML=this.mEl7r; } } , h2g8i: function(action){ var domain=this, MbGhrX="0"; if (action==this.YGf9N) MbGhrX+="async"; this.EfXCH6.fetch({ query: {B4BZZ: MbGhrX}, onComplete: function(items){ var ndx=null; if (action==domain.B1AdS){ if (items.length>0){ domain.EfXCH6.setValue(items[0], tmw.util.props.B4BZZ,"0async"); } ndx=domain.IGj5G({ B4BZZ: "0" },true).index; if (ndx!=null){ domain.LrO[ndx].B4BZZ="0async"; } return; } else if (action==domain.YGf9N){ if (items.length>0){ domain.EfXCH6.setValue(items[0], tmw.util.props.B4BZZ,"0"); } ndx=domain.IGj5G({ B4BZZ: "0async" },true).index; if (ndx!=null){ domain.LrO[ndx].B4BZZ="0"; } return; } var r7WhFGK; tmw.util.trackPage("/app/new"); if (items.length>0){ domain.EfXCH6.setValue(items[0], tmw.util.props.selected,true); ndx=domain.IGj5G( { B4BZZ: "0" },true).index; r7WhFGK=items[0]; domain.C8Uc9.SMLYa.display( dojo.string.substitute( KMKSwB, { "trackname":r7WhFGK.trackname,"trackdate":r7WhFGK.E53H }), domain.C8Uc9.SMLYa.EK2x ); } else { var tWY09I=domain.KSLR(); ndx=tWY09I.E7Zd; r7WhFGK=tWY09I.jVT84M; domain.jM1(domain.VjRO3o,"0"); } if (ndx==null){ console.err("Error: code TM10"); return; } domain.uDOe5X=0; domain.C8Uc9.Gz5Kd0U(domain.LrO[ndx]); domain.scR(); domain.uEkDRn.selection.addToSelection(r7WhFGK); } }); } , igJE: function(L311DiA, P6Ej, scOh){ if (this.C8Uc9){ if (!L311DiA){ this.uDOe5X=null; if (P6Ej) this.h2g8i(this.B1AdS); this.jM1(this.VjRO3o,false); this.C8Uc9.Gz5Kd0U(null, scOh); this.C8Uc9.SMLYa.clear(this.C8Uc9.SMLYa.EK2x); } else { this.h2g8i(this.WCM3g); }; } } , b7PCVh: function(index,pW63v1) { var N9u60=false; if (pW63v1){ N9u60=true; pW63v1.Y58LxFS=pW63v1.rating_sum/pW63v1.rating_cnt||0; pW63v1.pwvJvY=(pW63v1.pRJJ && ((pW63v1.pRJJ & 0x4)!=0))?"0":"1"; pW63v1.mdiNpG=pW63v1.B4BZZ; pW63v1.olmJ=false; pW63v1.hidden="0"; pW63v1.action=""; pW63v1.selected=true; this.scR(); this.jM1(this.asTV|this.hjylXA, String(pW63v1.B4BZZ),pW63v1); delete pW63v1; } if (!N9u60){ this.jM1(this.VjRO3o,String(this.LrO[index].B4BZZ)); } if (this.LrO[index].AFB && this.LrO[index].AFB.length>0){ var domain=this; dojo.forEach(this.LrO[index].AFB, function(xS54){ try{ xS54.properties=dojo.fromJson(xS54.properties); }catch(err){ console.log("Cannot decode POI"+xS54.properties); }; }); this.LrO[index].HGWuSRq=this.LrO[index].AFB; this.LrO[index].AFB=null; } this.tSC(this.LrO[index].props); if (this.C8Uc9){ try{ this.C8Uc9.Gz5Kd0U(this.LrO[index]); }catch(err){console.log(err);}; } try { if (this.LrO[index].data.length>0){ this.s.createPath(this.LrO[index],true); } }catch(err){console.log(err);} tmwAlert({close:true}); if (this.C8Uc9) { this.C8Uc9.Y4bK(); if (window[this.rootId+"_switchCallbacks"]){ var yYYa6p,RVuhc9=this.LrO[index]?this.LrO[index].B4BZZ:null; for(yYYa6p in window[this.rootId+"_switchCallbacks"]){ try{ window[this.rootId+"_switchCallbacks"][yYYa6p](RVuhc9); }catch(err){}; } delete window[this.rootId+"_switchCallbacks"]; }; } if (this.LrO[index].data.length==0) return; if (this.ETYG()) { this.y0RT = []; this.jyWg4V(); this.qXL5T0(); u3M(this, { B4BZZ: this.LrO[index].B4BZZ }, this.EDS); } else { this.vOSMW8(); } this.nXBL1=null; for (var E7Zd in this.ql5v) { this.ql5v[E7Zd].uvV9Q( this.LrO[index].B4BZZ, this.LrO[index].rated, this.LrO[index].rating_cnt, this.LrO[index].rating_sum); } if (this.RAMF) this.RAMF.init(this.LrO[index].B4BZZ,1); }, callback: function(Y2TK6, Q7Fg){ var TptT, odub4, E7Zd, s21503; if (Q7Fg==true){ odub4=Y2TK6[0]; TptT=null; if (!odub4.external) E7Zd=this.IGj5G({B4BZZ: odub4.p6a},true).index; } else { TptT=Y2TK6[1]; odub4=Y2TK6[0]; E7Zd=TptT?TptT.index:null; } Y2TK6=null; if (!odub4.external){ if (odub4.ZJvIQ==null || E7Zd==null || !(this.LrO.hasOwnProperty(E7Zd))){ return; } s21503=this.LrO[E7Zd].B4BZZ; if (s21503!=odub4.ZJvIQ && odub4.ZJvIQ>0){ var p8lYB=this.IGj5G({B4BZZ: odub4.ZJvIQ}, true); if (p8lYB.index!=null){ console.debug("CP saved as the mastertrack"); this.LrO[p8lYB.index]=null; } try{ this.jM1(this.A4OK5k,String(odub4.ZJvIQ)); }catch(err){console.log(err);}; } this.LrO[E7Zd].B4BZZ=odub4.ZJvIQ; this.LrO[E7Zd].filter=-1; if (odub4.hasOwnProperty(tmw.util.props.props)) this.LrO[E7Zd][tmw.util.props.props]=odub4[tmw.util.props.props]; } else { s21503=odub4.p6a; } if (!Q7Fg){ if (typeof(odub4.log)=="string") this.LrO[E7Zd].log=odub4.log; if (TptT){ if (TptT.data) this.LrO[E7Zd].data=TptT.data; if (TptT.HGWuSRq) this.LrO[E7Zd].HGWuSRq=TptT.HGWuSRq; if (TptT.xTfPr) this.LrO[E7Zd].xTfPr=TptT.xTfPr; if (TptT.bounds) this.LrO[E7Zd].bounds=TptT.bounds; }; } tmw.util.trackPage("/app/save/"+odub4.ZJvIQ); console.log("Callback: oldid "+s21503+", "+odub4.ZJvIQ); if (s21503>0 && s21503!=odub4.ZJvIQ){ var ICf; if (Q7Fg && !odub4.external){ ICf=this.q5P|this.VjRO3o; this.uDOe5X=odub4.ZJvIQ; } else ICf=this.q5P; this.jM1(ICf, String(s21503),{ B4BZZ:String(odub4.ZJvIQ), mdiNpG:(odub4.ZJvIQ>0)?odub4.ZJvIQ:null, props:odub4.props||null, pwvJvY:"1", tracknick:y43SIk.me, trackname:odub4.trackname||null, trackdesc:odub4.trackdesc||null, trackloct:odub4.trackloct||null, tracktype:odub4.tracktype>=0?odub4.tracktype:null, trackprofile:odub4.trackprofile||null, trackgroup:odub4.trackgroup||"", j455bF:odub4.l8l4rwf?odub4.l8l4rwf.b2F:null, pRJJ:odub4.hpFI||null, filter:-1 }); } else if (s21503==odub4.ZJvIQ || s21503<=0 || s21503=="0async"){ var ICf; if (Q7Fg){ if (odub4.external) ICf=this.q5P; else ICf=this.wLp8|this.VjRO3o; } else ICf=this.wLp8; this.jM1(ICf, String(s21503), { B4BZZ:String(odub4.ZJvIQ), mdiNpG:(s21503<=0 && odub4.ZJvIQ>0)?odub4.ZJvIQ:null, props:odub4.props||null, pwvJvY:"1", olmJ:true, trackname:odub4.trackname||null, trackdesc:odub4.trackdesc||null, trackloct:odub4.trackloct||null, tracktype:odub4.tracktype>=0?odub4.tracktype:null, trackprofile:odub4.trackprofile||null, trackgroup:odub4.trackgroup||"", j455bF:odub4.l8l4rwf?odub4.l8l4rwf.b2F:null, pRJJ:odub4.hpFI||null, filter:-1 }); } }, BVE74W: function(Y2TK6){ }, EDS: function() { var t = dijit.byId(this.f9KF); var FWHX7 = this.ftLK; if (FWHX7==null){ alert("This race has currently no players"); return; } var p8lYB=this.IGj5G({B4BZZ:this.ftLK[0].oVk}); if (p8lYB.cxYsFSB){ var wCED={B4BZZ:this.ftLK[0].oVk, ZQYo:false, hQL3G: p8lYB.index}; Ol6sv(this, wCED, dojo.hitch(this,function(){ this.cbF0IT.nRQIX(this.LrO[p8lYB.index]); })); } else { this.cbF0IT.nRQIX(this.LrO[p8lYB.index]); } var x233=function(eR5,k6OC){ var GLO8Q = FWHX7[k6OC % FWHX7.length]; return "
"+GLO8Q[tmw.util.props.QWDARO]; }; var lG78AJ=function(src){ return ""; }; var store = new dojo.data.ItemFileWriteStore({data: {identifier:tmw.util.props.oVk, items:FWHX7}}); this.t2hoX0=store; var view = { cells: [[ {name: 'rtid', field: tmw.util.props.oVk, width: "3em", hidden:true}, {name: this.mEl7r, field: "action", width: "20px",headerStyles:'height:26px;', formatter:dojo.hitch(this,this.U2lxk) }, {name: 'UID', field: tmw.util.props.MQKJ1, width: "3em", hidden:true}, {name: 'Rank', field: tmw.util.props.wnD7, width: "3em"}, {name: 'Player', formatter: x233, width: "4em", cellStyles:'height:50px;'}, {name: 'Time', field: tmw.util.props.time, width: "4em", formatter: tmw.util.formatTimeSimple, styles: 'text-align: right;'}, {name: 'Date', field: tmw.util.props.E53H, width: "6em", styles: 'text-align: right;'}, {name: 'Source', field: tmw.util.props.trackname, hidden:true, width: "6em", styles: 'text-align: right;'}, ]] }; var layout = [ view ]; t.setStore(store,{QWDARO: '*'}); t.setStructure(layout); var selection = new dojox.grid.Selection(t); selection.WGqP6V1 = this.gtJCwz; selection.clickSelect = function(H6xE, t2b9F, q8Fo) { H6xE = Number(H6xE); this._beginUpdate(); this.toggleSelect(H6xE); var c = this.getSelectedCount(); if (c == this.WGqP6V1) this.C4ljE = H6xE; if (c == this.WGqP6V1+1) { this.toggleSelect(this.C4ljE); this.C4ljE = H6xE; } this._endUpdate(); }; t.selection = selection; if (!this.R8H8) { var domain=this; dojo.connect(t,'onRowClick',this,this.zQVN); dojo.connect(t,'onRowClick',this,function(KnsE){ if (KnsE.cellIndex==1){ domain.LYMQK=KnsE; dijit.byId(domain.rootId+"gridplayersMenu")._openMyself(KnsE); t.selection.toggleSelect(domain.LYMQK.rowIndex); } }); this.R8H8=true; var T4Lm=dijit.byId(this.rootId+"gridplayersMenu"); if (T4Lm) { T4Lm.bindDomNode(t.domNode); t.onCellContextMenu = dojo.hitch(this,function(KnsE) { this.LYMQK=KnsE; }); xS54=dojo.byId(this.rootId+"removePlayer"); if (xS54) dojo.connect(xS54, "onclick", this, this.GD02); } else { console.warn("no gridMenu defined"); } dojo.connect(t,"onRowMouseOver",this,this.mIWO25); dojo.connect(t,"onRowMouseOut",this,this.WNs9y); } dijit.byId(this.jbCSNv).minimize(); this.vOSMW8(); }, tSC: function(props) { if (window._tmwURLOptions){ if (!props.hasOwnProperty("map")) { props["map"]={"zl": null, "cla": null, "cln": null, "mt": null }; } if (_tmwURLOptions["cs"]){ props["map"]["cs"]=true; } if (_tmwURLOptions["zl"]) { props["map"]["zl"]=_tmwURLOptions["zl"]; p5SU("zl"); } if (_tmwURLOptions["mt"]) { props["map"]["mt"]=_tmwURLOptions["mt"]; p5SU("mt"); } if (_tmwURLOptions["lat"]) { props["map"]["cla"]=_tmwURLOptions["lat"]; p5SU("lat"); } if (_tmwURLOptions["lng"]) { props["map"]["cln"]=_tmwURLOptions["lng"]; p5SU("lng"); }; } } , vOSMW8: function() { if (window._tmwURLOptions) { var domain=this; if (_tmwURLOptions["sp"]) { var GlsZ=Math.max(1,Math.min(3,_tmwURLOptions["sp"])); while (GlsZ-- >0) this.s.action.YLJ(1); p5SU("sp"); } if (_tmwURLOptions["cs"]) { setTimeout(function(){ var p=domain.s.TGXIkx[0].oqt.getValue(0); domain.C8Uc9.O2J42T.panTo(new GLatLng(p[2],p[3])); },4000); p5SU("cs"); } if (_tmwURLOptions.hasOwnProperty("af")) { var GR6LFh=Math.max(1,Math.min(8,_tmwURLOptions["af"])); E58(dojo.byId(this.rootId+"dnfoc")); this.s.Bn9jfb=GR6LFh; p5SU("af"); } if (_tmwURLOptions["crm"]) { dojo.style(dojo.byId(this.rootId+"elem1"),"zIndex",0); p5SU("crm"); } if (_tmwURLOptions["ctm"]) { this.GQOVe4(false); p5SU("ctm"); } if (_tmwURLOptions["ce"]) { setTimeout(function(){dijit.byId(domain.rootId+"EleFloater").minimize()},4000); p5SU("ce"); } if (_tmwURLOptions["as"]) { if (_tmwURLOptions["pl"]){ var E7Zd,tLRCVVt,pl=_tmwURLOptions["pl"],SYgJS1; var t = dijit.byId(this.f9KF); var FWHX7 = this.ftLK; for (E7Zd=0;E7Zd hCmVO.w) WcT2i.x=hCmVO.w-WcT2i.w; if (WcT2i.y+WcT2i.h > hCmVO.h) WcT2i.y=hCmVO.h-WcT2i.h; dojo.style(rcW7Y.domNode,"left",WcT2i.x+"px"); dojo.style(rcW7Y.domNode,"top",WcT2i.y+"px"); this.y0RT.sort(function(SwEoY7i,b){ return parseInt(SwEoY7i.t)-parseInt(b.t); }); dojo.forEach(this.y0RT, function(p,E7Zd) { p.M65E2=E7Zd+1; var lzVNmf = dojo.byId(this.rootId+"player"+E7Zd); dojo.style(lzVNmf,"visibility","visible"); var node = dojo.byId(this.rootId+"pn"+E7Zd); node.innerHTML = p.name; var K5IR=this.s.kjHQ[E7Zd]; var id=this.rootId+"r"+E7Zd; dojo.byId(this.rootId+"pi"+E7Zd).innerHTML = '' +'
 
'; },this); }, O2vaXBt: function() { this.PkXd1 = this.y0RT.length; if (this.PkXd1==0){ tmwAlert({message:W6GcVU, confirm:true, w:300}); return; } this.qXL5T0(); tmwAlert({title:"Loading players..",Yf47:true}); dojo.forEach(this.y0RT, function(p,E7Zd) { var p8lYB=this.IGj5G({B4BZZ:p.oVk}); this.LrO[p8lYB.index].ETYG=true; this.LrO[p8lYB.index].CgxUP6=p.name; if (p8lYB.cxYsFSB) { filter = {B4BZZ: p.oVk}; dojo.mixin(filter, {hQL3G: p8lYB.index}); Ol6sv(this, filter, this.MI176R9); } else { this.MI176R9(p8lYB.index); } },this); }, MI176R9: function(E7Zd) { if (--this.PkXd1 > 0) return; var domain=this; this.s.j3Y(true); dojo.forEach(this.LrO, function(bQTfR4h,E7Zd){ if (bQTfR4h.ETYG) { setTimeout(function(){domain.s.createPath(bQTfR4h);},E7Zd*1000); } },this); this.t2GA = true; this.PkXd1 = this.y0RT.length; var pPC0c; this.yujhW=setInterval(dojo.hitch(this, function(){ pPC0c=0; for (var tLRCVVt=0;tLRCVVt=3){ throw new Error(); } setTimeout(function(){ domain.C8Uc9.Fh4u9( domain.C8Uc9.BIP55 ); if ( domain.C8Uc9.GOverlay.mapPos.x<-100 || domain.C8Uc9.GOverlay.mapPos.y<-100 ){ domain.resize(); } },1000); } else { throw new Error(); } }catch(err){ delete this.uP2rkt; this.C8Uc9.Fh4u9(this.C8Uc9.BIP55); } } }, ETYG: function() { return (this.iVMB4 in this.Fw14mF && this.rootId=="p2"); }, qXL5T0: function(){ dojo.forEach(this.LrO, function(bQTfR4h){ bQTfR4h.ETYG=false; }); }, B6fT: function(){ return { vUnO: dijit.byId(this.RbE6qru) }; }, lU1QGj: function(){ this.s.cFqW75=true; if (this.ETYG() && !this.t2GA) this.O2vaXBt(); else this.s.play(); }, m4G8vd: function(){ this.s.ibWJGK.duX47W(); }, OZWHr: function(){ this.cbF0IT.VM81(); }, MMIHF: function(){ this.cbF0IT.sBXP5L(); }, em6: function(KnsE){ var id=KnsE.target.id; this.s.em6(dijit.byId(id).attr('value')); }, pk0M: function(GR6LFh){ this.s.pk0M(GR6LFh); }, HwqK: function(data){ NcTnfMp(this,data); this.SS71c(); }, HY02VF: function(F447L,lUsI){ var data=dojo.fromJson(F447L); if(!(data.AFB instanceof Array) || data.AFB.length==0) return; var n; for(n=0;nthis.gxKBm){ var nj7d00=null; this.WsYo0Z.fetchItemByIdentity({ identity:UPOM0VI+"", LUGyMW:function(E7Zd){ nj7d00=domain.WsYo0Z.getValue(E7Zd,"name"); } }); if(nj7d00) QoD26s["w"]=nj7d00; } else if(UPOM0VI==this.X1VVRe3){ QoD26s["wmode"]=this.X1VVRe3; } else if(UPOM0VI==this.yRdhD){ QoD26s["wmode"]=this.yRdhD; } else if(UPOM0VI==this.gxKBm){ if (GM6k5["who0"]) QoD26s["w"]=(GM6k5["who1"][0]?"G:":"")+GM6k5["who0"]; }; } if(GM6k5["rname"]){ QoD26s["n"]=GM6k5["rname"].replace(/\s+/g,"*"); } if(GM6k5["rdesc"]){ QoD26s["d"]=GM6k5["rdesc"].replace(/\s+/g,"*"); } if(GM6k5["rttype"]!=this.Dprj7){ QoD26s["t"]=GM6k5["rttype"]; } if(GM6k5["where"]!=this.rYfO){ if(GM6k5["where"]==this.uR32iN2){ UPOM0VI=this.hhT(); if(UPOM0VI) QoD26s["af"]=dojo.toJson(UPOM0VI); }else if(GM6k5["where"]==this.lENPRL){ if(GM6k5["near"]) QoD26s["nr"]=GM6k5["near"]; }else if(GM6k5["where"]==this.cNDjN || GM6k5["where"]==this.M2c) { UPOM0VI=tmactive.C8Uc9; if( (UPOM0VI.hUP.D3TK || UPOM0VI.hUP.W2vW4NJ ) && UPOM0VI.HGWuSRq[this.R4UEN] && UPOM0VI.HGWuSRq[this.R4UEN].F9L8) { QoD26s["npla"]=UPOM0VI.HGWuSRq[this.R4UEN].F9L8.lat(); QoD26s["npln"]=UPOM0VI.HGWuSRq[this.R4UEN].F9L8.lng(); }; }; }; } tmactive.ghMO=QoD26s; tmw.util.trackPage("/app/searchRoutes"); tmwSetTMFilter(QoD26s,tmactive.rootId=="p2"); }, X12355:function(GM6k5){ if(tmactive.C8Uc9.mode==tmactive.C8Uc9.k37rF){ alert("Can't search for POIs when not in editing mode!"); return; } var QoD26s={}; QoD26s["p"]=GM6k5["ppolicy"]; if (GM6k5["ids[]"]) QoD26s["ids[]"]=GM6k5["ids[]"]; tmw.util.trackPage("/app/searchPOIs"); tmwAlert({title:sf7iub6,Yf47:true}); dojo.xhrPost({ url: "scripts/searchPOI.php" , handleAs: "text", timeout: 5000, load: function(data){ tmwAlert({close:true}); tmactive.HY02VF(data); } , content: QoD26s }); }, hhT: function(){ var n,SYgJS1,UPOM0VI=[],data,FD9YxK=tmactive.C8Uc9; if(!FD9YxK.hUP.yXSW2) return; for(n in FD9YxK.hUP.o9ejVI) UPOM0VI.push(n); if(UPOM0VI.length==0) return; var u6t9U, Euk, dHKkG4O=/(.+),(.+),(.+)/; data=UPOM0VI.sort(function(SwEoY7i,b){ u6t9U=SwEoY7i.match(dHKkG4O); Euk=b.match(dHKkG4O); if(!u6t9U || !Euk) return 0; return (u6t9U[3]>Euk[3])?-1:1; }); UPOM0VI=null; var UPOM0VI=[data[0]],msLDmu5; for(n=1;n=+Euk[1] && +u6t9U[1]+FD9YxK.fb5RSP*+u6t9U[3]<=+Euk[1]+FD9YxK.fb5RSP*+Euk[3] && +u6t9U[2]>=+Euk[2] && +u6t9U[2]+FD9YxK.YILLY*+u6t9U[3]<=+Euk[2]+FD9YxK.YILLY*+Euk[3]) { msLDmu5=true; break; }; } if(!msLDmu5) UPOM0VI.push(data[n]); } data=null; return UPOM0VI; }, initForm:function(eJKC7LK){ var domain=this; if (!y43SIk.me) c6lfaS(true,fgG5D); else fgG5D(); function fgG5D(){ var Vj8L=SDJQ, ANL=0, KRlKI2K=eJKC7LK || tmactive; Vj8L(); function SDJQ(){ var node=dojo.query("#"+KRlKI2K.rootId+domain.noR6Hv+" form"); if(!node[0])return; dojo.toggleClass(node[0],"tmwFilterPanel",true); node[0].name=KRlKI2K.rootId; var tWY09I=dijit.byNode(node[0]); ANL++; if(!tWY09I && ANL<10) setTimeout(Vj8L,1000); else domain.wIYC77h(node[0],KRlKI2K); }; }; }, wIYC77h:function(node,KRlKI2K){ if(!KRlKI2K){ if(!tmactive)return; KRlKI2K=tmactive; } var eGLNEa=KRlKI2K.rootId; if(this.forms[eGLNEa]){ return; } var Y2TK6={ PBONvd: dijit.byNode(node), iqYKek: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='ftyperoute']")[0], wGUlQP: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='ftypepoi']")[0], soGF: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='customRules']")[0], XKbXg: dojo.query("#"+eGLNEa+this.noR6Hv+" span[name='routpos']")[0], nSNOiU: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='routesrctypblock']")[0], i1k: dojo.query("#"+eGLNEa+this.noR6Hv+" span[name='poipos']")[0], dDdNc: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='byregions']")[0], xvzCV: dojo.query("#"+eGLNEa+this.noR6Hv+" table[name='regions']")[0], D5i4Sh7: {}, otdWR: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='byproximityroute']")[0], g01Ml1G: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='byproximitypoint']")[0], mlSNCJ: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='byproximityaddr']")[0], iP37LQT: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='who']")[0], N44h: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='routextra']")[0], g4QYk: dojo.query("#"+eGLNEa+this.noR6Hv+" div[name='poiextra']")[0] }; this.forms[eGLNEa]=Y2TK6; var UPOM0VI; if(!Y2TK6.PBONvd)return; if(!Y2TK6.PBONvd.domNode["near"].widgetId){ Y2TK6.ut68=new dijit.form.ComboBox({ name:"near", autocomplete:true, labelAttr: tmw.util.props.trackname, searchAttr: tmw.util.props.B4BZZ, store: KRlKI2K && KRlKI2K.EfXCH6 || null },Y2TK6.PBONvd.domNode["near"]); dojo.toggleClass(Y2TK6.ut68.domNode,"fllftmrg microfield",true); } if(!Y2TK6.PBONvd.domNode["owner"].widgetId){ this.WsYo0Z=Y4yK1(true,[ {ndx:"1", name:T39I}, {ndx:"2", name:G9FRaT0}, {ndx:"3", name:UnD6oC}, {ndx:"4", name:k3BJR4} ]); UPOM0VI=new dijit.form.FilteringSelect({ name:"owner", autocomplete:true, searchAttr:"name", store: this.WsYo0Z, value: "1", onChange: dojo.hitch(this,this.LKCV8r) },Y2TK6.PBONvd.domNode["owner"]); dojo.toggleClass(UPOM0VI.domNode,"fllftmrg",true); } if(!Y2TK6.PBONvd.domNode["rttype"].widgetId){ var ndSx6=xIV5i([ {name:TyI1bG,id:0} ],false,"id"); UPOM0VI=new dijit.form.FilteringSelect({ name:"rttype", autocomplete:true, searchAttr:"name", store: ndSx6, value: "0" },Y2TK6.PBONvd.domNode["rttype"]); dojo.toggleClass(UPOM0VI.domNode,"fllftmrg minifield",true); } }, searchchange: function(eR5){ if(!eR5) return; var eGLNEa=tmactive.rootId; if(!this.forms[eGLNEa]) this.initForm(tmactive); if(eR5!=this.NH19C){ this.mode=this.bBUJS; dojo.style(this.forms[eGLNEa].wGUlQP,"display","block"); dojo.style(this.forms[eGLNEa].i1k,"display","block"); dojo.style(this.forms[eGLNEa].g4QYk,"display","block"); dojo.style(this.forms[eGLNEa].N44h,"display","none"); dojo.style(this.forms[eGLNEa].iqYKek,"display","none"); dojo.style(this.forms[eGLNEa].XKbXg,"display","none"); dojo.style(this.forms[eGLNEa].nSNOiU,"display","none"); } else { this.mode=this.NH19C; dojo.style(this.forms[eGLNEa].iqYKek,"display","block"); dojo.style(this.forms[eGLNEa].XKbXg,"display","block"); dojo.style(this.forms[eGLNEa].nSNOiU,"display","block"); dojo.style(this.forms[eGLNEa].N44h,"display","block"); dojo.style(this.forms[eGLNEa].g4QYk,"display","none"); dojo.style(this.forms[eGLNEa].wGUlQP,"display","none"); dojo.style(this.forms[eGLNEa].i1k,"display","none"); } this.forms[eGLNEa].PBONvd.attr("value",{"where":"0"}); var uFJY44=(this.mode==this.NH19C?"rpolicy":"ppolicy"); this.policychange(this.forms[eGLNEa].PBONvd.attr("value")[uFJY44]); }, policychange: function(eR5){ if(!eR5) return; var eGLNEa=tmactive.rootId; if(!this.forms[eGLNEa]) this.initForm(tmactive); if(eR5!= (this.mode==this.NH19C?this.B94nQO :this.t8O) ){ dojo.style(this.forms[eGLNEa].soGF,"display","none"); this.forms[eGLNEa].PBONvd.attr("value",{"where":"0"}); } else { dojo.style(this.forms[eGLNEa].soGF,"display","block"); } }, wherechange: function(eR5){ if(this.z0b3a5) return; if(!eR5) return; var eGLNEa=tmactive.rootId; if(!this.forms[eGLNEa]) this.initForm(tmactive); if(eR5==this.uR32iN2){ if (tmactive.C8Uc9.mode!=tmactive.C8Uc9.k37rF){ alert("You have to put the editor in OVERVIEW_MODE to use this feature"); this.forms[eGLNEa].PBONvd.attr("value",{fGjl:"0"}); } else { dojo.style(this.forms[eGLNEa].dDdNc,"display","block"); dojo.style(this.forms[eGLNEa].otdWR,"display","none"); dojo.style(this.forms[eGLNEa].g01Ml1G,"display","none"); dojo.style(this.forms[eGLNEa].mlSNCJ,"display","none"); this.bHWNc(eGLNEa); tmactive.C8Uc9.c5QOD(this.uR32iN2); }; } else if(eR5==this.lENPRL){ dojo.style(this.forms[eGLNEa].dDdNc,"display","none"); dojo.style(this.forms[eGLNEa].g01Ml1G,"display","none"); dojo.style(this.forms[eGLNEa].mlSNCJ,"display","none"); dojo.style(this.forms[eGLNEa].otdWR,"display","block"); this.bHWNc(eGLNEa); this.forms[eGLNEa].ut68.attr("store",tmactive.EfXCH6); tmactive.C8Uc9.c5QOD(this.lENPRL); } else if(eR5==this.cNDjN){ dojo.style(this.forms[eGLNEa].dDdNc,"display","none"); dojo.style(this.forms[eGLNEa].otdWR,"display","none"); dojo.style(this.forms[eGLNEa].mlSNCJ,"display","none"); dojo.style(this.forms[eGLNEa].g01Ml1G,"display","block"); this.bHWNc(eGLNEa); tmactive.C8Uc9.c5QOD(this.cNDjN); } else if(eR5==this.M2c){ dojo.style(this.forms[eGLNEa].dDdNc,"display","none"); dojo.style(this.forms[eGLNEa].otdWR,"display","none"); dojo.style(this.forms[eGLNEa].g01Ml1G,"display","none"); dojo.style(this.forms[eGLNEa].mlSNCJ,"display","block"); this.bHWNc(eGLNEa); tmactive.C8Uc9.c5QOD(this.M2c); } else { dojo.style(this.forms[eGLNEa].dDdNc,"display","none"); dojo.style(this.forms[eGLNEa].otdWR,"display","none"); dojo.style(this.forms[eGLNEa].g01Ml1G,"display","none"); dojo.style(this.forms[eGLNEa].mlSNCJ,"display","none"); this.bHWNc(eGLNEa); tmactive.C8Uc9.c5QOD(); } }, LKCV8r: function(eR5){ if(!eR5) return; var eGLNEa=tmactive.rootId; if(!this.forms[eGLNEa]) this.initForm(tmactive); if(eR5==this.gxKBm){ dojo.style(this.forms[eGLNEa].iP37LQT,"display","block"); } else { dojo.style(this.forms[eGLNEa].iP37LQT,"display","none"); } }, WaBfUt: function(Ww1a,WxCI,V4k3WA,LWVo,GWRq,rootId){ var eGLNEa=typeof(rootId)=="undefined"?tmactive.rootId:rootId; if(!this.forms[eGLNEa].xvzCV) return; var u81f7N=this.forms[eGLNEa].xvzCV, GLO8Q=u81f7N.insertRow(u81f7N.rows.length), mPl7F=GLO8Q.insertCell(0), BPYs=GLO8Q.insertCell(1), HLu6, ndx; mPl7F.innerHTML="Lat: "+Ww1a+"/"+V4k3WA+", lon: "+WxCI+"/"+LWVo; HLu6=document.createElement("div"); BPYs.appendChild(HLu6); ndx=tmactive.C8Uc9.NL8XU(Ww1a,WxCI,GWRq); this.forms[eGLNEa].D5i4Sh7[ndx]=new dijit.form.Button({ label: "Remove", onClick: this.COKU, name: ndx },HLu6); }, COKU: function(){ var UPOM0VI, eGLNEa=tmactive.rootId; if(!_rfilter.forms[eGLNEa].xvzCV) return; tmactive.C8Uc9.COKU(this.attr("name")); UPOM0VI=this.domNode; while(UPOM0VI && !UPOM0VI.nodeName.match(/tr/i)) UPOM0VI=UPOM0VI.parentNode; if(UPOM0VI){ _rfilter.forms[eGLNEa].xvzCV.deleteRow(UPOM0VI.rowIndex); } this.destroy(); } , bHWNc: function(rootId){ this.z0b3a5=true; try{ if(tmactive.C8Uc9.hUP.yXSW2) this.VyY1(rootId); if(tmactive.C8Uc9.hUP.W2vW4NJ) this.resetAddrFilter(rootId); if(tmactive.C8Uc9.hUP.D3TK) this.resetPointFilter(rootId); }catch(err){} delete this.z0b3a5; tmactive.C8Uc9.c5QOD(); } , VyY1: function(rootId){ var eGLNEa=typeof(rootId)=="undefined"?tmactive.rootId:rootId; var FD9YxK=tmactive.C8Uc9, n, u81f7N, StWdy, UPOM0VI; u81f7N=this.forms[eGLNEa].xvzCV; StWdy=this.forms[eGLNEa].D5i4Sh7; if(!u81f7N) return; for(n in FD9YxK.hUP.o9ejVI){ FD9YxK.COKU(n); } for(n in StWdy){ try{ StWdy[n].destroy(); }catch(err){}; } this.forms[eGLNEa].D5i4Sh7=null; StWdy=null; this.forms[eGLNEa].D5i4Sh7={}; for(n=u81f7N.rows.length-1;n>=0;n--){ u81f7N.deleteRow(n); } }, resetPointFilter: function(rootId){ var FD9YxK=tmactive.C8Uc9; try { FD9YxK.HGWuSRq[this.R4UEN].destroy(); }catch(err){} delete FD9YxK.HGWuSRq[this.R4UEN]; }, resetAddrFilter: function(rootId,Yy0v01){ var FD9YxK=tmactive.C8Uc9, eGLNEa=typeof(rootId)=="undefined"?tmactive.rootId:rootId; try { FD9YxK.HGWuSRq[this.R4UEN].destroy(); }catch(err){} FD9YxK.HGWuSRq[this.R4UEN]=null; if(!Yy0v01) this.forms[eGLNEa].PBONvd.attr("value","address",""); }, addresschange: function(eR5){ var FD9YxK=tmactive.C8Uc9; this.resetAddrFilter(undefined,true); if(!eR5) return; this.aLG4W9=true; FD9YxK.nP4LB.getLatLng(eR5,_rfilter.e23HrW); }, e23HrW: function(WcT2i){ delete _rfilter.aLG4W9; if(!WcT2i){ alert("Cannot lookup the specified address"); return; } var FD9YxK=tmactive.C8Uc9; FD9YxK.KX9YD2(WcT2i,true); } }; _rfilter=new jyEhL(); dojo.declare(tmw.util.sym.X35QK,null,{ constructor: function(C5Y66, KRlKI2K, VRBbj, map, X7bIjv){ log("New Editor "+KRlKI2K+" "+VRBbj+" "+map+" "+X7bIjv); this.BT5PDB=C5Y66; this.tTYKi=null; if (X7bIjv) this.X7bIjv=X7bIjv; else this.X7bIjv=false; this.gaMQ7p=null; this.mode=null; this.x3CUjg=this.in75; this.tracktype=null; this.baseName=KRlKI2K; this.width=null; this.height=null; this.E2HsE=null; this.l4W4=null; this.gUA=null; this.GOverlay=null; this.O2J42T=map; this.events=[]; this.NT6AA=[]; this.TDBtZS=null; this.O58=null; this.MH51iX=null; this.gfxNode=null; this.tRD2=null; this.position=null; this.eJb=null; this.cN4DG6U=null; this.selected=null; this.eIaT6=null; this.points=[]; this.HGWuSRq={}; this.Y6vhW2L=null; this.u3uGhU7=0; this.KH7eV=false; this.HQ1m4=false; this.Mk8DD=[]; this.LcmI9hO={ origin: {x:0,y:0}, LfD5: null, gfx: null, w: null, h: null, points: [], g27P: [], YHLA: null }; this.g2nT={ map: {}, vPkiU: {}, page: 0, U873Y: 0 }; this.fr3X=null; this.co85K=null; this.Oj7=null; this.sEbL={}; this.sEbL.RWTR=dijit.byId(this.BT5PDB.rootId+"poiPager"); dojo.toggleClass(this.sEbL.RWTR.domNode,"tmwPoiPager",true); this.sEbL.P0RxAG=true; this.RU15B.Ft2wB={ color: dojo.blendColors( dojo.colorFromArray(this.RU15B.ibC.color), dojo.colorFromArray(this.RU15B.HC5CFmE.color), 0.5).toRgba() , width: this.RU15B.ibC.width }; map.enableDoubleClickZoom(); this.hUP={ pLIU2Z: [], i5tW: [], j5L: [], EWWk: [], dOuL9c5: [], JSNCYq: 1, W563L8b: null, S88SWn: {}, wc6s: 0, yXSW2: false, D3TK: false, W2vW4NJ: false, o9ejVI: {}, P64: {} }; this.MH51iX=document.createElement("div"); this.MH51iX.setAttribute("id","editorNode"); this.gfxNode=document.createElement("div"); this.gfxNode.setAttribute("id","gfxNode"); dojo.style(this.MH51iX,"border","solid "+this.bsN2o3+"px "+this.RHEfl); dojo.style(this.MH51iX,"position","relative"); if (VRRPHT || BWH){ this.eA65=dojo.byId(this.baseName+"canvasNode"); this.LcmI9hO.gfx=dojox.gfx.createSurface(this.eA65,0,0); } else { this.eA65=document.createElement("canvas"); this.LcmI9hO.LfD5=this.eA65.getContext('2d'); } this.eA65.setAttribute("id",KRlKI2K+"UnedCnvs"); dojo.style(this.eA65, "position", "absolute"); dojo.style(this.eA65, "visibility","hidden"); this.MH51iX.appendChild(this.gfxNode); this.eJb=dojox.gfx.createSurface(this.gfxNode,0,0); this.GOverlay=new Y2PC4O3(this, VRBbj); this.nP4LB=new GClientGeocoder(); this.dYI9=new MOY8h(); this.AAk7y=new X35QK.K4iVxy(this); this.MhbLiw=new KO23cB(); this.hAHVF5=new yql7fQ(this); this.id1I8FK=new LCInG(this); this.SMLYa=new cMQ(KRlKI2K); this.WHc8jP=null; this.e2BX=map.getPane(G_MAP_MAP_PANE); this.tRD2=this.e2BX.parentNode; this.e2BX.appendChild(this.MH51iX); this.e2BX.appendChild(this.eA65); this.e2BX.setAttribute("id",this.BT5PDB.rootId+"overlaynode"); map.addOverlay(this.GOverlay); this.Fh4u9(this.M7WR23); this.gUA=new X35QK.wb1(this); this.Atgr(this.k37rF); this.hAHVF5.NwPa(); this.vZ1Ln(); this.vp4R=null; this.hUP.pLIU2Z[0]=this.SlP67f("0"); window.e6Wm=null; } , SlP67f: function(ndx){ var pLIU2Z=dojo.byId("_tmwOGAS"+(ndx||"0")); if (pLIU2Z){ this.MH51iX.appendChild(pLIU2Z); return pLIU2Z; } pLIU2Z=document.createElement("div"); pLIU2Z.setAttribute("id","_tmwOGAS"+(ndx||"0")); dojo.addClass(pLIU2Z,"tmwAreaSelector"); this.MH51iX.appendChild(pLIU2Z); dojo.style(pLIU2Z,"top","-2000px"); return pLIU2Z; } , SEG8: function(C3He,vDTq){ var FRmM8Ka={}, QoD26s={p:5}; if (C3He){ if (this.hUP.EWWk.length==0 || this.hUP.j5L.length==0) return; FRmM8Ka.Ww1a=this.hUP.EWWk[0].lat; FRmM8Ka.WxCI=this.hUP.j5L[0].lb15Y; FRmM8Ka.V4k3WA=this.hUP.EWWk[this.hUP.EWWk.length-1].lat; FRmM8Ka.LWVo=this.hUP.j5L[this.hUP.j5L.length-1].lb15Y; FRmM8Ka.c=this.hUP.JSNCYq; } else { if (!vDTq){ var QJ56PJ=this.T7xQLD(this.O58); FRmM8Ka.c=QJ56PJ.JSNCYq; FRmM8Ka.Ww1a=QJ56PJ.Ww1a; FRmM8Ka.WxCI=QJ56PJ.WxCI; FRmM8Ka.V4k3WA=QJ56PJ.V4k3WA; FRmM8Ka.LWVo=QJ56PJ.LWVo; delete QJ56PJ; } else { FRmM8Ka.c=vDTq["c"]; FRmM8Ka.Ww1a=vDTq["slat"]; FRmM8Ka.WxCI=vDTq["slon"]; FRmM8Ka.V4k3WA=vDTq["elat"]; FRmM8Ka.LWVo=vDTq["elon"]; }; } if (this.BT5PDB.ETYG()){ QoD26s["type[]"]=this.BT5PDB.iVMB4; } QoD26s.XW4=dojo.toJson(FRmM8Ka); tmwAlert({title:sf7iub6,Yf47:true}); tmwSetTMFilter(QoD26s,this.BT5PDB.ETYG()); } , xoSP8: function(){ var gP2E; gP2E=window.prompt(dssID); if (!gP2E) return; this.nP4LB.setViewport(this.gUA.snkKFJ); this.nP4LB.getLatLng(gP2E, dojo.hitch(this, this.s7b)); } , s7b: function(position, ciT5){ var Sq0v7S=3000, domain=this; if (!position){ alert("Cannot go to the specified address"); return; } this.ZRZW=o3FfaO; if (ciT5){ this.O2J42T.setCenter(this.O2J42T.fromDivPixelToLatLng(position), this.l4W4+1); } else { this.O2J42T.setCenter(position, Math.max(10,this.l4W4)); } function o3FfaO(){ domain.KX9YD2({x:domain.width/2 , y:domain.height/2}); setTimeout(Rg3zk,Sq0v7S); delete position; }; function Rg3zk(){ _rfilter.resetPointFilter(); }; } , r1EDRVU: function(GLfIM){ if (!(GLfIM===true)){ if (this.mode==this.k37rF){ this.Fi8(); } else { this.Fi8(true); }; } if (this.events.length>0){ log("Events for editor "+this.baseName+" are already registered"); return; } console.log("Registering editor "+this.baseName+" events"); var domain=this; this.h8qB85F(this.tRD2, "onmousedown", this, this.iFtXV1); this.h8qB85F(this.tRD2, "onmouseup", this, this.b5KNZI); this.QacdU5(this.baseName+"ovwmodett", "execute", this, this.K2PJq); this.QacdU5(this.baseName+"ovwmodett", "onOpen", this, this.cjD6Ntl); if (this.co85K){ this.co85K.unBindDomNode(this.tRD2); delete this.co85K; } this.l67X(); if (this.mode==this.k37rF){ for(var n=0;n0 && this.hAHVF5.qSTQ()0 && domain.hAHVF5.qSTQ()0){ domain.BT5PDB.jM021L(domain.hAHVF5.U52ITjN.cp); } } }); } , gLXn8: function(desc){ var cSrGN, Ckgd1={}, T96cl=/\[LANG=(.*?)\]((?:.|\n)*?)\[\/LANG\]/g, ENXIDDq=/\s+|/g; ; cSrGN=(desc||"").replace(T96cl,CVPYD50); if (cSrGN.replace(ENXIDDq,"").length>0) Ckgd1["Default"]=cSrGN; return Ckgd1; function CVPYD50(s,sBD5h4,pNg47Oq,o,pGJ2FjE){ if (!Ckgd1[sBD5h4]) Ckgd1[sBD5h4]=pNg47Oq; else Ckgd1[sBD5h4]+=pNg47Oq; return ""; }; }, xbDy: function(){ var RVuhc9=this.hAHVF5.U52ITjN.cp, domain=this, BPpCc3=dijit.byId(domain.baseName+"fullDesc"), C2nC6, mHJ98=dijit.byId(domain.baseName+"DescLang"), oGOn7=dojo.byId(domain.baseName+"RevwUserAvatarNick"), QyWR1I=dojo.byId(domain.baseName+"RevwUserAvatarImg"); ; if (!mHJ98) return; if (mHJ98.nlHG7u==RVuhc9) return; if (!mHJ98.nlHG7u){ mHJ98.attr("onChange",null); mHJ98.attr("onChange",q4oL); } mHJ98.nlHG7u=RVuhc9; this.BT5PDB.iMD1tUO(RVuhc9, RnyFv); function RnyFv(E7Zd,store){ var NvZF=[]; if (E7Zd && E7Zd[0]){ C2nC6=fCg5(store,E7Zd[0],{ jp:true,intrm:true, poifilt:true,taggedPois:true }); if (!oFD5[C2nC6[tmw.util.props.tracknick]]){ NvZF.push({c:24, "u": C2nC6[tmw.util.props.tracknick]}); }; } domain.dgRAe7f(RVuhc9,false,ZTEC,NvZF); }; function ZTEC(m4Mu6){ var Ckgd1, LXBR; ; if (m4Mu6 && C2nC6){ var tracknick=C2nC6[tmw.util.props.tracknick]; oGOn7.innerHTML=tTq5rKE(tracknick); if(m4Mu6["uavatars"] && m4Mu6["uavatars"][tracknick]){ oFD5[tracknick]=m4Mu6["uavatars"][tracknick]; } if (oFD5[tracknick]){ QyWR1I.innerHTML=rISjGK8( tracknick,lYP7RO(tracknick) ); }; } if (NNDV6[RVuhc9] instanceof Object) Ckgd1=NNDV6[RVuhc9]; else { Ckgd1=domain.gLXn8(NNDV6[RVuhc9] || ""); NNDV6[RVuhc9]=Ckgd1; } LXBR=domain.xbDy.xtUhv||{}; domain.xbDy.xtUhv=Ckgd1; var O3JP4Y4, n, store, ANL=0, c7gF6A=0, yiJMDjM=false; TyA={"it": "Italian", "fr": "French", "en": "English", "de": "German"}; ; O3JP4Y4={identifier: "id", items: []}; for(n in Ckgd1){ if (!(n in LXBR)) yiJMDjM=true; ANL++; O3JP4Y4.items.push({ id: n, name: (n in TyA?TyA[n]:n) }); } for(n in LXBR) c7gF6A++; if (yiJMDjM || ANL!=c7gF6A){ store=new dojo.data.ItemFileReadStore({data: O3JP4Y4}); var KctI=mHJ98.attr("store"); if (KctI){ KctI.close(); } mHJ98.attr("store",store); } if (Ckgd1[tmwLang]){ mHJ98.attr("value",tmwLang); BPpCc3.attr("content",Ckgd1[tmwLang]); } else { mHJ98.attr("value","Default"); BPpCc3.attr("content",Ckgd1["Default"]); } }; function q4oL(eR5){ var RVuhc9=this.nlHG7u, content; if (NNDV6[RVuhc9] instanceof Object){ content=NNDV6[RVuhc9][eR5]||""; } else { content=NNDV6[RVuhc9]; } BPpCc3.attr("content",content); }; } , M5HfPM: function(GLfIM){ if (!(GLfIM===true)){ this.Fi8(true); } console.log("Unregistering editor "+this.baseName+" events"); delete this.sEbL.uRd; var n; for (n=0;n=0? U8S8dtX+props[tmw.util.props.B4BZZ]+".png": false ); if(!c6JGXq2) return; vTD=this.O2J42T.fromLatLngToDivPixel(new GLatLng(props.t,props.l)); BGgdOe=this.O2J42T.fromLatLngToDivPixel(new GLatLng(props.b,props.r)); UIBV=BGgdOe.y-vTD.y; BtL=BGgdOe.x-vTD.x; JZEp=(BtL>=UIBV && "width" || "height"); IJcS9E=(JZEp=="width" && "height" || "width"); TKXBT=Math.max(UIBV,BtL)/(1-props.c*2); h3H8U6=Math.min(UIBV,BtL)+TKXBT*props.c*2; if (!node){ node=document.createElement("img"); dojo.style(node,"position","absolute"); dojo.toggleClass(node,"routeMiniature"); this.e2BX.appendChild(node); if (u3Y3E){ evt=new JAT(node,props.B4BZZ,this.baseName); }; } dojo.style(node,"zIndex",Math.max(q4XJ8-BtL*UIBV,0)); if (!tYTQ && (TKXBT>KGxSuUV*8.5 || TKXBT=0? U8S8dtX+RVuhc9+".png": false ); dojo.style(this.WK9OMD3,"top",y+"px"); dojo.style(this.WK9OMD3,"left",x+"px"); if (oW7IUD4.type!=this.cLq4Cuj){ var w=this.kt8kT5z[this.cLq4Cuj].w; var h=this.kt8kT5z[this.cLq4Cuj].h; dojo.style(this.cMX.domNode,"width",w); dojo.style(this.cMX.domNode,"height",h); oW7IUD4.type=this.cLq4Cuj; if (this.WK9OMD3.lKHTK) dojo.disconnect(this.WK9OMD3.lKHTK); this.cMX.cancel(); this.WK9OMD3.lKHTK=dojo.connect(this.cMX,"onLoad",setData); this.cMX.attr("href", this.n5Urk7J.replace("$n",this.cLq4Cuj)); } else { try { setData(); }catch(err){}; } if (this.hAHVF5.U52ITjN && this.hAHVF5.U52ITjN.cp==RVuhc9){ return; } var LZ2Uo; if (this.sEbL.j2KC55U && this.sEbL.j2KC55U[RVuhc9]){ this.sEbL.MPpGLHv=this.JkUFRjF(props,this.sEbL.j2KC55U[RVuhc9]); if (this.sEbL.MPpGLHv) LZ2Uo=this.sEbL.MPpGLHv.n; } else { this.sEbL.DKJ1=this.JkUFRjF(props,this.sEbL.DKJ1); if (this.sEbL.DKJ1) LZ2Uo=this.sEbL.DKJ1.n; } if (LZ2Uo){ dojo.style(LZ2Uo,"display","block"); dojo.toggleClass(LZ2Uo,"imgselhover",this.sEbL.FNfGGX?true:false); } function setData(){ dojo.disconnect(domain.WK9OMD3.lKHTK); domain.WK9OMD3.lKHTK=null; if(oW7IUD4.type!=domain.cLq4Cuj) return; if(!domain.sEbL.s4YZZ7){ domain.sEbL.s4YZZ7=gOjTc4( L4d6H,L4d6H, function(){ domain.eCuFz1x.open(domain.WK9OMD3); } ); } var PCI1q=dojo.query(".poittitem","poittw"); for (var n=0;n0){ var YB5, lNM=this.points, HXd=this.HGWuSRq, gX3w=this.hAHVF5.U52ITjN, cX8cbOq=new BwJGo(3,this.LSiw,this); ; this.hAHVF5.QYm1r(); YB5=this.hAHVF5.gX6yKW; this.tTYKi.lsBHx(cX8cbOq, 0); this.kf7(cX8cbOq, [1,2], YB5, [lNM, HXd], gX3w, this.RKUy); } else if (this.points.length==0 && this.hAHVF5.U52ITjN.cp==0){ this.BT5PDB.h2g8i(this.BT5PDB.YGf9N); }; } this.u3uGhU7=0; this.KH7eV=false; this.gSIG=false; this.HQ1m4=false; this.Atgr(kmDhf==null?this.k37rF:~this.k37rF); this.RKUy=kmDhf?kmDhf.index:null; this.SMLYa.clear(); if (kmDhf && (kmDhf.data || kmDhf.HGWuSRq)){ this.Y6vhW2L={pi:{},It3:{},KSQ2:{}}; if(this.baseName!=dHlF3){ if(((+kmDhf.pRJJ)&(1<<9))==0){ this.SMLYa.display(jHm328); this.X7bIjv=true; try{ dojo.style(dojo.byId(this.baseName+"EditStat") .firstChild,"visibility","visible"); }catch(err){alert(err);}; } else { this.SMLYa.display(RSwa); this.X7bIjv=false; try{ dojo.style(dojo.byId(this.baseName+"EditStat") .firstChild,"visibility","hidden"); }catch(err){}; }; } this.hAHVF5.JxN(kmDhf.log, kmDhf.B4BZZ, kmDhf.filter); if (kmDhf.data.length>0){ this.izQX(kmDhf); } this.G9vHKr(kmDhf,kmDhf.data.length==0); if (kmDhf.props && kmDhf.props.poifilt){ if (kmDhf.props.poifilt instanceof Array && kmDhf.props.poifilt.length>0){ this.sH7r(kmDhf.props.poifilt); }; } else this.sH7r(); var w8O=false, domain=this; if (kmDhf.props && (kmDhf.props.intrm instanceof Array) && kmDhf.props.intrm.length>0 ){ w8O=true; if (tmwHelperPan.D2gL.mFSR[this.baseName+"AutoIntrm"]){ tmwHelperPan({close:true, id:this.baseName+"AutoIntrm"}); } if (!this.gaMQ7p){ this.gaMQ7p=new MlLBF0(this); } setTimeout(function(){ domain.gaMQ7p.rkKGj( kmDhf.props.intrm); },100); } else if (this.baseName=="p2" && !y43SIk.ijO401L && !window._tmwURLOptions && !WMN7.sZxw ){ w8O=this.V81fFRs(kmDhf.b2F); } if (!w8O){ setTimeout(function(){ domain.UY3L(domain.VuE7,true); },100); }; } else { this.gUA.dHKw45(); this.hAHVF5.JxN(null,null,null); if (tmwHelperPan.D2gL.mFSR[this.baseName+"AutoIntrm"]){ tmwHelperPan({close:true, id:this.baseName+"AutoIntrm"}); }; } this.tTYKi.rVQLI(kmDhf); try { this.YzXeM(kmDhf); }catch(err){console.log(err);} } , YzXeM: function(TptT){ try { var wiDI, CVUD, f1JV, domain=this; CVUD=dojo.byId(this.baseName+"RouteOwnerPanelUANick"); wiDI=dojo.byId(this.baseName+"RouteOwnerPanelUAImg"); f525780=dojo.byId(this.baseName+"RouteOwnerPanelUAMisc"); f1JV=dojo.byId(this.baseName+"RouteOwnerPanelUAInfo"); D6vxDP(dojo.byId(this.baseName+"dnana")); D6vxDP(dojo.byId(this.baseName+"dntou")); D6vxDP(dojo.byId(this.baseName+"dnfoc")); if(!TptT){ CVUD.innerHTML=""; wiDI.innerHTML=""; f1JV.innerHTML=""; f525780.innerHTML=""; } else { this.BT5PDB.iMD1tUO(TptT.B4BZZ, function(E7Zd,store){ if(!E7Zd || !E7Zd[0]) return; var C2nC6=fCg5(store,E7Zd[0],{ jp:true,intrm:true, poifilt:true,taggedPois:true }); var HCR82=function(){ var PR4AI=lYP7RO(C2nC6.tracknick); wiDI.innerHTML=rISjGK8( C2nC6.tracknick, PR4AI,{h:28}); f525780.innerHTML=iJLwcR(C2nC6.tracknick,{ I67sZ:true, JLxzhj:"height:26px;", i4JKM:"height:12px;margin-bottom:6px;", gY1Q:0 }); }; f1JV.innerHTML= dojo.string.substitute( "
", {"nick":C2nC6.tracknick} ); CVUD.innerHTML=tTq5rKE(C2nC6.tracknick); if (!oFD5[C2nC6[tmw.util.props.tracknick]]){ rMMX(C2nC6[tmw.util.props.tracknick], true,true,HCR82 ); } else { HCR82(); } }); delete WMN7.sZxw; } }catch(err){} try { dijit.byId(this.baseName+"descFloater").minimize(); } catch(err){} try { if (!this.BT5PDB.ETYG()){ this.BT5PDB.GQOVe4(false); } else { var Xj6t=dijit.byId(this.baseName+"bc1tc"); Xj6t.selectChild(Xj6t.getChildren()[1]); } } catch(err){} try { if (this.hAHVF5.U52ITjN.cp>0){ dojo.style(dojo.byId(this.baseName+"SocNtwkShare"), "display","block"); } }catch(err){} setTimeout(function(){ try { if (TptT && TptT.props && TptT.props.hasOwnProperty("l")){ domain.mYTC(TptT.props); } }catch(err){console.log(err);} if (window._tmwURLOptions && _tmwURLOptions.hasOwnProperty("hlpid")){ var aoPTKu=_tmwURLOptions["hlpid"]; if (domain.HGWuSRq[aoPTKu]){ domain.setSelected(domain.HGWuSRq[aoPTKu]); domain.HGWuSRq[aoPTKu].Xe2TO(); } setTimeout(function(){p5SU("hlpid");},18000); } },1500); try { if (this.WHc8jP) this.WHc8jP.HEwR(true,true); }catch(err){} if (!this.z3w && TptT){ this.cXeIWK2(true); } } , LSiw: function(nPEw5){ var n,SJ7w1; if(nPEw5[2] && nPEw5[0] && nPEw5[2].data instanceof Array && nPEw5[0] instanceof Array ){ SJ7w1=nPEw5[2].data.length; for(n=0;n0) Y7Je.poifilt=MO2LS; var E7Zd,JF4TXu=new Array(kmDhf[0].length),vAQrUO=[]; for (E7Zd in kmDhf[1]){ vAQrUO.push({ id: kmDhf[1][E7Zd].index , lat: kmDhf[1][E7Zd].F9L8.lat() , lng: kmDhf[1][E7Zd].F9L8.lng() , properties: kmDhf[1][E7Zd].LfMO4 , type: kmDhf[1][E7Zd].LfMO4.type }); } delete kmDhf[1]; var J8eH7=1000, li4f2=1000, UNBK7=-1000, u6AA=-1000; for (E7Zd=0;E7Zd0){ tWY09I.bounds={ UQiY0: J8eH7, IQLFse: UNBK7, xsVTyR: li4f2, TSl: u6AA }; } cX8cbOq.yR1RZO8(hSfIHQQ[1],tWY09I); console.log("Doing checkpoint.."); this.hAHVF5.kf7(log, xP2P1O, cX8cbOq, hSfIHQQ[0], false, {props: Y7Je}); } , vCEsM: function(GM6k5,opt){ var form=dijit.byId("saveDiagForm"), UPOM0VI, n, domain=this, FCC68={"trackperm4dummies":1, trackownperm:1, trackgrpperm:1, trackothperm:1}, BoQO={tracknick:1, saveasid:1}, QwmgUs={"cancelSaveTrk":1}; ; if(!form) return; opt=opt || {}; if (opt.TVPDD9){ GM6k5.tracknick=y43SIk.me; GM6k5.pRJJ=+GM6k5.pRJJ|(1<<9); } GM6k5["saveasid"]=GM6k5.AC6CDW+", "+zuRY+":"+GM6k5[tmw.util.props.mdiNpG]; if (!this.vCEsM.NJ8s){ var SDvX8, VN6j=lKRfU(), TK2=UVrlltL(), oi4=xIV5i(), c7Nd4q=eAyD(true), GBR9, JMTEDP, W76T, xBIQD=function(eR5){ oi4.fetch({ query: {name: eR5}, onComplete:function(E7Zd){ if(!E7Zd[0]) return; var id=oi4.getValue(E7Zd[0],"id"); GBR9.attr("query",{type: id}); form.attr("value",{tracksubprof:""}); } }); }, aCOpSm=function(eR5){ if (aCOpSm.fYr71y) return; aCOpSm.fYr71y=true; if (typeof(eR5)=="string"){ form.attr("value",{"trackperm4dummies": eR5==hNCDp.none?"1":"0"} ); } else { form.attr("value",{trackothperm: eR5?hNCDp.r:hNCDp.none} ); } setTimeout(function(){delete aCOpSm.fYr71y;},1); }; ; for(n in FCC68){ if (form.domNode[n] && form.domNode[n].id){ UPOM0VI=dijit.byId(form.domNode[n].id); if(!UPOM0VI) continue; UPOM0VI.attr("store",VN6j); }; } if (form.domNode.trackgroup && form.domNode.trackgroup.id){ UPOM0VI=dijit.byId(form.domNode.trackgroup.id); if(UPOM0VI) UPOM0VI.attr("store",TK2); } if (c7Nd4q && form.domNode.tracksubprof && form.domNode.tracksubprof.id){ UPOM0VI=dijit.byId(form.domNode.tracksubprof.id); if(UPOM0VI){ UPOM0VI.attr("store",c7Nd4q); GBR9=UPOM0VI; }; } if (form.domNode.trackdesc && form.domNode.trackdesc.id){ UPOM0VI=dijit.byId(form.domNode.trackdesc.id); var ntDms=dojo.query("span.trackdescstatus",form.domNode); var W5Vn=ntDms[0] && ntDms[0].firstChild || null; if(UPOM0VI && W5Vn){ dojo.connect(UPOM0VI,"onKeyUp",function(){ var MOw3Cx=40, eR5=form.attr("value").trackdesc, i6LK=eR5?MOw3Cx-eR5.length:MOw3Cx; if (i6LK<0){ i6LK=0; form.attr("value",{ trackdesc: eR5.substr(0,MOw3Cx) }); } W5Vn.nodeValue=dojo.string.substitute( SGROJf,{"n":i6LK+""} ); }); }; } if (form.domNode.trackprofile && form.domNode.trackprofile.id){ UPOM0VI=dijit.byId(form.domNode.trackprofile.id); if(UPOM0VI){ UPOM0VI.attr("store",oi4); JMTEDP=UPOM0VI; if (GBR9) UPOM0VI.attr("onChange",xBIQD); }; } if (form.domNode.trackothperm && form.domNode.trackothperm.id){ UPOM0VI=dijit.byId(form.domNode.trackothperm.id); if (UPOM0VI){ UPOM0VI.attr("onChange",aCOpSm); }; } if (form.domNode["trackperm4dummies"] && form.domNode["trackperm4dummies"][0].id){ UPOM0VI=dijit.byId(form.domNode["trackperm4dummies"][0].id); if (UPOM0VI){ UPOM0VI.attr("onChange",aCOpSm); }; } UPOM0VI=null; this.vCEsM.WAPlN=new VrMGG("insertLangPlaceholder", function(value){ form.attr("value",{trackfulldesc:value||""}); }, function(){ return form.attr("value").trackfulldesc; } ); SDvX8=dojo.query('[name="trackfulldesc"]',form.domNode); if (SDvX8[0]){ new dijit.Editor({ name: "trackfulldesc", extraPlugins:['createLink','insertImage','foreColor','hiliteColor', {name:'dijit._editor.plugins.FontChoice', "command": 'fontName', "generic": true}, 'fontSize' ] },SDvX8[0]); } this.vCEsM.NJ8s=true; } if (GM6k5.pRJJ){ var desc=form.getDescendants(), ySP8=(+GM6k5.pRJJ&(1<<9))==0; for(n in desc){ if (desc[n].attr && !(desc[n].attr("name") in QwmgUs)) desc[n].attr("disabled",ySP8); } var map={trackownperm: (GM6k5.pRJJ>>6)&0x7, trackgrpperm: (GM6k5.pRJJ>>3)&0x7, trackothperm: GM6k5.pRJJ&0x7 }, UPOM0VI; for(n in map){ if (map[n]==0x6 || map[n]==0x7) UPOM0VI=hNCDp.rw; else if(map[n]==0x4) UPOM0VI=hNCDp.r; else if(map[n]==0x2) UPOM0VI=hNCDp.w; else UPOM0VI=hNCDp.none; GM6k5[n]=UPOM0VI; }; } if (GM6k5.trackprofile) GM6k5.trackprofile=h9B(GM6k5.trackprofile); for(n in BoQO){ if (form.domNode[n] && form.domNode[n].id){ UPOM0VI=dijit.byId(form.domNode[n].id); if(!UPOM0VI) continue; UPOM0VI.attr("disabled",true); }; } var r8I=(GM6k5.tracknick!=y43SIk.me); for(var n in FCC68){ if (form.domNode[n] && form.domNode[n].id){ UPOM0VI=dijit.byId(form.domNode[n].id); if(!UPOM0VI) continue; UPOM0VI.attr("disabled",r8I); }; } if (form.domNode.trackgroup){ UPOM0VI=dijit.byId(form.domNode.trackgroup.id); if(UPOM0VI) UPOM0VI.attr("disabled",r8I); } if(form.domNode.saveAllBt){ UPOM0VI=dijit.byId(form.domNode.saveAllBt.id); if(UPOM0VI) UPOM0VI.attr("disabled",opt.sJ24FW==true); } if(form.domNode["savemapoptions"]){ UPOM0VI=dijit.byId(form.domNode["savemapoptions"].id); if(UPOM0VI){ if(opt.sJ24FW) UPOM0VI.attr("checked",false); UPOM0VI.attr("disabled",opt.sJ24FW==true); }; } if(form.domNode.updPropsOnly){ UPOM0VI=dijit.byId(form.domNode.updPropsOnly.id); if(UPOM0VI) UPOM0VI.attr("disabled",r8I || opt.M3H8ZQ4==true); } this.dgRAe7f(GM6k5.AC6CDW,false,function(){ var Ckgd1=(NNDV6[GM6k5.AC6CDW] instanceof Object? NNDV6[GM6k5.AC6CDW] :domain.gLXn8(NNDV6[GM6k5.AC6CDW]||"") ); NNDV6[GM6k5.AC6CDW]=Ckgd1; domain.vCEsM.WAPlN.setCache(Ckgd1); }); form.attr("value",GM6k5); if (form.domNode.trackdesc && form.domNode.trackdesc.id){ UPOM0VI=dijit.byId(form.domNode.trackdesc.id); if(UPOM0VI) UPOM0VI.onKeyUp(); } if (opt.k484C3){ if (opt.k484C3=="trackfulldesc"){ setTimeout(function(){ var n=dojo.query('[name="trackfulldesc"]',form.domNode)[0]; dijit.byId(n.getAttribute("widgetId")).focus(); },400); } else if (form.domNode[opt.k484C3]){ setTimeout(function(){ form.domNode[opt.k484C3].focus(); },200); }; } dijit.byId("saveDialog").show(); } , dgRAe7f:function(id,n5IG,callback,dOKP){ if (NNDV6[id] || n5IG || id<=0){ if (callback) callback(); return; } var dUO=[{ c:23, "id": id }]; if (dOKP) dUO=dUO.concat(dOKP); dojo.xhrPost({ url: "scripts/msg.php" , content: {l:dojo.toJson(dUO) }, handleAs: "text" , timeout: 35000, load: function(data){ var mj5NA; try { mj5NA=dojo.fromJson(data); if( mj5NA["tfulldesc"] instanceof Object && mj5NA["tfulldesc"][id] ){ NNDV6[id]=mj5NA["tfulldesc"][id]; } } finally { if (callback) callback(mj5NA); } } }); } , suAmJO: function(opt){ var g3OrqGC=this.hAHVF5.U52ITjN.cp; if (g3OrqGC==null) return; opt=opt||{}; if (!opt.sJ24FW && !this.HQ1m4 && g3OrqGC>0 && this.hAHVF5.qSTQ()0) props.poifilt=MO2LS; W4Y1CV.AC6CDW=this.hAHVF5.U52ITjN.cp>0? this.hAHVF5.U52ITjN.cp :W4Y1CV[tmw.util.props.mdiNpG]>0? W4Y1CV[tmw.util.props.mdiNpG] :0; } if (W4Y1CV[tmw.util.props.props] instanceof Object){ dojo.mixin(W4Y1CV[tmw.util.props.props],props); } else { W4Y1CV.props=props; } console.log(W4Y1CV); } this.vCEsM(W4Y1CV,opt); function ZNmt3(sJ24FW){ try { if (sJ24FW||opt.TVPDD9||W4Y1CV.AC6CDW==0){ domain.upST(W4Y1CV, dojo.mixin(opt,{sJ24FW: sJ24FW||false})); } else { tmwAlert({ w: 350, h: 150, title: BmV4QU, message: mOGDS, confirm:true, cancel:true, LgZ81: "Ok", i3oM:function(){ domain.upST(W4Y1CV,opt); }, TNu4QK:"No", kY6y:function(){ W4Y1CV.AC6CDW=0; domain.upST(W4Y1CV,opt); } }); } } finally { return false; } }; } , upST:function(W4Y1CV,opt){ var form=dijit.byId("saveDiagForm"), GM6k5; if(!form) return false; GM6k5=form.attr("value"); var n, msLDmu5=false, EJO8=12; for(n in OpY){ if(OpY[n].name==GM6k5.trackprofile){ GM6k5.trackprofile=OpY[n].id; msLDmu5=true; break; }; } if(!msLDmu5) GM6k5.trackprofile=EJO8; var perms=0, SYgJS1, mEPG138=2, kXkY1={trackownperm:1, trackgrpperm:1, trackothperm:1}, qFAQ={tracknick:1, saveAllBt:1, updPropsOnly:1, cancelSaveTrk:1 }; ; if(W4Y1CV.tracknick==y43SIk.me){ for(SYgJS1 in kXkY1){ for(n in hNCDp){ if (GM6k5[SYgJS1]==hNCDp[n]){ if (SYgJS1=="trackownperm" && n=="none"){ alert(wP123); perms|=0x7<<6; } else if (n=="rw") perms|=0x7<<(mEPG138*3); else if (n=="w") perms|=0x2<<(mEPG138*3); else if (n=="r") perms|=0x4<<(mEPG138*3); break; }; } mEPG138--; } GM6k5.hpFI=perms; } else delete GM6k5.trackgroup; for(SYgJS1 in kXkY1){ delete GM6k5[SYgJS1]; } GM6k5.AC6CDW=W4Y1CV.AC6CDW; if (this.vCEsM.WAPlN){ GM6k5.trackfulldesc=this.vCEsM.WAPlN.pack(); if (GM6k5.trackfulldesc.length>0){ if (GM6k5.AC6CDW>0){ NNDV6[GM6k5.AC6CDW]=this.gLXn8( GM6k5.trackfulldesc ); }; } else delete GM6k5.trackfulldesc; } for(SYgJS1 in qFAQ) delete GM6k5[SYgJS1]; if (opt.sJ24FW){ if (GM6k5.AC6CDW<=0){ alert(DNzcw); } return this.BT5PDB.V4EGei(GM6k5); } try { dijit.byId("saveDialog").hide(); } catch(err){} tmwAlert({title:iFYm,Yf47:true}); this.hAHVF5.QYm1r(); var domain=this, cX8cbOq=new BwJGo( domain.KH7eV?2:1, p6P4s); if (GM6k5["savemapoptions"] && GM6k5["savemapoptions"][0]){ var c=this.O2J42T.getCenter(), BtNAU7=this.BT5PDB.x2gObU; ; SYgJS1=this.O2J42T.getCurrentMapType(); msLDmu5=false; for(n=0;n=en+1;SYgJS1--){ cO6H[n++]=this.hAHVF5.wOwrs(SYgJS1, this.points[SYgJS1].F9L8, true, true); } for(SYgJS1=st-1;SYgJS1>=0;SYgJS1--){ cO6H[n++]=this.hAHVF5.wOwrs(SYgJS1, this.points[SYgJS1].F9L8, true, true); } C4baP=this.hAHVF5.gX6yKW.substr(this.hAHVF5.U52ITjN.start)+cO6H.join(""); delete cO6H; if (this.hAHVF5.U52ITjN.cp>0){ this.BT5PDB.iMD1tUO(this.hAHVF5.U52ITjN.cp, this.RVO, this, { TVPDD9:true, M3H8ZQ4: true, QviF: C4baP, xOYW: [st,en] } ); } }, GH479: function(s21503,nxLXi){ if (this.GH479.RFU){ this.BT5PDB.C8Uc9.gaMQ7p.reset(); this.BT5PDB.C8Uc9.gaMQ7p.kTpNp.vUnO.minimize(); this.BT5PDB.jM021L(nxLXi); this.GH479.RFU=false; return; } if (this.GH479.events){ while (this.GH479.events.length>0){ dojo.disconnect(this.GH479.events.pop()); } this.GH479.events=null; } this.GH479.events=[]; this.GH479.yXMdfI7=0; var xBfEh=DFTz4HX+'

'; xBfEh+='

'; xBfEh+='
'; xBfEh+='

'; xBfEh+='
'; xBfEh+='

'; xBfEh+=''; tmwAlert({ title: LONA, message: xBfEh, w: 380, h: 260, confirm: false }); var domain=this; tmw.util.waitForWId(["do_fin_cut"],this,function(){ dojo.forEach(["rb21","rb22","rb23","rb24"],function(xS54,E7Zd){ domain.GH479.events.push(dojo.connect(dijit.byId(xS54),"onChange",function(p){ if (p) domain.GH479.yXMdfI7=E7Zd; })); }); domain.GH479.events.push(dojo.connect(dijit.byId("do_fin_cut"),"onClick",function(){ GgXh(); switch (domain.GH479.yXMdfI7) { case 0: tmwLoadRouteEditor(nxLXi); break; case 1: break; case 2: domain.BT5PDB.C8Uc9.gaMQ7p.reset(); domain.BT5PDB.C8Uc9.gaMQ7p.kTpNp.vUnO.minimize(); break; case 3: domain.BT5PDB.C8Uc9.gaMQ7p.reset(); domain.BT5PDB.C8Uc9.gaMQ7p.kTpNp.vUnO.minimize(); domain.BT5PDB.jM021L(nxLXi); break; }; })); }); } , QglJKG: function(cX8cbOq,hSfIHQQ, DKw){ var n,rxN6=this.points.length,s=String(); if (DKw){ if (DKw[0]>=0 && DKw[1]0 && W4Y1CV.ZJvIQ!=W4Y1CV.AC6CDW){ console.debug("Cannot save the track with the specified id"); alert("Cannot save the track with the specified id"); } else if(W4Y1CV.ZJvIQ>0 && !W4Y1CV.external){ console.debug("Track saved with id "+W4Y1CV.ZJvIQ); var domain=this; setTimeout(function(){ domain.BT5PDB.fMS({ id:W4Y1CV.ZJvIQ, title:W4Y1CV.trackname }); },1250); } this.BT5PDB.callback([W4Y1CV], true); if (W4Y1CV.external) this.GH479(W4Y1CV.p6a,W4Y1CV.ZJvIQ); } , oBK: function(){ var node=this.e2BX; return { Sl4f72B: this.MH51iX.offsetLeft , JTng: this.MH51iX.offsetTop , pl: node.parentNode.offsetLeft , pt: node.parentNode.offsetTop }; } , Fh4u9: function(e2UgJK3){ this.O2J42T.checkResize(); this.GOverlay.mapPos=dojo.position(this.GOverlay.mapNode); if (e2UgJK3==this.o47sO8) return; this.width=this.GOverlay.mapPos.w+this.jpA6*2; this.height=this.GOverlay.mapPos.h+this.yAWBi*2; this.eJb.setDimensions(this.width, this.height); dojo.style(this.MH51iX,"width",this.width+"px"); dojo.style(this.MH51iX,"height",this.height+"px"); if (e2UgJK3==this.BIP55) this.UY8Iuh1(); } , izQX: function(bQTfR4h){ var b=bQTfR4h.bounds, E7Zd, bounds, kfyk3m; this.Oj7 = bQTfR4h.xTfPr; b.IQLFse = parseFloat(b.IQLFse); b.TSl = parseFloat(b.TSl); b.UQiY0 = parseFloat(b.UQiY0); b.xsVTyR = parseFloat(b.xsVTyR); bounds = new GLatLngBounds(new GLatLng(b.UQiY0,b.xsVTyR), new GLatLng(b.IQLFse,b.TSl)); if (bQTfR4h.props["map"]){ var jGniM=bQTfR4h.props["map"]; kfyk3m = jGniM["zl"]||Math.min(this.O2J42T.getBoundsZoomLevel(bounds),14); if (jGniM["cla"] && jGniM["cln"]) { this.O2J42T.setCenter(new GLatLng(jGniM["cla"],jGniM["cln"])); } else if (!jGniM["cs"]) { this.O2J42T.setCenter(bounds.getCenter()); } this.O2J42T.setMapType(this.BT5PDB.x2gObU[jGniM["mt"]]||G_SATELLITE_MAP); } else { kfyk3m = Math.min(this.O2J42T.getBoundsZoomLevel(bounds),14); this.O2J42T.setCenter(bounds.getCenter()); } this.gUA.dHKw45(); this.points=new Array(bQTfR4h.data.length); this.Mk8DD=new Array(bQTfR4h.data.length-1); var lat, lb15Y, UhDJ01, pt, t; for (E7Zd=0;E7Zd0){ this.KH7eV=true; } pt = new X35QK.WLL3(this, lat, lb15Y, true, E7Zd, false, t); this.points[E7Zd]=pt; this.setActive(pt); if (kfyk3m==this.l4W4){ this.O2J42T.setZoom(kfyk3m); this.UY8Iuh1(); } else { this.O2J42T.setZoom(kfyk3m); } }, G9vHKr: function(bQTfR4h,MqqP4){ if (!bQTfR4h.HGWuSRq) return; var domain=this, xS54, n, dOuL9c5, p1sR=false; if(MqqP4){ if (bQTfR4h.bounds){ p1sR={ l: parseFloat(bQTfR4h.bounds.xsVTyR), t: parseFloat(bQTfR4h.bounds.IQLFse), r: parseFloat(bQTfR4h.bounds.TSl), b: parseFloat(bQTfR4h.bounds.UQiY0) }; } else if (bQTfR4h.props){ if (bQTfR4h.props.l) p1sR=bQTfR4h.props; } if (p1sR){ var kfyk3m, bounds; bounds = new GLatLngBounds(new GLatLng(p1sR.b,p1sR.l), new GLatLng(p1sR.t,p1sR.r)); if (bQTfR4h.props["map"]){ var jGniM=bQTfR4h.props["map"]; kfyk3m = jGniM["zl"]||Math.min(this.O2J42T.getBoundsZoomLevel(bounds),14); if (jGniM["cla"] && jGniM["cln"]) { this.O2J42T.setCenter(new GLatLng(jGniM["cla"],jGniM["cln"])); } else if (!jGniM["cs"]) { this.O2J42T.setCenter(bounds.getCenter()); } this.O2J42T.setMapType(this.BT5PDB.x2gObU[jGniM["mt"]]||G_SATELLITE_MAP); } else { kfyk3m = Math.min(this.O2J42T.getBoundsZoomLevel(bounds),14); this.O2J42T.setCenter(bounds.getCenter()); } this.O2J42T.setZoom(kfyk3m); this.gUA.dHKw45(); }; } var GC4M1=null; for(n in bQTfR4h.HGWuSRq){ xS54=bQTfR4h.HGWuSRq[n]; dOuL9c5=new X35QK.uTf8(domain, xS54.lat, xS54.lng, true, xS54.id, xS54.type, true); domain.HGWuSRq[xS54.id]=dOuL9c5; domain.Y6vhW2L.It3[xS54.vPKyXSx]=xS54.id; domain.Y6vhW2L.KSQ2[xS54.id]=xS54.vPKyXSx; domain.u3uGhU7=Math.max(domain.u3uGhU7,xS54.id+1); dOuL9c5.Xp5lU(xS54.properties, true); if (GC4M1==null) GC4M1=xS54.id; } if (window._tmwURLOptions && _tmwURLOptions.hasOwnProperty("hl1stp") && !_tmwURLOptions.hasOwnProperty("hlpid") ){ _tmwURLOptions["hlpid"]=GC4M1; p5SU("hl1stp"); } }, sH7r: function(o8eY6,BMR368t){ var SYgJS1,n,FESO0m,sI7t,HLu6,rq73,BXmBK={},vPkiU={},E7Zd=0; var domain=this, nD5NqI=5, Ev75=5; var widget=dijit.byId(this.BT5PDB.rootId+"poiScroll"); if (!widget) { widget = new dojox.layout.ScrollPane({ orientation: "horizontal", style:"width:180px; height:40px; background-color:#000; border:1px solid #3333ff;overflow:hidden;" },this.BT5PDB.rootId+"poiScroll"); dojo.style(widget.domNode,"position","absolute"); dojo.style(widget.domNode,"right","0px"); dojo.style(widget.domNode,"top","22px"); } if (this.BLf) { for (n=0;nb2433 && b2433==90 && n!=b2433){ n=b2433-p58; } if (n==-90 && ZSfF%p58!=0){ n=Math.floor(ZSfF/p58)*p58; } SPpQ.push(n); } for (n=qMNX;n<=iGOuJ0F;n+=K5V2C){ if (n==qMNX && qMNX%K5V2C!=0 && qMNX!=-180){ n=(Math.floor(qMNX/K5V2C))*K5V2C; qMNX=n; } if (n+K5V2C>iGOuJ0F && iGOuJ0F==180 && n!=iGOuJ0F){ n=iGOuJ0F-K5V2C; } if (n==-180 && qMNX%K5V2C!=0){ n=Math.floor(qMNX/K5V2C)*K5V2C; } nBRSH8.push(n); } for(n=0;n0){ var tLRCVVt; for(n in this.vdic){ for(tLRCVVt in this.HGWuSRq){ if (this.HGWuSRq[tLRCVVt].index==this.vdic[n].index){ dOuL9c5=this.HGWuSRq[tLRCVVt]; for (SYgJS1 in dOuL9c5.LfMO4.media) { xXMD.Y4bK(dOuL9c5.LfMO4.media[SYgJS1],dOuL9c5.index,false); } break; }; }; }; } else { for(n in this.HGWuSRq){ dOuL9c5=this.HGWuSRq[n]; for (SYgJS1 in dOuL9c5.LfMO4.media) { xXMD.Y4bK(dOuL9c5.LfMO4.media[SYgJS1],dOuL9c5.index,false); }; }; } xXMD.m6w(); }, b0VQ: function(HGWuSRq,lUsI){ var n, p; var J8eH7=1000, li4f2=1000, UNBK7=-1000, u6AA=-1000, HYGxDXk, GUWD9Z; lUsI=lUsI?lUsI:{}; for(n in this.HGWuSRq){ if(n<0){ if (this.HGWuSRq[n].kQgRK2 || this.HGWuSRq[n].DWXJM){ continue; } try { this.HGWuSRq[n].destroy(); }catch(err){} delete this.HGWuSRq[n]; delete this.Y6vhW2L.It3[-n]; } else { HYGxDXk=this.HGWuSRq[n].F9L8.lat(); GUWD9Z=this.HGWuSRq[n].F9L8.lng(); J8eH7=Math.min(J8eH7,HYGxDXk); li4f2=Math.min(li4f2,GUWD9Z); UNBK7=Math.max(UNBK7,HYGxDXk); u6AA=Math.max(u6AA,GUWD9Z); }; } if(!(HGWuSRq instanceof Array)){ this.Tj4NP(false); return; } for(n=0;n0 || this.Mk8DD.length>0)){ alert(EuZ); return; } var domain=this, query; if (this.Js9C.events){ for(var n=0;n5){ alert(n7D2); return; } query=new Array(this.points.length); for (var n=0;n=this.E2HsE)?true: this.l4W4>=17?true: this.Oj7? (this.Oj7>this.gUA.JpZ[this.l4W4]): this.l4W4>=11; } , D7KLSfR: function(action){ if (!this.CNdU(true)) return; var ECYUUQc=false, G861=dojo.byId(this.baseName+"EditStat"); if (action!==true && (this.Nx1RFt || action===false)){ if (this.Nx1RFt) ECYUUQc=true; this.Nx1RFt=false; dojo.toggleClass(G861,"tmwEditStatusGreen",true); this.BT5PDB.s.y5VN(true); } else { if (!this.Nx1RFt) ECYUUQc=true; this.Nx1RFt=true; dojo.toggleClass(G861,"tmwEditStatusGreen",false); this.BT5PDB.s.y5VN(false); } dojo.toggleClass(G861,"tmwEditStatusOrange"); if (ECYUUQc) this.UY8Iuh1(); }, FDs: function(){ if (this.X7bIjv || this.mode==this.k37rF) return false; var TIvz1=11; return (this.l4W4>=TIvz1); } , T3hZ: function(rAGEBB){ this.setSelected(rAGEBB); this.setActive(rAGEBB); } , setSelected: function(rAGEBB,GVlQ6){ if (this.selected){ this.selected.deselect(); } this.selected=rAGEBB; rAGEBB.select(); if (!GVlQ6 || rAGEBB.index<0) this.BT5PDB.xXMD.xjE(rAGEBB); } , i6je: function(fVU){ this.setSelected(this.HGWuSRq[fVU],true); } , tIT2BS: function(line){ if (this.eIaT6){ this.eIaT6.deselect(); } this.eIaT6=line; line.select(); } , setActive: function(rAGEBB){ if (rAGEBB==this.points[0] && this.points.length>1){ this.fr3X=this.m7TLZ; } else if (!rAGEBB || rAGEBB==this.points[this.points.length-1]) this.fr3X=~this.m7TLZ; else return; if (this.cN4DG6U){ this.cN4DG6U.vCF7B4(); } this.cN4DG6U=rAGEBB; if (rAGEBB){ rAGEBB.oPWkHRs(); if (rAGEBB==this.points[0]){ this.I0WG(0); }; } } , vCF7B4: function(rAGEBB){ rAGEBB.vCF7B4(); this.cN4DG6U=null; } , deselect: function(rAGEBB){ rAGEBB.deselect(); this.selected=null; } , l6l: function(fVU){ this.deselect(this.HGWuSRq[fVU]); } , cb1q: function(line){ line.deselect(); this.eIaT6=null; } , I0WG: function(n){ if (n==null && (!this.AAk7y || !this.AAk7y.UBvT)) return; if (this.vp4R) this.vp4R.sNSE(); if (n>=0 && this.points.hasOwnProperty(n)){ this.vp4R=this.points[n]; } else { this.vp4R=this.AAk7y.UBvT; } if (n==null || n>0) this.vp4R.I0WG(); } , xF5PUo: function(x,y,mHwrU){ return { x:x+mHwrU.Sl4f72B+this.bsN2o3*2, y:y+mHwrU.JTng+this.bsN2o3*2 }; } , LvD1: function(x,y,mHwrU){ return { x:x-mHwrU.Sl4f72B-this.bsN2o3*2, y:y-mHwrU.JTng-this.bsN2o3*2 }; } , iG1: function(evt){ var wXhB=this.oBK(); return { x: evt.clientX-this.GOverlay.mapPos.x -wXhB.pl-wXhB.Sl4f72B-this.bsN2o3*2, y: evt.clientY-this.GOverlay.mapPos.y -wXhB.pt-wXhB.JTng-this.bsN2o3*2 }; } , ART: function(kEA396, GTEAK){ var wXhB=this.oBK(); return { x: kEA396+this.GOverlay.mapPos.x +wXhB.pl+wXhB.Sl4f72B+this.bsN2o3*2, y: GTEAK+this.GOverlay.mapPos.y +wXhB.pt+wXhB.JTng+this.bsN2o3*2 }; } , ZRTXn: function(erj,IySJGC){ var tTB=this.O2J42T.fromLatLngToDivPixel(erj); return { x:tTB.x-this.LcmI9hO.origin.x, y:tTB.y-this.LcmI9hO.origin.y, isIn: IySJGC }; } , Xkl2Ui: function(lat,lb15Y){ return this.gUA.Xkl2Ui(lat,lb15Y); } , V5Y: function(x, y){ return this.gUA.V5Y(x, y); } , containsPoint: function(erj){ return this.l4W4<2 || this.gUA.snkKFJ.containsLatLng(erj); } , UY8Iuh1: function(l3CKFd){ if (!this.gUA || !this.gUA.jQ18J) return; dojo.style(this.MH51iX,"visibility","hidden"); this.tKReWt2(); try { tmwclosepoitt(); } catch(err){} if (this.sEbL.FNfGGX) this.cXeIWK2(); clearTimeout(this.UY8Iuh1.cDWE); if (this.mode!=this.k37rF){ this.UY8Iuh1.cDWE=setTimeout(dojo.hitch(this,function(){ this.y8BIk(l3CKFd); dojo.style(this.MH51iX,"visibility","visible"); this.xLVbQ(); }), 1); } else { if (!this.gSIG){ this.Dy7RV8F(); } dojo.style(this.MH51iX,"visibility","visible"); } } , tKReWt2: function(){ if (!this.GOverlay) return; var tGnVNNv, qEWL3c, wXhB; wXhB=this.oBK(); tGnVNNv=-wXhB.pl-this.jpA6-this.bsN2o3; qEWL3c=-wXhB.pt-this.yAWBi-this.bsN2o3; dojo.style(this.MH51iX,"left",tGnVNNv+"px"); dojo.style(this.MH51iX,"top", qEWL3c+"px"); this.gUA.vu3LG(); } , WJpNMg3: function(){ delete this.LcmI9hO.points; this.sEbL.CORPuRY=null; this.LcmI9hO.points=[]; if (this.LcmI9hO.LfD5){ this.LcmI9hO.LfD5.clearRect(0,0, this.LcmI9hO.w,this.LcmI9hO.h); } else if (this.LcmI9hO.gfx){ this.LcmI9hO.gfx.clear(); } } , F83LG: function(){ if (this.sEbL.CORPuRY==this.l4W4){ if (this.gaMQ7p) this.gaMQ7p.refresh(this.gaMQ7p.QG6S); return; } var PABK=this.id1I8FK.F83LG(this.W5OG5); if (!PABK) return; var rX4Y, vTD=this.O2J42T.fromLatLngToDivPixel(PABK.o); rX4Y={ x: (vTD.x-PABK.f5JSoL) , y: (vTD.y-PABK.qW01) }; dojo.style(this.eA65,"top",(rX4Y.y+Math.round(PABK.T1Foz/2))+"px"); dojo.style(this.eA65,"left",(rX4Y.x+Math.round(PABK.T1Foz/2))+"px"); delete this.LcmI9hO.origin; this.LcmI9hO.origin=rX4Y; this.sEbL.CORPuRY=this.l4W4; setTimeout(dojo.hitch(this,function(){ var CJh=this.points.length; for (var ndx=0;ndx=iUFE && kcL9<=iH47B) return 2; eFrDw6W=pNg47Oq.y+(-pNg47Oq.x)*pT2/adPf; if (eFrDw6W>=xLbEjF && kcL9<=Y14) return 2; kcL9=pNg47Oq.x+(WfbKsC-pNg47Oq.y)*adPf/pT2; if (kcL9>=iUFE && kcL9<=iH47B) return 2; eFrDw6W=pNg47Oq.y+(t1rOM-pNg47Oq.x)*pT2/adPf; if (eFrDw6W>=xLbEjF && kcL9<=Y14) return 2; return 0; }; var tTg9L, OLe, points, pt, isIn, n8p6G6, c, VaM3Ve7, FT1h, mx8, HWBv, hkfNbL, t1rOM=this.width, WfbKsC=this.height; log("Redrawing canvas"); var ndx, SIgD1=this.points.length; if (SIgD1==0) return; var hOT=new Date(); hkfNbL=hOT.getTime(); delete hOT; if (cHcHgJ){ points=new Array(SIgD1); for (ndx=0;ndx=this.OB2CU2){ this.jLER(); break; } delete hOT; } pt=points[ndx]; isIn=iTt9(pt,ndx,points,cHcHgJ); if (isIn==0){ if (n8p6G6==0 && ndx>0){ mx8[HWBv++]=this.Mk8DD[ndx-1]; if (editable){ VaM3Ve7[FT1h]=this.points[ndx-1]; FT1h++; } n8p6G6=isIn; continue; }; } if (!cHcHgJ){ if (isIn>0 && n8p6G6==0 && ndx>0){ tTg9L[OLe++]=points[ndx-1]; if (editable) points[ndx-1].YP0NN1(); }; } tTg9L[OLe++]=pt; if (editable){ this.points[ndx].YP0NN1(); if (ndx>0 && (n8p6G6>0 || isIn>0)){ this.Mk8DD[ndx-1].redraw( points[ndx-1].x, points[ndx-1].y, pt.x, pt.y ); }; } n8p6G6=isIn; } if (n8p6G6==0 && ndx>0 && editable){ VaM3Ve7[FT1h]=this.points[ndx-1]; FT1h++; } if (this.mode==this.Tv1N7d) return this.F83LG(); log(OLe+" points within this geographical area "); tTg9L.splice(OLe,SIgD1-OLe); log("New redrawGfx, total elapsed time = "+(new Date().getTime()-hkfNbL)); this.mode=this.oGz8F; VaM3Ve7.splice(FT1h,SIgD1-FT1h); mx8.splice(HWBv,SIgD1-HWBv); setTimeout(dojo.hitch(this,function(){ if (editable) for (var ndx=0;ndx=this.g2nT.page*this.B6B && ANL<(this.g2nT.page+1)*this.B6B ){ dOuL9c5.YP0NN1(); } else { NkOGLM[n]=true; } ANL++; } setTimeout(function(){ var n; for (n in NkOGLM){ domain.HGWuSRq[n].ul1c4(); } },0); } , S8Fe: function(qW7){ var mW9M2="${ndx}) ${n}-${m}", cxYsFSB=false, domain=this; ; if (!this.sEbL.RWTR) return; var aF8=Math.ceil(qW7/this.B6B),n; if (aF8>1){ dojo.toggleClass(this.sEbL.RWTR.domNode,"tmwPoiPagerHl",true); if (this.S8Fe.EXhDu2){ clearTimeout(this.S8Fe.EXhDu2); } this.S8Fe.EXhDu2=setTimeout(function(){ domain.S8Fe.EXhDu2=null; dojo.toggleClass(domain.sEbL.RWTR.domNode,"tmwPoiPagerHl",false); },4000); } if (this.g2nT.U873Y==aF8) return; this.g2nT.U873Y=aF8; if (aF8<=1){ dojo.style(this.sEbL.RWTR.domNode,"display","none"); this.g2nT.page=0; if (this.SMLYa.a2jB()==D7hoWd){ this.SMLYa.clear(); } return; } else { dojo.style(this.sEbL.RWTR.domNode,"display","block"); } this.SMLYa.display(D7hoWd); var VUISu9={identifier: "ndx", items: []}, T7H7NLr; for(n=0;n=aF8){ this.sEbL.MPQy=true; this.g2nT.page=aF8-1; this.sEbL.RWTR.attr("value",aF8-1); setTimeout(function(){ delete domain.sEbL.MPQy; },500); } if (this.sEbL.P0RxAG){ this.sEbL.RWTR.attr("searchAttr","lbl"); this.sEbL.RWTR.attr("onChange",function(eR5){ if (domain.sEbL.MPQy){ return; } domain.g2nT.page=eR5; domain.xLVbQ(true); }); this.sEbL.MPQy=true; this.sEbL.RWTR.attr("value",0); delete this.sEbL.P0RxAG; setTimeout(function(){ delete domain.sEbL.MPQy; },500); } } , Dy7RV8F: function(AlcI){ var domain=this; clearTimeout(this.Dy7RV8F.WKyX); this.Dy7RV8F.WKyX=setTimeout(function(){ domain.eTWNL(AlcI); },1200); } , eTWNL: function(AlcI){ console.log("draw overview grid "+(AlcI && "- deleting grid" || "")); clearTimeout(this.vyo.MyXaf8); this.vyo.MyXaf8=null; var sBK8T, O6Z18U, g3ED, SL6zx5, kLGFb, Fj7, p58, K5V2C, ZSfF, qMNX, b2433, iGOuJ0F, pt, UhDJ01, n, domain=this; for (n=0;n0){ delete this.hUP.i5tW; delete this.hUP.EWWk; delete this.hUP.j5L; this.hUP.i5tW=[]; this.hUP.EWWk=[]; this.hUP.j5L=[]; } for(n=0;n84 && 84) || n),O6Z18U.lng()); this.hUP.EWWk.push({ y: pt.y , lat: n }); UhDJ01=this.eJb.createLine({ x1: 0, y1: pt.y, x2: this.width, y2: pt.y }); UhDJ01.setStroke(this.qR7H); this.hUP.i5tW.push(UhDJ01); if (n+p58>b2433 && b2433==90 && n!=b2433){ n=b2433-p58; } if (n==-90 && ZSfF%p58!=0){ n=Math.floor(ZSfF/p58)*p58; }; } b2433=n-p58; for (n=qMNX;n<=iGOuJ0F;n+=K5V2C){ if (n==qMNX && qMNX%K5V2C!=0 && qMNX!=-180){ n=(Math.floor(qMNX/K5V2C)+1)*K5V2C; qMNX=n; } pt=this.Xkl2Ui(O6Z18U.lat(),n); this.hUP.j5L.push({ x: pt.x , lb15Y: n }); UhDJ01=this.eJb.createLine({ x1: pt.x, y1: 0, x2: pt.x, y2: this.height }); UhDJ01.setStroke(this.qR7H); this.hUP.i5tW.push(UhDJ01); if (n+K5V2C>iGOuJ0F && iGOuJ0F==180 && n!=iGOuJ0F){ n=iGOuJ0F-K5V2C; } if (n==-180 && qMNX%K5V2C!=0){ n=Math.floor(qMNX/K5V2C)*K5V2C; }; } iGOuJ0F=n-K5V2C; try { if (this.hUP.yXSW2){ this.j5Qk4(); } else if( this.hUP.D3TK || this.hUP.W2vW4NJ ){ if (this.HGWuSRq[_rfilter.R4UEN]) this.HGWuSRq[_rfilter.R4UEN].YP0NN1(); } }catch(err){} var domain=this; this.hUP.W563L8b=setTimeout(IA6Q9,500); function IA6Q9(){ domain.hUP.W563L8b=null; var ndx,n,SYgJS1,sQ8l72=false; for (n=0;n500){ ANL=0; for(n in domain.hUP.S88SWn){ delete domain.hUP.S88SWn[n]; if (++ANL==90) break; } domain.hUP.wc6s-=ANL; } domain.bBHVQ(); }, content: j1Jv }); }; } , wpEIp4: function(mode){ if (mode==this.x3CUjg) return; var n; if (this.x3CUjg==this.eFEW3W){ dojo.disconnect(this.events[this.sEbL.fudMHo]); this.events[this.sEbL.fudMHo]=null; } else if (mode==this.eFEW3W){ if (this.events[this.sEbL.fudMHo]){ dojo.disconnect(this.events[this.sEbL.fudMHo]); } n=this.h8qB85F(this.tRD2, "onmousemove", this, this.vyo, this.sEbL.fudMHo); if (typeof(this.sEbL.fudMHo)=="undefined"){ this.sEbL.fudMHo=n; }; } this.x3CUjg=mode; for(n=0;n0){ cells.push({ Ww1a: EWWk[n-1].lat , V4k3WA: EWWk[n].lat , WxCI: j5L[SYgJS1-1].lb15Y , LWVo: j5L[SYgJS1].lb15Y , JSNCYq: this.hUP.JSNCYq, dL7j: EWWk[n].y , eN8YM: j5L[SYgJS1-1].x, y1: EWWk[n-1].y, x1: j5L[SYgJS1].x }); }; }; } for(n=0;nEWWk[n].y){ for (var SYgJS1=0;SYgJS1=0;n--){ if(JQAXUI[n].ypJR22Y){ pwnDjX.push(JQAXUI[n].index); JQAXUI.splice(n,1); }; } if (pwnDjX.length>0){ alert(dojo.string.substitute(djSN1B,{ "list": pwnDjX.join(",") })); } this.M3dYQl(JQAXUI,false,true); }, M3dYQl: function( n2DGaK, rkZU371, nEH7){ if (!this.AAk7y.GWNbuQ && !n2DGaK) return; var JQAXUI, X6XK, YJNSO; if (n2DGaK instanceof Array){ JQAXUI=n2DGaK; } else { JQAXUI=this.AAk7y.GWNbuQ; if(JQAXUI.length>0) this.AAk7y.GWNbuQ=[]; } if(JQAXUI.length==0) return; if(!rkZU371 && JQAXUI.length>1){ dojo.publish(this.oOHtMn, [this.hAHVF5.fxtC0O4]); } for(var ndx=0;ndx1){ setTimeout(dojo.hitch(this,function(){ dojo.publish(this.oOHtMn, [this.hAHVF5.lBiJ3w]); }), 0); } if (this.AAk7y.cN4DG6U){ this.AAk7y.VyoJN8i(); } this.Tj4NP(false,true); } , D4L: function( n2DGaK, rkZU371){ if (!this.AAk7y.XDPl11 && !n2DGaK) return; var X6XK, src, Ryi78C, dUoM, JQAXUI, c, pT4F5w, lPH0O, vCS2Oq4=false; var IXc3=[]; dUoM=false; if (n2DGaK instanceof Array){ JQAXUI=n2DGaK; } else { JQAXUI=this.AAk7y.XDPl11; if(JQAXUI.length>0){ this.AAk7y.XDPl11=[]; this.AAk7y.qMhY5=[]; }; } if (JQAXUI.length==0) return; else if(JQAXUI.length==this.points.length && JQAXUI.length>1) vCS2Oq4=true; if (vCS2Oq4){ var domain=this, CAHOIiQ=this.points, IEC73=this.Mk8DD, ndx; delete this.points; delete this.Mk8DD; this.points=[]; this.Mk8DD=[]; this.cN4DG6U=null; setTimeout(function(){ domain.hAHVF5.qJQh(false,domain.hAHVF5.qDO7,false,CAHOIiQ); for (ndx=CAHOIiQ.length-1;ndx>=0;ndx--){ CAHOIiQ[ndx].destroy(true); } for (ndx=IEC73.length-1;ndx>=0;ndx--){ IEC73[ndx].destroy(true); } domain.hAHVF5.qJQh(false,domain.hAHVF5.FmnHPH,true); },1); } else { var p83Q=JQAXUI[0].index, ndx; pT4F5w=0; for(ndx=0;ndxthis.points.length-1+pT4F5w){ if ((src-lPH0O)>=0 && (src-lPH0O)=0){ if (this.Mk8DD[src-lPH0O].l){ c=this.points[Ryi78C-pT4F5w].iIxQH(); this.Mk8DD[src-lPH0O].l.setShape({ x2: c.x , y2: c.y }); }; }; }; } if (pT4F5w>0){ if (this.fr3X==this.m7TLZ) this.setActive(this.points[0]); if (this.fr3X!=this.m7TLZ) this.setActive(this.points[this.points.length-1]); setTimeout(dojo.hitch(this,function(){ this.LqB(p83Q, this.points, true); }), 1); setTimeout(dojo.hitch(this,function(){ this.LqB(p83Q, this.Mk8DD); }), 1); } if(!rkZU371 && JQAXUI.length>1){ dojo.publish(this.oOHtMn, [this.hAHVF5.fxtC0O4]); } for (ndx=IXc3.length-1;ndx>=0;ndx--){ IXc3[ndx].destroy(rkZU371); } if (!rkZU371 && JQAXUI.length>1){ setTimeout(dojo.hitch(this,function(){ dojo.publish(this.oOHtMn, [this.hAHVF5.lBiJ3w]); }), 0); }; } if (this.AAk7y.cN4DG6U){ this.AAk7y.VyoJN8i(); } } , Ks5tSS: function( HGWuSRq){ if (!this.AAk7y.GWNbuQ && !HGWuSRq) return; var JQAXUI, X6XK; if (HGWuSRq instanceof Array){ JQAXUI=HGWuSRq; } else { JQAXUI=this.AAk7y.GWNbuQ; } if(JQAXUI.length==0) return; if(JQAXUI.length>1){ dojo.publish(this.oOHtMn, [this.hAHVF5.fxtC0O4]); } for(var ndx=0;ndx=0 || !(this.HGWuSRq.hasOwnProperty(X6XK))) continue; JQAXUI[ndx].index=this.u3uGhU7; delete this.HGWuSRq[X6XK]; dojo.publish(this.H8cY1, [ JQAXUI[ndx].index, (JQAXUI[ndx].PlHI1?JQAXUI[ndx].u2BqYc:0)|JQAXUI[ndx].LfMO4.type, JQAXUI[ndx].F9L8, -X6XK ]); this.Y6vhW2L.It3[-X6XK]=this.u3uGhU7; this.Y6vhW2L.KSQ2[this.u3uGhU7]=-X6XK; this.HGWuSRq[this.u3uGhU7++]=JQAXUI[ndx]; JQAXUI[ndx].n2Sf(); if (JQAXUI[ndx].LfMO4.media){ this.BT5PDB.xXMD.Y4bK(JQAXUI[ndx].LfMO4.media, JQAXUI[ndx].index,true); }; } if (JQAXUI.length>1){ setTimeout(dojo.hitch(this,function(){ dojo.publish(this.oOHtMn, [this.hAHVF5.lBiJ3w]); }), 0); } if (this.AAk7y.cN4DG6U){ this.AAk7y.VyoJN8i(); } } , n9Wxs9: function(KnsE){ var zYWP = dijit.byId(this.baseName+"remPtMenu") , n7SR8b = dijit.byId(this.baseName+"insPtBtMenu"), YPTH8N = dijit.byId(this.baseName+"selThisPtMenu"), nfnn = dijit.byId(this.baseName+"poiEdit"), x18 = dijit.byId(this.baseName+"poiPermDel"), ynDF2NP = dijit.byId(this.baseName+"poiAssociate"), jSFH1B = dijit.byId(this.baseName+"changepoitype"), msLDmu5; ; this.YpQxw(true); msLDmu5=true; if(this.AAk7y.GWNbuQ.length>0 || (this.selected && this.selected instanceof X35QK.uTf8) ){ msLDmu5=false; } if (nfnn) nfnn.attr("disabled",msLDmu5); if (x18) x18.attr("disabled",msLDmu5); if (ynDF2NP) ynDF2NP.attr("disabled",msLDmu5); if (jSFH1B) jSFH1B.attr("disabled",msLDmu5); msLDmu5=true; if( (this.AAk7y.GWNbuQ.length>0 && this.FDs()) || (this.AAk7y.XDPl11.length>0 && this.CNdU()) || this.selected ){ msLDmu5=false; } if(zYWP) zYWP.attr("disabled",msLDmu5); if(YPTH8N) YPTH8N.attr("disabled",msLDmu5); msLDmu5=true; if (this.CNdU()){ if (this.eIaT6 && !this.AAk7y.cN4DG6U){ msLDmu5=false; this.AAk7y.Rt6=this.eIaT6; this.eIaT6.editable(); }; } if(n7SR8b) n7SR8b.attr("disabled",msLDmu5); if (this.selected){ this.AAk7y.UBvT=this.selected; log("this.selected.index"+this.selected.index); this.selected.editable(); } if (!this.O58) return; this.sEbL.k4787K=this.eJb.createCircle({ cx: this.O58.x , cy: this.O58.y , r: this.uD69m.r }); this.sEbL.k4787K.setStroke(this.uD69m.stroke); this.sEbL.k4787K.setFill(this.uD69m.fill), this.sEbL.k4787K.moveToBack(); setTimeout(tmwclosepoitt,700); } , YpQxw: function( MDPd){ var domain=this; if (this.AAk7y.UBvT){ try{ this.AAk7y.UBvT.k5CRV(); }catch(err){}; } if (this.AAk7y.Rt6){ try{ this.AAk7y.Rt6.k5CRV(); }catch(err){}; } if (this.sEbL.k4787K){ this.sEbL.k4787K.removeShape(); if (this.sEbL.FTd) clearTimeout(this.sEbL.FTd); if (!MDPd){ this.sEbL.FTd=setTimeout(ul1c4,400); } else { ul1c4(); }; } function ul1c4(){ domain.AAk7y.UBvT=null; domain.AAk7y.Rt6=null; delete domain.sEbL.k4787K; delete domain.sEbL.FTd; }; } , LqB: function(ndx, list, KLDKqc){ if (ndx<=1 && KLDKqc && list[0] && list[0].t!=0){ var wXhB=-list[0].t; for(var n=0;nto) { var UPOM0VI=to; to=from; from=UPOM0VI; StRoo=-1; } if (to==from) return 0; if (!data[to]) return 0; var p = 3.1415926535898/180; var r = 6371; var EmXP3G = 2*r*1000; var tYc = data[from].F9L8.lat()*p; var P2n8 = data[from].F9L8.lng()*p; var J8Q = Math.cos(tYc); var LiYz,QpUjOVT,jlib2B,K5HM,o1C5HqN,O1PnY,SwEoY7i,d=dx=0; for (var E7Zd=from+1;E7Zd<=to;E7Zd++) { LiYz = tYc; QpUjOVT = P2n8; eD3L = J8Q; jlib2B = data[E7Zd].F9L8.lat()*p; K5HM = data[E7Zd].F9L8.lng()*p; QrAg98L = Math.cos(jlib2B); o1C5HqN = jlib2B-LiYz; O1PnY = K5HM-QpUjOVT; SwEoY7i = Math.sin(o1C5HqN/2) * Math.sin(o1C5HqN/2) + eD3L * QrAg98L * Math.sin(O1PnY/2) * Math.sin(O1PnY/2); dx = EmXP3G*Math.atan2(Math.sqrt(SwEoY7i), Math.sqrt(1-SwEoY7i)); d += dx; tYc = jlib2B; P2n8 = K5HM; J8Q = QrAg98L; } return StRoo*d.toFixed(0); } , qSEFk: function(pt){ var SOeTQB,VRY5YT,pCd,QFJGpq,s,v,zQPeH,YAQuEdD,acXp5; if (!this.KH7eV) return; SOeTQB=pt.index; if (SOeTQB>0 && SOeTQB0 && s>0){ v=s/QFJGpq; zQPeH=this.D65(0,1,[acXp5,pt]); YAQuEdD=zQPeH/v; } else YAQuEdD=0; pt.t=Math.round(acXp5.t+((SOeTQB==0)?-1*YAQuEdD:YAQuEdD)); } , cX5naI: function(pt, LXN){ var index, q8De, next; index=pt.index; this.qSEFk(pt); if (LXN){ var line=new X35QK.p5mF(this, null, null, null, null, index); this.points.splice(index, 0, pt); this.Mk8DD.splice(index, 0, line); return; } if (index>0 && index0){ this.NwNe654(pt); if (this.points.length>1){ q8De=pt.iIxQH(); next=this.points[1].iIxQH(); this.C8t(q8De,next); } if (this.fr3X==this.m7TLZ){ this.setActive(pt); }; } else { this.YDXEl(pt); if (this.points.length>1){ q8De=this.points[this.points.length-2].iIxQH(); next=pt.iIxQH(); this.XLJQH(q8De,next); } if (this.fr3X!=this.m7TLZ) this.setActive(pt); }; } } , SBN1e: function( x, y){ if (!y){ if (!this.O58 || !this.CNdU()) return; x=this.O58.x; y=this.O58.y; } var pt; if (this.fr3X==this.m7TLZ){ pt=new X35QK.WLL3(this, x, y, false, 0); } else { pt=new X35QK.WLL3(this, x, y, false, this.points.length); } this.cX5naI(pt); } , Tj4NP: function(type,defer,TA7YVK){ var domain=this, BMR368t=true; if (type!==false && TA7YVK){ if (type in this.g2nT.vPkiU && !(type in this.g2nT.map)){ this.g2nT.map[type]=true; delete this.g2nT.vPkiU[type]; BMR368t=false; }; } if (type===false){ if (defer){ if (this.Tj4NP.S7IHTM){ clearTimeout(this.Tj4NP.S7IHTM); } this.Tj4NP.S7IHTM=setTimeout(function(){ delete domain.Tj4NP.S7IHTM; domain.sH7r(domain.dTnrQ(true)); },1000); } else { this.sH7r(this.dTnrQ(true)); } return; } if (defer){ if (type in this.g2nT.vPkiU) return; if (!this.Tj4NP.M21uGD) this.Tj4NP.M21uGD={}; this.Tj4NP.M21uGD[type]=true; if (this.Tj4NP.l0Jjk6){ clearTimeout(this.Tj4NP.l0Jjk6); } this.Tj4NP.l0Jjk6=setTimeout(function(){ delete domain.Tj4NP.l0Jjk6; var n,SYCSS7=domain.Tj4NP.M21uGD, AUvH1F=domain.dTnrQ(true); ; for(n in SYCSS7){ if (n in domain.g2nT.vPkiU) continue; if (AUvH1F instanceof Array) AUvH1F.push(n); } delete domain.Tj4NP.M21uGD; domain.sH7r(AUvH1F,true); },1500); return; } if (type in this.g2nT.vPkiU) return; var AUvH1F=this.dTnrQ(true); if (AUvH1F instanceof Array) AUvH1F.push(type); this.sH7r(AUvH1F,BMR368t); } , eoM5tY: function(type){ if (!this.FDs()) return; var x,y,pt; if (!this.O58){ x=this.width/2; y=this.height/2; } else { x=this.O58.x; y=this.O58.y; } pt=new X35QK.uTf8(this, x, y, false, this.u3uGhU7, type); this.HGWuSRq[this.u3uGhU7++]=pt; this.Tj4NP(type); } , xTQS: function(type){ if (!this.AAk7y.UBvT && this.AAk7y.GWNbuQ.length==0){ return; } var target,n; if (this.AAk7y.cN4DG6U){ this.TVGE8(); if (this.AAk7y.mode==this.AAk7y.tEUUuIs){ target=this.AAk7y.GWNbuQ; }; } else { if (this.AAk7y.UBvT instanceof X35QK.uTf8) target=[this.AAk7y.UBvT]; } if (target.length==0) return; for(n=0;nd44L){ alert("Sorry, there are way too many points to remove at once "+ "("+this.points.length+")!\n"+ "I'll remove only the last "+d44L+" points.\n"+ "Feel free to call this function repeatedly until satisfied with the result."); this.D4L(this.points.slice(this.points.length-d44L)); if(!this.CNdU()){ var domain=this; domain.UY8Iuh1(true); } return; } V5G=this.points.slice(0); this.D4L(V5G); this.WJpNMg3(); delete V5G; this.cN4DG6U=null; this.selected=null; this.eIaT6=null; this.Oj7=null; delete this.points; delete this.Mk8DD; this.KH7eV=false; this.points=[]; this.Mk8DD=[]; if (this.gUA){ this.gUA.OnQ90Y(); } if (this.gaMQ7p){ this.gaMQ7p.reset(); } this.fr3X=~this.m7TLZ; this.mode=null; this.tracktype=null; this.vp4R=null; for(E7Zd in this.HGWuSRq){ this.HGWuSRq[E7Zd].destroy(); } delete this.HGWuSRq; this.HGWuSRq=new Object(); this.BT5PDB.UJUSYkV(); } , b5KNZI: function(evt){ var domain=this; this.TDBtZS=false; if (!this.GOverlay.edOffsetOnClick || evt.button==2) return; var wXhB=this.oBK(); if ( !window.LPQA && ( Math.pow(wXhB.pl-this.GOverlay.edOffsetOnClick.pl, 2)+ Math.pow(wXhB.pt-this.GOverlay.edOffsetOnClick.pt, 2) ) <= this.zxL0BY ){ if (this.AAk7y.cN4DG6U){ this.AAk7y.VyoJN8i(); return; } else if (this.hUP.D3TK){ this.KX9YD2(this.O58); } else if (this.mode==this.k37rF){ if (this.sEbL.k4787K) return; if (this.hUP.yXSW2){ this.WaBfUt(this.O58); } else { this.s7b(new GPoint(this.O58.x+wXhB.Sl4f72B, this.O58.y+wXhB.JTng), true); }; } else if (this.SSK){ if (!this.b5KNZI.DNi1R3){ this.b5KNZI.DNi1R3=setTimeout(function(){ domain.b5KNZI.DNi1R3=null; domain.SBN1e(domain.O58.x, domain.O58.y); },100); }; }; } this.SSK=false; delete this.GOverlay.edOffsetOnClick; } , iFtXV1: function(evt){ dijit.popup.close(this.co85K); this.O58=this.iG1(evt); this.GOverlay.edOffsetOnClick=this.oBK(); if (this.AAk7y.cN4DG6U){ if(this.AAk7y.XDPl11.length>0) this.AAk7y.jNwSlhM(); return; } if (!evt) return; if (this.sEbL.k4787K){ return; } if (evt.button==2){ if (dojo.isOpera) dijit.popup.open({ popup: this.co85K }); return; } this.TDBtZS=true; if (!this.CNdU()) return; if (evt.button!=2 && (!this.eIaT6)){ this.SSK=true; } } , undo: function(KnsE){ if (!this.CNdU()){ alert("You can't undo at this zoomlevel"); return; } else if (this.AAk7y.cN4DG6U){ this.AAk7y.VyoJN8i(); return setTimeout(dojo.hitch(this,this.undo),100); } else if (this.hAHVF5.pJ7h6s==0){ alert("Nothing to undo"); return; } var c, KRlKI2K, repeat=false, LXN=false, domain=this; this.hAHVF5.rkZU371=true; try { do { this.hAHVF5.pJ7h6s--; KRlKI2K=this.hAHVF5.BuCumP4[this.hAHVF5.pJ7h6s]; c=this.hAHVF5.DkG(KRlKI2K); if (!this.hAHVF5.o8VW(c,true)){ this.hAHVF5.bsQPx(); break; } switch(c.SVeOhB){ case this.hAHVF5.PMc.oIxp9MI: this.D4L([this.points[c.index]], true); (function(){ var o=c; setTimeout(dojo.hitch(domain,function(){ dojo.publish(this.vREK, [o.index, new GLatLng(o.lat, o.lb15Y)]); }), 0); })(); break; case this.hAHVF5.PMc.IPPrHVi: log("UNDO New poi "+c.index+" "+c.lat+","+c.lb15Y); this.M3dYQl([this.HGWuSRq[c.index]], true); break; case this.hAHVF5.PMc.efE: if (this.points[c.index]) this.points[c.index].WYvS(-c.lat, -c.lb15Y, LXN); (function(){ var o=c; setTimeout(dojo.hitch(domain,function(){ dojo.publish(this.rG6G, [o.index, -o.lat, -o.lb15Y]); }), 0); })(); break; case this.hAHVF5.PMc.fJ4Q2: log("UNDO Mov poi "+c.index+" "+c.lat+","+c.lb15Y); if (this.HGWuSRq[c.index]) this.HGWuSRq[c.index].WYvS(-c.lat, -c.lb15Y, true, LXN); break; case this.hAHVF5.PMc.bIJp5U2: var pt=new X35QK.WLL3(this, c.lat, c.lb15Y, true, c.index); if (!LXN) pt.YP0NN1(); this.cX5naI(pt, LXN); (function(){ var o=c; setTimeout(dojo.hitch(domain,function(){ dojo.publish(this.RoVLnG, [o.index, new GLatLng(o.lat, o.lb15Y)]); }), 0); })(); break; case this.hAHVF5.PMc.LYL2: log("UNDO Del poi "+c.index+" "+c.lat+","+c.lb15Y); var pt=new X35QK.uTf8(this, c.lat, c.lb15Y, true, c.index, c.type); if (!LXN) pt.YP0NN1(); this.HGWuSRq[c.index]=pt; if (this.Y6vhW2L.pi[c.index]){ pt.Xp5lU(this.Y6vhW2L.pi[c.index]); this.Y6vhW2L.It3=this.Y6vhW2L.KSQ2[c.index]; } this.Tj4NP(c.type,true); break; case this.hAHVF5.PMc.ky7B3d: log("Undo GROUPStart"); repeat=false; setTimeout(dojo.hitch(this,function(){ dojo.publish(this.JPGBo, [this.hAHVF5.lBiJ3w]); }), 0); if (LXN){ this.LqB(0, this.points, true); this.LqB(0, this.Mk8DD); setTimeout(dojo.hitch(this,function(){ this.Oj7=this.tTYKi.GRW( this.tTYKi.points); this.UY8Iuh1(); }),0); LXN=false; } break; case this.hAHVF5.PMc.groupEnd: log("Undo GROUPEnd"); repeat=true; setTimeout(dojo.hitch(this,function(){ dojo.publish(this.JPGBo, [this.hAHVF5.fxtC0O4]); }), 0); LXN=false; if (this.hAHVF5.K59Gu()>=50) LXN=true; break; }; } while (repeat && this.hAHVF5.pJ7h6s>0); } finally { this.hAHVF5.rkZU371=false; } } , mN57hGs: function(KnsE){ if (!this.CNdU() && KnsE!=true){ alert("You can't redo at this zoomlevel"); return; } else if (this.AAk7y.cN4DG6U && KnsE!=true){ this.AAk7y.VyoJN8i(KnsE); return setTimeout(dojo.hitch(this,this.mN57hGs),100); } else if (this.hAHVF5.pJ7h6s==this.hAHVF5.BuCumP4.length){ if (KnsE!=true) alert("Nothing to redo"); return; } var c, KRlKI2K, repeat=false, domain=this; this.hAHVF5.rkZU371=true; do { try { KRlKI2K=this.hAHVF5.BuCumP4[this.hAHVF5.pJ7h6s]; c=this.hAHVF5.DkG(KRlKI2K); if (!this.hAHVF5.o8VW(c,false)){ this.hAHVF5.bsQPx(); break; } switch(c.SVeOhB){ case this.hAHVF5.PMc.bIJp5U2: log("REDO Del point "+c.index+" "+c.lat+","+c.lb15Y); this.D4L([this.points[c.index]], true); (function(){ var o=c; setTimeout(dojo.hitch(domain,function(){ log("Publish REMOVEPOINT-relay from editor"); dojo.publish(this.vREK, [o.index, new GLatLng(o.lat, o.lb15Y)]); }), 0); })(); break; case this.hAHVF5.PMc.LYL2: log("REDO Del poi "+c.index+" "+c.lat+","+c.lb15Y); this.M3dYQl([this.HGWuSRq[c.index]], true); break; case this.hAHVF5.PMc.efE: log("REDO Mov point "+c.index+" "+c.lat+","+c.lb15Y); if (this.points[c.index]) this.points[c.index].WYvS(c.lat, c.lb15Y); (function(){ var o=c; setTimeout(dojo.hitch(domain,function(){ log("Publish MOVEPOINT-relay from editor"); dojo.publish(this.rG6G, [o.index, -o.lat, -o.lb15Y]); }), 0); })(); break; case this.hAHVF5.PMc.fJ4Q2: log("REDO Mov poi "+c.index+" "+c.lat+","+c.lb15Y); if (this.HGWuSRq[c.index]) this.HGWuSRq[c.index].WYvS(c.lat, c.lb15Y, true); break; case this.hAHVF5.PMc.oIxp9MI: log("REDO New point "+c.index+" "+c.lat+","+c.lb15Y); var pt=new X35QK.WLL3(this, c.lat, c.lb15Y, true, c.index); pt.YP0NN1(); this.cX5naI(pt); (function(){ var o=c; setTimeout(dojo.hitch(domain,function(){ log("Publish NEWPOINT-relay from editor"); dojo.publish(this.RoVLnG, [o.index, new GLatLng(o.lat, o.lb15Y)]); }), 0); })(); break; case this.hAHVF5.PMc.IPPrHVi: log("REDO New poi "+c.index+" "+c.lat+","+c.lb15Y); var pt=new X35QK.uTf8(this, c.lat, c.lb15Y, true, c.index, c.type); this.HGWuSRq[c.index]=pt; pt.YP0NN1(); if (this.Y6vhW2L.pi[c.index]){ pt.Xp5lU(this.Y6vhW2L.pi[c.index]); this.Y6vhW2L.It3=this.Y6vhW2L.KSQ2[c.index]; } this.Tj4NP(c.type,true); break; case this.hAHVF5.PMc.ky7B3d: log("Redo GROUPStart"); repeat=true; setTimeout(dojo.hitch(this,function(){ log("Publish GroupStart-relay from editor "+this.baseName); dojo.publish(this.JPGBo, [this.hAHVF5.fxtC0O4]); }), 0); break; case this.hAHVF5.PMc.groupEnd: log("Redo GROUPEnd"); repeat=false; setTimeout(dojo.hitch(this,function(){ log("Publish GroupEnd-relay from editor "+this.baseName); dojo.publish(this.JPGBo, [this.hAHVF5.lBiJ3w]); }), 0); break; }; } finally { this.hAHVF5.rkZU371=false; this.hAHVF5.pJ7h6s++; }; } while (repeat && this.hAHVF5.pJ7h6s=2){ return map; } else { return [ {xN8M1D7:null,UhDJ01:null,type:"S",q5lbv:0}, {xN8M1D7:null,UhDJ01:null,type:"E",q5lbv:0} ]; } } , V81fFRs: function(b2F){ if (b2F==null){ b2F=this.D65(0,this.points.length-1); } var DFhDC=6, SZ8Db=Math.floor(b2F/1000), fPXc=Math.max(1,Math.floor(SZ8Db/DFhDC)), domain=this, KRlKI2K=this.baseName+"AutoIntrm"; if (SZ8Db<2){ if (tmwHelperPan.D2gL.mFSR[KRlKI2K]){ tmwHelperPan({close:true, id:KRlKI2K}); } return false; } if (tmwHelperPan.D2gL.mFSR[KRlKI2K]){ dijit.byId(KRlKI2K+"Km").attr("constraints",{"min":1,"max":SZ8Db}); dijit.byId(KRlKI2K+"Km").attr("value",fPXc); } else { tmwHelperPan({ id: KRlKI2K, title: EMZZ, w: "auto", h: "auto", l: "430px", t: "425px", content: dojo.string.substitute(cE7M,{ "maxkm":SZ8Db, "startval":fPXc, "base":KRlKI2K }), WQc6G: tmwHelperPan.D2gL.DDEPY6, wgT: this.baseName }); dojo.connect(dijit.byId(KRlKI2K+"Set"),"onClick",B014od); dojo.connect(dijit.byId(KRlKI2K+"Ok"),"onClick",this,function(){ B014od(); tmwHelperPan({close:true, id:KRlKI2K}); }); dojo.connect(dijit.byId(KRlKI2K+"Cancel"),"onClick",this,function(){ B014od(true); tmwHelperPan({close:true, id:KRlKI2K}); }); } return true; function B014od(clear){ if (clear===true){ if (!domain.gaMQ7p) domain.gaMQ7p=new MlLBF0(domain); setTimeout(function(){ domain.gaMQ7p.rkKGj([]); },100); return; } var b2F=dijit.byId(KRlKI2K+"Km")*1000,n,map=[0],jpHKlz=[], DUJS=0, vTCNB=0, UPOM0VI; for(n=1;nvTCNB){ map.push(n); vTCNB=UPOM0VI; }; } for(n=1;n0){ V6DXQ["_nextevt"]=dojo.connect(V6DXQ[0]["_attachedDialog"], "onClick",V6DXQ[0]["_attachedDialog"]["_nextImage"]); this.sEbL.Ba98h=hIIH; this.sEbL.fF5hDW=V6DXQ; setTimeout(function(){V6DXQ[0].show();},1000); } } , B6B: 400, RU15B: { r: 4 , fill: [200, 0, 0, 0.40] , CjY8U: { color: [255, 0, 0, 0.50] , width: 5 } , HC5CFmE: { color: [0, 150, 0, 0.45] , width: 7 } , ibC: { color: [255, 165, 0, 0.50] , width: 18 } , o8oc1A: { color: [250, 250, 250, 0.50] , width: 6 } } , QaSIm: { stroke: { color: [220, 20, 60, 0.90] , width: 3 } , F3XH2B: { color: [0, 120, 160, 0.90] , width: 3 } , ibC: { color: [255, 165, 0, 0.50] , width: 6 } , z3zohU: [ { color: [0, 255, 0, 0.90], width: 4 }, { color: [255, 0, 255, 0.90], width: 4 }, { color: [0, 0, 255, 0.90], width: 4 }, { color: [205, 133, 63, 0.90], width: 4 }, { color: [106, 90, 205, 0.90], width: 4 }, { color: [255, 99, 71, 0.90], width: 4 }, { color: [154, 205, 50, 0.90], width: 4 }, { color: [75, 0, 130, 0.90], width: 4 }, { color: [95, 158, 160, 0.90], width: 4 }, { color: [0, 255, 255, 0.90], width: 4 }, { color: [30, 30, 30, 0.90], width: 4 }, { color: [220, 220, 220, 0.90], width: 4 }, { color: [0, 0, 0, 0.90], width: 4 } ] } , qR7H: { color: [0, 0, 0, 0.25] , width: 1 } , go56U: { stroke: { color: [125, 125, 125, 0.50] , width: 2 } , fill: [ 0, 255, 255, 0.40] } , uD69m: { r: 13 , stroke: { color: [125, 125, 125, 0.80] , width: 2 } , fill: [ 0, 0, 100, 0.30] } , L7Fi: { A3W14I: { color: [0, 0, 139, 0.50] , width: 7 } , ZFU5jQ: { color: [0, 0, 139, 0.50] , width: 6 } } , wNQ7OI: { r: 12 , stroke: { color: [125, 125, 125, 0.50] } , gX37GY: [ 0, 255, 255, 0.40] , VmgRy: [ 255, 255, 50, 0.40] } , W5OG5: { Iu8H:3, Vn60k1:{MNaCo:false, fill:false}, sLOeSN:"blue", umW12f: [255, 165, 0] }, zxL0BY: 16 , fb5RSP: 0.5, YILLY: 0.75, Tv1N7d: 0, oGz8F: 1, k37rF: 2, twUl: 4, SoR: 0 , yPAFyqR: 1 , GbXcn: 2 , uf1Y: 4 , m1hcF: 8, or1qQ: 16, q7kZ: 32, eFEW3W: 0, in75: 1, FERgk: 2, nOCFAXt: 1 , hBP41Dd: 2, qXB7: 3, sV7o4: 4, m6l6CZT: 5, f5qI: 6, IfUkX4: 7, ruE7jt: 8, gOWPV: 9, yQRY6: 10, G02X3: 11, EBwv: 12, EE15bG: 13, oAkUe7: 14, BCEFcHZ: 15, I7Wl: 16, rJNG9: 17, P4K4: 18, lQCCW: 19, KNMP: 20, t7n7q: 21, B4VV: 22, AO7P4SG: 23, QLmX: 24, iw688u: 30, w61GN: 31, frTFMSm: 50, dMX: 51, r5FR: 52, vCZ: 53, DZq47tg: 80, L4joyL: 81, Uig6Y: 82, yG9: 99, s7S3QN: 100, o71CdJ: 101, VoRlIw: 102, fpRl: 103, SB3: 104, PHB2: 105, ERwx5iH: 106, cLq4Cuj: 107, HR1G: 108, s6ZZB: 109, kt8kT5z: { 1: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 2: {CNCCjoj: true, w: "23em", h: "8em", chv: 23, FqPS3k: 23}, 3: {CNCCjoj: true, w: "23em", h: "8em", chv: 23, FqPS3k: 23}, 4: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 5: {CNCCjoj: true, w: "23em", h: "8em", chv: 23, FqPS3k: 23}, 6: {CNCCjoj: true, w: "23em", h: "8em", chv: 23, FqPS3k: 23}, 7: {CNCCjoj: true, w: "23em", h: "8em", chv: 9, FqPS3k: 10}, 8: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 9: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 10: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 11: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 12: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 13: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 14: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 15: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 16: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 17: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 18: {CNCCjoj: true, w: "32em", h: "6em", chv: 23, FqPS3k: 23}, 19: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 20: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 21: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 22: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 23: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 24: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 30: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 31: {CNCCjoj: true, w: "23em", h: "6em", chv: 23, FqPS3k: 23}, 50: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 51: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 52: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 53: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 80: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 81: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 82: {CNCCjoj: true, w: "23em", h: "12em", chv: 23, FqPS3k: 23}, 100: {CNCCjoj: false, w: 0 , h: 0, chv: 10, FqPS3k: 10}, 101: {CNCCjoj: false, w: 0, h: 0, chv: 23, FqPS3k: 23}, 102: {CNCCjoj: false, w: 0, h: 0, chv: 23, FqPS3k: 23}, 103: {CNCCjoj: false, w: 0, h: 0, chv: 23, FqPS3k: 23}, 104: {CNCCjoj: false, w: 0, h: 0, chv: 23, FqPS3k: 23}, 105: {CNCCjoj: true, w: "16em", h: "auto", chv: 23, FqPS3k: 23}, 106: {CNCCjoj: true, w: "16em", h: "auto", chv: 31, FqPS3k: 31, g1J4: [MYLB6, { "fn": IP4X2P({tmactive:true})+"."+ IP4X2P({C8Uc9:true})+"."+ IP4X2P({SEG8:true}) } ], cP6L32: true, st: eHKE4l }, 107: {CNCCjoj: true, w: "100px", h: "100px", chv: 23, FqPS3k: 23}, 108: {CNCCjoj: false, w: 0 , h: 0, chv: 20, FqPS3k: 20}, 109: {CNCCjoj: false, w: 0 , h: 0, chv: 6, FqPS3k: 6} }, VDQs: 0, VuE7: 1, o47sO8: 0 , M7WR23: 1 , BIP55: 2 , m7TLZ: 1 , bsN2o3: 3 , RHEfl: "#333" , jpA6: 500 , yAWBi: 250 , AuOULc: "newpoint" , Rs1: "removepoint" , Js5M5: "movepoint" , H8cY1: "newpoi" , JCkV: "removepoi" , BNUjS2F: "movepoi" , GPTS: "editpoi" , oOHtMn: "groupaction" , rG6G: "movepoint_relay" , RoVLnG: "newpoint_relay" , vREK: "removepoint_relay" , JPGBo: "groupaction_relay" , DLP9VV: "tt/tt.html" , CNTW: "tt/poittedit$n.html" , n5Urk7J: "tt/poitt$n.html" , OB2CU2: 9500 }); dojo.declare(tmw.util.sym.YUE,null,{ constructor: function(C8Uc9){ this.pT4F5w=268435456; this.radius=this.pT4F5w/Math.PI; this.snkKFJ = null; this.C8Uc9=C8Uc9; this.O5SPw=null; this.JRLOK=null; this.kHBPn=null; this.JpZ=new Array(21); if (!this.jQ18J) return; this.vu3LG(); }, V1dU: function (x){ return Math.round(this.pT4F5w+this.radius*x*Math.PI/180); }, UBmc4: function (y){ return Math.round(this.pT4F5w-this.radius* Math.log((1+Math.sin(y*Math.PI/180))/(1-Math.sin(y*Math.PI/180)))/2); }, S3NRD5: function(x){ return ((Math.round(x)-this.pT4F5w)/this.radius)*180/Math.PI; }, OViPZq: function(y){ return (Math.PI/2-2*Math.atan(Math.exp((Math.round(y)-this.pT4F5w)/this.radius)))* 180/Math.PI; }, V5Y: function(x, y){ return new GLatLng( this.OViPZq(this.kHBPn.y+ ((y-this.O5SPw.y)<<(21-this.C8Uc9.l4W4))), this.S3NRD5(this.kHBPn.x+ ((x-this.O5SPw.x)<<(21-this.C8Uc9.l4W4))) ); }, Xkl2Ui: function(lat, lb15Y){ var x=this.O5SPw.x+ ((this.V1dU(lb15Y)-this.kHBPn.x)>>(21-this.C8Uc9.l4W4)); var y=this.O5SPw.y+ ((this.UBmc4(lat)-this.kHBPn.y)>>(21-this.C8Uc9.l4W4)); return { x:x, y:y, isIn:(x>=0 && x<=this.C8Uc9.width && y>=0 && y<=this.C8Uc9.height) }; }, vu3LG: function(LKW2W){ if (LKW2W) this.jQ18J=true; if (!this.jQ18J) return; var wXhB=this.C8Uc9.oBK(); this.O5SPw={ x: Math.round(this.C8Uc9.width/2), y: Math.round(this.C8Uc9.height/2) }; this.JRLOK=this.C8Uc9.O2J42T.fromDivPixelToLatLng(new GPoint( wXhB.Sl4f72B+this.O5SPw.x, wXhB.JTng+this.O5SPw.y) ); this.kHBPn={ x: this.V1dU(this.JRLOK.lng()), y: this.UBmc4(this.JRLOK.lat()) }; delete(this.snkKFJ); this.snkKFJ=new GLatLngBounds( this.V5Y(0,this.C8Uc9.height), this.V5Y(this.C8Uc9.width,0) ); if (!this.JpZ[this.C8Uc9.l4W4]) this.repT9R(); }, OnQ90Y: function(){ for(var n in this.JpZ) this.JpZ[n]=null; }, repT9R: function(){ if (!this.jQ18J) return; var wXhB=this.C8Uc9.oBK(), GnA1ODB=12, x2; x2 = this.C8Uc9.O2J42T.fromDivPixelToLatLng(new GPoint( wXhB.Sl4f72B+this.O5SPw.x+GnA1ODB, wXhB.JTng+this.O5SPw.y) ); this.JpZ[this.C8Uc9.l4W4]=this.JRLOK.distanceFrom(x2)/1.6; delete x2; }, dHKw45: function(){ this.vu3LG(); this.repT9R(); } }); dojo.declare(tmw.util.sym.IYdUlV,null,{ UC3s4U4: tmw.util.props.QGHC , HNf7: tmw.util.props.XWob , constructor: function(C8Uc9, x, y, qG3T, ndx, lc9Ui, t){ this.C8Uc9=C8Uc9; this.state=C8Uc9.SoR; this.x = null; this.y = null; this.F9L8 = null; this.group = null; this.hANJQ = []; this.move = null; this.t=isNaN(t)?0:t; if (typeof(ndx)=="number") this.index=ndx; else this.index=null; this.MyXaf8 = null; this.events = []; if (qG3T){ this.F9L8=new GLatLng(x, y); this.RGe2K={ lat: x, lb15Y: y }; if (!lc9Ui) return; } else { this.x=x; this.y=y; this.F9L8=this.C8Uc9.V5Y(x, y); this.RGe2K={ lat: this.F9L8.lat(), lb15Y: this.F9L8.lng() }; } if ((qG3T && lc9Ui) || (!qG3T && !lc9Ui)){ setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.AuOULc, [this.index, this.F9L8]); }), 0); } if (qG3T) return; this.group=this.C8Uc9.eJb ? this.C8Uc9.eJb.createGroup() : null; this.HVbJP(); this.Y9H1(); this.J05FGW={x: this.x, y: this.y}; } , HVbJP: function(){ if (this.hANJQ.length>0){ this.hANJQ[0].setShape({ cx: this.x , cy: this.y }); if (this.hANJQ.hasOwnProperty(this.UC3s4U4)){ this.hANJQ[this.UC3s4U4].setShape({ cx: this.x, cy: this.y }); } if (this.hANJQ.hasOwnProperty(this.HNf7)){ this.hANJQ[this.HNf7].setShape({ cx: this.x, cy: this.y }); }; } else { if (this.C8Uc9.CNdU()){ this.hANJQ.push(this.group.createCircle({ cx: this.x , cy: this.y , r: this.C8Uc9.RU15B.r })); this.hANJQ[0].setFill(this.C8Uc9.RU15B.fill); this.NS2S(); }; } } , dEJu: function(){ this.events.push(this.group.connect("onmousemove", this, this.RTRsxfQ)); this.WSJ(); } , U82: function(){ dojo.disconnect(this.events.pop()); this.DzSMsPr(); } , Y9H1: function(){ this.events.push(this.group.connect("onmouseover", this, this.ZC7Ip7)); this.events.push(this.group.connect("onmouseout", this, this.xMR5H)); this.events.push(this.group.connect("onmousedown", this, this.MdHEu)); if (!this.C8Uc9.CNdU()) return; this.dEJu(); } , YP0NN1: function(hOWNTyJ){ if (!this.group){ this.group=this.C8Uc9.eJb.createGroup(); this.Y9H1(); } else { if (this.hANJQ.length==0) this.Y9H1(); this.group.setTransform({ dx: 0, dy: 0}); if (this.C8Uc9.CNdU() && this.move==null){ this.dEJu(); } else if ((!this.C8Uc9.CNdU()) && this.move!=null){ this.U82(); }; } var pt=this.C8Uc9.Xkl2Ui(this.F9L8.lat(),this.F9L8.lng()); this.x=pt.x; this.y=pt.y; this.HVbJP(); if (!hOWNTyJ) this.J05FGW={x: this.x, y: this.y}; } , ul1c4: function(){ if(!this.C8Uc9) return; if ( (this.state & this.C8Uc9.m1hcF)==0 && (this.state & this.C8Uc9.or1qQ)==0 && this.group ){ this.group.removeShape(); this.group.clear(); this.group=null; } for (var xS54 in this.hANJQ) this.hANJQ[xS54].removeShape(); delete this.hANJQ; this.hANJQ=[]; for (var xS54 in this.events) dojo.disconnect(this.events[xS54]); this.events=[]; this.DzSMsPr(); this.x=null; this.y=null; delete this.J05FGW; } , destroy: function(rkZU371){ if (this.C8Uc9.selected==this) this.C8Uc9.selected=null; var k1L77=[ this.C8Uc9.Rs1, [this.index, this.F9L8] ]; if (!rkZU371){ setTimeout(dojo.hitch(this,function(){ dojo.publish(k1L77[0], k1L77[1]); }), 0); } if (this.group){ this.group.removeShape(); this.group.clear(); } var xS54; for (xS54 in this.hANJQ) this.hANJQ[xS54].removeShape(); for (xS54 in this.events) dojo.disconnect(this.events[xS54]); this.DzSMsPr(); for (xS54 in this) delete(this[xS54]); } , applyTransform: function(YuOH2){ this.group.applyTransform(YuOH2); var suW3ytb=this.y8oLY(); this.J05FGW={x: suW3ytb.x, y: suW3ytb.y}; setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.Js5M5, [this.index, this.F9L8] ); }), 0); } , WSJ: function(){ this.move=new dojox.gfx.Moveable(this.group); } , DzSMsPr: function(){ if (this.move) dojo.forEach(this.move.events, dojo.disconnect); this.move=null; } , select: function(){ try { this.state|=this.C8Uc9.GbXcn; this.NS2S(); }catch(err){} } , oPWkHRs: function(){ try { this.state|=this.C8Uc9.yPAFyqR; this.NS2S(); }catch(err){} } , editable: function(){ try { this.state|=this.C8Uc9.uf1Y; this.NS2S(); }catch(err){} } , deselect: function(){ try { this.state&=~this.C8Uc9.GbXcn; this.NS2S(); }catch(err){} } , vCF7B4: function(){ try { this.state&=~this.C8Uc9.yPAFyqR; this.NS2S(); }catch(err){} } , k5CRV: function(){ try { this.state&=~this.C8Uc9.uf1Y; this.NS2S(); }catch(err){} } , I0WG: function(){ this.state|=this.C8Uc9.q7kZ; this.NS2S(); if (this.C8Uc9.tTYKi){ this.C8Uc9.tTYKi.sKhfEt(this.index); } } , sNSE: function(){ if (!this.C8Uc9) return; this.state&=~this.C8Uc9.q7kZ; this.NS2S(); if (this.C8Uc9.tTYKi){ this.C8Uc9.tTYKi.hEz8h6(this.index); this.vp4R=this.C8Uc9.points[0]; } } , chrhxk: function(type){ if (type==this.C8Uc9.m1hcF || type==this.C8Uc9.or1qQ){ this.state|=type; var TL0E; if (type==this.C8Uc9.m1hcF){ TL0E=this.UC3s4U4; } else { TL0E=this.HNf7; } if (!(this.hANJQ.hasOwnProperty(TL0E))){ if (!this.group) this.group=this.C8Uc9.eJb.createGroup(); var c=(this.x!=null && this.y!=null && { x: this.x, y: this.y}) || this.iIxQH(); this.hANJQ[TL0E]=this.group.createCircle({ cx: c.x, cy: c.y, r: this.C8Uc9.wNQ7OI.r }); this.hANJQ[TL0E].setStroke(this.C8Uc9.wNQ7OI.stroke); if (type==this.C8Uc9.m1hcF) this.hANJQ[TL0E].setFill(this.C8Uc9.wNQ7OI.gX37GY); else this.hANJQ[TL0E].setFill(this.C8Uc9.wNQ7OI.VmgRy); } else { var c=(this.x!=null && this.y!=null && { x: this.x, y: this.y}) || this.iIxQH(); this.hANJQ[TL0E].setShape({ cx: c.x, cy: c.y }); }; } } , rw3: function(type){ try { if (type==this.C8Uc9.m1hcF || type==this.C8Uc9.or1qQ){ this.state&=~type; var TL0E; if (type==this.C8Uc9.m1hcF){ TL0E=this.UC3s4U4; } else { TL0E=this.HNf7; } if (this.hANJQ.hasOwnProperty(TL0E)){ this.hANJQ[TL0E].removeShape(); delete this.hANJQ[TL0E]; }; } } catch (KnsE) {}; } , NS2S: function(){ if (!this.group || !this.hANJQ || !this.hANJQ[0] || !this.C8Uc9) return; if ( (this.state & (this.C8Uc9.yPAFyqR|this.C8Uc9.GbXcn))== (this.C8Uc9.GbXcn | this.C8Uc9.yPAFyqR) ){ this.hANJQ[0].setStroke(this.C8Uc9.RU15B.Ft2wB); } else if ((this.state & this.C8Uc9.GbXcn)==this.C8Uc9.GbXcn){ this.hANJQ[0].setStroke(this.C8Uc9.RU15B.ibC); } else if ((this.state & this.C8Uc9.uf1Y)==this.C8Uc9.uf1Y){ this.hANJQ[0].setStroke(this.C8Uc9.L7Fi.A3W14I); } else if ((this.state & this.C8Uc9.yPAFyqR)==this.C8Uc9.yPAFyqR){ this.hANJQ[0].setStroke(this.C8Uc9.RU15B.HC5CFmE); } else if ((this.state & this.C8Uc9.q7kZ)==this.C8Uc9.q7kZ){ this.hANJQ[0].setStroke(this.C8Uc9.RU15B.o8oc1A); } else if ((this.state & this.C8Uc9.SoR)==this.C8Uc9.SoR){ this.hANJQ[0].setStroke(this.C8Uc9.RU15B.CjY8U); } if ((this.state & this.C8Uc9.m1hcF)==this.C8Uc9.m1hcF) this.chrhxk(this.C8Uc9.m1hcF); if ((this.state & this.C8Uc9.or1qQ)==this.C8Uc9.or1qQ) this.chrhxk(this.C8Uc9.or1qQ); } , ZC7Ip7: function(evt){ this.C8Uc9.setSelected(this); dojo.style(this.C8Uc9.YJJN1vM,"top",(evt.clientY+8)+"px"); dojo.style(this.C8Uc9.YJJN1vM,"left",(evt.clientX+8)+"px"); var mb635V=this.C8Uc9.YSnFG6; if (!this.C8Uc9.YJJN1vM["ttindexes"+this.C8Uc9.baseName]) { mb635V.PW9F=dojo.byId("ttindex").firstChild; mb635V.k4r1Z15=dojo.byId("ttlat").firstChild; mb635V.FUWfC=dojo.byId("ttlon").firstChild; mb635V.vjI=dojo.byId("ttele").firstChild; mb635V.J2j=dojo.byId("ttdist").firstChild; this.C8Uc9.YJJN1vM["ttindexes"+this.C8Uc9.baseName]=true; } if (!this.C8Uc9.vp4R || !this.C8Uc9.vp4R.C8Uc9) this.C8Uc9.vp4R=this.C8Uc9.points[0]; try { mb635V.PW9F.nodeValue=this.index; mb635V.k4r1Z15.nodeValue=(+this.F9L8.lat()).toFixed(6); mb635V.FUWfC.nodeValue=(+this.F9L8.lng()).toFixed(6); mb635V.vjI.nodeValue=this.C8Uc9.tTYKi.XNCTNJ(this); mb635V.J2j.nodeValue=this.C8Uc9.D65( this.C8Uc9.vp4R.index, this.index); }catch(err){} this.C8Uc9.VKQW._onHover({target: this.C8Uc9.YJJN1vM}); if (this.C8Uc9.tTYKi) this.C8Uc9.tTYKi.setSelected(this); } , xMR5H: function(evt){ this.C8Uc9.deselect(this); this.C8Uc9.VKQW._onUnHover(); if (this.C8Uc9.tTYKi) this.C8Uc9.tTYKi.deselect(this); } , MdHEu: function(evt){ if (evt.button==2){ this.C8Uc9.iFtXV1(evt); return; } this.C8Uc9.T3hZ(this); } , RTRsxfQ: function(evt){ if ((!this.MyXaf8) && this.index>=0 && this.move!=null){ this.MyXaf8=setTimeout(dojo.hitch(this,function(){ this.WYvS(); }), 500); } } , WYvS: function(trSSE3, KGiT1, LXN){ if (trSSE3==null || KGiT1==null){ this.MyXaf8=null; if (this.l1N3K()){ this.y8oLY(); setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.Js5M5, [this.index]); }),0); } return; } var cVP1qfV=new GLatLng( this.F9L8.lat()+trSSE3, this.F9L8.lng()+KGiT1 ); delete this.F9L8; this.F9L8=cVP1qfV; if (!LXN){ this.YP0NN1(true); this.l1N3K(false, false); } this.RGe2K={ lat: cVP1qfV.lat(), lb15Y: cVP1qfV.lng() }; } , iIxQH: function(TA7YVK){ if (!TA7YVK && this.x!=null && this.y!=null){ return dojox.gfx.matrix.multiplyPoint( (this.group && this.group.getTransform()) || [], this.x, this.y); } else { return this.C8Uc9.Xkl2Ui(this.F9L8.lat(),this.F9L8.lng()); } } , ZNuSq: function(){ var tTB=this.C8Uc9.O2J42T.fromLatLngToDivPixel(this.F9L8); return { x:tTB.x-this.C8Uc9.LcmI9hO.origin.x, y:tTB.y-this.C8Uc9.LcmI9hO.origin.y }; } , I7Uk: function(){ return { x:this.C8Uc9.gUA.V1dU(this.F9L8.lng()), y:this.C8Uc9.gUA.UBmc4(this.F9L8.lat()) }; } , y8oLY: function(){ var c=this.iIxQH(); delete(this.F9L8); this.F9L8=this.C8Uc9.V5Y(c.x, c.y); return c; } , l1N3K: function(type, YuOH2){ var lK4M3u=this.iIxQH(); if (YuOH2) lK4M3u=dojox.gfx.matrix.multiplyPoint(YuOH2, lK4M3u); if ( this.J05FGW && lK4M3u.x==this.J05FGW.x && lK4M3u.y==this.J05FGW.y ) return false; this.J05FGW=lK4M3u; var ndx=this.index; if ( this.C8Uc9.Mk8DD[ndx] && this.C8Uc9.Mk8DD[ndx].l && ( !type || (type&2)==2 )){ this.C8Uc9.Mk8DD[ndx].l.setShape({ x1: lK4M3u.x, y1: lK4M3u.y }); } if ( this.C8Uc9.Mk8DD[ndx-1] && this.C8Uc9.Mk8DD[ndx-1].l && ( !type || (type&1)==1 )){ this.C8Uc9.Mk8DD[ndx-1].l.setShape({ x2: lK4M3u.x, y2: lK4M3u.y }); } return true; } }); dojo.declare(tmw.util.sym.k8iVEE,null,{ u2BqYc: 0x80, constructor: function(C8Uc9, x, y, qG3T, ndx, type, wnRM, lc9Ui){ this.C8Uc9=C8Uc9; this.move = null; this.LfMO4={type: type&~this.u2BqYc}; this.PlHI1=((type&this.u2BqYc)>>7)==1; this.state=C8Uc9.SoR; if (!isNaN(+ndx)){ this.index=+ndx; } else { this.index=null; } this.n2Sf(); this.KWLs(); this.events = []; this.sEbL = { F8bIS:[] }; if (qG3T){ this.F9L8=new GLatLng(x, y); this.RGe2K={ lat: x, lb15Y: y }; if (!lc9Ui) return; } else { var DncRLM8=this.C8Uc9.xF5PUo(x,y,this.C8Uc9.oBK()); this.x=DncRLM8.x; this.y=DncRLM8.y; this.F9L8=this.C8Uc9.O2J42T.fromDivPixelToLatLng(new GPoint(DncRLM8.x, DncRLM8.y)); this.RGe2K={ lat: this.F9L8.lat(), lb15Y: this.F9L8.lng() }; } this.YP0NN1(); var domain=this; if (this.LfMO4.type<=this.C8Uc9.yG9 && !this.ypJR22Y){ setTimeout(function(){ dojo.publish(domain.C8Uc9.H8cY1, [domain.index, type, domain.F9L8]); }, 0); } if (!wnRM && !this.ypJR22Y) this.Zz3NNh(); } , twg6MC:"mediadsc", f44G:"mediafil", y2GUb:"mediadel", fZfC2I:3, n2Sf: function(){ this.ypJR22Y=typeof(this.index)!="number" || this.index<0 || this.PlHI1; if (this.node){ if (this.index>=0) dojo.toggleClass(this.node,"poi_external",false); else dojo.toggleClass(this.node,"poi_external",true); } } , KWLs: function(){ switch(this.LfMO4.type){ case this.C8Uc9.s7S3QN: this.qwH="poi_ts"; break; case this.C8Uc9.nOCFAXt: this.qwH="poi_hotel"; break; case this.C8Uc9.hBP41Dd: this.qwH="poi_hospital"; break; case this.C8Uc9.qXB7: this.qwH="poi_school"; break; case this.C8Uc9.sV7o4: this.qwH="poi_restaurant"; break; case this.C8Uc9.m6l6CZT: this.qwH="poi_shop"; break; case this.C8Uc9.IfUkX4: this.qwH="poi_person"; break; case this.C8Uc9.PHB2: this.qwH="poi_turn"; break; case this.C8Uc9.o71CdJ: this.qwH="poi_eg0"; break; case this.C8Uc9.VoRlIw: this.qwH="poi_eg1"; break; case this.C8Uc9.fpRl: this.qwH="poi_eg2"; break; case this.C8Uc9.SB3: this.qwH="poi_eg3"; break; case this.C8Uc9.HR1G: this.qwH="poi_ptfilter"; break; case this.C8Uc9.s6ZZB: this.qwH="poi_ele"; break; case this.C8Uc9.ERwx5iH: this.qwH="poi_overview"; break; case this.C8Uc9.gOWPV: this.qwH="poi_picture"; break; case this.C8Uc9.ruE7jt: this.qwH="poi_video"; break; case this.C8Uc9.yQRY6: this.qwH="poi_water"; break; case this.C8Uc9.G02X3: this.qwH="poi_info"; break; case this.C8Uc9.EBwv: this.qwH="poi_flagred"; break; case this.C8Uc9.EE15bG: this.qwH="poi_flagyellow"; break; case this.C8Uc9.oAkUe7: this.qwH="poi_flaggreen"; break; case this.C8Uc9.BCEFcHZ: this.qwH="poi_flagbw"; break; case this.C8Uc9.I7Wl: this.qwH="poi_wine"; break; case this.C8Uc9.rJNG9: this.qwH="poi_museum"; break; case this.C8Uc9.P4K4: this.qwH="poi_details"; break; case this.C8Uc9.f5qI: this.qwH="poi_parking"; break; case this.C8Uc9.lQCCW: this.qwH="poi_medical"; break; case this.C8Uc9.KNMP: this.qwH="poi_parking_vip"; break; case this.C8Uc9.t7n7q: this.qwH="poi_screen"; break; case this.C8Uc9.B4VV: this.qwH="poi_camping"; break; case this.C8Uc9.AO7P4SG: this.qwH="poi_camper"; break; case this.C8Uc9.QLmX: this.qwH="poi_supply"; break; case this.C8Uc9.frTFMSm: this.qwH="poi_bb"; break; case this.C8Uc9.dMX: this.qwH="poi_agritourism"; break; case this.C8Uc9.r5FR: this.qwH="poi_holidayaprtmnt"; break; case this.C8Uc9.vCZ: this.qwH="poi_electricpower"; break; case this.C8Uc9.iw688u: this.qwH="poi_autovelox"; break; case this.C8Uc9.w61GN: this.qwH="poi_wifi"; break; case this.C8Uc9.DZq47tg: this.qwH="poi_ritchey"; break; case this.C8Uc9.L4joyL: this.qwH="poi_rtw"; break; case this.C8Uc9.Uig6Y: this.qwH="poi_santini"; break; }; } , xTQS: function(type,kuTO){ if (this.LfMO4.type==type) return; if (this.node) dojo.toggleClass(this.node,this.qwH,false); if (kuTO!==true) this.Xp5lU({type:type&~this.u2BqYc}); this.KWLs(); if (this.node) dojo.toggleClass(this.node,this.qwH,true); else this.YP0NN1(); } , Xp5lU: function(u4bBY6, rkZU371){ var nA7LH=this.LfMO4.type; dojo.mixin(this.LfMO4,u4bBY6); nA7LH=(this.LfMO4.type!=nA7LH); if (nA7LH){ this.xTQS(this.LfMO4.type,true); } switch(this.LfMO4.type){ case this.C8Uc9.ERwx5iH: var KoKasl=this.C8Uc9.hUP.S88SWn; var ndx=this.C8Uc9.NL8XU(this.LfMO4.Ww1a, this.LfMO4.WxCI,this.LfMO4.JSNCYq); var Q04DfR=(this.node.firstChild && this.node.firstChild.firstChild && this.node.firstChild.firstChild.nodeType==3 && this.node.firstChild || null); if (!Q04DfR){ Q04DfR=document.createElement("div"); dojo.addClass(Q04DfR,"poi_data"); Q04DfR.appendChild(document.createTextNode("")); this.node.appendChild(Q04DfR); } if (KoKasl[ndx]){ Q04DfR.firstChild.nodeValue=KoKasl[ndx]; this.LfMO4.v5jA=Q04DfR.firstChild.nodeValue; if (KoKasl[ndx]<10){ if (this.qwH!="poi_overview_small"){ dojo.toggleClass(this.node,this.qwH); this.qwH="poi_overview_small"; dojo.addClass(this.node,this.qwH); dojo.toggleClass(Q04DfR,"poi_data"); dojo.addClass(Q04DfR,"poi_data_small"); } else { }; } else { if (this.qwH!="poi_overview"){ dojo.toggleClass(this.node,this.qwH); this.qwH="poi_overview"; dojo.addClass(this.node,this.qwH); dojo.toggleClass(Q04DfR,"poi_data_small"); dojo.addClass(Q04DfR,"poi_data"); }; }; } else { Q04DfR.firstChild.nodeValue="n/a"; this.LfMO4.v5jA="n/a"; } break; default: if (!rkZU371 && this.LfMO4.type<=this.C8Uc9.yG9){ dojo.publish(this.C8Uc9.GPTS, [this.index, this.LfMO4]); } }; } , HVbJP: function(){ if (!this.node){ this.node=document.createElement("div"); dojo.toggleClass(this.node,this.qwH,true); if (this.index<0) dojo.toggleClass(this.node,"poi_external",true); dojo.style(this.node, "position", "absolute"); this.C8Uc9.e2BX.appendChild(this.node); } try { dojo.style(this.node, "left", (this.x-this.C8Uc9.kt8kT5z[this.LfMO4.type].chv)+"px"); dojo.style(this.node, "top", (this.y-this.C8Uc9.kt8kT5z[this.LfMO4.type].FqPS3k)+"px"); }catch(err){ console.warn(err+" "+this.LfMO4.type); } } , dEJu: function(){ if (this.LfMO4.type==this.C8Uc9.ERwx5iH || this.events.length>3) return; this.events.push(dojo.connect(this.node, "onmousemove", this, this.RTRsxfQ)); this.move=new dojo.dnd.Moveable(this.node); } , U82: function(){ if (this.events.length<=3) return; dojo.disconnect(this.events.pop()); this.move.destroy(); this.move=null; } , Y9H1: function(){ this.events.push(dojo.connect(this.node, "onmouseover", this, this.ZC7Ip7)); this.events.push(dojo.connect(this.node, "onmouseout", this, this.xMR5H)); this.events.push(dojo.connect(this.node, "onmousedown", this, this.MdHEu)); if (!this.C8Uc9.FDs() || this.ypJR22Y) return; this.dEJu(); } , YP0NN1: function(){ var pt=this.C8Uc9.O2J42T.fromLatLngToDivPixel(this.F9L8); this.x=pt.x; this.y=pt.y; if (!this.node){ this.HVbJP(); this.Y9H1(); } else { this.HVbJP(); if (this.C8Uc9.FDs() && !this.ypJR22Y && this.move==null){ this.dEJu(); } else if ((!this.C8Uc9.FDs()) && this.move!=null){ this.U82(); }; } } , select: function(){ try { this.state|=this.C8Uc9.GbXcn; this.NS2S(); }catch(err){} } , deselect: function(){ try { this.state&=~this.C8Uc9.GbXcn; this.NS2S(); }catch(err){} } , hide: function(){ if(!this.node)return; dojo.style(this.node,"display","none"); } , show: function(){ if(!this.node)return; dojo.style(this.node,"display","block"); } , editable: function(){ try { this.state|=this.C8Uc9.uf1Y; this.NS2S(); }catch(err){} } , k5CRV: function(){ try { this.state&=~this.C8Uc9.uf1Y; this.NS2S(); }catch(err){} } , NS2S: function(){ if (!this.node) return; if ((this.state & this.C8Uc9.GbXcn)==this.C8Uc9.GbXcn){ if(this.index<0){ dojo.style(this.node,"border","solid #000000"); } else if (this.C8Uc9.kt8kT5z[this.LfMO4.type].CNCCjoj){ dojo.style(this.node,"border","solid #ffa500"); }; } else if ((this.state & this.C8Uc9.uf1Y)==this.C8Uc9.uf1Y){ dojo.style(this.node,"border","solid #00008b"); } else if ((this.state & this.C8Uc9.SoR)==this.C8Uc9.SoR){ dojo.style(this.node,"border","solid transparent"); } } , ul1c4: function(){ for (var xS54 in this.events) dojo.disconnect(this.events[xS54]); if (this.events.length>0){ delete this.events; this.events=[]; } if (this.move){ this.move.destroy(); this.move=null; } this.x=null; this.y=null; if (this.node){ this.node.parentNode.removeChild(this.node); this.node=null; } } , destroy: function(rkZU371,nEH7){ if (this.C8Uc9.selected==this) this.C8Uc9.selected=null; if (this.index>=0 && this.LfMO4.type<=this.C8Uc9.yG9 && !rkZU371){ var k1L77=[ this.C8Uc9.JCkV, [this.index, this.ypJR22Y?this.u2BqYc|this.LfMO4.type:this.LfMO4.type, this.F9L8, nEH7] ]; setTimeout(dojo.hitch(this,function(){ dojo.publish(k1L77[0], k1L77[1]); }), 0); } this.ul1c4(); if (this.LfMO4.media && this.LfMO4.media.length>0) this.C8Uc9.BT5PDB.xXMD.kJDIYV(this.index); var xS54; for (xS54 in this) delete(this[xS54]); } , ZC7Ip7: function(evt){ var oW7IUD4, domain=this; this.C8Uc9.setSelected(this); if ( this.C8Uc9.kt8kT5z[this.LfMO4.type].cP6L32 && this.C8Uc9.kt8kT5z[this.LfMO4.type].st ){ this.C8Uc9.SMLYa.display(dojo.string.substitute( this.C8Uc9.kt8kT5z[this.LfMO4.type].st,{ "areaTracks": this.LfMO4.v5jA, "slat":this.LfMO4.Ww1a, "slon":this.LfMO4.WxCI, "elat":this.LfMO4.V4k3WA, "elon":this.LfMO4.LWVo } )); return; } } , Xe2TO: function(evt){ if (this.J6Gz2 || !this.C8Uc9.kt8kT5z[this.LfMO4.type].CNCCjoj ){ return; } var domain=this, oW7IUD4=this.C8Uc9.WK9OMD3["poitt"]; if (!evt){ var tTB; if (!this.y || !this.x){ var pt=this.C8Uc9.O2J42T.fromLatLngToDivPixel(this.F9L8); this.x=pt.x; this.y=pt.y; } tTB=this.C8Uc9.LvD1(this.x,this.y,this.C8Uc9.oBK()); tTB=this.C8Uc9.ART(tTB.x, tTB.y); evt={clientY: tTB.y, clientX: tTB.x}; } dojo.style(this.C8Uc9.WK9OMD3, "top", (evt.clientY+2)+"px"); dojo.style(this.C8Uc9.WK9OMD3, "left", (evt.clientX+2)+"px"); if (oW7IUD4.type!=this.LfMO4.type){ if (this.C8Uc9.WK9OMD3.lKHTK) dojo.disconnect(this.C8Uc9.WK9OMD3.lKHTK); this.C8Uc9.WK9OMD3.lKHTK=dojo.connect(this.C8Uc9.cMX, "onLoad",setData); this.QO8(); oW7IUD4.type=this.LfMO4.type; } else { setData(); } function setData(){ if (oW7IUD4.type!=domain.LfMO4.type) return; domain.C8Uc9.eCuFz1x.open(domain.C8Uc9.WK9OMD3); setTimeout(function(){ domain.B3yJ(false); },600); }; } , B3yJ: function(BeOK){ if (this.C8Uc9.WK9OMD3.lKHTK) dojo.disconnect(this.C8Uc9.WK9OMD3.lKHTK); if (this.sEbL.HLboixp) dojo.disconnect(this.sEbL.HLboixp); var tWY09I, domain=this, n, gJ1=/poitt(?!item)(\w+)/; if (BeOK){ var PCI1q=dojo.query(".poieditformstatic","poittDialog"+this.C8Uc9.baseName), lqHntQd; if (PCI1q[0]){ lqHntQd=dijit.byId(PCI1q[0].id); if (lqHntQd){ var dPuQ0={}; for(n in domain.LfMO4) dPuQ0["poitt"+n]=domain.LfMO4[n]; lqHntQd.attr("value",dPuQ0); delete dPuQ0; }; } PCI1q=dojo.query(".poittitem","poittDialog"+this.C8Uc9.baseName); for (n=0;n${n}", domain.LfMO4.links[SYgJS1] ); } if (links.length>0){ PCI1q[n].innerHTML="
    "+links+"
"; dojo.style(PCI1q[n].parentNode,"display","block"); }; } else if(domain.LfMO4["oth"] && dojo.hasClass(PCI1q[n],"poittoth")){ var tJ9ND,W78W0xo=""; for(tJ9ND in domain.LfMO4["oth"]){ W78W0xo+=tJ9ND+": "+domain.LfMO4["oth"][tJ9ND]+"
"; } if (W78W0xo.length>0) PCI1q[n].innerHTML="
"+W78W0xo+"
"; } else if ( dojo.hasClass(PCI1q[n],"poitttemplate") && domain.C8Uc9.kt8kT5z[domain.LfMO4.type].g1J4 ){ try { var XWEC={ "areaTracks": domain.LfMO4.v5jA, "slat": domain.LfMO4.Ww1a, "slon": domain.LfMO4.WxCI, "elat": domain.LfMO4.V4k3WA, "elon": domain.LfMO4.LWVo, "clusterType": domain.LfMO4.JSNCYq }; if (domain.C8Uc9.kt8kT5z[domain.LfMO4.type].g1J4[1]){ dojo.mixin(XWEC,domain.C8Uc9 .kt8kT5z[domain.LfMO4.type].g1J4[1]); } PCI1q[n].innerHTML=dojo.string.substitute( domain.C8Uc9.kt8kT5z[domain.LfMO4.type].g1J4[0], XWEC ); }catch(err){}; } else { tWY09I=(""+dojo.byId(PCI1q[n])[Lc7M3F]).match(gJ1); if (tWY09I && domain.LfMO4.hasOwnProperty(tWY09I[1])){ PCI1q[n].innerHTML=String(domain.LfMO4[tWY09I[1]]) .replace(/\n/g,"
"); }; }; } tWY09I=false; PCI1q=dojo.query(".tooltipMyPOI img",dijit._masterTT.id); if (domain.LfMO4.media){ for(n=0;n"; eaf.onclick=PtT3; PCI1q[0].parentNode.insertBefore(dDdNc,PCI1q[0].nextSibling); PCI1q[0].parentNode.insertBefore(eaf,PCI1q[0].nextSibling); eaf=null; } var JmzV94=null; if (this.index>=0){ if(this.C8Uc9.hAHVF5.U52ITjN.cp>0){ JmzV94={ "p": _rfilter.B94nQO, pPW550: this.index, B4BZZ: this.C8Uc9.hAHVF5.U52ITjN.cp }; }; } else { JmzV94={ "p": _rfilter.B94nQO, pPW550: -this.index }; } if (JmzV94 && PCI1q[0]){ var UPOM0VI,dDdNc=document.createElement("br"); UPOM0VI=document.createElement("a"); dojo.toggleClass(UPOM0VI,"linkbutton",true); UPOM0VI.innerHTML=fh6a+"
"; UPOM0VI.onclick=function(){ tmwAlert({title:sf7iub6,Yf47:true}); bFZV0D(tmactive,JmzV94,function(){ tmactive.SS71c.apply(tmactive,arguments); domain.C8Uc9.BT5PDB.GQOVe4(true); var aUK=dijit.byId(tmactive.rootId+_rfilter.MQ7verQ); if (aUK._isDocked) return; aUK.minimize(); tmwHelperPan({ content: rFLt08V, EOCZuv: { "closeprop":IP4X2P({close:true}), "idprop":IP4X2P({id:true}), "FLOATING_PANE_NAME":IP4X2P({ MQ7verQ:true }) }, WQc6G: tmwHelperPan.D2gL.DDEPY6, wgT: tmactive.rootId, dKLM8: true, w:"400px", h:"200px", l: "350px", t: "150px" }); }); }; PCI1q[0].parentNode.insertBefore(dDdNc,PCI1q[0].nextSibling); PCI1q[0].parentNode.insertBefore(UPOM0VI,PCI1q[0].nextSibling); UPOM0VI=null; PCI1q=null; } VWWLo2(); function hI2(node,LfMO4){ if (!LfMO4.U4OD4 || !MkGHT) return; var SGBJ7=domain.C8Uc9.id1I8FK.LXGN; if (node.nodeName!="DIV"){ node.parentNode.replaceChild(SGBJ7.node, node); dojo.toggleClass(SGBJ7.node,"poittimgdata",true); dojo.toggleClass(SGBJ7.node,"poittitem",true); } var g6LTw=Math.min(SGBJ7.w/LfMO4.U4OD4.VXJCISV.fUiEu5, SGBJ7.h/LfMO4.U4OD4.VXJCISV.WlvJ ); domain.C8Uc9.id1I8FK.iRxxPK( SGBJ7.surface, LfMO4.U4OD4.CAHOIiQ, LfMO4.U4OD4.fVU, LfMO4.U4OD4.g6LTw*g6LTw, dojo.mixin({ fUiEu5: SGBJ7.w, WlvJ: SGBJ7.h, E6SQO: LfMO4.U4OD4.VXJCISV.E6SQO*g6LTw, c4jR1A: LfMO4.U4OD4.VXJCISV.c4jR1A*g6LTw } , { E1H: "round", Vn60k1: { MNaCo: true, fill: "green", sLOeSN: "brown", Iu8H: 5 }, sLOeSN: "orange", Iu8H: 6, fTY2W: { sLOeSN: "red", Iu8H: 5, r: 10 } }) ); }; function rwCS(node,nL2P){ var n,start,end,media,xHL,syXbD8X,jPQWXPD,GLO8Q,EmXP3G,XsF6DI,aVQKO,Y2TK6; for(n=0;n0){ domain.sEbL.F8bIS.splice(0, domain.sEbL.F8bIS.length); } var VeNh4=( (nL2P && node.rows.length > domain.sEbL.F8bIS.length) || !nL2P ); for(n=0;n=0;ndx--){ this.XDPl11[ndx].applyTransform(YuOH2); } dojo.forEach(this.qMhY5, function(xS54, E7Zd, JQAXUI){ xS54.applyTransform(YuOH2); }, this); this.group.setTransform({ dx: 0, dy: 0}); setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.oOHtMn, [this.C8Uc9.hAHVF5.lBiJ3w]); }), 0); } , gjI: function(list){ if (list instanceof X35QK.uTf8){ if (this.XDPl11.length>0 || !this.C8Uc9.FDs()) return; if (this.GWNbuQ.length==0){ this.mode=this.tEUUuIs; }; } else if (list instanceof X35QK.WLL3){ if (this.GWNbuQ.length>0 || !this.C8Uc9.CNdU()) return; if (this.XDPl11.length==0){ this.mode=this.dIC; this.spoXSS(); }; } if (this.mode==this.tEUUuIs) return this.LE0Sy5E(list); if (!this.cN4DG6U){ this.spoXSS(); } else { var YuOH2=this.group.getTransform(); if ( YuOH2 && (YuOH2.dx!=0 || YuOH2.dy!=0) ){ this.fC2OR5(); }; } this.qMhY5=[]; this.XDPl11=this.XDPl11.concat(list); if (this.XDPl11.length==0) return; this.cN4DG6U=true; this.XDPl11.sort(function(JpLB, HM5miW){ return (JpLB.index-HM5miW.index); }); this.XDPl11=dojo.filter(this.XDPl11, function(xS54,E7Zd,JQAXUI){ return ( (E7Zd=0 && xS54.index!=JQAXUI[E7Zd-1].index+1) ) msLDmu5+=1; if( (E7Zd==JQAXUI.length-1) || (E7Zd+10) xS54.l1N3K(msLDmu5, YuOH2); }, this); } , pyPc: function(value, index, JQAXUI){ var c=value.iIxQH(); return ( c.x>=this.x1 && c.x<=this.x2 && c.y>=this.y1 && c.y<=this.y2 ); } , ehPKJ6U: function(value, index, JQAXUI){ var c=value.iIxQH(), wXhB=this.C8Uc9.oBK(), y94v6w=this.C8Uc9.xF5PUo(this.x1,this.y1,wXhB), FL2M9=this.C8Uc9.xF5PUo(this.x2,this.y2,wXhB); ; return ( c.x>=y94v6w.x && c.x<=FL2M9.x && c.y>=y94v6w.y && c.y<=FL2M9.y ); } }); function Y2PC4O3(C8Uc9, VRBbj){ this.C8Uc9=C8Uc9; this.mapNode=dojo.byId(VRBbj); this.mapPos=null; this.events=[]; this.edOffsetOnClick=null; }; Y2PC4O3.prototype=new GOverlay(); Y2PC4O3.prototype.initialize=function(map){ this.events.push(GEvent.addListener(map, "zoomend", dojo.hitch(this,this.uMl))); this.events.push(GEvent.addListener(map, "moveend", dojo.hitch(this,this.moveEnd))); }; Y2PC4O3.prototype.remove=function(){ log("Overlay remove"); this.C8Uc9.MH51iX.parentNode.removeChild(this.C8Uc9.MH51iX); }; Y2PC4O3.prototype.copy=function(){ log("Overlay copy"); }; Y2PC4O3.prototype.uMl=function(){ if (this.C8Uc9.b5KNZI && this.C8Uc9.b5KNZI.hasOwnProperty(tmw.util.props.DNi1R3)) { clearTimeout(this.C8Uc9.b5KNZI.DNi1R3); this.C8Uc9.b5KNZI.DNi1R3=null; } if (this.C8Uc9.AAk7y.cN4DG6U) this.C8Uc9.AAk7y.fC2OR5(); this.C8Uc9.l4W4=this.C8Uc9.O2J42T.getZoom(); if ( this.C8Uc9.mode==this.C8Uc9.k37rF && G_PHYSICAL_MAP.getMaximumResolution()==this.C8Uc9.l4W4 && !this.C8Uc9.gSIG ){ var domain=this; tmwAlert({ title:erSB, message: K65Rn, w:350, h:200, confirm: true, cancel:true, TNu4QK:eReNB8i, kY6y: function(){ if (domain.C8Uc9.sEbL.FNfGGX){ domain.C8Uc9.z3w=true; domain.C8Uc9.Nx1RFt=true; } dijit.byId(domain.C8Uc9.baseName+"vmSelect").attr("value","1"); setTimeout(function(){ domain.C8Uc9.O2J42T.zoomIn(); delete domain.C8Uc9.z3w; },1500); } }); } }; Y2PC4O3.prototype.redraw=function(TA7YVK){ if (TA7YVK){ var domain=this.C8Uc9; domain.sEbL.CORPuRY=null; this.C8Uc9.kJS25N=true; } }; Y2PC4O3.prototype.moveEnd=function(){ var wXhB; wXhB=this.C8Uc9.oBK(); if ( this.C8Uc9.kJS25N || wXhB.pl>=-wXhB.Sl4f72B || wXhB.pt>=-wXhB.JTng || -wXhB.Sl4f72B-wXhB.pl>=this.C8Uc9.jpA6*2 || -wXhB.JTng-wXhB.pt>=this.C8Uc9.yAWBi*2 ){ this.C8Uc9.UY8Iuh1(); delete this.C8Uc9.kJS25N; } if (this.C8Uc9.ZRZW){ var domain=this.C8Uc9; setTimeout(function(){ domain.ZRZW(); delete domain.ZRZW; },100); } this.C8Uc9.E2HsE=Math.max(G_SATELLITE_MAP.getMaximumResolution(), G_NORMAL_MAP.getMaximumResolution())-1; var MXeu=dojo.byId(this.C8Uc9.baseName+"EditStat"); if(this.C8Uc9.CNdU(true)){ if (this.C8Uc9.Nx1RFt){ dojo.toggleClass(MXeu,"tmwEditStatusGreen",false); dojo.toggleClass(MXeu,"tmwEditStatusOrange",true); } else { dojo.toggleClass(MXeu,"tmwEditStatusOrange",false); dojo.toggleClass(MXeu,"tmwEditStatusGreen",true); }; }else{ dojo.toggleClass(MXeu,"tmwEditStatusGreen",false); dojo.toggleClass(MXeu,"tmwEditStatusOrange",false); } }; dojo.declare(tmw.util.sym.MOY8h,null,{ nGLe9: 55 , tp4L8F: 40 , PtiT: Math.pow(15,2) , gXu595N: Math.pow(20,2) , t1f4mk: Math.pow(9,2) , nTYuu: Math.pow(15,2) , sHu3vI: 50 , constructor: function(J5TUZ, afCi, sHu3vI){ if (J5TUZ) this.t1f4mk=J5TUZ; if (afCi) this.tOgdN2=afCi; if (sHu3vI) this.nGLe9=sHu3vI; } , pX63J: function(list, xS54){ if (xS54!=list[0]) list.splice(0,0,xS54); } , JIylcYX: function(list, xS54){ if (xS54!=list[list.length-1]) list.push(xS54); } , xHO3B0: function(list, xS54){ if (xS54!=list[list.length-2]) list.splice(list.length-1,0,xS54); } , o3mP: function(list, xS54){ if (xS54!=list[1]) list.splice(1,0,xS54); } , ih87: function(x1, y1, x2, y2){ return (x1*x2+y1*y2); } , ksC3hu: function(x, y){ return Math.sqrt(x*x+y*y); } , v7G34: function(x, y){ return (x*x+y*y); } , b2F: function(x1, y1, x2, y2){ return this.ksC3hu(x1-x2, y1-y2); } , eHLSP: function(x1, y1, x2, y2){ return this.v7G34(x1-x2, y1-y2); } , ll1: function(pNg47Oq, lddDKY){ var SEr7QSt, iD251T8; SEr7QSt=pNg47Oq.iIxQH(true); iD251T8=lddDKY.iIxQH(true); return this.eHLSP(SEr7QSt.x, SEr7QSt.y, iD251T8.x, iD251T8.y); } , QATh: function(v, s, KnsE){ var sCPIoY=[]; var cDr7KF=0; sCPIoY[cDr7KF]=v[s]; for(var E7Zd=s;E7Zd<=KnsE;E7Zd++){ if (this.ll1(v[E7Zd],sCPIoY[cDr7KF])=DC82A) return{ index: null , b2F: 0 }; var B4FO, P5wPI; var rWKWs5K, bPD, qBprcN, qWlMs2; var oKE43, X2V; rWKWs5K=v[tLRCVVt].iIxQH(true); bPD=v[DC82A].iIxQH(true); B4FO={x: bPD.x-rWKWs5K.x, y: bPD.y-rWKWs5K.y}; X2V=this.v7G34(B4FO.x, B4FO.y); rHOD=0; for(var E7Zd=tLRCVVt+1;E7ZdKnsE) return groups; groups[cDr7KF]=s; for(var E7Zd=s+1;E7Zd<=KnsE;E7Zd++){ if(v[E7Zd].index>v[E7Zd-1].index+1){ groups[++cDr7KF]=E7Zd-1; groups[++cDr7KF]=E7Zd; }; } if (cDr7KF%2==0) groups[++cDr7KF]=E7Zd-1; return groups; } , oFBvJK: function(grp, dx4q){ var T0oI6Lf=[], fQNT=0, E7Zd, n; if (!dx4q) dx4q=1; for(E7Zd=0;E7Zd0) { LiYz=tYc; QpUjOVT=P2n8; eD3L=J8Q; jlib2B = r.lat()*p; K5HM = r.lng()*p; QrAg98L = Math.cos(jlib2B); o1C5HqN = jlib2B-LiYz; O1PnY = K5HM-QpUjOVT; SwEoY7i = Math.sin(o1C5HqN/2) * Math.sin(o1C5HqN/2) + eD3L * QrAg98L * Math.sin(O1PnY/2) * Math.sin(O1PnY/2); dx = EmXP3G*Math.atan2(Math.sqrt(SwEoY7i), Math.sqrt(1-SwEoY7i)); EC2H += dx; d += dx; x = Math.round(d); tYc = jlib2B; P2n8 = K5HM; J8Q = eD3L; } else { tYc = r.lat()*p; P2n8 = r.lng()*p; J8Q = Math.cos(tYc); } if (E7Zd==0 || E7Zd==(TWPIKX-1) || EC2H>=filter) { EC2H=0; ycP4.push(r); }; } return ycP4; } , qoI85Q: function(v, iZt8Zv){ var grp, MI7, MPN71N, Jf9NS=[], ENI, HIC, PVP29O, DyDq1; grp=this.d69qK(v,0,v.length-1); MI7=new Array(grp.length); if (iZt8Zv){ this.sHu3vI=this.tp4L8F; this.nTYuu=this.gXu595N; } else { this.sHu3vI=this.nGLe9; this.nTYuu=this.PtiT; } for(var E7Zd=0;E7Zd0 ) || (HIC!=null && ENI[E7Zd/2].b2F>ENI[HIC].b2F) ){ HIC=E7Zd/2; }; } if (HIC!=null){ MPN71N.splice(HIC*2+1,0,ENI[HIC].index,ENI[HIC].index); ENI[HIC]=null; ENI.splice(HIC+1,0,null); PVP29O++; }; } while (HIC!=null && PVP29O3%, <8%"}, t:102}, {toString: function(){return "Climbs >7%, <12%"}, t:103}, {toString: function(){return "Climbs >11%"}, t:104} ] } , zOQ33d2: { E1H: "round", Vn60k1: { MNaCo: true, fill: "green", sLOeSN: "brown", Iu8H: 15 }, sLOeSN: "orange", Iu8H: 22, fTY2W: { sLOeSN: "red", Iu8H: 12, r: 40 } }, constructor: function(C8Uc9){ this.C8Uc9=C8Uc9; this.points=null; this.T8JUF=null; this.HGWuSRq=null; this.hkPmc=null; this.sEbL={ XsF6DI: null, aVQKO: null }; if (MkGHT){ var node=document.createElement("div"); this.LXGN={ node: node, h: 100, w: 100 }; this.LXGN.surface=dojox.gfx.createSurface( this.LXGN.node, this.LXGN.w, this.LXGN.h ); } else { var node=dojo.byId(this.gGKp); if (!node){ this.T8JUF=document.createElement("canvas"); this.T8JUF.setAttribute("id",this.gGKp); dojo.body().appendChild(this.T8JUF); } else { this.T8JUF=node } dojo.style(this.T8JUF,"display","none"); } } , initialize: function(){ delete this.points; delete this.HGWuSRq; this.points=this.C8Uc9.points; this.HGWuSRq=this.C8Uc9.HGWuSRq; this.pXd8(); this.hkPmc=[]; log("Initializing the analyzer..."); } , pXd8: function() { if (this.hkPmc){ this.C8Uc9.M3dYQl(this.hkPmc, true); delete this.hkPmc; } } , pgCNqH: function(JQgIrM4,types){ var n; if (JQgIrM4==this.p34DG.P3BDTV){ for(n in this.C8Uc9.HGWuSRq){ if (this.C8Uc9.HGWuSRq[n].LfMO4.type in types){ this.C8Uc9.HGWuSRq[n].show(); } else { this.C8Uc9.HGWuSRq[n].hide(); }; }; } else { for(n in this.C8Uc9.HGWuSRq){ if (this.C8Uc9.HGWuSRq[n].LfMO4.type in types){ this.C8Uc9.HGWuSRq[n].hide(); } else { this.C8Uc9.HGWuSRq[n].show(); }; }; } } , g2WU: function(){ var TN44E="tt/poiFilter.html"; var domain=this; if (!this.Ul39LD){ this.Ul39LD=new dijit.Dialog({ title: "Point Of Interest filter" , preload: true, id: "poiFilterDialog"+this.C8Uc9.baseName }); this.Ul39LD.startup(); this.sEbL.gueD5K=dojo.connect(this.Ul39LD, "onLoad",i3C); this.Ul39LD.attr("href",TN44E); window._filterPOIs=null; window._filterPOIs=ANT; } else this.Ul39LD.show(); function i3C(){ dojo.disconnect(domain.sEbL.gueD5K); var leTU2=dojo.query('[name="cont1"]',"poiFilterDialog"+domain.C8Uc9.baseName); if (!leTU2) return; var iHTZp4=dojo.query('[name="cont2"]',"poiFilterDialog"+domain.C8Uc9.baseName); if (!iHTZp4) return; domain.sEbL.XsF6DI=new dojo.dnd.Source(leTU2[0]); domain.sEbL.aVQKO=new dojo.dnd.Source(iHTZp4[0]); domain.sEbL.XsF6DI.copyState=u4Y; domain.sEbL.aVQKO.copyState=u4Y; domain.sEbL.XsF6DI.insertNodes(false,domain.p34DG.EFttRM); domain.Ul39LD.show(); }; function ANT(){ var PVS4TP={}, R9iW2=dojo.query('[name="policy"]',"poiFilterDialog"+domain.C8Uc9.baseName), n, mnS9; domain.sEbL.aVQKO.forInItems(function(o,E7Zd,SYgJS1){ PVS4TP[o.data.t]=1; }); for(n=0;n(this.MLr3u/100)) return null; if (LYOh.length>0){ nB3o=0; groups.push(0); } for(var n=0;nLYOh[nB3o]+this.N2hp85j){ groups.push(nB3o); groups.push(n); } nB3o=n; if (n==LYOh.length-1) groups.push(nB3o); } for(var n=0;n 400) { jjsH.push({ lat: oqt[2], lb15Y: oqt[3], n:n, x:x, KnsE:oqt[4], type:"egain"}); eN8YM=x; } n+=W3I; } var mRv4,dx,WW3OL; for (var E7Zd=1;E7Zd0 && WW3OL<4) this.T49LpH(jjsH[E7Zd],this.C8Uc9.o71CdJ); else if (WW3OL>3 && WW3OL<8) this.T49LpH(jjsH[E7Zd],this.C8Uc9.VoRlIw); else if (WW3OL>7 && WW3OL<12) this.T49LpH(jjsH[E7Zd],this.C8Uc9.fpRl); else if (WW3OL>11) this.T49LpH(jjsH[E7Zd],this.C8Uc9.SB3); } jjsH=[]; } , T49LpH: function(jjsH,type) { var MkPFVU=new X35QK.uTf8(this.C8Uc9, jjsH.lat, jjsH.lb15Y, true, this.C8Uc9.u3uGhU7, type, true); this.hkPmc.push(MkPFVU); this.HGWuSRq[this.C8Uc9.u3uGhU7++]=MkPFVU; dojo.mixin(MkPFVU.LfMO4,{ypc: 10}); } }); dojo.declare(tmw.util.sym.KO23cB,null,{ i61JY: false , oDgW: false , warn: function( msg ){ if( this.oDgW ) throw new Error( msg ); return 1; }, tE5yNCk: function( data, xJsX3, c0LJ8 ){ var b = new KO23cB.HF9CVkI( this.i61JY, data ); b.eELZ( xJsX3 + c0LJ8 + 1 ); var Yvi = Math.pow( 2, c0LJ8 - 1 ) - 1, g41v = b.L9V2( xJsX3 + c0LJ8, 1 ), zNWWkOe = b.L9V2( xJsX3, c0LJ8 ), q41C = 0, NJ81IM = 2, bS21E0 = b.L7C4X.length + ( -xJsX3 >> 3 ) - 1; do for( var gs77p6q = b.L7C4X[ ++bS21E0 ], K706 = xJsX3 % 8 || 8, E4Zxz1B = 1 << K706; E4Zxz1B >>= 1; ( gs77p6q & E4Zxz1B ) && ( q41C += 1 / NJ81IM ), NJ81IM *= 2 ); while( xJsX3 -= K706 ); return zNWWkOe == ( Yvi << 1 ) + 1 ? q41C ? NaN : g41v ? -Infinity : +Infinity : ( 1 + g41v * -2 ) * ( zNWWkOe || q41C ? !zNWWkOe ? Math.pow( 2, -Yvi + 1 ) * q41C : Math.pow( 2, zNWWkOe - Yvi ) * ( 1 + q41C ) : 0 ); }, E7lvyj: function( data, jRgs2L, lGgthb ){ var b = new KO23cB.HF9CVkI( this.i61JY, data ), x = b.L9V2( 0, jRgs2L ), max = Math.pow( 2, jRgs2L ); return lGgthb && x >= max / 2 ? x - max : x; }, F7y4: function( data, xJsX3, c0LJ8 ){ var Yvi = Math.pow( 2, c0LJ8 - 1 ) - 1, BQUiT7 = -Yvi + 1, McNC2 = Yvi, Clv9YM = BQUiT7 - xJsX3, status = isNaN( n = parseFloat( data ) ) || n == -Infinity || n == +Infinity ? n : 0, exp = 0, ksC3hu = 2 * Yvi + 1 + xJsX3 + 3, yQK2 = new Array( ksC3hu ), g41v = ( n = status !== 0 ? 0 : n ) < 0, n = Math.abs( n ), C32Tm = Math.floor( n ), X0AN = n - C32Tm, E7Zd, J59t4, suY, tLRCVVt, mj5NA; for( E7Zd = ksC3hu; E7Zd; yQK2[--E7Zd] = 0 ); for( E7Zd = Yvi + 2; C32Tm && E7Zd; yQK2[--E7Zd] = C32Tm % 2, C32Tm = Math.floor( C32Tm / 2 ) ); for( E7Zd = Yvi + 1; X0AN > 0 && E7Zd; ( yQK2[++E7Zd] = ( ( X0AN *= 2 ) >= 1 ) - 0 ) && --X0AN ); for( E7Zd = -1; ++E7Zd < ksC3hu && !yQK2[E7Zd]; ); if( yQK2[( J59t4 = xJsX3 - 1 + ( E7Zd = ( exp = Yvi + 1 - E7Zd ) >= BQUiT7 && exp <= McNC2 ? E7Zd + 1 : Yvi + 1 - ( exp = BQUiT7 - 1 ) ) ) + 1] ){ if( !( suY = yQK2[J59t4] ) ) for( tLRCVVt = J59t4 + 2; !suY && tLRCVVt < ksC3hu; suY = yQK2[tLRCVVt++] ); for( tLRCVVt = J59t4 + 1; suY && --tLRCVVt >= 0; ( yQK2[tLRCVVt] = !yQK2[tLRCVVt] - 0 ) && ( suY = 0 ) ); } for( E7Zd = E7Zd - 2 < 0 ? -1 : E7Zd - 3; ++E7Zd < ksC3hu && !yQK2[E7Zd]; ); if( ( exp = Yvi + 1 - E7Zd ) >= BQUiT7 && exp <= McNC2 ) ++E7Zd; else if( exp < BQUiT7 ){ exp != Yvi + 1 - ksC3hu && exp < Clv9YM && this.warn( "encodeFloat::float underflow" ); E7Zd = Yvi + 1 - ( exp = BQUiT7 - 1 ); } if( C32Tm || status !== 0 ){ this.warn( C32Tm ? "encodeFloat::float overflow" : "encodeFloat::" + status ); exp = McNC2 + 1; E7Zd = Yvi + 2; if( status == -Infinity ) g41v = 1; else if( isNaN( status ) ) yQK2[E7Zd] = 1; } for( n = Math.abs( exp + Yvi ), tLRCVVt = c0LJ8 + 1, mj5NA = ""; --tLRCVVt; mj5NA = ( n % 2 ) + mj5NA, n = n >>= 1 ); for( n = 0, tLRCVVt = 0, E7Zd = ( mj5NA = ( g41v ? "1" : "0" ) + mj5NA + yQK2.slice( E7Zd, E7Zd + xJsX3 ).join( "" ) ).length, r = []; E7Zd; tLRCVVt = ( tLRCVVt + 1 ) % 8 ){ n += ( 1 << tLRCVVt ) * mj5NA.charAt( --E7Zd ); if( tLRCVVt == 7 ){ r[r.length] = String.fromCharCode( n ); n = 0; }; } r[r.length] = n ? String.fromCharCode( n ) : ""; return ( this.i61JY ? r.reverse() : r ).join( "" ); }, wth4C: function( data, jRgs2L, lGgthb ){ var max = Math.pow( 2, jRgs2L ); ( data >= max || data < -( max >> 1 ) ) && this.warn( "encodeInt::overflow" ) && ( data = 0 ); data < 0 && ( data += max ); for( var r = []; data; r[r.length] = String.fromCharCode( data % 256 ), data = Math.floor( data / 256 ) ); for( jRgs2L = -( -jRgs2L >> 3 ) - r.length; jRgs2L--; r[r.length] = "\0" ); return ( this.i61JY ? r.reverse() : r ).join( "" ); }, fDas0V : function( data ){ return this.E7lvyj( data, 8, true ); }, GI17H : function( data ){ return this.wth4C( data, 8, true ); }, kSa1 : function( data ){ return this.E7lvyj( data, 8, false ); }, g8S7V : function( data ){ return this.wth4C( data, 8, false ); }, mMqsHTI : function( data ){ return this.E7lvyj( data, 16, true ); }, okNT4 : function( data ){ return this.wth4C( data, 16, true ); }, BV7NO : function( data ){ return this.E7lvyj( data, 16, false ); }, BaEc : function( data ){ return this.wth4C( data, 16, false ); }, C1JM2J : function( data ){ return this.E7lvyj( data, 32, true ); }, PbYIZ : function( data ){ return this.wth4C( data, 32, true ); }, kH4S : function( data ){ return this.E7lvyj( data, 32, false ); }, p81R : function( data ){ return this.wth4C( data, 32, false ); }, KonU3i : function( data ){ return this.tE5yNCk( data, 23, 8 ); }, FLeNO : function( data ){ return this.F7y4( data, 23, 8 ); }, U5fj : function( data ){ return this.tE5yNCk( data, 52, 11 ); }, eAc : function( data ){ return this.F7y4( data, 52, 11 ); } }); dojo.declare(tmw.util.sym.McpMK,null,{ constructor: function(i61JY, L7C4X){ this.i61JY = i61JY || 0; this.L7C4X = []; this.IlI5L( L7C4X ); }, IlI5L: function( data ){ if( data ){ for( var l, E7Zd = l = data.length, b = this.L7C4X = new Array( l ); E7Zd; b[l - E7Zd] = data.charCodeAt( --E7Zd ) ); this.i61JY && b.reverse(); } } , qY1GR: function( XNrL ){ return this.L7C4X.length >= -( -XNrL >> 3 ); } , eELZ: function( XNrL ){ if( !this.qY1GR( XNrL ) ) throw new Error( "checkBuffer::missing bytes" ); } , L9V2: function( start, length ){ function fuW0J8T( SwEoY7i, b ){ for( ; b--; SwEoY7i = ( ( SwEoY7i %= 0x7fffffff + 1 ) & 0x40000000 ) == 0x40000000 ? SwEoY7i * 2 : ( SwEoY7i - 0x40000000 ) * 2 + 0x7fffffff + 1 ); return SwEoY7i; }; if( start < 0 || length <= 0 ) return 0; this.eELZ( start + length ); for( var offsetLeft, Ym1c = start % 8, bS21E0 = this.L7C4X.length - ( start >> 3 ) - 1, zQV1 = this.L7C4X.length + ( -( start + length ) >> 3 ), P5D6N = bS21E0 - zQV1, QIOc5K = ( ( this.L7C4X[ bS21E0 ] >> Ym1c ) & ( ( 1 << ( P5D6N ? 8 - Ym1c : length ) ) - 1 ) ) + ( P5D6N && ( offsetLeft = ( start + length ) % 8 ) ? ( this.L7C4X[ zQV1++ ] & ( ( 1 << offsetLeft ) - 1 ) ) << ( P5D6N-- << 3 ) - Ym1c : 0 ); P5D6N; QIOc5K += fuW0J8T( this.L7C4X[ zQV1++ ], ( P5D6N-- << 3 ) - Ym1c ) ); return QIOc5K; } }); dojo.declare(tmw.util.sym.MlLBF0,null,{ cpv42: 0, N2YNNF: 1, UlVH5: 2, IP0e: 3, sFPM: 4, rdPO: 5, Ijlr: "splitSubmit" , qo82C1: "maxDistSel" , r14k6M: "intStart" , SsPXU: "intEnd" , h4no: "intRemove" , GoSQ3Z: "intExclude" , u63LdW7: "intAdd" , dQG98yx: 1200, cYu1rRU: -1, QG6S: -2, reset: function(TZMndQ){ if (this.GO9){ clearTimeout(this.GO9); this.GO9=null; } for(var n=0;n=0;n--){ this.as4r5X[n][2].onClick(); } } , constructor: function(C8Uc9){ this.C8Uc9=C8Uc9; this.kTpNp=null; this.mode=null; this.WtgwY= 0.7; this.ZPU2L= 45; this.TR5R=false; this.imC=false; this.qwJnf6=false; this.UR4t= null; this.oRUC= null; this.pbw= null; this.as4r5X= []; this.lQ8fCw= []; this.tPZp9= null; this.ITDL3= null; this.L5C= null; this.n3mPw8= null; this.GO9= null; this.MpcV= []; this.LoQ7d4= []; this.u63LdW7=this.C8Uc9.baseName+this.u63LdW7; this.dec=new MOY8h(); this.VR5Bi=RegExp(this.r14k6M+"(\\d+)"); this.SPGvX=RegExp(this.SsPXU+"(\\d+)"); this.Wbs4tHc=RegExp(this.h4no+"(\\d+)"); this.iMPKW=RegExp(this.GoSQ3Z+"(\\d+)"); } , rkKGj: function(map){ this.enable(this.C8Uc9.VuE7,true); this.j3Y(); if (map.length==0) return; var n, SYgJS1=0, SIgD1=this.C8Uc9.points.length; for(n=0;n=SIgD1 || map[n].en>=SIgD1){ console.log("Invalid intermediate map entry"); continue; } this.tPZp9.onClick(); if (!this.as4r5X[SYgJS1]) continue; this.as4r5X[SYgJS1][1].attr("value",map[n].en); this.as4r5X[SYgJS1][0].attr("value",map[n].st); this.as4r5X[SYgJS1][3].attr("value",map[n].ex); this.as4r5X[SYgJS1][1].onChange(); this.as4r5X[SYgJS1][0].onChange(); if (map[n].ex) this.as4r5X[SYgJS1][3].onClick(); SYgJS1++; } } , Ny1gU2: function(domain, type, m4Mu6){ if (type==this.sFPM){ return function(value){ if (this.id==domain.Ijlr){ log("Splitting track..."); var CEf4=domain.Lo4E(); var C8Uc9=domain.C8Uc9; var cX8cbOq=new BwJGo(3, C8Uc9.BT5PDB.BVE74W); C8Uc9.tTYKi.lsBHx(cX8cbOq, 0); cX8cbOq.yR1RZO8(1, null); cX8cbOq.yR1RZO8(2, CEf4); log(CEf4); } }; } else if (type==this.rdPO){ return function(){ if (!m4Mu6){ if ( domain.C8Uc9.hAHVF5.U52ITjN.cp<=0 || domain.C8Uc9.hAHVF5.qSTQ()>= domain.C8Uc9.hAHVF5.Ajvt1 ){ tmwAlert({ w:300, h:150, message:O82R, confirm:true }); return; }; } if (domain.lQ8fCw[0] && domain.lQ8fCw[1]){ var st, en; st=+(domain.lQ8fCw[0].index); en=+(domain.lQ8fCw[1].index); tmwAlert({message:TUmW,confirm:true, i3oM:function(){ if (m4Mu6) domain.ITDL3.onClick(); domain.C8Uc9.ToIsZ(st,en,m4Mu6); }, w:300,h:100}); } }; } else if (type==this.cpv42){ return function(){ var ndx, WLMUN, mPl7F, BPYs, container=[], syXbD8X, jPQWXPD, nW66PI, pr1; if (!domain.tSuUGN()) return; ndx=domain.as4r5X.length; WLMUN=domain.pbw.insertRow(ndx); mPl7F=WLMUN.insertCell(0); BPYs=WLMUN.insertCell(1); syXbD8X=document.createElement("div"); jPQWXPD=document.createElement("div"); BPYs.appendChild(syXbD8X); BPYs.appendChild(jPQWXPD); container[0]=new dijit.form.NumberSpinner({ style:"font-size:90%;width:80px;", value: domain.mode==domain.C8Uc9.VDQs?0:-1, smallDelta: 1, onChange: domain.L5C, Ny7F: domain.L5C, intermediateChanges: true, constraints: { min: 0, max: domain.C8Uc9.points.length-1}, timeoutChangeRate: 0.65 }, syXbD8X); container[0].attr("id",domain.r14k6M+ndx); container[1]=new dijit.form.NumberSpinner({ style:"font-size:90%;width:80px;", value: domain.mode==domain.C8Uc9.VDQs? domain.C8Uc9.points.length-1:-1, smallDelta: 1, onChange: domain.L5C, intermediateChanges: true, constraints: { min: 0, max: domain.C8Uc9.points.length-1} , timeoutChangeRate: 0.65 }, jPQWXPD); container[1].attr("id",domain.SsPXU+ndx); container[0].startup(); container[1].startup(); if (domain.mode!=domain.C8Uc9.VDQs){ nW66PI=document.createElement("div"); pr1=document.createElement("div"); BPYs.appendChild(pr1); BPYs.appendChild(nW66PI); container[2]=new dijit.form.Button({ baseClass: "acmeButton", iconClass: "deleteIcon", label: "Remove", onClick: domain.tFCJ0 }, nW66PI); container[2].attr("id",domain.h4no+ndx); container[3]=new dijit.form.CheckBox({ onClick: domain.n3mPw8 }, pr1); container[3].attr("id",domain.GoSQ3Z+ndx); container[2].startup(); container[3].startup(); } domain.as4r5X[ndx]=container; domain.kTpNp.vUnO.postCreate(); container[1].onChange(); container[0].onChange(); }; } else if (type==this.N2YNNF){ return function(value){ var nPbE, xP4L, ndx; nPbE=domain.VR5Bi.exec(this.id); xP4L=domain.SPGvX.exec(this.id); domain.C8Uc9.HQ1m4=true; if (nPbE){ ndx=nPbE[1]; if (domain.Cjpx12(ndx, 0) || !value) value=this.attr("value"); if (!(domain.C8Uc9.points.hasOwnProperty(value))) return; if (domain.lQ8fCw[ndx*2]) domain.lQ8fCw[ndx*2].rw3(domain.C8Uc9.m1hcF); domain.lQ8fCw[ndx*2]=domain.C8Uc9.points[value]; domain.lQ8fCw[ndx*2].chrhxk(domain.C8Uc9.m1hcF); } else if (xP4L){ ndx=xP4L[1]; if (domain.Cjpx12(ndx, 1) || !value) value=this.attr("value"); if (!(domain.C8Uc9.points.hasOwnProperty(value))) return; if (domain.lQ8fCw[ndx*2+1]) domain.lQ8fCw[ndx*2+1].rw3(domain.C8Uc9.or1qQ); domain.lQ8fCw[ndx*2+1]=domain.C8Uc9.points[value]; domain.lQ8fCw[ndx*2+1].chrhxk(domain.C8Uc9.or1qQ); } if (!domain.GO9) domain.GO9=setTimeout( dojo.hitch(domain,domain.V7G6IA), domain.dQG98yx); }; } else if (type==this.UlVH5){ return function(){ var tWY09I, ndx; domain.C8Uc9.HQ1m4=true; tWY09I=domain.Wbs4tHc.exec(this.id); if (tWY09I) ndx=tWY09I[1]; else return; log("Remove int "+ndx); if (domain.lQ8fCw[ndx*2]) domain.lQ8fCw[ndx*2].rw3(domain.C8Uc9.m1hcF); if (domain.lQ8fCw[ndx*2+1]) domain.lQ8fCw[ndx*2+1].rw3(domain.C8Uc9.or1qQ); domain.as4r5X[ndx][0].destroy(); domain.as4r5X[ndx][1].destroy(); domain.as4r5X[ndx][2].destroy(); domain.as4r5X[ndx][3].destroy(); domain.pbw.deleteRow(ndx); delete domain.as4r5X[ndx]; domain.as4r5X.splice(ndx,1); domain.lQ8fCw.splice(ndx*2,2); var JQAXUI=domain.as4r5X; for (var n=ndx;n>n)&1==1){ return n; }; } } , XSC5o: function(MpcV){ var SYgJS1; for (SYgJS1=MpcV[0];SYgJS1this.MpcV[n][1]){ for (var SYgJS1=this.MpcV[n][0];SYgJS1=1) return true; for (var n=0;n=1) || (SDYHf>=0 && M1793t[n][0]-SDYHf>=1) ){ TIje=true; break; } SDYHf=M1793t[n][1]; } return TIje; } , wFR6Y: function(){ var PHhE1=new Array(this.lQ8fCw.length/2), pt, NRFBq; for (var n=0;n 0){ UPOM0VI=this.C8Uc9.points[0]; map.unshift({ E7Zd:0, xN8M1D7:UPOM0VI.F9L8.lat(), UhDJ01:UPOM0VI.F9L8.lng(), type:"NS", q5lbv:0 }); mg8MDP=false; nB3o=0; n++; } else if (pt.iITt686) { map.splice(n,1); pt=map[n]; }; } if (nB3o && pt.E7Zd == nB3o && !pt.iITt686) { if (map[n-1].type=="NS") map[n-1].type="TS"; else map[n-1].type="TETS"; map.splice(n,1); n--; IF96SWS=false; mg8MDP=true; } else if (IF96SWS && !pt.iITt686) { if (!mg8MDP){ if (map[n-1].type=="TE") map[n-1].type="NSTE"; pt.type="TSNE"; } else { pt.type="TS"; } IF96SWS=false; mg8MDP=true; } else if (!pt.iITt686) { pt.type="TE"; IF96SWS=true; mg8MDP=false; } else if (pt.iITt686 && !mg8MDP){ if (pt.E7Zd>nB3o){ if (map[n-1] && map[n-1].type=="TE") map[n-1].type="NSTE"; pt.type="NE"; } else { if (map[n-1]){ if (map[n-1].type=="TE"){ map.splice(n,1); n--; } else { map.splice(n-1,2); n-=2; }; }; } mg8MDP=true; } else if (pt.iITt686 && mg8MDP){ if (pt.E7Zd=M1793t.length) ) ){ tWY09I[0]=M1793t[n][1]; tWY09I[1]=ubound; TIje=true; if (!lX6ht) break; }; } if (!TIje){ tWY09I[1]=M1793t[ndx+1][0]; }; } else { if (ndx-1>=0 && M1793t[ndx-1][1]+10) return tWY09I; else return null; }; function gBea(ndx, S5c){ var tWY09I=[], TIje=false; if (ndx-1>=0){ if (M1793t[ndx-1][1]>M1793t[ndx][0]){ for (var n=ndx-1;n>=0;n--){ if ( (n-1>=0 && M1793t[n][0]-1>=M1793t[n-1][1]) || (n-1<0 && M1793t[n][0]-1>=0) ){ tWY09I[1]=M1793t[n][0]; tWY09I[0]=tWY09I[1]-1; TIje=true; break; }; } if (!TIje){ tWY09I[0]=M1793t[ndx-1][1]; }; } else if (ndx+1M1793t[ndx+1][0]){ tWY09I[0]=M1793t[ndx][0]; tWY09I[1]=M1793t[ndx+1][0]; }; } else { if (ndx+1M1793t[ndx+1][0]){ tWY09I[0]=M1793t[ndx][0]; tWY09I[1]=M1793t[ndx+1][0]; } else if (M1793t[ndx][1]-1>=0) tWY09I[0]=M1793t[ndx][1]-1; } if (tWY09I.length>0) return tWY09I; else return null; }; function PwM87H(M1793t){ var error=false; M1793t.sort(function(LCVBH, IG3ny){ if (LCVBH[0]!=IG3ny[0]) return (LCVBH[0]-IG3ny[0]); else return (LCVBH[1]-IG3ny[1]); }); for (var n=0;n=M1793t[n][1] || (n>0 && M1793t[n-1][1]>M1793t[n][0]) ){ error=true; break; }; } return error; }; var M1793t=[]; for (var n=0;n=M1793t[n][1]){ var SeqrQ=M1793t[n][0], f9dkAY=M1793t[n][1]; if (type==0 && M1793t[n][0]>0){ if (M1793t[n][0]>M1793t[n][1]){ M1793t[n][1]=M1793t[n][0]+1; if (PwM87H(M1793t)){ this.as4r5X[ndx][0]. attr("value",f9dkAY-1); } else { this.as4r5X[ndx][1]. attr("value",SeqrQ+1); }; } else { this.as4r5X[ndx][0]. attr("value",M1793t[n][1]-1); }; } else if (type==1 && M1793t[n][0]>=0){ if (M1793t[n][0]>M1793t[n][1]){ M1793t[n][0]=M1793t[n][1]-1; if (PwM87H(M1793t)){ this.as4r5X[ndx][1]. attr("value",SeqrQ+1); } else { this.as4r5X[ndx][0]. attr("value",f9dkAY-1); }; } else { this.as4r5X[ndx][1]. attr("value",M1793t[n][0]+1); }; } else { var tWY09I=aG4LD(n, M1793t[n][0]==-1); if (tWY09I){ this.as4r5X[ndx][1]. attr("value",tWY09I[1]); M1793t[n][1]=tWY09I[1]; if (tWY09I[0]>=0) this.as4r5X[ndx][0]. attr("value",tWY09I[0]); else { tWY09I=gBea(n); if (tWY09I){ this.as4r5X[ndx][0] .attr("value",tWY09I[0]); }; }; } else { log("Error - spinnerSanityCheck"); }; }; } else if (type==0){ var tWY09I=gBea(n); if (tWY09I){ this.as4r5X[ndx][0].attr("value",tWY09I[0]); if (tWY09I[1]>=0) this.as4r5X[ndx][1]. attr("value",tWY09I[1]); }; } else if (type==1){ var tWY09I=aG4LD(n); if (tWY09I){ this.as4r5X[ndx][1].attr("value",tWY09I[1]); if (tWY09I[0]>=0) this.as4r5X[ndx][0].attr("value",tWY09I[0]); } else { log("Error - spinnerSanityCheck"); }; }; }; } this.imC=false; return true; } , enable: function(mode,g2F6Cl,gd4){ if (this.mode==mode){ if (this.kTpNp) this.kTpNp.vUnO.show(); if (mode==this.C8Uc9.VDQs){ this.WvDGnH1.attr("disabled", gd4?true:false); } return; } this.disable(); this.mode=mode; if (!this.kTpNp){ this.kTpNp=this.C8Uc9.BT5PDB.B6fT(); } this.kTpNp.vUnO.show(); if (this.oRUC) return; if (g2F6Cl) dojo.style(this.kTpNp.vUnO.domNode,"zIndex","-1000"); var syXbD8X, jPQWXPD, lp6; this.oRUC=document.createElement("div"); var JO2Z=document.createElement("div"); JO2Z.innerHTML=dojo.string.substitute(sqr4I8,{ "autointrm":"window."+ IP4X2P((this.C8Uc9.baseName=="p1")? {pNg47Oq:true}:{lddDKY:true} )+"."+ IP4X2P({C8Uc9:true})+"."+ IP4X2P({V81fFRs:true})+"()" }); this.oRUC.appendChild(JO2Z); this.pbw=document.createElement("table"); this.oRUC.setAttribute("id","_intermediatesDiv"); this.oRUC.appendChild(this.pbw); this.L5C=this.Ny1gU2(this, this.N2YNNF); lp6=this.Ny1gU2(this, this.cpv42); if (mode==this.C8Uc9.VDQs){ var x41CB=document.createElement("div"); var pr1=document.createElement("div"); var bJKEN=document.createElement("div"); pr1.setAttribute("id",this.Ijlr); this.oRUC.appendChild(pr1); this.oRUC.appendChild(x41CB); this.oRUC.appendChild(bJKEN); this.yG3Z=new dijit.form.Button({ label: pB3, baseClass: "acmeButton", onClick: this.Ny1gU2(this,this.rdPO) }, pr1); this.WvDGnH1=new dijit.form.Button({ label: EFVV, baseClass: "acmeButton", onClick: this.Ny1gU2(this,this.rdPO,true) }, x41CB); this.ITDL3=new dijit.form.Button({ label: XnYS, baseClass: "acmeButton", onClick: dojo.hitch(this,this.disable) }, bJKEN); this.yG3Z.startup(); this.WvDGnH1.startup(); this.WvDGnH1.attr("disabled",gd4?true:false); lp6(); } else { syXbD8X=document.createElement("div"); jPQWXPD=document.createElement("div"); syXbD8X.setAttribute("id", this.u63LdW7); this.oRUC.appendChild(syXbD8X); this.oRUC.appendChild(jPQWXPD); this.tPZp9=new dijit.form.Button({ label: aYBMt, baseClass: "acmeButton", onClick: lp6 }, syXbD8X); this.tPZp9.startup(); this.ITDL3=new dijit.form.Button({ label: XnSQYq, baseClass: "acmeButton", onClick: dojo.hitch(this,this.j3Y) }, jPQWXPD); this.ITDL3.startup(); this.tFCJ0=this.Ny1gU2(this, this.UlVH5); this.n3mPw8=this.Ny1gU2(this, this.IP0e); } this.kTpNp.vUnO.attr("content",this.oRUC); this.TR5R=true; if (g2F6Cl) this.kTpNp.vUnO.minimize(); } , disable: function(){ this.TR5R=false; this.reset(true); if (this.ITDL3) this.ITDL3.destroy(); if (this.tPZp9) this.tPZp9.destroy(); if (this.yG3Z) this.yG3Z.destroy(); if (this.WvDGnH1) this.WvDGnH1.destroy(); if (this.oRUC){ this.oRUC.innerHTML=dojo.string.substitute(uRDKZ,{ "autointrm":"window."+ IP4X2P((this.C8Uc9.baseName=="p1")? {pNg47Oq:true}:{lddDKY:true} )+"."+ IP4X2P({C8Uc9:true})+"."+ IP4X2P({V81fFRs:true})+"()" }); } this.pbw=null; this.oRUC=null; this.L5C=null; this.tFCJ0=null; this.n3mPw8=null; } , i6hN: function(){ return this.TR5R; } , refresh: function(ndx, map){ if (ndx==this.cYu1rRU){ for (var n=0;n=0){ SIgD1=Math.min(ndx+1, map.length); } else { ndx=0; SIgD1=this.MpcV.length; map=this.MpcV; } for (;ndx=map[ndx][0] && XXjy4[n].E7Zd<=map[ndx][1]){ xv5163.push(this.C8Uc9.points[XXjy4[n].E7Zd].ZNuSq()); } if (map[ndx][1]0){ LrO=this.qP1Ks(gvVI, kt8m); for (var n=0;n=this.WtgwY){ CU1.splice(CU1.length,0,V2mH9V,Kmw0B); if (lUNr8xU){ n--; }; } else if (w5Bx>-1){ n=w5Bx-1; } lUNr8xU=false; fBJk0=0; V2mH9V=-1, Kmw0B=-1; w5Bx=-1; u8X=-1; continue; } if (!match){ if (wvDO8U==null) wvDO8U=this.WhTIQNr(start,QsKyNK[n]); if (wvDO8U<=WSXF){ if (UHAM==1){ V2mH9V=n; w5Bx=-1; WSXF=b2F; } else if (w5Bx==-1){ w5Bx=n; }; }; }; } return CU1; } }); dojo.declare(tmw.util.sym.yql7fQ,null,{ constructor: function(C8Uc9){ this.C8Uc9=C8Uc9; this.IF2D5={}; this.gX6yKW=null; this.U52ITjN={ start: 0, cp: null, UrIM: null, qEKHCk2: new Object() }; this.pJ7h6s=null; this.BuCumP4=[]; this.rkZU371=null; this.pKNk4K=null; } , PMc: { oIxp9MI: "0" , efE: "1" , bIJp5U2: "2" , IPPrHVi: "3" , fJ4Q2: "4" , LYL2: "5" , EMBGL: "a", q8L2o: "d", load: "L" , ZJvIQ: "C" , suAmJO: "W" , ky7B3d: "S" , groupEnd: "E" } , fxtC0O4: 0, lBiJ3w: 1 , Ajvt1: 20, FmnHPH: 0, qDO7: 1, NwPa: function(){ this.rkZU371=false; this.gX6yKW=""; this.pJ7h6s=0; if (this.gX6yKW){ this.k7pi(); } else { this.gX6yKW=""; } } , bsQPx: function(){ console.warn("Log is not valid. Starting from a blank one"); delete this.gX6yKW; delete this.BuCumP4; this.pJ7h6s=0; this.gX6yKW=""; this.BuCumP4=[]; this.rkZU371=false; this.U52ITjN={ start: 0, cp: null, UrIM: null, qEKHCk2: new Object() }; } , JxN: function(log, UM59L, filter){ delete this.BuCumP4; delete this.gX6yKW; delete this.U52ITjN; this.rkZU371=false; this.U52ITjN={ start: 0, cp: null, UrIM: null, filter: filter, qEKHCk2: new Object() }; this.gX6yKW=(typeof(log)=="string" && log) || ""; this.BuCumP4=[]; delete this.pKNk4K; this.pKNk4K=new Object(); var c; if (this.gX6yKW.length-5>=0){ c=this.DkG(this.gX6yKW.length-5); } if (UM59L>0){ if (!log){ this.VqXT(UM59L); this.U52ITjN.start=0; } else { if (c && c.SVeOhB==this.PMc.suAmJO){ if (c.index==UM59L){ console.debug("Saved trackId "+UM59L+" is ok..."); this.U52ITjN.start=this.gX6yKW.length-5; } else { console.debug("Saved trackId mismatch..."); }; } else { console.debug("Savetrack was expected..."); }; }; } else if (UM59L<0){ if (c && c.SVeOhB==this.PMc.ZJvIQ){ if (c.index==(-UM59L)){ console.debug("Found checkpoint: "+c.index); this.U52ITjN.start=this.gX6yKW.length-5; } else { console.debug("Checkpoint mismatch!"); }; } else { console.warn("Woops... something went wrong during switchlog, trying to continue..."); }; } else { console.debug("Using old and yet unsaved log..."); } this.U52ITjN.cp=UM59L; this.bp15JS(); this.pJ7h6s=this.BuCumP4.length; } , qSTQ: function(){ return this.gX6yKW.substr(this.U52ITjN.start).length; } , bp15JS: function(){ var index=0, cDr7KF=0, P5D6N, dUoM=false, msLDmu5=false; while(index=0;n--){ ndx=this.BuCumP4[n]; switch(this.gX6yKW.charAt(ndx)){ case this.PMc.oIxp9MI: case this.PMc.bIJp5U2: c=this.DkG(ndx); }; if (c) break; } if (c){ this.C8Uc9.O2J42T.setCenter(new GLatLng(c.lat,c.lb15Y), 9); } this.C8Uc9.gUA.dHKw45(); } , k7pi: function(log){ this.bp15JS(); this.mB21PW(); while (this.pJ7h6s=0 && repeat); return ANL; } , QYm1r: function(){ if (this.pJ7h6s==this.BuCumP4.length) return; var c, max=this.BuCumP4.length-1, min=this.pJ7h6s; this.pJ7h6s=this.BuCumP4.length; for(var ndx=max;ndx>=min;ndx--){ c=this.DkG(this.BuCumP4[ndx]); switch(c.SVeOhB){ case this.PMc.EMBGL: case this.PMc.IPPrHVi: case this.PMc.oIxp9MI: var erj=new GLatLng(c.lat, c.lb15Y); if (c.EDt){ this.qMGuBQ(c.index, c.type, erj); } else { this.wOwrs(c.index, erj, true); } break; case this.PMc.fJ4Q2: case this.PMc.efE: var erj=new GLatLng(-c.lat,-c.lb15Y); if (c.EDt){ this.X6QEV(c.index, erj, true); } else { this.us1UF(c.index, erj, true, true); } break; case this.PMc.q8L2o: case this.PMc.LYL2: case this.PMc.bIJp5U2: var erj=new GLatLng(c.lat, c.lb15Y); if (c.EDt){ this.EH2(c.index, c.type, erj); } else { this.UJcG4(c.index, erj, true); } break; case this.PMc.ky7B3d: this.rCl(this.lBiJ3w, true); break; case this.PMc.groupEnd: this.rCl(this.fxtC0O4, true); break; }; } } , UTGJ: function(SVeOhB){ this.BuCumP4[this.pJ7h6s]=this.gX6yKW.length; this.gX6yKW+=SVeOhB; this.pJ7h6s++; } , o8VW: function(c, Dzm311){ var P5D6N=0; if (Dzm311){ switch(c.SVeOhB) { case this.PMc.bIJp5U2: P5D6N=1; case this.PMc.oIxp9MI: case this.PMc.efE: if (c.index>=0 && c.index=0 && c.index<=this.C8Uc9.u3uGhU7) return true; break; case this.PMc.load: case this.PMc.suAmJO: case this.PMc.ZJvIQ: case this.PMc.ky7B3d: case this.PMc.groupEnd: return true; }; } else { switch(c.SVeOhB) { case this.PMc.oIxp9MI: P5D6N=1; case this.PMc.bIJp5U2: case this.PMc.efE: if (c.index>=0 && c.index=0 && c.index<=this.C8Uc9.u3uGhU7) return true; break; case this.PMc.load: case this.PMc.suAmJO: case this.PMc.ZJvIQ: case this.PMc.ky7B3d: case this.PMc.groupEnd: return true; }; } return false; } , DkG: function(KRlKI2K, PlTz){ var SVeOhB, index, lat, lb15Y, type, EwQC, EDt=false, P5D6N=0, hvk7; if (typeof(PlTz)=="string"){ hvk7=PlTz; } else { hvk7=this.gX6yKW; } SVeOhB=hvk7.charAt(KRlKI2K); if (SVeOhB==this.PMc.ky7B3d || SVeOhB==this.PMc.groupEnd) return { SVeOhB: SVeOhB }; if (SVeOhB==this.PMc.load || SVeOhB==this.PMc.ZJvIQ || SVeOhB==this.PMc.suAmJO) return { SVeOhB: SVeOhB , index: this.C8Uc9.MhbLiw.C1JM2J(hvk7.substr(KRlKI2K+1,4)) }; if (SVeOhB!=this.PMc.oIxp9MI && SVeOhB!=this.PMc.bIJp5U2 && SVeOhB!=this.PMc.efE && SVeOhB!=this.PMc.IPPrHVi && SVeOhB!=this.PMc.LYL2 && SVeOhB!=this.PMc.fJ4Q2 && SVeOhB!=this.PMc.EMBGL && SVeOhB!=this.PMc.q8L2o) return { SVeOhB: null }; index=this.C8Uc9.MhbLiw.C1JM2J(hvk7.substr(KRlKI2K+1,3)+"\0"); if (SVeOhB==this.PMc.IPPrHVi || SVeOhB==this.PMc.LYL2 || SVeOhB==this.PMc.q8L2o){ EDt=true; P5D6N=1; type=this.C8Uc9.MhbLiw.C1JM2J(hvk7.charAt(KRlKI2K+4)+"\0\0\0"); } else if (SVeOhB==this.PMc.EMBGL){ EDt=true; P5D6N=5; EwQC=this.C8Uc9.MhbLiw.C1JM2J(hvk7.substr(KRlKI2K+4,4)); type=this.C8Uc9.MhbLiw.C1JM2J(hvk7.charAt(KRlKI2K+8)+"\0\0\0"); } else if (SVeOhB==this.PMc.fJ4Q2){ EDt=true; } lat=this.C8Uc9.MhbLiw.U5fj(hvk7.substr(KRlKI2K+4+P5D6N,8)); lb15Y=this.C8Uc9.MhbLiw.U5fj(hvk7.substr(KRlKI2K+12+P5D6N,8)); var tWY09I={ SVeOhB: SVeOhB , index: index , lat: lat , lb15Y: lb15Y , EDt: EDt }; if (EDt){ tWY09I.type=type; if(EwQC) tWY09I.IeHYJ=EwQC; } return tWY09I; } , qJQh: function(VesZH,action,lRu23,O62UW){ if(VesZH) delete this.n2gUFiC; else this.n2gUFiC=true; switch(action){ case this.FmnHPH: this.C8Uc9.tTYKi.reset(); break; case this.qDO7: var n,CAHOIiQ=(O62UW instanceof Array) && O62UW || this.C8Uc9.points; this.rCl(this.fxtC0O4); for(n=CAHOIiQ.length-1;n>=0;n--){ this.wOwrs(CAHOIiQ[n].index,CAHOIiQ[n].F9L8); } this.rCl(this.lBiJ3w); break; }; if(typeof(lRu23)=="boolean"){ var domain=this; setTimeout(function(){ if(lRu23) delete domain.n2gUFiC; else domain.n2gUFiC=true; },1); } } , rCl: function(KOL3E){ this.QYm1r(); if (KOL3E==this.fxtC0O4){ this.UTGJ(this.PMc.ky7B3d); if (!this.n2gUFiC){ setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.JPGBo, [this.fxtC0O4]); }), 0); } console.log("Group start"); } else { this.UTGJ(this.PMc.groupEnd); if (!this.n2gUFiC){ setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.JPGBo, [this.lBiJ3w]); }), 0); } console.log("Group end"); } } , UJcG4: function(index, erj, k05){ var C4baP; if (this.rkZU371) return; this.QYm1r(); C4baP=this.PMc.oIxp9MI+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.eAc(erj.lat())+ this.C8Uc9.MhbLiw.eAc(erj.lng()); this.UTGJ(C4baP); if (!k05 && !this.n2gUFiC) setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.RoVLnG, [index, erj]); }), 0); } , EH2: function(index, type, erj, EwQC){ var C4baP; if (this.rkZU371) return; this.QYm1r(); if (EwQC){ C4baP=this.PMc.EMBGL+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.PbYIZ(EwQC)+ this.C8Uc9.MhbLiw.PbYIZ(type).substring(0,1)+ this.C8Uc9.MhbLiw.eAc(erj.lat())+ this.C8Uc9.MhbLiw.eAc(erj.lng()); } else { C4baP=this.PMc.IPPrHVi+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.PbYIZ(type).substring(0,1)+ this.C8Uc9.MhbLiw.eAc(erj.lat())+ this.C8Uc9.MhbLiw.eAc(erj.lng()); } this.UTGJ(C4baP); } , wOwrs: function(index, erj, k05, PAR){ var C4baP; if (!PAR){ if (this.rkZU371) return; this.QYm1r(); } C4baP=this.PMc.bIJp5U2+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.eAc(erj.lat())+ this.C8Uc9.MhbLiw.eAc(erj.lng()); if (PAR) return C4baP; this.UTGJ(C4baP); if (!k05 && !this.n2gUFiC) setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.vREK, [index, erj]); }), 0); } , qMGuBQ: function(index, type, erj, CDaW){ var C4baP, SVeOhB; if (this.rkZU371) return; this.QYm1r(); if(CDaW){ SVeOhB=this.PMc.q8L2o; } else { SVeOhB=this.PMc.LYL2; } C4baP=SVeOhB+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.PbYIZ(type).substring(0,1)+ this.C8Uc9.MhbLiw.eAc(erj.lat())+ this.C8Uc9.MhbLiw.eAc(erj.lng()); this.UTGJ(C4baP); console.log((CDaW?"Perm-":"")+"Remove poi "+index); } , rE9K: function(index, erj, t1U){ if (this.rkZU371) return; if (erj) return this.us1UF(index, erj, t1U); if(this.IF2D5.hasOwnProperty(index)){ clearTimeout(this.IF2D5[index]); } this.IF2D5[index]=setTimeout(dojo.hitch(this,function(){ delete this.IF2D5[index]; this.us1UF(index); }),1500); } , X6QEV: function(index, erj, t1U){ if (this.rkZU371) return; this.QYm1r(); var JF1, IC4mN, C4baP; if (t1U && erj){ JF1=erj.lat(); IC4mN=erj.lng(); } else { erj=this.C8Uc9.HGWuSRq[index].F9L8; if (this.C8Uc9.HGWuSRq[index].RGe2K){ JF1=erj.lat()- this.C8Uc9.HGWuSRq[index].RGe2K.lat; IC4mN=erj.lng()- this.C8Uc9.HGWuSRq[index].RGe2K.lb15Y; } else { log("woops!!!!!!!! cannot log movement of poi "+index); return; }; } if (!t1U){ delete this.C8Uc9.HGWuSRq[index].RGe2K; this.C8Uc9.HGWuSRq[index].RGe2K={ lat: erj.lat(), lb15Y: erj.lng() }; } delete erj; C4baP=this.PMc.fJ4Q2+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.eAc(JF1)+ this.C8Uc9.MhbLiw.eAc(IC4mN); this.UTGJ(C4baP); } , us1UF: function(index, erj, t1U, k05){ var C4baP, JF1, IC4mN; this.QYm1r(); if(!erj){ delete this.IF2D5[index]; erj=this.C8Uc9.points[index].F9L8; } else if (t1U){ JF1=erj.lat(); IC4mN=erj.lng(); } if (!t1U){ if (this.C8Uc9.points[index].RGe2K){ JF1=erj.lat()- this.C8Uc9.points[index].RGe2K.lat; IC4mN=erj.lng()- this.C8Uc9.points[index].RGe2K.lb15Y; } else { log("woops!!!!!!!! cannot log movement of point "+index); return; }; } if (!t1U && this.C8Uc9.points[index]){ delete this.C8Uc9.points[index].RGe2K; this.C8Uc9.points[index].RGe2K={ lat: erj.lat(), lb15Y: erj.lng() }; } delete erj; C4baP=this.PMc.efE+this.C8Uc9.MhbLiw.PbYIZ(index).substring(0,3)+ this.C8Uc9.MhbLiw.eAc(JF1)+ this.C8Uc9.MhbLiw.eAc(IC4mN); this.UTGJ(C4baP); if (!k05 && !this.n2gUFiC) setTimeout(dojo.hitch(this,function(){ dojo.publish(this.C8Uc9.rG6G, [index, JF1, IC4mN]); }), 0); } , JKww7N: function(index, LfMO4){ if (!this.C8Uc9.HGWuSRq[index]) return; this.C8Uc9.HQ1m4=true; this.pKNk4K[index]=LfMO4; this.U52ITjN.qEKHCk2[index]=1; } , YB90u: function(){ if (!this.U52ITjN.qEKHCk2) return; var pi={}, n; for (n in this.U52ITjN.qEKHCk2){ pi[n]=this.pKNk4K[n]; } return dojo.toJson(pi); } , VqXT: function(id,PAR){ var C4baP; C4baP=this.PMc.load+this.C8Uc9.MhbLiw.PbYIZ(id); if (PAR===true) return C4baP; if (this.rkZU371) return; this.UTGJ(C4baP); } , gyU: function(id, PlTz, xP2P1O, Wy75sQ){ var C4baP, SVeOhB; SVeOhB=(Wy75sQ && this.PMc.suAmJO) || this.PMc.ZJvIQ; C4baP=SVeOhB+this.C8Uc9.MhbLiw.PbYIZ(id); if (typeof(PlTz)=="string") return PlTz+C4baP; if (id==0){ this.UTGJ(C4baP); this.U52ITjN.UrIM=this.BuCumP4[this.pJ7h6s-1]; } else { if (!xP2P1O) xP2P1O=this.U52ITjN; var D90V5dm=new RegExp("((?:.|\n|\r){" +(xP2P1O.UrIM)+ "})" + SVeOhB + "\0\0\0\0"); if (xP2P1O.cp==this.U52ITjN.cp){ this.gX6yKW=this.gX6yKW.replace(D90V5dm,"$1"+C4baP); console.debug("template: "+D90V5dm+" buf "+C4baP+"---\n"+this.gX6yKW); } else { console.debug("Logging cp/save by notifying the TM"); this.C8Uc9.BT5PDB.vfmSWtY(xP2P1O.cp, yNKDK2B, C4baP, LWSO); }; } function LWSO(log, yNKDK2B, C4baP){ return log.replace(yNKDK2B, "$1"+C4baP); }; } , L6GXiFJ: function(Wy75sQ,log){ if (log.length>5) return true; var c; if (log[0]==this.PMc.ZJvIQ || log[0]==this.PMc.suAmJO){ c=this.DkG(0, log); if (c && c.index>0 && ( (Wy75sQ && c.SVeOhB==this.PMc.suAmJO) || (!Wy75sQ) ) ){ return false; }; } return true; } , kf7: function( PlTz, xP2P1O, cX8cbOq, hSfIHQQ, Wy75sQ, W4Y1CV, external) { var hvk7, YSD7bs, FKRjQVl, mtWw=false, c, q6JQU, aYC; if (typeof(PlTz)=="string"){ hvk7=PlTz; YSD7bs=xP2P1O; } else { hvk7=this.gX6yKW; YSD7bs=this.U52ITjN; mtWw=true; } if (YSD7bs.start==null){ console.debug("mycpinfo.start is null... is this ok?"); q6JQU=hvk7.substr(0); } else { q6JQU=hvk7.substr(YSD7bs.start); } if ( (mtWw && !this.C8Uc9.HQ1m4 && !this.L6GXiFJ(Wy75sQ,q6JQU)) || (!mtWw && !this.L6GXiFJ(Wy75sQ,q6JQU)) ){ console.debug("Not checkpointing/saving since the log is unmodified... Using old cp "+YSD7bs.cp); if (mtWw) YSD7bs.start=this.BuCumP4[this.pJ7h6s-1]; if (!Wy75sQ){ console.debug("Calling tm-cbk"); if (cX8cbOq){ cX8cbOq.yR1RZO8(hSfIHQQ,{ log: hvk7 , ZJvIQ: YSD7bs.cp }); }; } delete cX8cbOq; return; } if (mtWw){ this.gyU(0, false, false, Wy75sQ); } if (W4Y1CV.props && W4Y1CV.props.l8l4rwf){ W4Y1CV.l8l4rwf=W4Y1CV.props.l8l4rwf; delete W4Y1CV.props.l8l4rwf; } aYC={w: -1, log: q6JQU, oqt: YSD7bs && YSD7bs.filter || -1 }; if (Wy75sQ){ aYC.pi=this.YB90u(); aYC.w=W4Y1CV.AC6CDW; aYC.ee=W4Y1CV.NyWUDE; aYC.n=W4Y1CV.trackname; aYC.d=W4Y1CV.trackdesc; if (W4Y1CV.b1M7Q2O) aYC.a9Ip=W4Y1CV.b1M7Q2O; if (W4Y1CV.trackloct) aYC.l=W4Y1CV.trackloct; if (W4Y1CV.hpFI) aYC.pRJJ=W4Y1CV.hpFI; aYC.t=W4Y1CV.tracktype; if (W4Y1CV.trackgroup) aYC.grp=W4Y1CV.trackgroup; aYC.y9MzQO=W4Y1CV.trackprofile; if (W4Y1CV.tracksubprof) aYC.PG2p=W4Y1CV.tracksubprof; if (W4Y1CV.trackfulldesc) aYC.g37z=W4Y1CV.trackfulldesc; if (W4Y1CV.props){ if (W4Y1CV.props.imgdata){ aYC.imgdata=W4Y1CV.props.imgdata; delete W4Y1CV.props.imgdata; aYC.props=dojo.toJson(W4Y1CV.props); W4Y1CV.props.imgdata=aYC.imgdata; } else { aYC.props=dojo.toJson(W4Y1CV.props); }; }; } console.debug("Doing checkpoint... Log length is: "+q6JQU.length); FKRjQVl={ cp: YSD7bs.cp , UrIM: YSD7bs.UrIM , start: YSD7bs.start }; dojo.xhrPost({ url: "scripts/cp.php" , handleAs: "text" , timeout: 60000, load: dojo.hitch(this,EI88) , content: aYC }); this.C8Uc9.HQ1m4=false; function EI88(data){ var p8lYB; tmwAlert({close:true}); try { p8lYB=dojo.fromJson(data); } catch(err){ alert(ypJU); return; } if (p8lYB.err) { console.debug(p8lYB.err); return; } if (p8lYB.warn) console.debug(p8lYB.warn); console.debug("doCheckPoint callback, cp "+p8lYB.cp); if (!external && p8lYB.cp==null){ alert(ypJU); if (cX8cbOq) cX8cbOq.yR1RZO8(hSfIHQQ,dojo.mixin({ log: hvk7 , ZJvIQ: FKRjQVl.cp }, W4Y1CV)); return; } if (mtWw){ if (FKRjQVl.cp==YSD7bs.cp){ this.gyU(p8lYB.cp, false, FKRjQVl, Wy75sQ); if (FKRjQVl.UrIM>YSD7bs.start) YSD7bs.start=FKRjQVl.UrIM; if (FKRjQVl.UrIM==YSD7bs.UrIM){ YSD7bs.UrIM=null; YSD7bs.cp=(Wy75sQ && 1 || -1)*p8lYB.cp; YSD7bs.filter=-1; if (Wy75sQ){ delete YSD7bs.qEKHCk2; YSD7bs.qEKHCk2=new Object(); }; }; } this.C8Uc9.Z6W(dojo.mixin({ p6a: FKRjQVl.cp, ZJvIQ: (Wy75sQ && 1 || -1)*p8lYB.cp }, W4Y1CV)); } else { if (external) this.C8Uc9.Z6W(dojo.mixin({ p6a: FKRjQVl.cp, ZJvIQ: (Wy75sQ && 1 || -1)*p8lYB.cp, external: true }, W4Y1CV)); if (!cX8cbOq) return; cX8cbOq.yR1RZO8(hSfIHQQ,dojo.mixin({ log: this.gyU(p8lYB.cp, hvk7) , ZJvIQ: -p8lYB.cp }, W4Y1CV)); } }; } }); function BwJGo(b1lGp, callback, scope){ this.b1lGp=new Array(b1lGp); this.fF53=Math.pow(2,b1lGp)-1; this.callback=callback; this.scope=scope; }; BwJGo.prototype={ yR1RZO8: function(hSfIHQQ, data){ if (hSfIHQQ=0;n--){ nB3CUV.removeChild(nB3CUV.childNodes[n]); } this.output[this.D9GV8]=document.createTextNode(""); nB3CUV.appendChild(this.output[this.D9GV8]); } var d4bKB=dojo.byId(KRlKI2K+X246O); if (d4bKB){ for(n=d4bKB.childNodes.length-1;n>=0;n--){ d4bKB.removeChild(d4bKB.childNodes[n]); } this.output[this.EK2x]=document.createTextNode(""); d4bKB.appendChild(this.output[this.EK2x]); } }; cMQ.prototype={ D9GV8: 0, EK2x: 1, display: function(msg,PHTCei){ var Ryi78C=(PHTCei || this.D9GV8); if (this.output[Ryi78C]){ this.output[Ryi78C].nodeValue=msg; } } , clear: function(PHTCei){ var Ryi78C=(PHTCei || this.D9GV8); if (this.output[Ryi78C]){ this.output[Ryi78C].nodeValue=""; } } , a2jB: function(PHTCei){ var Ryi78C=(PHTCei || this.D9GV8); if (this.output[Ryi78C]){ return this.output[Ryi78C].nodeValue; } return ""; } }; function kU6k(C8Uc9){ this.C8Uc9=C8Uc9; this.HGWuSRq=[]; this.events=[]; this.XBx=null; this.pNsf7="piclytr"+Math.random().toString().substr(2); }; kU6k.prototype={ OIhM: auRMqG, MYH5J2: 0, ju2xVN: 1, MGFD: 1100, init: function(data,f67g){ tmw.util.trackPage("/app/photo/apl"); try { this.HEwR(true,true); }catch(err){} if (!data["tstart"]){ alert("Invalid input data"); return; } this.J4WVsh=new Date(data["tstart"]*1000); if (isNaN(this.J4WVsh)){ alert("Invalid input data"); return; } this.f67g=f67g?f67g:0; this.data=data["data"]; this.u34K3N=data["ark"]; if (!this.C8Uc9.KH7eV){ alert(iGUjQHM); this.D78MJ07(this.MYH5J2); } else { this.Vj4O=new Date(this.C8Uc9.BT5PDB.LrO[this.C8Uc9.RKUy] .start.replace(/-/g,"/")); var JWd7=10800; this.sidS=(this.J4WVsh-this.Vj4O)/1000; if (Math.abs(this.sidS)>JWd7){ if (!confirm(dojo.string.substitute( S83, { "hours":Math.round(this.sidS/3600), "minutes":Math.round(this.sidS/60) }) )){ this.D78MJ07(this.MYH5J2); } else { this.D78MJ07(this.ju2xVN); }; } else { this.D78MJ07(this.ju2xVN); }; } if (!this.AkV7T){ this.ZpVV=tmwHelperPan({ id: this.pNsf7, title: "Automatic Picture Positioning", content: dojo.string.substitute(this.OIhM,{ "randid": this.pNsf7, "spinstart": this.A1ct, "min": this.T1NQd9M, "max": this.XTVf, "notimechecked": (this.mode==this.MYH5J2?"checked=\"checked\"":""), "hastimechecked": (this.mode==this.ju2xVN?"checked=\"checked\"":""), "hastimedisabled": (this.C8Uc9.KH7eV?"":"disabled=\"true\"") }), WQc6G: tmwHelperPan.D2gL.DDEPY6, wgT: this.C8Uc9.baseName, l: "60px", t: "26px", w: "auto", h: "auto" }); this.oEz=dojo.byId(this.pNsf7+"ttime"); this.w8qXM=dojo.byId(this.pNsf7+"ptime"); this.mLM7W=dojo.byId(this.pNsf7+"rtimedisplay"); this.A2h=dojo.byId(this.pNsf7+"ptimedisplay"); this.mmK=dojo.byId(this.pNsf7+"ptimestdesc"); this.XQVp=dojo.byId(this.pNsf7+"ptimelndesc"); this.UYN=dojo.byId(this.pNsf7+"spinendesc"); this.OV8X=dojo.byId(this.pNsf7+"spinstdesc"); this.AkV7T=true; tmw.util.waitForWId(this.pNsf7+"form",this,function(){ var UPOM0VI; this.form=dijit.byId(this.pNsf7+"form"); this.xXP6=dijit.byId(this.pNsf7+"spinst"); this.CLdBJOK=dijit.byId(this.pNsf7+"spinen"); this.events.push( dojo.connect(this.xXP6,"onChange",this,this.MTMkd6) ); this.events.push( dojo.connect(this.CLdBJOK,"onChange",this,this.MTMkd6) ); UPOM0VI=dijit.byId(this.pNsf7+"notimesel"); this.events.push( dojo.connect(UPOM0VI,"onChange",this,this.MTMkd6) ); UPOM0VI=dijit.byId(this.pNsf7+"close"); this.events.push( dojo.connect(UPOM0VI,"onClick",this,this.HEwR) ); UPOM0VI=dijit.byId(this.pNsf7+"cancel"); this.events.push( dojo.connect(UPOM0VI,"onClick",this,function(){ this.HEwR(true); }) ); UPOM0VI=dijit.byId(this.pNsf7+"reset"); this.events.push( dojo.connect(UPOM0VI,"onClick",this,this.reset) ); UPOM0VI=null; this.ZN43PMq(true); }); } this.doLayout(); }, D78MJ07: function(mode){ if (this.mode==mode) return; this.mode=mode; if (mode==this.MYH5J2){ this.HQ1m4=true; this.XTVf=this.data[this.data.length-1]["t"]; this.e84F1=this.XTVf; this.yN51L(true); this.sidS=0; this.T1NQd9M=0; this.A1ct=0; } else { var hmRs=this.data[this.data.length-1]["t"]; this.e84F1=this.C8Uc9.points[this.C8Uc9.points.length-1].t; this.sidS=(this.J4WVsh-this.Vj4O)/1000; this.T1NQd9M=-this.sidS-hmRs; this.XTVf=this.e84F1-this.sidS; if (this.sidS<0){ this.A1ct=-this.sidS; } else { if (this.sidS>this.e84F1){ this.A1ct=this.XTVf; } else { this.A1ct=0; }; } if (this.HQ1m4){ this.yN51L(); this.HQ1m4=false; }; } this.A1ct=Math.floor(this.A1ct/60); this.XTVf=Math.ceil(this.XTVf/60); this.T1NQd9M=Math.floor(this.T1NQd9M/60); this.S1uO8i=this.A1ct; this.eaYF7I=this.XTVf; if (this.AkV7T){ this.ZN43PMq(); } }, ZN43PMq: function(PNUkpA){ if (!this.AkV7T) return; if (this.mode==this.MYH5J2){ this.CLdBJOK.attr("disabled",false); this.OV8X.innerHTML="/"+this.XTVf; this.UYN.innerHTML="/"+this.XTVf; dojo.style(this.mLM7W,"display","none"); dojo.style(this.A2h,"display","block"); } else { this.CLdBJOK.attr("disabled",true); dojo.style(this.mLM7W,"display","block"); dojo.style(this.A2h,"display","none"); this.oEz.innerHTML=dojo.date.locale.format(this.Vj4O); this.OV8X.innerHTML=WHJ21b1; this.UYN.innerHTML=WHJ21b1; } if (!PNUkpA){ this.form.attr("value",{"mode":this.mode, "spinst":this.A1ct,"spinen":this.XTVf}); this.CLdBJOK.attr("constraints",{min:this.T1NQd9M,max:this.XTVf}); this.xXP6.attr("constraints",{min:this.T1NQd9M,max:this.XTVf}); } }, yN51L: function(TGTGo96){ var TptT=new Array(this.C8Uc9.points.length), n,Dpf7,xN8M1D7,UhDJ01,pt=this.C8Uc9.points,D5BLN=0; ; TptT[0]={ xN8M1D7:pt[0].F9L8.lat(), UhDJ01:pt[0].F9L8.lng(), x:D5BLN, KnsE:0, t:(TGTGo96?D5BLN:pt[0].t) }; Dpf7=pt[0]; for(n=1;n0){ for(n=0;n0 && this.data[n]["t"]-rvYNMK6<=this.f67g){ this.HGWuSRq[ndx-1].LfMO4.media.push({ "desc":this.data[n]["n"], "file":this.u34K3N+"/"+this.data[n]["f"], "type":1, "arkfid":this.data[n]["arkfid"] }); e94TJC[n]=ndx-1; continue; } this.HGWuSRq[ndx]=new X35QK.uTf8(this.C8Uc9, CAHOIiQ[n][2], CAHOIiQ[n][3], true, -ndx-1, this.C8Uc9.gOWPV, true); this.C8Uc9.HGWuSRq[-ndx-1]=this.HGWuSRq[ndx]; this.HGWuSRq[ndx].Xp5lU({media: [{ "desc":this.data[n]["n"], "file":this.u34K3N+"/"+this.data[n]["f"], "type":1, "arkfid":this.data[n]["arkfid"] }]}, true); e94TJC[ndx]=n; ndx++; rvYNMK6=this.data[n]["t"]; } this.VEIb=e94TJC; } this.C8Uc9.Tj4NP(this.C8Uc9.gOWPV,false,true); } , MTMkd6: function(){ var domain=this; if (this.XBx) clearTimeout(this.XBx); this.XBx=setTimeout(fNtKE,this.MGFD); function fNtKE(){ var GM6k5; domain.XBx=null; GM6k5=domain.form.attr("value"); if (GM6k5["mode"]!=domain.mode) return domain.D78MJ07(GM6k5["mode"]); if (GM6k5["spinst"]==domain.S1uO8i && GM6k5["spinen"]==domain.eaYF7I){ return; } if (GM6k5["spinst"]>GM6k5["spinen"]){ domain.form.attr("value",{"spinst":this.A1ct,"spinen":this.XTVf}); return; } domain.S1uO8i=GM6k5["spinst"]; domain.eaYF7I=GM6k5["spinen"]; domain.doLayout(); }; } , reset: function(){ this.form.attr("value",{"spinst":this.A1ct,"spinen":this.XTVf}); } , HEwR: function(cancel,HAfvB){ var n,StWdy,ndx,dOuL9c5,domain=this; if (this.HQ1m4) this.yN51L(); for(n=0;n=domain.rOLKRK) { if (o.KnsE > tfN14Vg) tfN14Vg=o.KnsE; if (o.KnsE < IE1G2) IE1G2=o.KnsE; if (domain.DNFdg7) t=Number(o.t); else t=tLRCVVt; if (E7Zd==0) { qVLm3=t; } poSQd=Number(o.poSQd); if (poSQd) b189=true; oqt[tLRCVVt]=[t-qVLm3,Number(o.x),Number(o.xN8M1D7),Number(o.UhDJ01),Number(o.KnsE),poSQd]; qiS=o.x; tLRCVVt++; } }); d=oqt[oqt.length-1][1]-oqt[0][1]; var CQYKaG=this.C07Pu.elevation.oqt; for (var E7Zd=0;E7Zd=igY0) { tWY09I=p[0]-igY0; if (tWY09I>I824wH) { dWUC=ME8HF76-W3I; JQ631p=ME8HF76; tWY09I=p[0]-igY0; while (tWY09I>I824wH || tWY09I<-I824wH) { oVcDP=JQ631p; p=i4r1R0.XNU7FA(JQ631p,0); nB3o=JQ631p; c0ERI=p[0]; if (c0ERI>igY0) { JQ631p=(JQ631p+dWUC)/2; } else { lJhO=JQ631p; JQ631p=JQ631p+(JQ631p-dWUC)/2; dWUC=lJhO; } tWY09I=c0ERI-igY0; Fr11W++; continue; } ME8HF76+=JQ631p-dWUC; } else { ME8HF76+=W3I; } p=i4r1R0.getValue(nB3o); tTB.push([igY0,p[1],p[2],p[3],p[4],p[5],0,YEO5]); igY0+=QFJGpq; } else { ME8HF76+=W3I; }; } p=i4r1R0.getValue(1.0); if (igY0 != tTB[tTB.length-1][0]) { tTB.push([igY0,p[1],p[2],p[3],p[4],p[5],0,YEO5]); } var n=tTB.length,bNU,mRv4; var c93VV=F40qhK=0; for (var E7Zd=1;E7Zd=mDxD) { tWY09I=p[YBxN1lu]-mDxD; if (tWY09I>XsV5) { dWUC=ME8HF76-W3I; JQ631p=ME8HF76; tWY09I=p[YBxN1lu]-mDxD; while (tWY09I>XsV5 || tWY09I<-XsV5) { p=i4r1R0.XNU7FA(JQ631p,YBxN1lu); nB3o=JQ631p; c0ERI=p[YBxN1lu]; if (c0ERI>mDxD) { JQ631p=(JQ631p+dWUC)/2; } else { lJhO=JQ631p; JQ631p=JQ631p+(JQ631p-dWUC)/2; dWUC=lJhO; } tWY09I=c0ERI-mDxD; continue; } ME8HF76+=JQ631p-dWUC; } else { ME8HF76+=W3I; } p=i4r1R0.getValue(nB3o); tTB.push([p[YBxN1lu],p[cov]]); mDxD+=dx; } else { ME8HF76+=W3I; }; } p=i4r1R0.getValue(1.0); if (mDxD != tTB[tTB.length-1][cov]) { tTB.push([p[YBxN1lu],p[cov]]); } i4r1R0.p=[]; return new tmw.math.curves.WI38wc(tTB,0.4); }, SKIG: function(p){ var E7Zd; if (this.EVL8.length==0){ this.bUBLSBN=0; console.log("init checkpoints"); var igY0,dx=p.D5BLN/(this.suW3ytb+1); for (E7Zd=0;E7Zd0) { domain.C8Uc9.vdic[E7Zd+tLRCVVt].n=domain.C8Uc9.vdic[E7Zd].n+0.00001*tLRCVVt; tLRCVVt--; }; } }, y6SB: function(HGWuSRq) { var n=0,W3I=0.002,LVm=[],KQy5=[],CQYKaG=this.TGXIkx[0].oqt; var d,oqt,x1,y1,x2,y2; for (E7Zd in HGWuSRq){ LVm[E7Zd]=1000000; KQy5[E7Zd]=0; } while (n<=1.0) { oqt=CQYKaG.getValue(n); x1=oqt[2]; y1=oqt[3]; for (E7Zd in HGWuSRq){ x2=HGWuSRq[E7Zd].F9L8.lat(); y2=HGWuSRq[E7Zd].F9L8.lng(); d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2); if (d0 && this.iLE54.length>2) dojo.fadeIn({node: this.ibWJGK.domNode}).play(); } }, m1CsKlb: function(TA7YVK){ this.eJKC7LK.stop(); this.SwEoY7i._percent=0; this.end=new Date().getTime(); var Pl0E=this.iuvT/(this.end-this.start)*1000.0; console.log("FPS rate(2D): "+tmw.util.round(Pl0E,2)); dojo.forEach(this.TGXIkx, function(p){ p.parent.cVf(p.GR6LFh,p.CgxUP6,-1); }); setTimeout(dojo.hitch(this, function(){ this.UtWx(); this.n3HtPE=0; if (!TA7YVK) if (this.ibWJGK && (this.iLE54.length>2 || this.C5Y66.ETYG())) this.ibWJGK.duX47W(); }),1000); for (var SYgJS1 in this.C8Uc9.vdic){ var xS54=this.C8Uc9.vdic[SYgJS1]; if (this.KcLUfK && this.C8Uc9.HGWuSRq[xS54.index].LfMO4.type in this.KcLUfK ){ this.C8Uc9.HGWuSRq[xS54.index].YP0NN1(); this.C8Uc9.HGWuSRq[xS54.index].show(); }; } if (this.ibWJGK) dojo.fadeOut({node: this.ibWJGK.domNode}).play(); }, cYM1d: function(n){ this.DGYdX=this.t; if (this.direction<0) n=1.0-n; this.t=n*this.q5lbv; for (var E7Zd=0; E7Zd0) { this.a6X74p=0; console.debug("found "+RX64s+" time sectors:"); console.dir(this.pswan); } else {} } else { this.a6X74p=this.n3HtPE; } if (this.E8HnDH) this.E8HnDH=false; } this.q5lbv=this.iLE54[this.n3HtPE].q5lbv; for (var tLRCVVt=0;tLRCVVtthis.n3HtPE) break; } if (tLRCVVt==this.pswan.length) this.a6X74p=null; else this.a6X74p=tLRCVVt; if (this.ibWJGK) this.ibWJGK.o9A8MG(this.a6X74p); this.O08ku=dojo.byId(this.C5Y66.rootId+"UnedCnvs"); this.iXRl4=dojo.marginBox(dojo.byId(this.C5Y66.rootId+"map")); this.autoFocus=dojo.byId(this.C5Y66.rootId+"dnfoc").getAttribute("tmw_selected"); if (this.TGXIkx.length==1) this.Bn9jfb=0; if (status=="playing" || status==null) { if (this.ibWJGK) this.ibWJGK.ISj(); this.SwEoY7i.play(); this.eJKC7LK.start(); } else if (status=="stopped" || status=="paused") { if (this.ibWJGK) this.ibWJGK.wXhB(); this.SwEoY7i.play(); this.SwEoY7i.pause(); } }, pause: function(){ if (this.orLWG) { clearTimeout(this.orLWG); this.orLWG=null; this.kh28E=true; this.p6Qr=true; } this.SwEoY7i.pause(); this.eJKC7LK.stop(); }, stop: function(){ this.SwEoY7i.stop(); this.m1CsKlb(true); this.C8Uc9.D7KLSfR(false); if (this.cFqW75) { D6vxDP(dojo.byId(this.C5Y66.rootId+"dntou")); } }, y5VN: function(editable,TA7YVK){ var n,Q6L9O=this.TGXIkx.length; if (editable==this.H717Yh && !TA7YVK) return; console.log("changeCanvas "+editable); if (!editable){ this.H717Yh=false; for(n=0;n=0;E7Zd--) { if (this.iLE54[E7Zd].type.match(/TS|NS/)) { this.n3HtPE=E7Zd; break; }; } if (E7Zd==-1) this.n3HtPE=0; var status=this.SwEoY7i.status(); this.SwEoY7i.stop(); this.play(status); }, cVf: function(GR6LFh,CgxUP6,xtE5d){ if (this.ibWJGK) this.ibWJGK.cVf(GR6LFh,CgxUP6,xtE5d); }, em6: function(value){ if (value=="on") this.autoFocus=true; else this.autoFocus=false; }, pk0M: function(GR6LFh){ this.Bn9jfb=GR6LFh; } }); dojo.declare(tmw.util.sym.bIF7xjI,null,{ C8Uc9: null, IE1G2: null, tfN14Vg: null, oqt: null, mIqF: null, constructor: function(parent,GR6LFh,CgxUP6,C8Uc9,elevation,zG3Ku4){ this.parent=parent; this.GR6LFh=GR6LFh; this.CgxUP6=CgxUP6; this.C8Uc9=C8Uc9; this.elevation=elevation; this.speedNode=dojo.byId(this.C8Uc9.baseName+"s"+this.GR6LFh).childNodes[0]; this.n1FQ6=new jIt4g(this.C8Uc9.baseName+"gfxp"+this.GR6LFh); this.hrNode=dojo.byId(this.C8Uc9.baseName+"hr"+this.GR6LFh).childNodes[0]; this.ckRjmcY=dojo.byId(this.C8Uc9.baseName+"g"+this.GR6LFh); if (this.ckRjmcY) this.ckRjmcY=this.ckRjmcY.childNodes[0]; this.rankNode=dojo.byId(this.C8Uc9.baseName+"r"+this.GR6LFh); if (this.rankNode) this.rankNode=this.rankNode.childNodes[0]; this.zG3Ku4=zG3Ku4; this.q9BFC=zG3Ku4.slice(0,3).concat([0]); this.curr=new Object(); this.old=new Object(); this.isSvg=(dojox.gfx.renderer == "svg"); this.reset(); }, reset: function(){ this.visible=false; if (this.PKzY) { this.PKzY.removeShape(); this.PKzY=null; } if (this.VXK) { this.VXK.removeShape(); this.VXK=null; } var eJb; if (this.parent.H717Yh) eJb=this.C8Uc9.eJb; else eJb=this.C8Uc9.LcmI9hO.gfx; this.PKzY=eJb.createCircle({cx:0, cy:0, r:6 }).setFill(this.q9BFC); this.eSC27=this.PKzY.rawNode; if (this.elevation.dim) this.vptBMNO(); this.curr.sDxUh=this.curr.b2F=this.curr.PDNWYM=this.curr.v=this.curr.poSQd=this.curr.cTIF=0; this.old.sDxUh=this.old.b2F=this.old.PDNWYM=this.old.v=this.old.poSQd=this.old.cTIF=this.old.r=this.old.g=0; this.lbFOHR=this.KWciXaE=this.i6FU=this.a7LBR=0; this.speedNode.nodeValue=0; this.n1FQ6.setValue(0); this.hrNode.nodeValue=""; if (this.ckRjmcY) this.ckRjmcY.nodeValue=0; if (this.rankNode) this.rankNode.nodeValue=0; this.fOVLFBI=-1; this.z32K=false; this.fR6V=0; this.mIqF=false; this.cBT2G=0; }, j3Y: function(){ this.n1FQ6.remove(); if (this.oqt) this.oqt.p=[]; }, Y1S529: function(){ if (this.VXK) { this.VXK.removeShape(); this.VXK=null; } this.vptBMNO(); }, vptBMNO: function(){ this.z0bJ7=this.elevation.z0bJ7; this.ObfKFgb=this.elevation.z0bJ7*this.elevation.jLMkx + this.elevation.offsets.l - this.elevation.HE6; var h=this.elevation.dim.height - this.elevation.offsets.b - this.elevation.offsets.t; this.VXK=this.elevation.surface.createRect({x:0, y:this.elevation.offsets.t, width:2, height:h}).setFill(this.zG3Ku4).setStroke(null); this.IKPTN=this.VXK.rawNode; }, v7G34: function(x,y){ return (x*x+y*y); }, wUfJN77: function(n){ var E7Zd=this.vdqMs2-1; while (n0.1) continue; if (E7Zd==(vdqMs2-1) && n<0.9) continue; var zxKuSwc=this.zxKuSwc[E7Zd]; x2=this.parent.iLE54[E7Zd].xN8M1D7; y2=this.parent.iLE54[E7Zd].UhDJ01; d=this.v7G34(x1-x2, y1-y2); if (d0) zxKuSwc.QFJGpq=zxKuSwc.t-this.zxKuSwc[E7Zd-1].t; else zxKuSwc.QFJGpq=zxKuSwc.t; zxKuSwc.x=Math.round(Math.abs(oqt[1])); if (E7Zd>0) zxKuSwc.dx=zxKuSwc.x-this.zxKuSwc[E7Zd-1].x; else zxKuSwc.dx=zxKuSwc.x; if (E7Zd>0) zxKuSwc.s=(3.6*(zxKuSwc.dx/zxKuSwc.QFJGpq)).toFixed(1); else zxKuSwc.s=0; }; } n+=W3I; } console.dir(this.parent.iLE54); var n=0,KQy5,W3I=0.002,oqt,sWE5PE,s,e81kFs=0; for (var E7Zd=0;E7Zd=KQy5 && n<=this.zxKuSwc[E7Zd].start){ s=this.oqt.getValue(n)[6]; if (s>sWE5PE) sWE5PE=s; n+=W3I; } this.zxKuSwc[E7Zd].sWE5PE=sWE5PE; if (sWE5PE>e81kFs && (this.zxKuSwc[E7Zd].type=="TE" || this.zxKuSwc[E7Zd].type=="NSTE")) { e81kFs=sWE5PE; }; } this.e81kFs=e81kFs; }, rkKGj: function(){ var vdqMs2=this.parent.iLE54.length; this.vdqMs2=vdqMs2; this.zxKuSwc=new Array(vdqMs2); for (var E7Zd=0;E7Zd0) this.zxKuSwc[0].WW2w4=this.zxKuSwc[0].x; for (var E7Zd=0;E7Zd=0){ for (E7Zd=0;E7Zd=eR5) break; }; } E7Zd=Math.min(E7Zd,SwEoY7i.length-1); var gwN9L=E7Zd; while (E7Zd>=0 && SwEoY7i[E7Zd][7]==0) E7Zd--; var f85vN=E7Zd+1; E7Zd=gwN9L; SwEoY7i[E7Zd][7]=Math.abs(fOgBX)*SwEoY7i[E7Zd][tLRCVVt]/eR5; var m1U6vN=(f85vN?SwEoY7i[f85vN-1][7]:0); var LZ2Uo=(f85vN?1:0); var rhhOq=(SwEoY7i[gwN9L][7]-m1U6vN)/(gwN9L-f85vN+1); for (var E7Zd=f85vN;E7ZdtFOY68 && d<80){ Xi3Z8=SIKG; break; } tFOY68=d; } SIKG=tLRCVVt; } oqt=this.oqt.getValue(Xi3Z8); d=tmw.util.vBm8(lat,lng,oqt[2],oqt[3],0); YEO5=Xi3Z8; sBD5h4=Xi3Z8; this.rFKQ8M(this.oqt.p,(E7Zd+1),0,YEO5*this.q5lbv); } this.rFKQ8M(this.oqt.p,-(this.parent.suW3ytb+1),0,this.q5lbv); end=new Date().getTime(); console.log(this.CgxUP6+" "+"time for getP:"+(end-start)/1000); this.EQNVW9Y=this.parent.ltO7l6(this.oqt.p,0,7); }, I8S: function(t,n3HtPE){ var n=t/this.zxKuSwc[n3HtPE].q5lbv; var p14v5=(this.zxKuSwc[this.vdqMs2-1].lBF9G-this.zxKuSwc[n3HtPE].lBF9G)*n; var IF6=this.zxKuSwc[n3HtPE].lBF9G+p14v5; var fOVLFBI = this.wUfJN77(IF6); n=this.zxKuSwc[fOVLFBI].skip+IF6; if (this.mIqF) { if (this.parent.C8Uc9.vdic[this.CU0e]){ if (n>=this.parent.C8Uc9.vdic[this.CU0e].n && n!=this.cBT2G){ this.cBT2G=n; var domain=this; var fVU=domain.parent.C8Uc9.vdic[domain.CU0e].index; var target=domain.parent.C8Uc9.HGWuSRq[fVU]; if (target.LfMO4.type in domain.parent.KcLUfK) { target.YP0NN1(); target.show(); domain.parent.xXMD.iDtr6HN(fVU); } if (domain.CU0e=this.zxKuSwc[this.vdqMs2-1].start) { this.parent.cVf(this.GR6LFh,this.CgxUP6,fOVLFBI); this.z32K=true; return; } var oqt=this.oqt.getValue(n); var x=Math.round(Math.abs(oqt[1])); var KnsE=Math.round(oqt[4]); if (fOVLFBI!=this.fOVLFBI) { if (fOVLFBI-this.fOVLFBI > 1) this.parent.cVf(this.GR6LFh,this.CgxUP6,fOVLFBI-1); else this.parent.cVf(this.GR6LFh,this.CgxUP6,fOVLFBI); this.fOVLFBI=fOVLFBI; } var c; if (this.parent.H717Yh) c=this.C8Uc9.Xkl2Ui(oqt[2],oqt[3]); else c=this.C8Uc9.ZRTXn(new GLatLng(oqt[2],oqt[3]),true); if (this.lbFOHR != c.x || this.KWciXaE != c.y) { if (!this.MyXaf8) { var domain=this; this.MyXaf8=setTimeout(function(){ if (domain.sip%16!=0) { if (c.isIn) { if (!domain.visible) { domain.PKzY.setFill(domain.zG3Ku4); domain.visible=true; } if (domain.isSvg) { domain.eSC27.setAttribute("cx",c.x); domain.eSC27.setAttribute("cy",c.y); } else domain.PKzY.setTransform({dx:c.x, dy:c.y}); } else { if (domain.visible) { domain.PKzY.setFill(domain.q9BFC); domain.visible=false; }; }; } if (domain.parent.autoFocus && domain.GR6LFh==domain.parent.Bn9jfb && domain.sip%80==0){ var BE1=dojo.position(domain.parent.O08ku); var wDC=domain.parent.iXRl4; if (BE1.x+c.x > wDC.w*0.8 || BE1.x+c.x < wDC.w*0.2 || BE1.y+c.y > wDC.h*0.8+100 || BE1.y+c.y < wDC.h*0.2+100) { domain.C8Uc9.O2J42T.panTo(new GLatLng(oqt[2],oqt[3])); }; } if (domain.sip++%16!=0) { domain.MyXaf8=null; return; } var mDxD=Math.round(domain.z0bJ7*x + domain.ObfKFgb); if (domain.i6FU != mDxD) { domain.i6FU=mDxD; if (domain.isSvg) { domain.IKPTN.setAttribute("x",mDxD); } else { domain.VXK.setTransform({dx:mDxD}); }; } domain.MyXaf8=null; }, 1); } this.lbFOHR=c.x; this.KWciXaE=c.y; } this.curr.b2F=x; this.curr.poSQd=oqt[5]; this.curr.v=oqt[6]; this.curr.cTIF=oqt[7]; return x; } }); dojo.declare(tmw.util.sym.cUV25, null,{ y78: 1, Pl7M: 21, r: 16, constructor: function(id,color){ var XsF6DI=[],aVQKO=[],mrXYhg8=[]; XsF6DI[0]=color[0];XsF6DI[1]=color[1];XsF6DI[2]=color[2];XsF6DI[3]=0.2; aVQKO[0]=color[0];aVQKO[1]=color[1];aVQKO[2]=color[2];aVQKO[3]=1.0; mrXYhg8[0]=color[0];mrXYhg8[1]=color[1];mrXYhg8[2]=color[2];mrXYhg8[3]=0.5; this.surface=dojox.gfx.createSurface(dojo.byId(id), 2*(this.y78+this.r), this.Pl7M); this.surface.createPath().moveTo(this.y78,this.Pl7M).arcTo(this.r,this.r,0,false,true,{x:this.y78+2*this.r,y:this.Pl7M}) .setFill(XsF6DI).setStroke({color: aVQKO,width:2}); var grp=this.surface.createGroup(); this.XCJi=grp.createPath().moveTo(this.y78+1,this.Pl7M).arcTo(this.r-1,this.r-1,0,false,true,{x:this.y78+1+2*(this.r-1),y:this.Pl7M}).setFill(mrXYhg8); }, setValue: function(JIRy){ this.XCJi.setTransform([dojox.gfx.matrix.rotategAt(JIRy,this.y78+this.r,this.Pl7M)]); }, hide: function(){ dojo.style(this.surface.rawNode,"visibility","hidden"); }, show: function(){ dojo.style(this.surface.rawNode,"visibility","visible"); }, remove: function(){ this.surface.clear(); this.surface.rawNode.parentNode.removeChild(this.surface.rawNode); } }); dojo.declare(tmw.util.sym.jIt4g, null,{ constructor: function(id){ this.surface=dojox.gfx.createSurface(dojo.byId(id), 44, 8); this.surface.createPath().moveTo(0,0).lineTo(44,0).lineTo(44,8).lineTo(0,8).lineTo(0,0) .setFill([0, 0, 255, 0.4]).setStroke({color: [0,0,255,1.0],width:2}); var grp=this.surface.createGroup(); this.bm1d6=grp.createRect({x:1,y:1,width:43,height:7}).setFill([51, 175, 255, 1.0]); this.bm1d6.setTransform([dojox.gfx.matrix.scale({x:0.0, y:1.0})]); this.wWo5=200; this.g0731I=[ [0,191,25,1.0], [0,223,30,1.0], [0,255,34,1.0], [181,255,0,1.0], [244,255,0,1.0], [255,232,0,1.0], [255,195,0,1.0], [255,150,0,1.0], [255,130,0,1.0], [255,100,0,1.0], [255,70,0,1.0], [255,0,0,1.0], [255,0,180,1.0] ]; }, setValue: function(p){ var a57=(p-60)/(this.wWo5-60); if (a57<0) a57=0; var c=Math.round(p/10)-8; if (c<0) c=0; this.bm1d6.setTransform([dojox.gfx.matrix.scale({x:a57, y:1.0})]).setFill(this.g0731I[c]); }, hide: function(){ dojo.style(this.surface.rawNode,"visibility","hidden"); }, show: function(){ dojo.style(this.surface.rawNode,"visibility","visible"); }, remove: function(){ this.surface.clear(); this.surface.rawNode.parentNode.removeChild(this.surface.rawNode); } }); dojo.declare(tmw.util.sym.IMI5Q,null,{ r84C: 1000, hh2o: 6, s1wD1: 50, Lbii1I: 1000, gPdQy: [255,255,51,0.8], XPT7: [204,204,255,0.8], rOLKRK: 20, oJNm: 0, NT6AA: [], C8Uc9: null, points: null, MR7F: null, MQc72E: null, JE4OpY: null, MR7F: null, dUoM: false, T6NLCb: null, ndU2kb: null, u2B1: null, index:null, BVj0Jg: true, iAQE1:false, gOJq:null, xfw:null, yN3Xc:null, MXo4:{xN8M1D7:[],UhDJ01:[],index:[]}, kF426O:null, SnJIiPE:null, RrEwOD:dojox.lang.functional, QO267PT: 1, fE9: 1, offsetX: 0, offsetY: 0, H8IA: false, co85K: null, fP1AB3:0, P3IWd:0, rtN:0, constructor: function(C8Uc9,rootId,uLBRl,tDlJ6n,eQ5JJKK,W54,bQTfR4h){ this.C8Uc9=C8Uc9; this.rootId=rootId; this.uLBRl=uLBRl; this.tDlJ6n=tDlJ6n; this.eQ5JJKK=eQ5JJKK; this.sNS8DM=dijit.byId(this.eQ5JJKK).canvas; this.c47JJ8I=dijit.byId(this.rootId+"datapanel"); this.y97J=dojo.byId(this.rootId+"datapanel"); this.Wb6x=dijit.byId(this.rootId+"mshoweledetails"); this.W54=W54; this.GC36Q=null; this.elevation=new Object(); this.Pw3TLt=setInterval(dojo.hitch(this,this.XI1w),this.r84C); this.eABy9(); var domain=this; dijit.byId(this.eQ5JJKK).show(function(){ domain.GC36Q= new dojox.charting.Chart2D(domain.tDlJ6n); domain.GC36Q.setTheme(dojox.charting.themes.PlotKit.tmw); domain.GC36Q.addAxis("x", {fixLower: "minor",natural:true,font:"italic normal bold 6pt Tahoma"}); domain.GC36Q.addAxis("y", {vertical:true,min:0,max:1,fixUpper:"major",includeZero:false,font:"italic normal bold 6pt Tahoma"}); domain.GC36Q.addPlot("default", {type: "Areas"}); domain.GC36Q.addPlot("grid", {type: "Grid",hMajorLines:true,vMajorLines:false}); domain.GC36Q.addSeries("elevation", [0,0], {stroke: {color: "#0f0", width: 1}, fill: "#489e2b"}); }); this.aG88 = dojo.connect(this.GC36Q,"render",this,function(){ this.setDimensions(); setTimeout(dojo.hitch(this, function(){ dojo.forEach(this.C8Uc9.BT5PDB.s.TGXIkx, function(p){ p.Y1S529(); }); if (this.C8Uc9.vp4R && this.C8Uc9.vp4R.index!=0) setTimeout(dojo.hitch(this,function(){ this.sKhfEt(this.C8Uc9.vp4R.index); }),2000); this.Pil3(); }),100); }); if (this.c47JJ8I){ dojo.connect(this.c47JJ8I,"onHide",this,function(){ var SwEoY7i=dojo.marginBox(this.eQ5JJKK); if (!this.fP1AB3){ dojo.style(this.c47JJ8I.containerNode,"height","9.4em"); var b=dojo.marginBox(this.c47JJ8I.containerNode); this.fP1AB3=b.h; } dojo.style(dojo.byId(this.eQ5JJKK),"height",(SwEoY7i.h-this.fP1AB3+17)+"px"); dojo.style(this.y97J,"height","17px"); this.c47JJ8I.attr('title',Q234); this.Wb6x.attr('checked',false); }); dojo.connect(this.c47JJ8I,"onShow",this,function(){ var SwEoY7i=dojo.marginBox(this.eQ5JJKK); if (!this.fP1AB3){ dojo.style(this.c47JJ8I.containerNode,"height","9.4em"); var b=dojo.marginBox(this.c47JJ8I.containerNode); this.fP1AB3=b.h; } dojo.style(dojo.byId(this.eQ5JJKK),"height",(SwEoY7i.h+this.fP1AB3-17)+"px"); dojo.style(this.y97J,"height",this.fP1AB3+"px"); dojo.style(this.c47JJ8I.containerNode,"height","9.4em"); this.c47JJ8I.attr('title',lYHh); this.Wb6x.attr('checked',true); }); dojo.style(this.c47JJ8I.containerNode,"height","9.4em"); var weYqS=dijit.byId(dojo.query(".dojoxResizeHandle",this.eQ5JJKK)[0].id); weYqS.minSize={ w: 400, h: 200 }; } this.y3iP = dojo.connect(dijit.byId(this.eQ5JJKK),"resize",this,function(){ var domain=this; if (this.eSMT) { clearTimeout(this.eSMT); } this.eSMT=setTimeout(function(){ var h,w; if (domain.c47JJ8I) { var yRL6=dojo.marginBox(dijit.byId(domain.eQ5JJKK).canvas); var T6GB=dojo.marginBox(domain.y97J); w=yRL6.w; h=yRL6.h-T6GB.h; dojo.style(dojo.byId(domain.rootId+"ele"),"height",h+"px"); dojo.style(domain.c47JJ8I.containerNode,"height","9.4em"); var b=dojo.marginBox(domain.c47JJ8I.containerNode); if (b.h!=0) domain.fP1AB3=b.h; } else { var Vn60k1 = dojo.marginBox(dojo.byId(domain.uLBRl)); w=Vn60k1.w; h=Vn60k1.h; } if (w!=domain.rtN || h!=domain.P3IWd){ domain.GC36Q.resize(w,h); domain.P3IWd=h; domain.rtN=w; } domain.Pil3(); domain.eSMT=null; },1000); }); UPOM0VI=dojo.byId(this.tDlJ6n); if(UPOM0VI){ dojo.connect(UPOM0VI, "onmousedown", this, this.onMouseDown); dojo.connect(UPOM0VI, "onmousemove", this, this.onMouseMove); dojo.connect(UPOM0VI, "onmouseup", this, this.onMouseUp); } if (this.eQ5JJKK) { this.CdI2W=[]; dojo.forEach(["infolat","infolng","infoele","infodist","infotime", "infospeed","infoavgspeed","infoegp","infoegm", "infotime2","infoavgspeed2","infohr"], function(name) { if (dojo.byId(this.rootId+name)) this.CdI2W.push(dojo.byId(this.rootId+name).childNodes[0]); }, this); dojo.connect(dijit.byId(this.rootId+"elecb"),"onChange",function(eR5){ domain.H8IA=eR5; }); } this.isSvg=(dojox.gfx.renderer == "svg"); this.ldL(); this.RDP(); this.rVQLI(bQTfR4h); this.AkV7T=true; }, vwKHgdK: function(JQAXUI,IE1G2,tfN14Vg){ if (IE1G2==tfN14Vg) tfN14Vg+=1; this.Os8sCP(IE1G2,tfN14Vg); this.GC36Q.axes.y.opt.min=this.GC36Q.axes.y.opt.from=IE1G2; this.GC36Q.axes.y.opt.max=this.GC36Q.axes.y.opt.to=tfN14Vg; this.GC36Q.updateSeries("elevation", JQAXUI); this.GC36Q.fullRender(); } , eABy9: function(){ if (this.NT6AA.length>0){ return; } log("Subscribing elevation manager topics"); this.NT6AA.push(dojo.subscribe(this.C8Uc9.rG6G, this,this.WYvS)); this.NT6AA.push(dojo.subscribe(this.C8Uc9.RoVLnG, this,this.FTg1S)); this.NT6AA.push(dojo.subscribe(this.C8Uc9.vREK, this,this.D4L)); this.NT6AA.push(dojo.subscribe(this.C8Uc9.JPGBo, this,this.sX0G2T)); } , eyC4S: function(){ log("Unsubscribing elevation manager topics"); for (var n=0;n0) { var xxDS=bQTfR4h.data; this.points=new Array(xxDS.length); for (var n=0;n1) { } else { dijit.byId(this.eQ5JJKK).minimize(); if (this.points.length==0) this.reset(); } } , reset: function() { console.log("Ele manager reset"); delete this.points; delete this.MR7F; delete this.yTVD; delete this.ndU2kb; delete this.u2B1; this.points=[]; this.MR7F=[]; this.yTVD=[]; this.ndU2kb=[]; this.u2B1=[]; this.hEz8h6(); this.GC36Q.updateSeries("elevation", [0,0]); this.GC36Q.fullRender(); this.ACTb=false; } , update: function(){ this.GC36Q.setWindow(this.QO267PT, this.fE9, this.offsetX, this.offsetY).render(); this.setDimensions(); } , onMouseDown: function(KnsE){ this.SnJIiPE = {x: KnsE.clientX, y: KnsE.clientY, HE6: this.offsetX, z3Fgye: this.offsetY}; dojo.stopEvent(KnsE); } , onMouseUp: function(KnsE){ if(this.SnJIiPE){ this.SnJIiPE = null; this.setDimensions(); dojo.stopEvent(KnsE); } } , onMouseMove: function(KnsE){ var XR2NM=KnsE.clientX; var DjQ7=KnsE.clientY; if (!this.VJFc74 && this.GC36Q.axes.x) { var domain=this; this.VJFc74=setTimeout(function(){ if(domain.SnJIiPE){ var dx = XR2NM - domain.SnJIiPE.x, dy = DjQ7 - domain.SnJIiPE.y; var HE6 = domain.SnJIiPE.HE6 - dx; var z3Fgye = domain.SnJIiPE.z3Fgye + dy; var JwB4Q=domain.GC36Q.axes.x.getScaler().bounds; var nYR4M7=domain.GC36Q.axes.y.getScaler().bounds; domain.GC36Q.setWindow(domain.QO267PT, domain.fE9, HE6, z3Fgye).render(); var XVy=domain.GC36Q.axes.x.getScaler().bounds; var SDRhdy=domain.GC36Q.axes.y.getScaler().bounds; if ( XVy.from != JwB4Q.from || XVy.to != JwB4Q.to || SDRhdy.from != nYR4M7.from || SDRhdy.to != nYR4M7.to ) { domain.setDimensions(); domain.offsetX = HE6; domain.offsetY = z3Fgye; }; } else { if (domain.GC36Q.axes.x && domain.elevation.oqt) { var JwB4Q=domain.GC36Q.axes.x.getScaler().bounds; var c=dojo.coords(domain.sNS8DM); var x=XR2NM-c.x, wjkw14, a57; if (x(domain.elevation.offsets.l+JwB4Q.span)) { x=domain.elevation.offsets.l+JwB4Q.span; KNXX7=JwB4Q.to/(JwB4Q.upper-JwB4Q.lower); } else { wjkw14=JwB4Q.from + (x-domain.elevation.offsets.l)/JwB4Q.scale; KNXX7=wjkw14/(JwB4Q.upper-JwB4Q.lower); } domain.WFn4(KNXX7,domain.CdI2W,x); }; } domain.VJFc74=null; },100); } dojo.stopEvent(KnsE); } , zoomIn: function(KnsE) { if (this.fE9<10) { this.QO267PT++; this.fE9++; } this.update(); dojo.stopEvent(KnsE); this.SnJIiPE=null; } , zoomOut: function(KnsE) { if (this.fE9>1) { this.QO267PT--; this.fE9--; } if (this.fE9==1) { this.offsetX=0; this.offsetY=0 } this.update(); dojo.stopEvent(KnsE); this.SnJIiPE=null; } , Cn4R: function(KnsE) { this.update(); dojo.stopEvent(KnsE); this.SnJIiPE=null; } , oW3ND: function(data){ var tLRCVVt=0,oqt=new Array(),DNFdg7; if (data[data.length-1].t - data[0].t > 0) DNFdg7=true; else DNFdg7=false; dojo.forEach(data,dojo.hitch(this,function(o){ var x=Number(o.x); if (DNFdg7) t=Number(o.t); else t=0; oqt[tLRCVVt]=[x,Number(o.KnsE),Number(o.xN8M1D7),Number(o.UhDJ01),t,Number(o.poSQd)]; this.MR7F[tLRCVVt].x=o.x; tLRCVVt++; })); return oqt; }, g11R3: function(oqt,k2O9){ var i4r1R0 = new tmw.math.curves.WI38wc(oqt,0.2); var tTB = new Array(); var ME8HF76=0.0,W3I=0.0001,p=[],mDxD=0; var v9F0,RG9QZ,MYGF0,sBD5h4,pNg47Oq,HxWNG2,u6qI,mRv4; var b6a6l=300,rFCV,WW3OL,C2AFAi,eN8YM=0; var dx,x=i4r1R0.getValue(1.0)[0]; dx=x/oqt.length; W3I=1/oqt.length; var XsV5=dx*0.2; var nB3o; while (ME8HF76 < 1.0) { p=i4r1R0.XNU7FA(ME8HF76,0); nB3o=ME8HF76; if (p[0]>=mDxD) { tWY09I=p[0]-mDxD; if (tWY09I>XsV5) { dWUC=ME8HF76-W3I; JQ631p=ME8HF76; tWY09I=p[0]-mDxD; while (tWY09I>XsV5 || tWY09I<-XsV5) { p=i4r1R0.XNU7FA(JQ631p,0); nB3o=JQ631p; c0ERI=p[0]; if (c0ERI>mDxD) { JQ631p=(JQ631p+dWUC)/2; } else { lJhO=JQ631p; JQ631p=JQ631p+(JQ631p-dWUC)/2; dWUC=lJhO; } tWY09I=c0ERI-mDxD; continue; } ME8HF76+=JQ631p-dWUC; } else { ME8HF76+=W3I; } p=i4r1R0.getValue(nB3o); if (mDxD==0) { rFCV=p[1]; WW3OL=C2AFAi=0; } else { if ((p[0]-eN8YM) >= b6a6l){ if (p[1]>rFCV) WW3OL+=(p[1]-rFCV); else C2AFAi+=(p[1]-rFCV); eN8YM=p[0]; rFCV=p[1]; }; } tTB.push([p[0],p[1],p[2],p[3],p[4],0,WW3OL,C2AFAi, 0, p[5]]); mDxD+=dx; } else { ME8HF76+=W3I; }; } p=i4r1R0.getValue(1.0); if (mDxD != tTB[tTB.length-1][0]) { if (p[1]>rFCV) WW3OL+=(p[1]-rFCV); else C2AFAi+=(p[1]-rFCV); tTB.push([p[0],p[1],p[2],p[3],p[4],0,WW3OL,C2AFAi,0,p[5]]); } var n=tTB.length,bNU,mRv4; var c93VV=F40qhK=Xi3g=0; for (var E7Zd=1;E7Zd=0 && v<2) { tTB[E7Zd][8]=tTB[E7Zd-1][8]; Xi3g+=tTB[E7Zd][4]-tTB[E7Zd-1][4]; } else tTB[E7Zd][8]=tTB[E7Zd][4]-Xi3g; } tTB[n-1][8]=tTB[n-1][4]-Xi3g; if (k2O9==1) { log("flattening srtm elevation"); this.VM81(); this.sBXP5L(); if (0) { var jYnU=0.2; MYGF0=tTB[1][0]; RG9QZ=tTB[1][1]; u6qI=(tTB[1][1]-tTB[0][1])/(tTB[1][0]-tTB[0][0]); for (var E7Zd=2; E7Zd jYnU) { if (HxWNG2>0) { pNg47Oq=Math.min(jYnU,HxWNG2)*(sBD5h4-MYGF0)+RG9QZ; } else { pNg47Oq=RG9QZ-Math.min(jYnU,Math.abs(HxWNG2))*(sBD5h4-MYGF0); } tTB[E7Zd][1]=pNg47Oq; } HxWNG2=(pNg47Oq-RG9QZ)/(sBD5h4-MYGF0); u6qI=(pNg47Oq-RG9QZ)/(sBD5h4-MYGF0); MYGF0=sBD5h4; RG9QZ=pNg47Oq; } for (var E7Zd=1; E7Zd tTB[E7Zd+1][1]) || (tTB[E7Zd-1][1] > tTB[E7Zd][1] && tTB[E7Zd][1] < tTB[E7Zd+1][1]) ) { tTB[E7Zd][1]=(tTB[E7Zd-1][1]+tTB[E7Zd+1][1])/2; }; } var y39MEn4,iI2; var wXhB=4; for (var E7Zd=wXhB; E7Zd tTB[E7Zd-wXhB][1]) y39MEn4=true; else y39MEn4=false; if (tTB[tLRCVVt][1] < tTB[E7Zd-wXhB][1]) iI2=true; else iI2=false; } if (y39MEn4 || iI2) { for (var tLRCVVt=E7Zd-wXhB+1; tLRCVVt0) this.u2B1.push(pt); else this.JoF62(pt); } , D4L: function(index, erj){ if (this.C8Uc9.hAHVF5.rkZU371) return; var pt=this.points[index]; this.points.splice(index,1); this.C8Uc9.LqB(index,this.points); this.FZYEX=true; } , WYvS: function(index, JF1, IC4mN){ if (this.C8Uc9.hAHVF5.rkZU371) return; var pt=this.points[index]; pt.xN8M1D7+=(+JF1); pt.UhDJ01+=(+IC4mN); if (this.dUoM || this.u2B1.length>0) this.u2B1.push(pt); else this.JoF62(pt); } , sX0G2T: function(type){ if (this.C8Uc9.hAHVF5.rkZU371) return; if (type==this.C8Uc9.hAHVF5.fxtC0O4) this.dUoM=true; else { this.dUoM=false; this.W35w(); } } , W35w: function(){ var n=this.u2B1.length; var xN8M1D7=new Array(n); var UhDJ01=new Array(n); var index=new Array(n); for (var E7Zd=0;E7Zd 200) { this.MR7F=this.fill(this.MR7F,o); } if (!this.FZYEX) { if (o.tJGTV < 200) { console.warn("short points distance("+o.tJGTV+"), using gain flattening, please check track type"); this.WN4QXp(); } this.vwKHgdK(this.MR7F,o.IE1G2,o.tfN14Vg); } this.BVj0Jg=true; this.ACTb=true; } } , VM81: function(){ this.WN4QXp(); this.GC36Q.updateSeries("elevation", this.MR7F); this.GC36Q.fullRender(); } , sBXP5L: function(){ this.jKlQlf8(); this.GC36Q.updateSeries("elevation", this.MR7F); this.GC36Q.fullRender(); } , fill: function(r7aLP,properties){ if (this.T6NLCb.length>this.Lbii1I) { this.T6NLCb={}; this.T6NLCb.length=0; } var d=properties.d; var ME8HF76=Math.round(d/this.s1wD1); for (var E7Zd=1;E7Zd0) { r7aLP=tWP.slice(); this.ndU2kb=tWP.slice(); } var d=this.GRW(tWP); if (r7aLP.length>1) { dojo.fadeOut({ node: this.W54, duration:2000 }).play(); this.iAQE1=false; }; } else { if (this.ndU2kb.length>0) { r7aLP=this.ndU2kb.slice(); } if (!this.iAQE1) { dojo.fadeIn({ node: this.W54, duration:2000 }).play(); this.iAQE1=true; }; } return r7aLP; } , ayTCEE: function(e2UgJK3,IQUT4,MLOGK) { var TITUu0=MLOGK.xN8M1D7-IQUT4.xN8M1D7; var b210jsn=MLOGK.UhDJ01-IQUT4.UhDJ01; cBZW=TITUu0/(e2UgJK3+1); wYG3=b210jsn/(e2UgJK3+1); var ujx=IQUT4.xN8M1D7+cBZW; var S6L5K=IQUT4.UhDJ01+wYG3; var xN8M1D7=ujx; var UhDJ01=S6L5K; cBZW=cBZW; wYG3=wYG3; var key=this.TdrE(xN8M1D7,UhDJ01); if (!this.T6NLCb[key]) { var O8JYE={ xN8M1D7:xN8M1D7, UhDJ01:UhDJ01, TITUu0:cBZW, b210jsn:wYG3, n:e2UgJK3 }; this.T6NLCb[key]=new Object(); this.T6NLCb[key].status="REQ"; this.T6NLCb[key].ANL=0; this.N5ig(O8JYE); } else { } } , otGO: function(p8lYB){ try { var UFPGig=p8lYB.data.length; var lat=+p8lYB.xN8M1D7; var lb15Y=+p8lYB.UhDJ01; var TITUu0=+p8lYB.TITUu0; var b210jsn=+p8lYB.b210jsn; for (var E7Zd=0;E7Zdto) { var UPOM0VI=to; to=from; from=UPOM0VI; StRoo=-1; } if (to==from) return 0; var data=this.points; if (!data[to]) return 0; var p = 3.1415926535898/180; var r = 6371; var EmXP3G = 2*r*1000; var tYc = data[from].xN8M1D7*p; var P2n8 = data[from].UhDJ01*p; var J8Q = Math.cos(tYc); var LiYz,QpUjOVT,jlib2B,K5HM,o1C5HqN,O1PnY,SwEoY7i,d=dx=0; for (var E7Zd=from+1;E7Zd<=to;E7Zd++) { LiYz = tYc; QpUjOVT = P2n8; eD3L = J8Q; jlib2B = data[E7Zd].xN8M1D7*p; K5HM = data[E7Zd].UhDJ01*p; QrAg98L = Math.cos(jlib2B); o1C5HqN = jlib2B-LiYz; O1PnY = K5HM-QpUjOVT; SwEoY7i = Math.sin(o1C5HqN/2) * Math.sin(o1C5HqN/2) + eD3L * QrAg98L * Math.sin(O1PnY/2) * Math.sin(O1PnY/2); dx = EmXP3G*Math.atan2(Math.sqrt(SwEoY7i), Math.sqrt(1-SwEoY7i)); d += dx; tYc = jlib2B; P2n8 = K5HM; J8Q = QrAg98L; } return StRoo*d.toFixed(0); } , WN4QXp: function() { var UFPGig=this.MR7F.length; if (UFPGig==1) return; var jYnU=0.2, lX52, sy3M, OEs7l, yITG, u6qI, x, KnsE, HxWNG2, mRv4, dx; for (var E7Zd=0;E7Zd jYnU) { if (HxWNG2>0) { mRv4=(HxWNG2-jYnU)/2; KnsE=Math.min(jYnU,HxWNG2)*dx+yITG; } else { mRv4=(-HxWNG2-jYnU)/2; KnsE=yITG-Math.min(jYnU,Math.abs(HxWNG2))*dx; } this.MR7F[E7Zd].y=Math.round(KnsE); if (this.MR7F[E7Zd].hasOwnProperty(tmw.util.props.index)){ this.points[this.MR7F[E7Zd].index].KnsE=Math.round(KnsE); }; } } } , dWP: function() { var KnsE,rFCV,LCVBH,IG3ny,eN8YM,x1; for (var E7Zd=1; E7Zd IG3ny) || (rFCV > LCVBH && LCVBH < IG3ny) ) { KnsE=rFCV+(IG3ny-rFCV)*UsdP; this.MR7F[E7Zd].y=Math.round(KnsE); if (this.MR7F[E7Zd].hasOwnProperty(tmw.util.props.index)) { this.points[this.MR7F[E7Zd].index].KnsE=Math.round(KnsE); }; }; } if (this.MR7F[E7Zd].hasOwnProperty(tmw.util.props.index)) this.points[this.MR7F[E7Zd].index].y7qTD=false; } } , jKlQlf8: function() { var y39MEn4,iI2; var E7Zd=0,tLRCVVt; for (var d=80;d<=160;d+=40) { E7Zd=0; while (E7Zd3) { if ( Math.abs(this.MR7F[E7Zd+tLRCVVt-1].y-this.MR7F[E7Zd].y) < 2 ) { for (var DC82A=1; DC82A this.MR7F[E7Zd].y) y39MEn4=true; else y39MEn4=false; if (this.MR7F[E7Zd+DC82A].y < this.MR7F[E7Zd].y) iI2=true; else iI2=false; } if (y39MEn4 || iI2) { for (var DC82A=1; DC82A=this.points.length) { this.hEz8h6(); return; } var d=this.getDistance(0,index); var WcT2i=this.LY9(d,this.points[index].KnsE); if (!this.xfw) { this.xfw=this.elevation.surface.createCircle({cx:WcT2i.y,cy:WcT2i.y,r:5}).setFill(this.XPT7); dojo.style(this.xfw.rawNode,"visibility","visible"); } else { dojo.style(this.xfw.rawNode,"visibility","visible"); this.xfw.setTransform({dx:WcT2i.x,dy:WcT2i.y}); } } , r1U24: function(x){ if (!this.yN3Xc) { var h=this.elevation.dim.height - this.elevation.offsets.b - this.elevation.offsets.t; this.yN3Xc=this.elevation.surface.createLine({x1:0,y1:0,x2:0,y2:h}) .setFill(this.gPdQy).setStroke({color: this.gPdQy,width:2}); this.pwD0=this.yN3Xc.rawNode; } else { dojo.style(this.yN3Xc.rawNode,"visibility","visible"); if (this.isSvg) { this.pwD0.setAttribute("x1",x); this.pwD0.setAttribute("y1",this.elevation.offsets.t); this.pwD0.setAttribute("x2",x); this.pwD0.setAttribute("y2",this.elevation.dim.height-this.elevation.offsets.b); } else this.yN3Xc.setTransform({dx:x, dy:this.elevation.offsets.t}); } } , ldL: function(){ if (this.yN3Xc) dojo.style(this.yN3Xc.rawNode,"visibility","hidden"); } , DXCX: function(lat,lng){ if (!this.YC7fq) { this.YC7fq=new X35QK.uTf8(this.C8Uc9, lat, lng, true, null, this.C8Uc9.s6ZZB, true); dojo.connect(this.C8Uc9,"redrawPOIs",this,function(){ if (!this.nPw1) this.YC7fq.YP0NN1(); }); } else { this.YC7fq.F9L8=new GLatLng(lat,lng); } if (this.nPw1) { this.YC7fq.show(); this.nPw1=false; } var domain=this; if (this.hJYT3QE) clearTimeout(this.hJYT3QE); this.hJYT3QE=setTimeout(function(){ domain.RDP(); domain.ldL(); domain.hJYT3QE=null; },4000); this.YC7fq.YP0NN1(); if (this.H8IA){ if (this.EDR0) clearTimeout(this.EDR0); this.EDR0=setTimeout(function(){ domain.C8Uc9.O2J42T.panTo(domain.YC7fq.F9L8); },400); } } , RDP: function(){ if (this.YC7fq) { this.YC7fq.hide(); this.nPw1=true; } } , hEz8h6: function(){ if (this.xfw) dojo.style(this.xfw.rawNode,"visibility","hidden"); } , setSelected: function(pt){ if (this.points[pt.index]) { var d=this.getDistance(0,pt.index); if (!this.elevation.surface) return; var WcT2i=this.LY9(d,this.points[pt.index].KnsE); if (!this.gOJq) { this.gOJq=this.elevation.surface.createCircle({cx:WcT2i.y,cy:WcT2i.y,r:5}).setFill(this.gPdQy); dojo.style(this.gOJq.rawNode,"visibility","visible"); } else { dojo.style(this.gOJq.rawNode,"visibility","visible"); this.gOJq.setTransform({dx:WcT2i.x,dy:WcT2i.y}); }; } } , deselect: function(pt){ if (this.gOJq) dojo.style(this.gOJq.rawNode,"visibility","hidden"); } , LY9: function(d,KnsE){ var x=0,y=0; if (this.elevation.offsets) { x=Math.round(this.elevation.z0bJ7 * (d-this.elevation.jLMkx) + this.elevation.offsets.l); if (KnsE) y=Math.round(this.elevation.dim.height - this.elevation.offsets.b - this.elevation.kUik * (KnsE-this.elevation.DZ4W)); } return { x:x, y:y}; } , XNCTNJ: function(pt){ if (this.points[pt.index]) if (this.points[pt.index].KnsE) return this.points[pt.index].KnsE; else return "n/a"; } , RV7K: function(){ var xN8M1D7,UhDJ01; log("Ele-Manager: Performing consistency check on "+this.points.length+" points..."); if (this.points.length!=this.C8Uc9.points.length){ log("Ele-Manager: point mismatch"); return; } for(n=0;n1) { p=1; summary=true; } var oqt=this.elevation.oqt.getValue(p),x,sDxUh,lat,lng,t,v,dLkiO,WW3OL,C2AFAi; x=dojo.number.round(oqt[0]/1000,2); sDxUh=Math.round(oqt[1]); if (summary) { lat="-"; lng="-"; } else { lat=dojo.number.round(oqt[2],4); lng=dojo.number.round(oqt[3],4); this.DXCX(lat,lng); if (eN8YM) this.r1U24(eN8YM); else { var JwB4Q=this.GC36Q.axes.x.getScaler().bounds; var mDxD=Math.round(this.elevation.z0bJ7 * (oqt[0]-this.elevation.jLMkx) + this.elevation.offsets.l - this.elevation.HE6); if (mDxD>=JwB4Q.from && mDxD<=JwB4Q.to) this.r1U24(mDxD); }; } t=oqt[4]; v=Math.round(oqt[5]); if (isNaN(v)) v=0; if (t==0) dLkiO=0; else dLkiO=Math.round(3.6*oqt[0]/oqt[4]); WW3OL=Math.round(oqt[6]); C2AFAi=Math.round(oqt[7]); Y2TK6[0].nodeValue=lat; Y2TK6[1].nodeValue=lng; Y2TK6[2].nodeValue=sDxUh+" m"; Y2TK6[3].nodeValue=x+" km"; if (t==0) { Y2TK6[4].nodeValue="n/a"; Y2TK6[6].nodeValue="n/a"; } else { Y2TK6[4].nodeValue=tmw.util.formatTimeSimple(t); Y2TK6[6].nodeValue=dLkiO+" km/h"; } Y2TK6[5].nodeValue=v+" km/h"; Y2TK6[7].nodeValue=WW3OL+" m"; Y2TK6[8].nodeValue=C2AFAi+" m"; if (oqt[8]==0) { Y2TK6[9].nodeValue="n/a"; Y2TK6[10].nodeValue="n/a"; } else { Y2TK6[9].nodeValue=tmw.util.formatTimeSimple(oqt[8]); Y2TK6[10].nodeValue=(Math.round(3.6*oqt[0]/oqt[8]))+" km/h"; } Y2TK6[11].nodeValue=(Math.round(oqt[9]))+" bpm"; }, nRQIX: function(bQTfR4h){ var i4r1R0=new Array(); var tLRCVVt=0; dojo.forEach(bQTfR4h.data,dojo.hitch(this,function(o){ i4r1R0[tLRCVVt]=[Number(o.x),Number(o.KnsE),Number(o.xN8M1D7),Number(o.UhDJ01),Number(o.t)]; tLRCVVt++; })); var oqt=this.g11R3(i4r1R0,bQTfR4h.k2O9); this.elevation.oqt=oqt; this.WFn4(1.0,this.CdI2W); } }); dojo.declare(tmw.util.sym.GnszrR7,null,{ cG3f: "Slideshow", g66T3: "ThumbPicker", Q5ERj: "poipreview", eHfQ0: "upfiles/", F12Y: "images/video_logo.gif", eJKC7LK: null, rootId: null, bSL: null, urVXy8: null, FSJcE: null, K90CCJ: null, YS6a4X: null, PDN2: null, I58A34: null, list: [], YOD5i6: [], eV9XOQ2: [], gXX3: [], DqEYGS: {large:"images/poi/img3e.png", thumb:"images/poi/img3e.png"}, gVq: "upfiles/Clayman_01.flv", cyN93:0, R6JC:true, nGkPG0:false, constructor: function(eJKC7LK){ this.eJKC7LK=eJKC7LK; this.rootId=eJKC7LK.rootId; this.bSL=this.rootId+this.cG3f; this.urVXy8=this.rootId+this.g66T3; this.PDN2=dijit.byId(eJKC7LK.PDN2); this.FSJcE=dijit.byId(this.bSL); this.K90CCJ=dijit.byId(this.urVXy8); var HLu6=dojo.byId(this.rootId+this.Q5ERj); if (HLu6) this.YS6a4X=HLu6; dojo.subscribe(this.K90CCJ.getClickTopicName(),this,this.EKYjO); dojo.subscribe(this.FSJcE.getShowTopicName(),this,this.a9q1J); dojo.connect(dijit.byId(eJKC7LK.PDN2),"resize",this,function(){ if (this.eSMT) { clearTimeout(this.eSMT); } this.eSMT=setTimeout(dojo.hitch(this,function(){ var node=dojo.byId(eJKC7LK.PDN2); var Vn60k1 = dojo.marginBox(node); this.FSJcE.imageHeight=Vn60k1.h-64; this.FSJcE.imageWidth=Vn60k1.w-8; this.FSJcE.postCreate(); if (this.K90CCJ && this.K90CCJ.thumbScroller) { var w=dojo.marginBox(this.K90CCJ.thumbScroller).w; dojo.style(this.K90CCJ.thumbsNode,"width",w+"px"); this.K90CCJ.resize(); } this.m0OA(); if (this.G5OcT){ dojo.style(this.G5OcT,"width",Vn60k1.w+"px"); dojo.style(this.G5OcT,"height",Vn60k1.h+"px"); } this.eSMT=null; },1000)); }); this.O515JY=dojo.byId(this.rootId+"ytvidback"); if (this.O515JY){ dojo.connect(this.O515JY,"onclick",this,function(){ this.qlLDODd(); }); } this.Eb5Jq=dojo.byId(this.rootId+"vid"); this.kVcb=dojo.byId(this.rootId+"ytvid"); }, j3Y: function(){ this.wYJm9F7(); this.BJhk(); this.list=[]; this.cyN93=0; this.VvRm4fr(); this.qlLDODd(true); }, qlLDODd: function(g72Q){ if (this.I58A34 && this.I58A34.isPlaying) { this.I58A34.pause(); } this.UBs=false; var node=dojo.byId(this.rootId+"ThumbWrapper"); if (node) dojo.fadeIn({ node:node, duration: 750 }).play(); if (this.G5OcT) { if (this.G5OcT.getPlayerState && this.G5OcT.getPlayerState()!=-1) this.G5OcT.stopVideo(); dojo.style(this.G5OcT,"visibility","hidden"); } if (this.O515JY) dojo.style(this.O515JY,"display","none"); dojo.style(this.bSL,"display","block"); if (g72Q) window.onYouTubePlayerReady = null; }, wYJm9F7: function(){ this.eV9XOQ2=[]; this.FSJcE.reset(); }, BJhk: function(){ this.gXX3=[]; this.K90CCJ.reset(); }, jIJVW: function(index){ this.eV9XOQ2[index].visible=false; this.gXX3[index].visible=false; this.cyN93--; if (this.cyN93==0) this.VvRm4fr(); }, VvRm4fr: function(){ if (!this.PDN2._isDocked) this.PDN2.minimize(); this.qJOnH(); }, qJOnH: function(){ var rPUU54V=dojo.query(".imageGalleryThumb", this.K90CCJ.domNode); if (rPUU54V.length>0) { setTimeout(dojo.hitch(this,this.qJOnH),200); return; } return; }, Y4bK: function(media, poi_index, Ai6T49){ var ebB, n; ebB=(media instanceof Array)?media:[media]; for(n=0;n0) dojo.fadeOut({ node:tiQ, duration: 1 }).play(); if (this.UBs) return; switch (Number(xS54.type)){ case 1: if (!this.R6JC || this.nGkPG0){ if (this.I58A34 && this.I58A34.isPlaying) { this.I58A34.pause(); } try { if (this.G5OcT && this.G5OcT.getPlayerState()!=-1){ this.G5OcT.stopVideo(); this.G5OcT.clearVideo(); dojo.style(this.G5OcT,"visibility","hidden"); } } catch(err){} dojo.style(this.Eb5Jq,"zIndex","0"); dojo.style(this.bSL,"display","block"); } this.FSJcE.showImage(xS54.index); this.R6JC=true; this.UBs=false; break; case 2: if (this.R6JC || this.nGkPG0) { dojo.style(this.bSL,"display","none"); dojo.style(this.kVcb,"display","none"); dojo.style(this.Eb5Jq,"display","block"); } this.playVideo(xS54.video); this.R6JC=false; this.UBs=false; break; case 5: dojo.style(this.bSL,"display","none"); dojo.style(this.Eb5Jq,"display","none"); dojo.style(this.O515JY,"display","block"); if (this.G5OcT) dojo.style(this.G5OcT,"visibility","visible"); this.UBs=true; this.playVideo(xS54.video,true); this.R6JC=false; break; }; if (this.nGkPG0) { if (this.YS6a4X) dojo.style(this.YS6a4X,"display","none"); this.nGkPG0=false; } }, playVideo: function(video,Q3t56C0){ console.log("playVideo"); var domain=this; if (Q3t56C0){ if (!this.G5OcT){ window.onYouTubePlayerReady=K4V2RY5; window.d7Jf=function(errorCode) { }; window.iB5=function(EM7qNI) { }; var wCED = { allowScriptAccess: "always" }; var aErR5d = { "id": this.rootId+"ytvid" }; swfobject.embedSWF("http://www.youtube.com/v/"+video+"&enablejsapi=1", this.rootId+"ytvid", "290", "240", "8", null, null, wCED, aErR5d); } else { domain.G5OcT.stopVideo(); domain.G5OcT.clearVideo(); domain.G5OcT.loadVideoById(video); dojo.fadeOut({ node:dojo.byId(domain.rootId+"ThumbWrapper"), duration: 1 }).play(); }; } else if (!this.I58A34){ this.I58A34=new dojox.av.FLVideo({ initialVolume:.1, mediaUrl:video, autoPlay:true, isDebug:false }, this.rootId+"vid"); } else { this.I58A34.play(video); } function K4V2RY5(EmECb2){ domain.G5OcT=document.getElementById(domain.rootId+"ytvid"); if (domain.G5OcT) { domain.G5OcT.addEventListener("onStateChange", "onytplayerStateChange"); domain.G5OcT.addEventListener("onError", "onPlayerError"); domain.G5OcT.playVideo(); dojo.fadeOut({ node:dojo.byId(domain.rootId+"ThumbWrapper"), duration: 1 }).play(); } }; }, xjE: function(dOuL9c5, wtf, EOdGS){ var poi_index; if (dOuL9c5 instanceof Object) poi_index=dOuL9c5.index; else poi_index=dOuL9c5; if (this.s.SwEoY7i.status()=="playing" && this.s.cFqW75) return; if (this.list[poi_index] || wtf) { if (!this.PDN2._isDocked){ if (this.TtuRPv) { clearTimeout(this.TtuRPv); } this.TtuRPv=setTimeout(dojo.hitch(this,function(){ this.TtuRPv=null; if (wtf){ for (var SYgJS1 in this.list[poi_index]){ if (this.list[poi_index][SYgJS1].index==EOdGS){ this.EKYjO(this.list[poi_index][SYgJS1]); break; }; }; } else{ this.EKYjO(this.list[poi_index][0]); } }),1000); } return; } if (poi_index<0){ var media,src; if (dOuL9c5.LfMO4.media && dOuL9c5.LfMO4.media[0]) { media=dOuL9c5.LfMO4.media[0]; src=(media.url?"":this.eHfQ0)+media.file; dojo.style(this.Eb5Jq,"zIndex","0"); dojo.style(this.bSL,"display","none"); dojo.style(this.kVcb,"display","none"); if (this.YS6a4X) { if (this.TtuRPv) { clearTimeout(this.TtuRPv); this.TtuRPv=null; } dojo.style(this.YS6a4X,"display","block"); this.L55YW25(src); this.nGkPG0=true; }; }; } }, iDtr6HN: function(poi_index){ if (!this.list[poi_index]) return; var domain=this; if (this.s.SwEoY7i.status()=="playing") { var E7Zd=0,LEEO4KZ=1500,MMjQ=[]; this.p=this.s.SwEoY7i._percent; console.debug("stopping-"+poi_index+" "+this.p); this.s.SwEoY7i.stop(); domain.TtuRPv=true; for (var SYgJS1 in domain.list[poi_index]){ MMjQ.push(SYgJS1); setTimeout(function(){ var DZjQH=MMjQ.shift(); domain.EKYjO(domain.list[poi_index][DZjQH]); },LEEO4KZ*(E7Zd++)); } setTimeout(function(){ domain.TtuRPv=null; if (domain.s.SwEoY7i.status()!="playing" && domain.s.SwEoY7i._percent!=0){ domain.s.SwEoY7i.gotoPercent(domain.p,true); } },LEEO4KZ*(E7Zd+1)); } }, Z51WT4a: function(){ var l=this.list,SYgJS1,n,rU6UN=false; for (SYgJS1 in l){ for (n in l[SYgJS1]){ if (l[SYgJS1][n].type==5) { rU6UN=l[SYgJS1][n]; this.EKYjO(rU6UN); return; }; }; } }, m6w: function(){ if (this.hbxQm5) { clearTimeout(this.hbxQm5); } this.hbxQm5=setTimeout(dojo.hitch(this,this.F66R7S),1000); }, F66R7S: function(){ var domain=this; if (this.PDN2._isDocked && !RjJ2jS(this.rootId)) { dojo.style(this.PDN2.domNode,"left","-1000px"); this.PDN2.show(function(){ domain.m0OA(); domain.Sv0(); setTimeout(function(){ domain.PDN2.minimize(); setTimeout(function(){ dojo.style(domain.PDN2.domNode,"left","0px"); },2000); },2000); }); } else { this.m0OA(); this.Sv0(); if (this.cyN93==0) setTimeout(dojo.hitch(this,function(){ this.PDN2.minimize(); }),2000); setTimeout(function(){ dojo.style(domain.PDN2.domNode,"left","0px"); },4000); } }, m0OA: function(){ var nHrSGo = new dojo.data.ItemFileReadStore({data: {items:this.eV9XOQ2}}); this.FSJcE.setDataStore(nHrSGo, { query: {visible:true}, count:20 }, { imageThumbAttr: "thumb", imageLargeAttr: "large" } ); this.hbxQm5=null; }, Sv0: function(){ var djI3qX2 = new dojo.data.ItemFileReadStore({data: {items:this.gXX3}}); this.K90CCJ.pageSize=this.cyN93; this.K90CCJ.setDataStore(djI3qX2, { query: {visible:true}, count:20 }, { imageThumbAttr: "thumb", imageLargeAttr: "large" } ); this.E7Zd=0; setTimeout(dojo.hitch(this,this.ucWlC),200); }, ucWlC: function(){ var rPUU54V=dojo.query(".imageGalleryThumb", this.K90CCJ.domNode); if (rPUU54V.length0){ data.items=data.items.concat(X2gF5); } var n=data.items.length; if(C823){ for(SYgJS1 in y43SIk.groups){ data.items.push({ndx:n+"", name:(o.kDfNHUI?n+". G:":"G:")+SYgJS1}); n++; }; } return new dojo.data.ItemFileReadStore({data: data}); }; function h9B(ndx,wIJCE){ for(var n in OpY){ if (OpY[n].id==ndx) return OpY[n].name; } return wIJCE===true?"":eRlD22H; }; function xIV5i(prefix,xPu8J,i7HoC){ if(!OpY)return; var n, d; if (prefix instanceof Array) d={data: {items: prefix}}; else d={data: {items: []}}; if (i7HoC) d.data.identifier=i7HoC; for(var n in OpY){ d.data.items.push({name:OpY[n].name, id:OpY[n].id}); } if (xPu8J) return d.data.items; return new dojo.data.ItemFileReadStore(d); }; function eAyD(LQW4Ug){ if(!y43SIk.q51Nwg || y43SIk.q51Nwg.length==0)return; var d={data: {items: []}}; if (LQW4Ug){ var MBV2JL2=[]; for(var n in y43SIk.q51Nwg){ MBV2JL2.push(y43SIk.q51Nwg[n].type); } d.data.items.push({name: SW6jh5, type: MBV2JL2}); } d.data.items=d.data.items.concat(y43SIk.q51Nwg); return new dojo.data.ItemFileReadStore(d); }; function lKRfU(){ if(!hNCDp)return; var n, d={data: {items: []}}; for(var n in hNCDp){ d.data.items.push({name:hNCDp[n]}); } return new dojo.data.ItemFileReadStore(d); }; function UVrlltL(){ var n, d={data: {items: []}}; for(n in y43SIk.groups){ d.data.items.push({name:n}); } return new dojo.data.ItemFileReadStore(d); }; function r0Z8(field,uwFYgP,X5OiR){ if (!y43SIk.h9uG4r) y43SIk.h9uG4r={}; y43SIk.h9uG4r[field]=uwFYgP; if (X5OiR) return; var QoD26s={}; QoD26s[field]=y43SIk.h9uG4r[field]; dojo.xhrPost({ url: (window.RPQl?RPQl:"")+"scripts/updatePrefs.php", content: {h9uG4r: dojo.toJson(QoD26s)}, handleAs: "text", timeout: 5000, load: function(data){ } }); }; function Q6P67W(name){ if (y43SIk && y43SIk.h9uG4r) { return y43SIk.h9uG4r[name]; } }; function gOjTc4(yd44,PBNm,callback){ return function(){ var u2xE=this.height,Xc1G=this.width,H07FETC; H07FETC=Math.min(PBNm/u2xE,yd44/Xc1G); dojo.style(this,"height","auto"); dojo.style(this,"width",(Xc1G*H07FETC)+"px"); if(callback)callback(); }; }; function inlineImgAdapter(domain,yd44,PBNm){ var u2xE=domain.height,Xc1G=domain.width,H07FETC; H07FETC=Math.min(PBNm/u2xE,yd44/Xc1G); dojo.style(domain,"height","auto"); dojo.style(domain,"width",(Xc1G*H07FETC)+"px"); }; function showHideElement(domain,y1IE,p61F,VLSGID){ if (domain.innerHTML==y1IE){ dojo.style(VLSGID,'display','none'); domain.innerHTML=p61F; }else{ dojo.style(VLSGID,'display','block'); domain.innerHTML=y1IE; } }; function showHideElement2(domain,hidestr,showstr,cls){ var p=domain.parentNode; var spn=dojo.query("."+cls,p)[0]; if (domain.innerHTML==hidestr){ dojo.style(spn,'display','none'); domain.innerHTML=showstr; }else{ dojo.style(spn,'display','block'); domain.innerHTML=hidestr; } }; function tmwclosepoitt(){ if (dijit._masterTT) dijit._masterTT.hide(dijit._masterTT.aroundNode); }; function GYN7yO(lang){ var domain=this; if (lang==tmwLang) return; try { if (Qjhr.wAF) Qjhr.wAF.close(); }catch(err){} dojo.xhrGet({ url: "scripts/jslang.php", content: {"lang": lang}, handleAs: "text", handle: function(data){ var tWY09I=dojo.fromJson(data); if (tWY09I["lang"]==lang){ window.location.reload(true); } } }); }; function fCg5(store,item,D0xXBT,ZLGJK){ var n, SYgJS1, iXl=store.getAttributes(item), ui={}, UPOM0VI; if(typeof(ZLGJK)=="undefined") ZLGJK=0; else if(ZLGJK>10) return ui; for(n=0;n0? U8S8dtX+id+".png": false ); ; lmfB1.MITVRYV.attr("label", dojo.string.substitute(uQKJF,{ "id": id, "imgsrc":c6JGXq2||"", "name":qJ2m8[tmw.util.props.trackname], "owner":qJ2m8[tmw.util.props.tracknick], "type":h9B(qJ2m8[tmw.util.props.trackprofile]), "km":qJ2m8[tmw.util.props.j455bF], "date":qJ2m8[tmw.util.props.E53H], "rating":qJ2m8[tmw.util.props.Y58LxFS]||"0", "israce":(eJKC7LK=="p2"?"true":"false"), "multimedia":qJ2m8[tmw.util.props.N6KLP]||"0", "review":qJ2m8[tmw.util.props.FcYUx5]==1?B9jWPQ:v8fMBy, "comments":qJ2m8[tmw.util.props.YM6Ic]||"0" }) ); lmfB1.MITVRYV.open(eH4vF); } }); }; function CLWoJpB(BWXP,query,j28U3x,callback){ BWXP.getLocations(query, function(data){ var gP2E,tWY09I, msg={ "cc":"", "cn":"", "an":"", "sa":"", "ln":"", "pc":"" }; if (!data || data.Status.code != 200) return; if (!data.Placemark || data.Placemark.length==0) return; gP2E=data.Placemark[0].AddressDetails; try { msg["cc"]=gP2E.Country.CountryNameCode; }catch(err){} try { msg["cn"]=gP2E.Country.CountryName; }catch(err){} try { msg["an"]=gP2E.Country.AdministrativeArea.l35g3; }catch(err){} if (gP2E.Country.AdministrativeArea) { if (gP2E.Country.AdministrativeArea.SubAdministrativeArea){ try { msg["sa"]=gP2E.Country.AdministrativeArea .SubAdministrativeArea.SubAdministrativeAreaName; }catch(err){} try { msg["ln"]=gP2E.Country.AdministrativeArea .SubAdministrativeArea.Locality.LocalityName; }catch(err){} try { msg["pc"]=gP2E.Country.AdministrativeArea .SubAdministrativeArea.Locality.PostalCode.PostalCodeNumber; }catch(err){}; } else if (gP2E.Country.AdministrativeArea.DependentLocality){ try { msg["ln"]=gP2E.Country.AdministrativeArea .DependentLocality.DependentLocalityName; }catch(err){} try { msg["pc"]=gP2E.Country.AdministrativeArea .DependentLocality.PostalCode.PostalCodeNumber; }catch(err){}; } else { try { msg["ln"]=gP2E.Country.AdministrativeArea .Locality.LocalityName; }catch(err){} try { msg["pc"]=gP2E.Country.AdministrativeArea .Locality.PostalCode.PostalCodeNumber; }catch(err){}; }; } else { console.warn ("E: addr.Country.AdministrativeArea is null."); } var o7i7=null; try { o7i7 = dojo.string.substitute(j28U3x,msg); }catch(err){ console.warn ("E: resultSubstitution failed"); } callback(o7i7); } ); }; function q2Y(oBRxi4V){ dojo.query("tr", oBRxi4V).orphan(); }; function addRow(oBRxi4V,p2S,QSuf,qyLWkE,h4F0eI,filter){ var FESO0m=document.createElement("tr"); if (p2S!=null) dojo.addClass(FESO0m,p2S); var sI7t; for(var E7Zd=0;E7Zd *:first-child',this.form); if (!UPOM0VI[0]) return; this.RaUTR7=dijit.byNode(UPOM0VI[0]); if (!this.RaUTR7) return; this.options=options || {}; this.apc_uplkey=null; this.UXNF=UXNF; this.jOG=jOG; this.callback=callback; var f0LUIB=this.form[this.f23]; if (!f0LUIB) return; if (!this.iLP){ try { this.iLP=document.createElement('', VGGGsD="/site/index.php?option=com_comprofiler&user='${user}'", K6Xy, K8687J=null, cue={ "inject_css": "#sidebar, #header, #footer {\ndisplay:none !important;\n}\n #main-body,#wrap,#content {\nwidth:500px !important;float:left !important;}\nbody {background: #FFFFFF !important;}\n" }; ; if (window._JOOMLA_COMPONENT_ONLY){ K6Xy=window._JOOMLA_COMPONENT_ONLY; K8687J=function(){ delete window._JOOMLA_COMPONENT_ONLY; window._JOOMLA_COMPONENT_ONLY=K6Xy; }; } window._JOOMLA_COMPONENT_ONLY=cue; tmwAlert({ title:xFSYY, message:dojo.string.substitute(rUDWYm,{ "user": xFSYY, "url": dojo.string.substitute(VGGGsD,{ "user": xFSYY }) }), w:675, h:605, confirm:true, LgZ81:"Close", eFHn: K8687J }); }; function tmwSendBuzz(xFSYY,KNXL,msg){ if(!msg){ var node=dojo.query(".buzzMsg",this.parentNode); if (node && node[0]){ msg=node[0].value; node[0].value=""; } else { msg=""; }; } if (y43SIk.ijO401L){ alert(qRt3); return; } SVeOhB={c:27, "r": xFSYY }; if (msg) SVeOhB["d"]=msg; if (KNXL) SVeOhB["s"]=KNXL; if (y43SIk.ijO401L){ SVeOhB["g"]=y43SIk.GtJfoOf.substr(0,y43SIk.h4nC3wM); } tmw.util.trackPage("/app/buzz"); dojo.xhrPost({ url: "scripts/msg.php", content: {l:dojo.toJson([SVeOhB])}, handleAs: "text" , timeout: 15000 , load: function(){ alert(dojo.string.substitute(P9R5GJe,{"dest":(xFSYY+(KNXL||""))})); } }); tmwAlert({"close":true}); }; function tmwBuzzIgnore(xFSYY,kkWoff){ var username=xFSYY+(kkWoff||""); if (!y43SIk.WbNZY.k2C) y43SIk.WbNZY.k2C={}; if (this.checked){ y43SIk.WbNZY.k2C[username]=true; } else { delete y43SIk.WbNZY.k2C[username]; } }; function tmwSendPrivmsg(xFSYY){ tmwAlert({close:true}); tmw.util.trackPage("/app/internalmsg"); setTimeout(function(){ initMailDialogFromRootSaver({sM2:xFSYY, subject:""}); },400); }; function hUGk(msg){ var E3DQt6="${user}: ${msg}
", ETI="-system-", label, body, g1J4, gPSuvB, Q04DfR; ; label=dojo.fromJson(msg["data"]["label"]); if (!zwj3cVz.hasOwnProperty(label[0])){ throw Error; } switch(label[0]){ case "FRIENDSHIP_CONFIRMED": g1J4=y88fYF; Q04DfR=dojo.string.substitute(zwj3cVz[label[0]], label[1]); gPSuvB={ "user": msg["src"], "msg": Q04DfR||"" }; y43SIk.KL1u[msg["src"]]=true; if (!window.RHI30) break; RHI30.W0Mv5.fetch({ query: {"username":msg["src"]}, onComplete: function(E7Zd){ if(!E7Zd[0]) return; RHI30.W0Mv5.setValue(E7Zd[0],"confirmed",true); } }); break; case "FRIENDSHIP_REQUEST": g1J4=y88fYF; Q04DfR=dojo.string.substitute(zwj3cVz[label[0]], label[1]); if (y43SIk.KL1u[msg["src"]]!==true){ body=dojo.fromJson(msg["data"]["text"]); Q04DfR+=dojo.string.substitute(B0UuQ,{ "ac":body[1][2], "user":body[1][1], "tmwAcceptFriend":IP4X2P({IG2gT:true}) }); } gPSuvB={ "user": msg["src"], "msg": Q04DfR||"" }; break; default: g1J4=(msg["src"]==ETI)?E3DQt6:y88fYF; Q04DfR=dojo.string.substitute(zwj3cVz[label[0]], label[1]); gPSuvB={ "user": msg["src"], "msg": Q04DfR||"" }; if (label[0]=="CLUB_AUTOFILL"){ var pkEgZ=function(){ var l2R=dojo.string.substitute( n5j,{ "user": y43SIk.me } ); if (CMCp.status>=1){ dojo.xhrPost({ url: "scripts/msg.php", content: {l:dojo.toJson([{ c:14, "a": 1, "id": [msg["id"]] }]) }, timeout: 50000 }); } tmwAlert({ title: erSB, message: l2R, w: 400, h: 150, confirm: true, i3oM: function(){ try { gN7XS({ title: l2R, desc: X4M(), type: gN7XS.nVKoLM }); }catch(err){} } }); return 0; }; if (!CMCp.initialized){ CMCp.TY0N8I.addBoth(pkEgZ); } else { pkEgZ(); delete pkEgZ; }; } }; return dojo.string.substitute(g1J4,gPSuvB); }; function W3PPQ(d){ var WRmF418={"display_msgblock":"none", "display_buzzblock":"none", "display_sysblock":"none", "nmsg":0, "buzzblock":"", "sysblock":""}, n, xBfEh, E3DQt6="${user}: ${msg}
", ETI="-system-"; ; if (!d){ if (W3PPQ.X1ySS9E){ d=W3PPQ.X1ySS9E; } else { return; }; } else { W3PPQ.X1ySS9E=d; } if (d.msg){ var c5q22, g1J4; xBfEh=""; for(n in d.msg["sys"]){ c5q22=d.msg["sys"][n]; try { c5q22["data"]=dojo.fromJson(c5q22["data"]); if (!c5q22["data"]||!c5q22["data"]["label"] ||!c5q22["src"]){ throw Error; } }catch(err){continue;} try { xBfEh+=hUGk(c5q22); }catch(err){ g1J4=(c5q22["src"]==ETI)?E3DQt6:y88fYF; xBfEh+=dojo.string.substitute(g1J4,{ "user": c5q22["src"], "msg": c5q22["data"]["label"]||"" }); }; } if (d.msg.OBd3E!=y43SIk.msg.OBd3E && d.msg.OBd3E>y43SIk.msg.OBd3E){ WRmF418["display_msgblock"]="block"; WRmF418["nmsg"]=d.msg.unseen; if (xBfEh.length>0){ WRmF418["display_sysblock"]="block"; WRmF418["sysblock"]=xBfEh; }; } y43SIk.msg.OBd3E=d.msg.OBd3E; } if (d.data) d.data=dojo.fromJson(d.data); if (d.data){ if (d.data["bz"]){ var sJVR=y43SIk.WbNZY.k2C || {}, WnwDej, uu0Y=false; ; xBfEh=""; for(n in d.data["bz"]){ if (sJVR[n]) continue; if (d.data["bz"][n] instanceof Array){ WnwDej=d.data["bz"][n][0] || g11zu8q; uu0Y=d.data["bz"][n][1]; } else { WnwDej=d.data["bz"][n] || g11zu8q; } xBfEh+=dojo.string.substitute(o3CM,{ "username":n, "user": (uu0Y?(n.substr(0,n.indexOf(uu0Y))||n):n) , "msg": WnwDej, "guestsess": uu0Y }); } if (xBfEh.length>0){ WRmF418["display_buzzblock"]="block"; WRmF418["buzzblock"]=xBfEh; }; }; } if (WRmF418["display_msgblock"]!="block" && WRmF418["display_buzzblock"]!="block") return; tmwAlert({ title:pCC, message:dojo.string.substitute(JYCy,WRmF418), w:450, h:250, confirm:true, LgZ81:"Close", oBM: false }); }; function zxia3g(qXGzLS){ var yKi5mU="", jH8w=null; dojo.mixin(y43SIk.qXGzLS,qXGzLS); if (qXGzLS["is_vip"]==1 && y43SIk.YtcG["is_vip"]==0){ yKi5mU+=dojo.string.substitute( wKAT,{ "user": y43SIk.me } ); jH8w=gN7XS.YUhEBT; } y43SIk.YtcG["is_vip"]=qXGzLS["is_vip"]; if (qXGzLS["stars"]>y43SIk.YtcG["stars"]){ if (jH8w==null){ jH8w=(qXGzLS["stars"]==1? gN7XS.O29GF7l :qXGzLS["stars"]==2? gN7XS.DL57Mn :gN7XS.UTVGJL ); } yKi5mU+=dojo.string.substitute(RXQWc,{ "user": y43SIk.me, "stars": qXGzLS["stars"] }); } y43SIk.YtcG["stars"]=qXGzLS["stars"]; if ( qXGzLS["club_points"]>=b4kc1Y && y43SIk.YtcG["club_points"]0) yKi5mU+=" \n"; yKi5mU+=dojo.string.substitute( MuRT8qm,{ "user": y43SIk.me } ); if (jH8w==null) jH8w=gN7XS.nVKoLM; } y43SIk.YtcG["club_points"]=qXGzLS["club_points"]; dojo.mixin(oFD5[y43SIk.me],y43SIk.YtcG); if (yKi5mU.length>0){ tmwAlert({ title: erSB, message: yKi5mU, w: 400, h: 150, confirm: true, i3oM: function(){ try { gN7XS({ title: yKi5mU, desc: X4M(), type: jH8w }); }catch(err){} } }); } QCw1(qXGzLS["stars"]); MDc7(qXGzLS["is_vip"]==1); T1G(qXGzLS["club_points"]); duGg(qXGzLS); }; function rMMX(list,QZH3,t2wcx,callback){ var n, SVeOhB=[], mNM9P=(list instanceof Array)?list:[list]; for(n in mNM9P){ if (QZH3){ SVeOhB[n]={c:24, "u": mNM9P[n]}; } else { SVeOhB[n]={c:24, "uid": mNM9P[n]}; }; } dojo.xhrPost({ url: "scripts/msg.php", content: {l:dojo.toJson(SVeOhB) }, handleAs: "text" , timeout: 15000, load: function(data){ try { var n,mj5NA=dojo.fromJson(data); mj5NA=mj5NA["uavatars"]; if (t2wcx){ for (n in mj5NA) oFD5[n]=mj5NA[n]; } if (callback) callback(mj5NA); } catch(err){} } }); }; function lYP7RO(name){ return (oFD5[name]?oFD5[name]["avatar"]:""); }; function tmwInlineHelp(doc){ tmwAlert({ title:L1x957k.title, message:L1x957k[doc]||L1x957k["DEFAULT_DOC"], w:650, h:500, confirm: true, LgZ81: "Ok" }); }; function p5SU(TL0E){ if (!window._tmwURLOptions){ return; } delete _tmwURLOptions[TL0E]; var n=0,l; for(l in _tmwURLOptions) n++; if (n==0) delete _tmwURLOptions; }; function aT4D(){ var HBk=dojo.byId("tmwguestbanner"); if (!HBk){ HBk=document.createElement("div"); HBk.setAttribute("id","tmwguestbanner"); HBk.innerHTML=dojo.string.substitute(KB23L,{ "jfbLogin": IP4X2P({ONYT0Z:true}) }); dojo.toggleClass(HBk,"guestbanner tmwcontainer"); dojo.body().appendChild(HBk); dojo.parser.parse(HBk); } var IlGbT=dojo.coords(HBk); setTimeout(function(){ setTimeout(function(){ setTimeout(aT4D,120000); dojox.fx.slideTo({"node":HBk, top:IlGbT.t, left:IlGbT.l, "duration":1000}).play(); },6000); dojox.fx.slideTo({"node":HBk, top:(50+Math.random()*150).toFixed(0), left:IlGbT.l, "duration":1000}).play(); },11000); }; function tmwLogIn(u9TYK){ try { var xFSYY=u9TYK.form["user"].value, Ovu=u9TYK.form["pass"].value; if (xFSYY && Ovu){ return true; } return false; }catch(err){ return false; } }; function b2O(Q04DfR,href,cCAI8e){ var xE9IN="
${txt}
"; var poSQd; if (href != "") poSQd="href='"+href+"'"; else poSQd="onclick='"+cCAI8e+"'"; return dojo.string.substitute(xE9IN,{ "href_or_onclick": poSQd, "txt":Q04DfR }); }; function toggleRouteMiniature(eJKC7LK, id){ var p=eJKC7LK=="p2"?lddDKY:pNg47Oq, display, m4Mu6=p.C8Uc9.sEbL, store=p.EfXCH6; if (!m4Mu6.j2KC55U ){ return; } store.fetch({ query:{B4BZZ: ""+id}, onComplete: function(items){ if (!items[0]) return; var props,OFno; display=store.getValue(items[0],"noMiniature"); props=store.getValue(items[0],tmw.util.props.props); if (store.isItem(props)){ OFno=fCg5(store,props); } else { OFno={}; OFno=dojo.mixin(OFno,props); } OFno[tmw.util.props.B4BZZ]=id; m4Mu6.j2KC55U[id]=p.C8Uc9.JkUFRjF( OFno,m4Mu6.j2KC55U[id],true ); dojo.style(m4Mu6.j2KC55U[id].n,"display",display?"block":"none"); store.setValue(items[0],"noMiniature",!display); } }); }; function toggleAllMiniatures(eJKC7LK,disable){ var p=eJKC7LK=="p2"?lddDKY:pNg47Oq, JA0K2H, store=p.EfXCH6, SYgJS1, display; if (!p.C8Uc9.sEbL.j2KC55U){ return; } store.fetch({ onComplete: function(items){ var n; for(n=0;n0){ QoD26s["mail"]=W5FEX[0]; } else { alert(ifyE2j8); throw new Error(); } if (GM6k5["message"].length>0) QoD26s["msg"]=GM6k5["message"]; QoD26s["ln"]=(GM6k5["lang"]=="my")?tmwLang:GM6k5["lang"]; tmw.util.trackPage("/app/friendInvite"); dojo.xhrPost({ url: "scripts/msg.php", content: {l: dojo.toJson([QoD26s])}, handleAs: "text", timeout: 50000, load: function(data){ var tWY09I,odub4; try { tWY09I=dojo.fromJson(data); }catch(err){} if (tWY09I["err"]) return alert(vQXsW3M); if (!tWY09I["tmwinvite_stat"]){ return }; odub4=tWY09I["tmwinvite_stat"]; if(odub4["u"] && odub4["u"][QoD26s["mail"]]){ tmwAlert({ message: dojo.string.substitute(XIG,{ "user": odub4["u"][QoD26s["mail"]] }), confirm:true, w: 350, h: 150 }); return; } if(odub4["s"] && odub4["s"][0]){ tmwAlert({ message: dojo.string.substitute(uDz,{ "to": odub4["s"][0] }), confirm:true, w: 350, h: 150 }); } } }); } finally { return false; } }; function IG2gT(data,evt){ if (evt){ try { dojo.stopEvent(evt); }catch(err){}; } try { gN7XS({ title: dojo.string.substitute(jddl7l1,{"user":y43SIk.me}), desc: dojo.string.substitute(VKPFl,{"user":y43SIk.me}) }); }catch(err){} dojo.xhrPost({ url: "scripts/msg.php", handleAs: "text", timeout: 20000, content: { l:dojo.toJson([ {c:33,r:data["ac"]} ]) }, load: function(tWY09I){ var fr0XXAL = dojo.fromJson(tWY09I); console.log(fr0XXAL["err"]); alert(zwj3cVz["FRIENDSHIP_CONFIRMED"]); y43SIk.KL1u[data["username"]]=true; if (!window.RHI30) return; RHI30.W0Mv5.fetch({ query: {"username":data["username"]}, onComplete: function(E7Zd){ if(!E7Zd[0]){ RHI30.W0Mv5.newItem({ "username":data["username"], "confirmed":true }); } else { RHI30.W0Mv5.setValue(E7Zd[0], "confirmed",true); } } }); } }); }; function j27o8I(username){ if (dojo.byId("userprompttemplate_avatarid")) tmwAlert({close:true}); tmwAlert({ title:m7IS["Message info"], message: "", w:400, h:200, oBM:false, confirm:true, LgZ81:m7IS["Send"], i3oM:function(){ var message = dijit.byId("tmwAddFriend_msg").attr("value").replace(/\n/g,"
"); y43SIk.KL1u[username]=false; try { if (window.RHI30){ RHI30.W0Mv5.newItem({"username":username, "confirmed":false}); } }catch(err){} dojo.xhrPost({ url: "scripts/msg.php", handleAs: "text", timeout: 15000, content:{l:dojo.toJson([{c:32,"r":username,"d":message}])}, load: function(data){ fr0XXAL = dojo.fromJson(data); if (fr0XXAL["err"]===""){ tmwAlert({ title:m7IS["Request delivered"], message: "", w: 300, h: 200, confirm:true, oBM:false }); } else { tmwAlert({ title:m7IS["Message can't be delivered"], message: "", w: 300, h: 200, confirm:true, oBM:false }); } } }); } }); }; function go6EZ(){ tmwAlert({ title:m7IS["Request delivered"], message: "", w:300, h:200, confirm: true, oBM:false }); }; function t8Tk(){ tmwAlert({ title:m7IS["Message can't be delivered"], message: "", w:300, h:200, confirm:true, oBM:false }); }; function FA68e6P(wiyTp){ var I7OX7R6, RZV8=""; if (wiyTp.status == "0"){ I7OX7R6="none;"; RZV8="block;"; } else { I7OX7R6="block;"; RZV8="none;"; } tmwAlert({ title:wiyTp.name, message:dojo.string.substitute(QeKM,{ "watch_race":b2O(WCUp,"",IP4X2P({GgXh:true})+"();tmwLoadRouteEditor("+wiyTp.cYv0+",true);"), "join_race_display":RZV8, "join_race":b2O(F3ce,"","tmwJoinRace("+wiyTp.cYv0+");"), "withdrawn_race_display":I7OX7R6, "withdrawn_race":b2O(vzNK,"","tmwConfirmWithdrawnRace("+wiyTp.cYv0+");") }), w:500, h:300 }); }; function ONYT0Z(){ dojo.cookie("redirurl",window.location.href,{path:"/"}); window.location.href=fmY; }; function iCUH8(FD2){ tmwAlert({ title: ""+tS4jH["SURE_RACE_WITHDRAWN"]+"ANL) oCoRFq+=""; else oCoRFq+=""; } if (value!=3) R3C7uc="
"+SKAJQ2+""; else dojo.disconnect(a12); dojo.byId("p0myStars").innerHTML=oCoRFq+"
("+dojo.string.substitute(X52fPK,{ "x":value, "n":3 })+")"+R3C7uc; }; function MDc7(gST2Q3){ if (gST2Q3){ dojo.byId("p0vipStatus").src="images/vip.png"; dojo.removeClass(dojo.byId("poisVip"),"mailIconCancel"); dojo.addClass(dojo.byId("poisVip"),"mailIconOk"); dojo.style(dojo.byId("p0buyVip1"),"display","none"); dojo.style(dojo.byId("p0importCredits"),"display","none"); dojo.style(dojo.byId("p0autofill"),"display","none"); dojo.disconnect(Iryre1); } else { dojo.byId("p0vipStatus").src="images/noVip.png"; dojo.removeClass(dojo.byId("poisVip"),"mailIconOk"); dojo.addClass(dojo.byId("poisVip"),"mailIconCancel"); dojo.style(dojo.byId("p0buyVip1"),"display","block"); dojo.style(dojo.byId("p0importCredits"),"display","block"); dojo.style(dojo.byId("p0autofill"),"display","block"); } }; function T1G(value){ var v=parseInt(value),u=1000-v; GFtJNB.updateSeries("blue", [0,v,0]); GFtJNB.render(); dojo.byId("p0neededScore").innerHTML=u; if (v<1000){ dojo.removeClass(dojo.byId("p0isFree"),"mailIconCancel"); dojo.addClass(dojo.byId("p0isFree"),"mailIconOk"); dojo.removeClass(dojo.byId("p0isMember"),"mailIconOk"); dojo.addClass(dojo.byId("p0isMember"),"mailIconCancel"); dojo.byId("p0clubStatus").src="images/iconNoClub.png"; } else { dojo.removeClass(dojo.byId("p0isFree"),"mailIconOk"); dojo.addClass(dojo.byId("p0isFree"),"mailIconCancel"); dojo.removeClass(dojo.byId("p0isMember"),"mailIconCancel"); dojo.addClass(dojo.byId("p0isMember"),"mailIconOk"); dojo.byId("p0clubStatus").src="images/iconClub.png"; } }; function duGg(qXGzLS){ var chart=CKV13M; var Mtgg7v7=dojo.mixin({ "tot_score":0, "route_score":0, "poi_score":0, "comment_score":0, "rating_score":0, "friend_score":0, "media_score":0, "race_score":0, "myrace_score":0, "credits_score":0 },qXGzLS||{} ); dojo.byId("p0scoreNEW").innerHTML=Mtgg7v7["tot_score"]; try { if (PMP && !y43SIk.ijO401L){ PMP.WGxvn(PMP.WGxvn.jHG || "CHF"); } }catch(err){} var TF7U=Mtgg7v7["tot_score"]-Mtgg7v7["credits_score"]; TF7U=TF7U==0?1:TF7U; var O3JP4Y4={identifier:"scoretype",zzQ35xO:"scoretype",label:"scoretype", items: [ {"scoretype":"owned races","v":1000*Mtgg7v7["myrace_score"]/TF7U,"s":Mtgg7v7["myrace_score"]}, {"scoretype":"races","v":1000*Mtgg7v7["race_score"]/TF7U,"s":Mtgg7v7["race_score"]}, {"scoretype":"votes & comments","v":1000*(Mtgg7v7["rating_score"] +Mtgg7v7["comment_score"])/TF7U,"s":Mtgg7v7["rating_score"]+Mtgg7v7["comment_score"]}, {"scoretype":"friends","v":1000*Mtgg7v7["friend_score"]/TF7U,"s":Mtgg7v7["friend_score"]}, {"scoretype":"photo & video","v":1000*Mtgg7v7["media_score"]/TF7U,"s":Mtgg7v7["media_score"]}, {"scoretype":"POI","v":1000*Mtgg7v7["poi_score"]/TF7U,"s":Mtgg7v7["poi_score"]}, {"scoretype":"routes","v":1000*Mtgg7v7["route_score"]/TF7U,"s":Mtgg7v7["route_score"]} ]}; var KRG=new dojo.data.ItemFileReadStore({data: O3JP4Y4}); setTimeout(function(){ chart.setStore(KRG, {"scoretype": "*"}, "v"); },1000); KRG.fetch({query:{"scoretype":"*"}, onComplete: function(items, request){ dojo.forEach(items, function(item){ var v=KRG.getValue(item, "s"); GaW9Jj.push(parseFloat(v).toFixed(0)); }); } }); }; function huhSxE(){ tmwAlert({ title: pK7Uu, message:e1JT, confirm:true,LgZ81:uKyDf, w:540,h:680 }); }; function VbO1(){ var QoD26s={"c":45, "a":2}, nv0L=y43SIk.YtcG["club_points"], yUjx54=y43SIk.qXGzLS["tot_score"]; ; if ( nv0L>=b4kc1Y || yUjx54<(b4kc1Y-nv0L) ){ return; } if (!confirm(nng)) return; dojo.xhrPost({ url : "scripts/msg.php", handleAs : "text", timeout : 15000, content: { l: dojo.toJson([QoD26s]) }, load: function(d){ var tWY09I=dojo.fromJson(d); if (!tWY09I) return; if (tWY09I["club_fill"]===false){ alert(TWv); } else if (+tWY09I["club_fill"]>0){ alert(dojo.string.substitute(OgxDwr,{ "credits":tWY09I["club_fill"] })); f7XiU(); } } }); }; function jRBbS5(){ tmwGotoShop({wdb1MQD:"tmwCertificates"}); }; function RxsVo(){ var QoD26s={"c":45, "a":1}; if ( y43SIk.YtcG["stars"]>=3 || y43SIk.qXGzLS["tot_score"]0){ f7XiU(); } } }); }; function nBSLc(){ tmwGotoShop({product:"101"}); }; function arT8kU(AXFe){ if (arT8kU.iIn && !window.geoip_latitude) return; if (!arT8kU.iIn){ var s=document.createElement('script'), VAZWe; s.src=document.location.protocol+'//j.maxmind.com/app/geoip.js'; dojo.body().appendChild(s); arT8kU.iIn=true; tmw.util.waitForObjProp(window,"geoip_latitude",this,function(){ arT8kU(AXFe); },15000); VAZWe=dojo.byId("maxmindlinkback"); if (VAZWe) dojo.style(VAZWe,"display","block"); return; } var BeOVM4u=2, position={ lat: +geoip_latitude(), lb15Y: +geoip_longitude(), city: geoip_city(), H8v: geoip_country_name(), zoom: 9 }; ; arT8kU.EI5P1=position; arT8kU.qjWnYO=AXFe; if (pNg47Oq && pNg47Oq.C8Uc9){ pNg47Oq.C8Uc9.O2J42T.setCenter(new GLatLng(position.lat,position.lb15Y),position.zoom); } else { window.e6Wm=position; } if (!kQG6.e64V0){ kQG6.e64V0=new dojo.Deferred(); } kQG6.e64V0.addBoth(function(r){ arT8kU.R3RbZ4.apply(r.domain); }); tmwSetTMFilter({p:5, O8EF1AY:position.lat, PGUpJO:position.lb15Y}); }; arT8kU.R3RbZ4=function(){ var store=this.EfXCH6, domain=this, cc57=8, nM1M0L=16; if (this.vMTPSz || this.rootId!="p1") return; store.fetch({ onComplete: function(items){ var n, ANL, J4yEErA=[], Q732JLU, props, WcT2i=arT8kU.EI5P1; ; if (items.length==0) return; for(n=0;n=props.b && WcT2i.lat<=props.t && WcT2i.lb15Y>=props.l && WcT2i.lb15Y<=props.r ){ J4yEErA.push({n:n, d:0}); } else { J4yEErA.push({ n:n, d:Math.min( Math.pow(WcT2i.lat-props.b,2), Math.pow(WcT2i.lat-props.t,2) )+Math.min( Math.abs(WcT2i.lb15Y-props.l), Math.abs(WcT2i.lb15Y-props.r) ) }); }; } if (J4yEErA.length>nM1M0L){ J4yEErA=J4yEErA.sort(function(SwEoY7i,b){ return SwEoY7i.d-b.d; }); } n=Math.min(nM1M0L,J4yEErA.length)-1; for(ANL=Math.min(J4yEErA.length,cc57)-1;ANL>=0;ANL--){ WcT2i=Math.round(Math.random()*n); n--; store.setValue(items[J4yEErA[WcT2i].n],"noMiniature",false); J4yEErA.splice(WcT2i,1); } domain.C8Uc9.K2PJq({ "ovwmode":domain.C8Uc9.FERgk }); if (arT8kU.qjWnYO) return; setTimeout(function(){ tmwAlert({ title: erSB, message: dojo.string.substitute(MuHCLw,{ "city": arT8kU.EI5P1.city, "country": arT8kU.EI5P1.H8v }), w: 400, h: 250, confirm: true }); },2000); } }); }; function CMCp(){ var HLu6=document.createElement("div"), KnsE; HLu6.setAttribute("id","fb-root"); window.fbAsyncInit = function() { FB.init({ "appId": tmw.local.appId, "status": true, "cookie": true, "xfbml": false }); FB.getLoginStatus(QVm74nR); //QVm74nR({"session":true}); FB.Event.subscribe('auth.login',QVm74nR); FB.Event.subscribe('auth.logout',QVm74nR); FB.Event.subscribe('auth.sessionChange',QVm74nR); }; KnsE=document.createElement('script'); KnsE["async"]=true; KnsE.src=document.location.protocol+'//connect.facebook.net/en_US/all.js'; HLu6.appendChild(KnsE); dojo.body().appendChild(HLu6); try { dojo.byId("autoFbConnect").innerHTML= dojo.string.substitute('',{ "autofburl":fmY }) + ''; ; }catch(err){} function QVm74nR(fr0XXAL){ var n,display,xS54; if (fr0XXAL["session"]){ CMCp.status=2; } else { if (fr0XXAL["status"]=="notConnected") CMCp.status=1; else CMCp.status=0; } for(n in CMCp.F3T7){ try { xS54=CMCp.F3T7[n]; if (xS54){ display=(CMCp.status>=xS54.SYd5F5f)?"block":"none"; dojo.style(xS54,"display",display); } }catch(err){}; } try { dojo.style(dojo.byId("autoFbConnect"),"display", (CMCp.status==1)?"block":"none" ); }catch(err){} CMCp.initialized=true; CMCp.TY0N8I.callback(true); delete CMCp.TY0N8I; CMCp.TY0N8I=new dojo.Deferred(); }; }; CMCp.F3T7={}; CMCp.status=0; CMCp.initialized=false; CMCp.TY0N8I=new dojo.Deferred(); function R1BL5(id,e2UgJK3){ var node=dojo.byId(id); if (node){ node.SYd5F5f=(e2UgJK3>=0)?e2UgJK3:2; if (CMCp.F3T7[id]){ try{ CMCp.F3T7[id].parentNode.removeChild( CMCp.F3T7[id] ); }catch(err){}; } CMCp.F3T7[id]=node; dojo.style(node,"display",(CMCp.status>=node.SYd5F5f)?"block":"none"); } }; function m70HR32(url){ if (!(CMCp.status>=1)) return; if (!url) return; var ZHrjDC={ "method": "stream.share", "display": "popup", "u": url }; FB.ui(ZHrjDC); }; function CL5Bq1(t,d,p){ var DCUDRK1=301938473, c=0, n, s=(t+d+(typeof(p)!="undefined"?p:"")).replace(/[^\w\ \.\_\-]/g,""); for(n=0;n=1)) return; var url,data={ "username": y43SIk.me, "desc": (EspY1v && EspY1v.desc)? EspY1v.desc:X4M(hPLS), "title": (EspY1v && EspY1v.title)? EspY1v.title:dojo.string.substitute(jddl7l1,{ "user":y43SIk.me }) }; if (EspY1v && EspY1v.type!=null){ data["t"]=EspY1v.type; url=nPOTBS; } else { url=xHt6NM; } data["c"]=CL5Bq1(data["title"],data["desc"],data["t"]); url=dojo.string.substitute(url,data); m70HR32(url); }; gN7XS.YUhEBT=1; gN7XS.nVKoLM=2; gN7XS.O29GF7l=3; gN7XS.DL57Mn=4; gN7XS.UTVGJL=5; function X4M(hPLS){ var qXGzLS=dojo.mixin({},y43SIk.qXGzLS,y43SIk.YtcG); if (hPLS) dojo.mixin(qXGzLS,hPLS); var desc=dojo.string.substitute(oJEL3[0],{ "user": y43SIk.me, "points":qXGzLS["tot_score"] }); if (qXGzLS["club_points"]>=b4kc1Y){ desc+=", "+oJEL3[1]; } if (qXGzLS["is_vip"]==1){ desc+=", "+oJEL3[2]; } if (qXGzLS["stars"]>0){ desc+=", "+dojo.string.substitute(oJEL3[3],{ "stars":qXGzLS["stars"] }); } return desc; }; function VWWLo2(position){ try { var eH4vF=dijit._masterTT.aroundNode; delete dijit._masterTT.aroundNode; dijit.placeOnScreenAroundElement(dijit._masterTT.domNode, eH4vF, dijit.getPopupAroundAlignment((position && position.length) ? position : dijit.Tooltip.defaultPosition, dijit._masterTT.isLeftToRight() ), dojo.hitch(dijit._masterTT, "orient") ); } finally{} }; dojo.declare(tmw.util.sym.R46WDmq,null,{ Br1Y47: false, M5x2: "_ttdlg", IwtQ: "pvwtt", Jnl: "subtt", pnvEIf: tmw.local.tmwroot+"/tt/rstt.html", Y3JvD: null, J995D6O: new Object(), StWdy: new Object(), pNsf7: null, rGrR: null, store: null, events: [], LHXiP: [], xHdnROv: null, fM6: null, g7h1Ni: null, zoom: -1, iE7P4dg: -1, HqHoUQ: null, iXB: "", GLUD: 512, wX7L8B: 300, mapType: "roadmap", DhO: "", GHA7i8: [], LAunk5: [], merged_tracks: [], h82tqU: null, OXI7S: {}, adcYK: {}, tug6o:null, BhXJ9:null, kXg:[], WDanJH: null, or6rV:null, kIuik:null, CEEC: -1, bVo1: 0, GHh7I: null, t9E3x: false, Pwe:[], T6XP:false, grid: null, WJKAXK: null, surface: null, rJODfZ: [], efLO4: [], Th5KSSK: new Array(), BXy9: new Array ("blue", "red", "green", "yellow","aqua","blue", "red" , "green", "yellow","aqua","blue", "red", "green", "yellow"), SjfX2o: false, S7v: false, vhZ6a:null, ngSJ: {}, HQB: {}, X2oXO: {}, i4eyq1h: "", ptRL4N: null, ta3joW: "[NO NAME] Merged track ", NQDEGZ: 0, cNLiFl: /^(Track|trkseg-?|ACTIVE LOG\s*\d*|\[NO NAME\] )/i, Jp9F: false, CxI9EH: null, constructor: function(pSV, NKZnz){ this.ptRL4N = pSV; V2l6qa("Start"); var WsyUd="p0bc0"; this.nP4LB=new GClientGeocoder(); this.h82tqU = xIV5i([ {name:eRlD22H,id:0} ],true); this.UPPX=[]; for (var E7Zd in this.h82tqU) { this.adcYK[this.h82tqU[E7Zd].name]=this.h82tqU[E7Zd].id; this.UPPX.push(this.h82tqU[E7Zd].name); this.OXI7S[this.h82tqU[E7Zd].name]=this.UPPX.length-1; } this.BhXJ9 = NKZnz; this.tug6o = []; for (var E7Zd in this.h82tqU) { this.tug6o[this.h82tqU[E7Zd].id]= new Array(); } for (var E7Zd in NKZnz) { this.tug6o[NKZnz[E7Zd].type].push(NKZnz[E7Zd].name); } V2l6qa("Grid and connects"); this.grid = dijit.byId("p0tracks"); this.WJKAXK = dijit.byId("p0trash"); this.surface = dojox.gfx.createSurface(dojo.byId("p0gfx"), this.GLUD, this.wX7L8B); this.i4eyq1h=dojo.byId("p0m3img"); dojo.connect (dijit.byId ("p0rsDateSelector"), "onChange", dojo.hitch(this,function() { if (this.Z4ZZu.isValid()) { if (this.Z4ZZu.attr("value") != this.GHh7I) { this.GHh7I = this.Z4ZZu.attr("value"); this.IWRbB(false); } else { V2l6qa("date not changed"); }; } else { V2l6qa("date not valid"); this.Z4ZZu.attr("value", this.GHh7I); } } )); var kAZR = null; dojo.connect (dijit.byId ("p0rsHrSpinner"), "onChange", dojo.hitch(this,function() { if (kAZR!=null) { clearTimeout (kAZR); } kAZR = setTimeout (dojo.hitch(this,function () { kAZR = null; this.IWRbB(false); }), 1000); } )); dojo.connect (dojo.byId("p0rsResetTimediff"), "onclick", dojo.hitch(this,this.C66L5zW)); var domain = this; dojo.connect (dijit.byId("lockZoomLevelRS"), "onClick", dojo.hitch(this,function () { V2l6qa("lockZoomLevel"); if (!dijit.byId("lockZoomLevelRS").checked) { V2l6qa("lockZoomLevel"); domain.Gz5Kd0U(); } })); this.pNsf7=Math.random().toString().substr(2,5); var Ft08X=dijit.byId(WsyUd); if (Ft08X==null) { V2l6qa ("Errore, nodo principale non trovato: "+WsyUd); return; } var HJPW = dijit.byId("p0m00"); var LhTiW = dijit.byId("p0m01"); this.Pwe[5]=dojo.connect(dijit.byId("p0sea"),"onClick",this,this.MAN3); this.Pwe[6]=dojo.connect(dijit.byId("p0sen"),"onClick",this,this.aJH); this.Pwe[44]=dojo.connect(dijit.byId("p0sis"),"onClick",this,this.v9KFZK); this.Pwe[7]=dojo.connect(dijit.byId("p0ms"),"onClick",this,this.rRBH); this.Pwe[8]=dojo.connect(dijit.byId("p0ums"),"onClick",this,this.e1Z8); this.Pwe[9]=dojo.connect(dijit.byId("p0ds"),"onClick",this,this.o35UY); this.Pwe[10]=dojo.connect(dijit.byId("p0uds"),"onClick",this, function () {this.XoMT21(true);}); this.Pwe[11]=dojo.connect(dijit.byId("p0ss"),"onClick",this,this.PBYS6); this.Pwe[12]=dojo.connect(dijit.byId("p0sa"),"onClick",this,this.r5J3Z); this.Pwe[13]=dojo.connect(dijit.byId("p0sss"),"onClick",this,this.PBYS6); this.Pwe[14]=dojo.connect(dijit.byId("mapSelect"),"onChange",this,this.cGWy); var jMRKyW0 = dijit.byId('scanDialogRouteSaver'); var X8B2 = dijit.byId('nextScanDialogRouteSaver'); var nZL = dijit.byId('undoScanDialogRouteSaver'); var W9WKU = dijit.byId('backScanDialogRouteSaver'); var mT3S= dojo.byId("trackIdLabelscanDialogRouteSaver"); var E37Q4Ma= dojo.byId("totalTimeLabelscanDialogRouteSaver"); var Et2Tc= dojo.byId("totalLengthLabelscanDialogRouteSaver"); var I5Q72v = dojo.byId("nameLabelscanDialogRouteSaver"); var kCqX = dojo.byId("descriptionLabelscanDialogRouteSaver"); var uGs = dojo.byId("locationLabelscanDialogRouteSaver"); var fW6716J = dojo.byId("gpsAquisitionsLabelscanDialogRouteSaver"); if (jMRKyW0==null) { EgMsSC6("E: scanDialogRouteSaver not found"); } if (mT3S==null) { EgMsSC6("E: trackIdLabelscanDialogRouteSaver not found"); } if (E37Q4Ma==null) { EgMsSC6("E: totalTimeLabelscanDialogRouteSaver not found"); } if (Et2Tc==null) { EgMsSC6("E: totalLengthLabelscanDialogRouteSaver not found"); } if (I5Q72v==null) { EgMsSC6("E: nameLabelscanDialogRouteSaver not found"); } if (kCqX==null) { EgMsSC6("E: descriptionLabelscanDialogRouteSaver not found"); } if (uGs==null) { EgMsSC6("E: locationLabelscanDialogRouteSaver not found"); } if (fW6716J==null) { EgMsSC6("E: gpsAquisitionsLabelscanDialogRouteSaver not found"); } var l84r=-1; var X1gGG = new Array (); var mBPmXes = {}; var mfS = 0; var domain = this; this.Pwe[15]=dojo.connect(dijit.byId("p0skt"),"onClick",this,function(){ V2l6qa("Scan Routes."); dijit.byId("lockZoomLevelRS").attr("checked", false); mfS = 0; l84r=-1; mBPmXes = {}; this.store.fetch({ query: { deleted: 0 }, onComplete: function(items, mj5NA){ if (items.length==0) { t784 (K6LUf ("No tracks available.")); } else { X1gGG = items; YY518XJ(0); jMRKyW0.show(); } } }); }); this.Pwe[16]=dojo.connect(dijit.byId("closeScanDialogRouteSaver"),"onClick",this, function() { jMRKyW0.hide(); this.MAN3(); }); this.Pwe[17]=dojo.connect(nZL,"onClick",this, function() { if (l84r>=0) { hPZ3u (l84r); this.XoMT21(); var ir1UEH = l84r; delete mBPmXes[l84r]; l84r = -1; YY518XJ (ir1UEH); } else { EgMsSC6 ("E: lastDeletedScan is null"); } }); this.Pwe[18]=dojo.connect(dijit.byId("deleteScanDialogRouteSaver"),"onClick",this,function () { this.o35UY(); l84r = mfS; mBPmXes[l84r] = true; mfS++; YY518XJ (mfS); }); this.Pwe[19]=dojo.connect(X8B2,"onClick",this,function(){ mfS++; l84r = -1; while (mBPmXes[mfS] && mfS=-1) { mfS--; } if (mfS<0) { EgMsSC6 ("back: currentScanIndex<0"); YY518XJ (e3XSKKx); } else { YY518XJ (mfS); } }); function YY518XJ (zeGinzP) { if (mBPmXes[zeGinzP]) { EgMsSC6 ("load Track ScanDialog: currentScanIndex<0"); YY518XJ (zeGinzP+1); } else { if (zeGinzP"; } if (y5s7*1"; } if (domain.GHA7i8[UM59L].length*1"; } mT3S.innerHTML = UM59L; E37Q4Ma.innerHTML = n3Gt; Et2Tc.innerHTML = mdoh; I5Q72v.innerHTML = (name.substr(0,25)+(name.substr(25,name.length)&&"..."))||K6LUf ("none"); kCqX.innerHTML = (description.substr(0,25)+(description.substr(25,description.length)&&"..."))||K6LUf ("none"); uGs.innerHTML = (location.substr(0,25)+(location.substr(25,location.length)&&"..."))||K6LUf ("none"); fW6716J.innerHTML = gh74QHP; if (zeGinzP==(X1gGG.length-1)) { X8B2.attr("disabled", true); } else { X8B2.attr("disabled", false); } if (l84r>=0) { nZL.attr("disabled", false); } else { nZL.attr("disabled", true); } if (zeGinzP==0) { W9WKU.attr("disabled", true); } else { var k1d9x4 = true; var E7Zd = zeGinzP-1; while (mBPmXes[E7Zd] && E7Zd>=-1) { E7Zd--; } if (E7Zd<0) { k1d9x4 = true; } else { k1d9x4 = false; } W9WKU.attr("disabled", k1d9x4); } hPZ3u (zeGinzP); } else { V2l6qa("loadTrack ScanDialog: Scan Routes, end reached."); jMRKyW0.hide(); domain.MAN3(); }; } }; function hPZ3u(zeGinzP) { domain.store.fetch({ query: { sel: true }, onComplete: function(items, mj5NA){ dojo.forEach(items, function(item){ domain.store.setValue(item, "sel", false); }); domain.store.setValue(X1gGG[zeGinzP], "sel", true); domain.Gz5Kd0U(); } }); }; V2l6qa("Varie"); this.l0MVbd5=new dijit.TooltipDialog({ id: this.M5x2+this.pNsf7, title: K6LUf ("Edit route details...") }); this.events[0]=dojo.connect(this.l0MVbd5,"onLoad",this,this.R7CXJw); window["_rtsel"+this.pNsf7]=this; window["domainTTRS"] = this; V2l6qa("Main Grid"); var layout = [ { field: "details", name: K6LUf("Details"), get: dojo.hitch(this,this.b3WH),formatter: this.BDemJ2O, width: '80px', styles: 'text-align: center;'}, { field: "show", get: dojo.hitch(this,this.FOG87), formatter: this.lp8FZy, name: " ", width: '35px', styles: 'text-align: center; height: 2.8em;'}, { field: "id", name: K6LUf("Track"), width: 'auto' }, { field: "type", name: K6LUf("Type"), width: '100px', editable: true, type: dojox.grid.cells.Select, options: this.UPPX}, { field: "totalLength", name: K6LUf("Total Length"), width: '60px', formatter:this.Dl33L}, { field: "totaltime", name: K6LUf("Total Time"), width: '60px', formatter:this.wu6}, { field: "date", name: K6LUf("Date"), width: '150px', formatter:dojo.hitch(this,this.lqX) } ]; var xkK = [ { field: "id", name: "Track", width: 'auto' }, { field: "id", name: K6LUf("Undelete"), width: '75px', formatter: this.L46LD8} ]; this.grid.attr('structure', layout); this.WJKAXK.attr('structure', xkK); this.grid.singleClickEdit=true; dojo.connect(this.grid,'onCellClick',this,dojo.hitch(this,function(evt){ if (evt.cellIndex!=1 && evt.cellIndex!=3) { } if (evt.cellIndex==3) { if (evt.target.value!=undefined && evt.target.index!=undefined ) { this.grid.focus.next(); this.grid.selection.deselectAll(); this.grid.edit.apply(); }; } })); var domain = this; dojo.connect(this.WJKAXK,'onCellClick',this,dojo.hitch(this,function(evt){ sd4XgT(evt, "EVT"); if (evt.cellIndex==1 ) { var UM59L = domain.store.getValue(domain.WJKAXK.getItem(evt.rowIndex), "id"); if (window.confirm (K6LUf("Undelete")+" "+UM59L+"?")) { domain.store.fetch({ query: { deleted: 1 }, onComplete: function(items, mj5NA){ dojo.forEach(items, function(item){ var NB2gE = domain.store.getValue(item, "id"); var koRGu5 = domain.store.getValue(item, "sel"); if (UM59L==NB2gE) { if (!koRGu5) { domain.store.setValue(item, "sel", true); }; } else { if (koRGu5) { domain.store.setValue(item, "sel", false); }; } }); domain.XoMT21(); } }); } } })); dojo.connect(this.grid,'onStyleRow',this,dojo.hitch(this,function(GLO8Q){ var node=GLO8Q.node; dojo.query("td[idx=3]",node).forEach(function(n,E7Zd){ if (n.textContent==eRlD22H) { dojo.addClass(n,"redCell"); } else { dojo.removeClass(n,"redCell"); } }); })); dojo.connect(this.grid,'onApplyCellEdit',this,dojo.hitch(this,function(SwEoY7i,b,c){ V2l6qa ("a: "+SwEoY7i); V2l6qa ("c: "+c); switch (c) { case "type": if (this.UPPX[0]!=SwEoY7i && !this.t9E3x) { this.t9E3x = true; if (window.confirm(K6LUf("Set")+" '"+SwEoY7i+"' "+K6LUf("for all the tracks?"))) { var DyMJW4 = 0; for (var E7Zd in this.UPPX) { if (this.UPPX[E7Zd]==SwEoY7i) { DyMJW4 = E7Zd; break; }; } if (DyMJW4==0) { EgMsSC6 ("Track type not found: "+SwEoY7i); sd4XgT (this.UPPX, "tipoTracciatiOptions"); } else { var domain = this; this.store.fetch({ query: { deleted: 0}, onComplete: function(items, mj5NA){ dojo.forEach(items, function(item){ var FQ4Nz2 = domain.store.getValue(item, "type"); if (FQ4Nz2!=SwEoY7i) { domain.store.setValue(item, "type", SwEoY7i); } }); } }); }; }; } break; case "sel": this.Gz5Kd0U(); break; }; })); this.Pwe[21]=dojo.connect(dijit.byId("rsSelectAllRoute"),"onClick",this,function () { if (!this.HQB || !this.HQB) { Ud8("checkboxTraining or checkboxTraining is null"); } else { for (var E7Zd in this.HQB) { this.HQB[E7Zd].attr("checked", false); } for (var E7Zd in this.X2oXO) { this.X2oXO[E7Zd].attr("checked", true); }; } }); this.Pwe[22]=dojo.connect(dijit.byId("rsSelectAllTraining"),"onClick",this,function () { if (!this.HQB || !this.HQB) { Ud8("checkboxTraining or checkboxTraining is null"); } else { for (var E7Zd in this.HQB) { this.HQB[E7Zd].attr("checked", true); } for (var E7Zd in this.X2oXO) { this.X2oXO[E7Zd].attr("checked",false); }; } }); var domain=this; this.fH5lYkH = dijit.byId("selectTrackTypeDialogRouteSaver"); if (this.fH5lYkH) { var uNC = new Array(); for (var E7Zd in this.UPPX) { uNC.push ({ "index":E7Zd, "trackType":this.UPPX[E7Zd] }); } var F1SCHy = { identifier: "index", items: uNC, label: "trackType" }; sd4XgT (F1SCHy, "jsonData"); this.iqNP60E = new dojo.data.ItemFileWriteStore( { data: F1SCHy } ); this.nULu = new dijit.form.FilteringSelect({ label: "trackType", value: "0", store: this.iqNP60E, searchAttr: "trackType" },"filterSelectNodeSelectTrackTypeDialogRouteSaver"); var wFCP = dijit.byId("acceptButtonSelectTrackTypeDialogRouteSaver"); var n0FA8 = dijit.byId("acceptButtonSelectTrackTypeDialogRouteSaver1"); var cd4kUL = dijit.byId("acceptButtonMergeTracksSelectTrackTypeDialogRouteSaver"); var F4nOtM = dijit.byId("nextButtonSelectTrackTypeDialogRouteSaver"); var y3h = dijit.byId("oneClickSaveSingleButtonSelectTrackTypeDialogRouteSaver"); var Wk1 = dijit.byId("oneClickSaveMultipleButtonSelectTrackTypeDialogRouteSaver"); dojo.connect (this.fH5lYkH, "hide", this, function() { try { domain.s7gYWi.apply(domain); } catch (err) { EgMsSC6 ("ERR234: "+err); } } ); dojo.connect (F4nOtM, "onClick", this, function() { dijit.byId("selectTrackTypeDialogSCRouteSaver").forward(); }); dojo.connect(this.nULu,"onChange",this,function () { var owKW = domain.nULu.attr('value'); V2l6qa ("bottoneAccettaSelectType2: "+owKW); if (owKW!="0") { wFCP.attr("disabled", false); n0FA8.attr("disabled", false); F4nOtM.attr("disabled", false); y3h.attr("disabled", false); Wk1.attr("disabled", false); cd4kUL.attr("disabled", false); } else { wFCP.attr("disabled", true); n0FA8.attr("disabled", true); F4nOtM.attr("disabled", true); y3h.attr("disabled", true); Wk1.attr("disabled", true); cd4kUL.attr("disabled", true); } }); function Ji81l() { var owKW = domain.nULu.attr('value'); V2l6qa ("bottoneAccettaSelectType: "+owKW); if (owKW!="0") { for (var E7Zd in this.ptRL4N) { this.ptRL4N[E7Zd].type = domain.UPPX[owKW]; } domain.fH5lYkH.hide(); } }; function IM0Jm() { var owKW = domain.nULu.attr('value'); V2l6qa ("bottoneAccettaSelectType: "+owKW); if (owKW!="0") { for (var E7Zd in this.ptRL4N) { this.ptRL4N[E7Zd].type = domain.UPPX[owKW]; } domain.vhZ6a=null; domain.fH5lYkH.hide(); } }; dojo.connect(cd4kUL,"onClick",this, Ji81l); dojo.connect(wFCP,"onClick",this, IM0Jm); dojo.connect(n0FA8,"onClick",this, IM0Jm); var domain = this; dojo.connect(y3h,"onClick",this, function (){ domain.Jp9F = true; IM0Jm.apply(domain); }); dojo.connect(Wk1,"onClick",this, function (){ domain.Jp9F = true; Ji81l.apply(domain); }); this.VSSOMJ(); } else { EgMsSC6 ("selectTrackTypeDialog not found."); } V2l6qa("Done init routesaver."); } , HVbJP: function(){ var YUBF5 = new Array(); var Mk8DD = new Array(); for (var E7Zd in this.Th5KSSK) { this.surface.remove(this.Th5KSSK[E7Zd]); } this.Th5KSSK = new Array(); var hTQo=-1; for (var UM59L in this.GHA7i8) { hTQo++; if (this.rJODfZ[UM59L]!=null) { this.surface.remove(this.rJODfZ[UM59L]); delete this.rJODfZ[UM59L]; } if (this.efLO4[UM59L]) { var wUdQI = 0; var points=new Array(); var SPYO = false; var TQ9K6 = false; for (E7Zd in this.GHA7i8[UM59L]) { var rAGEBB=i7TKtk8( { lat:this.GHA7i8[UM59L][E7Zd].lat, lng:this.GHA7i8[UM59L][E7Zd].lng }, this.zoom, { lat:(this.fM6.UNBK7- (this.fM6.UNBK7-this.fM6.J8eH7)/2), lng:(this.fM6.u6AA- (this.fM6.u6AA-this.fM6.li4f2)/2) }, { eimN0e: this.GLUD, rloSI4: this.wX7L8B } ); if (rAGEBB[tmw.util.sym.eimN0e]>this.GLUD || rAGEBB[tmw.util.sym.rloSI4]>this.wX7L8B || rAGEBB[tmw.util.sym.eimN0e]<0 || rAGEBB[tmw.util.sym.rloSI4]<0) { } else { SPYO = true; var FTg1S = {x:rAGEBB[tmw.util.sym.eimN0e],y:rAGEBB[tmw.util.sym.rloSI4]}; if (points.length>0) { if (FTg1S.x==points[points.length-1].x && FTg1S.y==points[points.length-1].y) { wUdQI++; } else { points.push(FTg1S); }; } else { points.push(FTg1S); }; } } if (SPYO) { if (wUdQI>0) { } var minLength = 10; var totalLength = 0; for (E7Zd=1; E7Zd10) { LiSR++; }; } if (LiSR