var onLine=true;var VLoader={xmlPath:'xml/_lite/',jsPath:'',cssPath:'',local:(location.protocol.indexOf('file')==0||location.host=='localhost'),rpt:0,pln:0,fc:4,fn:null,retry:10,getRnd:function(){return Math.floor(Math.random()*1000);},init:function(){document.getElementById('Ldr').innerHTML=this.getLoadHtm();this.fn=this.fc;var aa=location.href.lastIndexOf('/');var ba=location.href.substring(0,aa+1);this.jsPath=ba+'js/';this.cssPath=ba+'css/';this.addCss(this.css[0]);this.addCss(this.css[1]);this.addCore();this.addScript('vprn.js');},chekLoaded:function(){if(VLoader.fc==0)this.checkGMap();},update:function(){this.fc--;document.getElementById('progBar').width=parseInt(200*(1-this.fc/this.fn));document.getElementById('progInfo').innerHTML='Caricamento&nbsp;'+parseInt(100*(1-this.fc/this.fn))+'%';this.chekLoaded();},updateRpt:function(){this.rpt--;if(this.rpt==0)VMain.setTabBtn(VLyr.rpt.id,null);},css:['class.css','object.css'],core:['vglobal.js','vobj.js','vspecial00.js','lmain.js'],modules:['vmap.js','dragzoom.js','vevt.js','vpos.js','vtrp.js','vmth.js','vrif.js','vpoi.js'],addCore:function(){for(var i=0;i<this.core.length;i++)this.addScript(this.core[i]);},getModule:function(i){this.addScript(this.modules[i]);},getModules:function(){var i,js=[];if(VModules.evt){js.push(this.modules[2]);this.rpt++;}
if(VModules.pos){js.push(this.modules[3]);this.rpt++;}
if(VModules.trp){js.push(this.modules[4]);this.rpt++;}
if(VModules.mth){js.push(this.modules[5]);this.rpt++;}
if(VModules.rif){js.push(this.modules[6]);this.rpt++;}
if(VModules.poi){js.push(this.modules[7]);}
for(i=0;i<js.length;i++)this.addScript(js[i]);},done:function(ca){switch(ca){case 'VMap':VMain.next(-1);}},addScript:function(da){var js=document.createElement('script');js.type='text/javascript';js.src=this.jsPath+da;document.getElementsByTagName("head")[0].appendChild(js);},addCss:function(ea){var el=document.createElement('link');el.type='text/css';el.rel='stylesheet';el.href=this.cssPath+ea;document.getElementsByTagName('head')[0].appendChild(el);},removeScript:function(fa){var ga=document.getElementsByTagName('script');var js,patternIdx,fa;for(var i=0;i<ga.length;i++){if(!ga[i].src)continue;fa=ga[i].src;patternIdx=fa.lastIndexOf(fa);if(patternIdx>-1){js=ga[i];js.parentNode.removeChild(js);break;}}},removeCss:function(ha){var ia=document.getElementsByTagName('link');var ja,patternIdx,href;for(var i=0;i<ia.length;i++){if(!ia[i].href)continue;href=ia[i].href;patternIdx=href.lastIndexOf(ha);if(patternIdx>-1){ja=ia[i];ja.parentNode.removeChild(ja);break;}}},checkGMap:function(){var ka=(typeof(GMap2)!="undefined");if(ka||!onLine)VMain=new _VMain();else{document.getElementById('dbg').innerHTML='Google Map: '+ka+' - '+VLoader.retry;if(VLoader.retry-->0)setTimeout('VLoader.checkGMap()',1000);else alert('Impossibile caricare le mappe di Google');}},getLoadHtm:function(){var la='<table border="0" cellspacing="0" cellpadding="0">'+'<tr><td width="105" id="LdrTd1">'+'<div id="progInfo" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #003399;">Caricamento&nbsp;0%</div>'+'</td></tr>'+'<tr><td id="LdrTd2" bgcolor="#E1E1E1" width="200"><img id="progBar" src="images/BluePx.jpg" width="1" height="12" alt=""></td></tr>'+'</table>'+'<div id="dbg"></div>'+'<div style="text-align:center; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #003399;">'+'<br>Se l\'applicazione non dovesse caricarsi correttamente clicca '+'<a href="#" onclick="window.location.reload(false);">&laquo;qui&raquo; </a><br><br>'+'Se il problema persiste rivolgiti a:<br><br>'+'<a href="mailto:support@visonline.it">support@visonline.it</a><br><br>'+'con i seguenti dati:<br><br>'+'UserAgent: <font style="font-weight: normal">'+window.navigator.userAgent+'</font>'+'</div>';return la;}};