IFactorLayersHandler.customLayersIcons=new Object();IFactorLayersHandler.prototype.doImportVectorLayer=function(B,C,D,G,A,E){if(!A){E.Hide()}if(iFactor.common.config.disable_map_msg_box==true||iFactor.common.config.disable_map_msg_box=="true"){this.stormCenter.map.ShowMessageBox=false}this.readCustomLayersIconsForDynamicLegend(C,D);var F=D.loadCraftily;if(!F){this.doImportVectorLayerAutomatically(C,D,G,E)}else{this.doImportVectorLayerCraftily(C,D,G,E)}};IFactorLayersHandler.prototype.readCustomLayersIconsForDynamicLegend=function(A,D){if(D.layerName=="informationpoint"){var C=this.getCustomLayerIconsAndDesc(A);IFactorLayersHandler.customLayersIcons[D.layerName]=C}else{if(D.layerName=="informationarea"){var C=this.getCustomLayerIconsAndDesc(A);var B;for(B=0;B<C.length;B++){C[B]=C[B].replace(/.ico/,".gif")}IFactorLayersHandler.customLayersIcons[D.layerName]=C}}};IFactorLayersHandler.prototype.getCustomLayerIconsAndDesc=function(E){if(E!=null){var C=iFactor.common.createXMLRequest();var B=E;B=B+iFactor.common.uniqueRequestTag(true);C.open("GET",B,false);C.send(null);if((C.readyState==4)&&(C.status!=404)){var F,D;var I;var L=[];var K=C.responseXML;var H=K.getElementsByTagName("item");for(F=0;F<H.length;F++){var A=H[F];var I=this.getCustomLayerIcon(A);var J=this.getCustomLayerDescription(A);var G=new Boolean(true);for(D=0;D<L.length;D++){if(I==L[D].split("|")[0]){G=false;break}}if(G){L[L.length]=I+"|"+J}}return L}}return null};IFactorLayersHandler.customlayersExternalNames={"informationarea_1.ico":"Planned Outage Gas","informationarea_2.ico":"Gas Event","informationarea_3.ico":"Planned Outage Electric","informationarea_4.ico":"Electric Event","informationarea_5.ico":"Ad hoc Area Event","informationpoint_1.gif":"Crews Working","informationpoint_2.gif":"Dry Ice Location","informationpoint_3.gif":"Mobile Outreach Command Center","informationpoint_4.gif":"Shelters","informationpoint_5.gif":"Photos","informationpoint_6.gif":"National Grid Road Closures","informationpoint_7.gif":"Ad hoc Indicators"};IFactorLayersHandler.prototype.getCustomLayerDescription=function(C){var B=C.getElementsByTagName("icon")[0];var A=iFactor.common.getXMLNodeValue(B);var E=A.split("/");var D=E[E.length-1];var F=IFactorLayersHandler.customlayersExternalNames[D];if(F==null){F="Not found"}return F};IFactorLayersHandler.prototype.getCustomLayerIcon=function(B){var A=B.getElementsByTagName("icon")[0];var C=iFactor.common.getXMLNodeValue(A);return C};