
var licDialog;var licstoreJSON=new Ext.data.JsonStore({url:'grid-data.php',root:'root',first:true,fields:['lon','lat','licencee','licence','pod','name',{name:'power',type:'float'},'purpose','units','status','icon'],listeners:{'beforeload':function(){Ext.getCmp('content-panel').layout.setActiveItem('tab-panel');},'load':function(store,records,options){var markers=[];var v;var zoom;var bounds=new GLatLngBounds;for(i=0;i<records.length;i++){if(records[i].json.lat!=null&&records[i].json.lat!=0){var icon;switch(records[i].json.icon){case'g':icon=g;break;case'r':icon=r;break;case'b':icon=b;break;}
v=new IconOverlay(new GLatLng(records[i].json.lat,records[i].json.lon),icon,{title:records[i].json.name+" ["+records[i].json.licencee+"]",mouseoverIcon:y,id:records[i].json.id});bounds.extend(v.point);markers.push(v);}}
markerMan.clearMarkers();markerMan.addMarkers(markers,0,17);markerMan.refresh();if(!this.first){zoom=themap.getBoundsZoomLevel(bounds);if(zoom<themap.getZoom()){themap.setZoom(zoom);}
themap.panTo(bounds.getCenter());}
this.first=false;},'loadexception':function(proxy,data,arg,e){}}});var start={id:'start-panel',title:'Start Page',layout:'fit',bodyStyle:'padding:25px',contentEl:'start-div'};var download=new Ext.Action({text:'Download',handler:function(){window.open('sql2excel.php?id='+licstoreJSON.lastOptions.params.id);},iconCls:'icon-save'});var storageCb=new Ext.form.Checkbox({boxLabel:'Include storage',name:'includeStorage',checked:false});