1 2/*------------------------------------------------------------------------ 3# Map Object Manager Class 4# ------------------------------------------------------------------------ 5# author: Dmitry Zhuk 6# copyright: Copyright (C) 2013 zhuk.cc. All Rights Reserved. 7# license: http://creativecommons.org/licenses/by-nc-nd/4.0/ 8# Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 9# website: http://zhuk.cc 10# Technical Support Forum: http://forum.zhuk.cc/ 11# version: 11.4.0 12-------------------------------------------------------------------------*/ 13function zhymMapObjectManager(){zhymMapObjectManager.ac+=1;this.bQ=zhymMapObjectManager.ac;this.G=[];this.eU=[];this.aY=[];this.bL=[];this.au="";this.al=[];this.ct=[];this.bE=[];this.fr=[];this.dS=[];this.ay=false;this.cs=true;this.bm=false;this.az=false;this.cR="Independent";this.bI=false;this.cc=false;this.cD=[];this.aZ=false;this.eB=false;this.cC=false;this.bP=[];this.er=false;this.bz=0;this.bB="";this.bO="";this.bF="";this.cK="";this.aw=0;this.bV="";this.aP="";this.cu;this.dJ=0;this.aQ="";this.bq=0;this.aD=0;this.fC=0;this.fa="";this.map=null;this.eo="";this.bG=null;this.dj=null;this.aj=jQuery.noConflict();this.bp="2.1";this.bN=[];this.R=null;this.C=null;this.J=null;this.h=[];this.bK=null;this.ah=null;this.aH=null;this.by=null;this.ao=null;this.ft=null;this.bs=null;this.cV=null;this.de=null;this.dH=null;this.cg=null;this.en=null;this.dQ=null;this.cb=null;this.bS="";this.cZ="";this.cA="";this.dw="";this.cp="";this.dA="";this.fn=0;this.aC=0;this.cX=0;this.dO="";this.bX=0;this.cw=0;this.cQ=0;this.dM=0;this.ck="";this.cl=0;this.ca=0;this.dG="";this.cF="";this.dB='0';this.ew=0;this.fE=null;this.du=0;this.cB=0;this.dm="";this.dR="";this.dK='0';zhymMapObjectManager.aO[this.bQ]=this;this.fF='a-markergroup_';};zhymMapObjectManager.ac=0;zhymMapObjectManager.aO=[];zhymMapObjectManager.prototype.setMarkerListAutoClose=function(t){this.ew=t;};zhymMapObjectManager.prototype.setMarkerListButton=function(t){this.fE=t;};zhymMapObjectManager.prototype.setGroupCountObject=function(t){this.au=t;};zhymMapObjectManager.prototype.setAPIversion=function(t){this.bp=t;};zhymMapObjectManager.prototype.setCompatibleMode=function(t){this.cX=t;};zhymMapObjectManager.prototype.setAjaxBufferSize=function(t){this.fn=t;};zhymMapObjectManager.prototype.setPlacemarkLoadType=function(t){this.aC=t;};zhymMapObjectManager.prototype.setMap=function(t){this.map=t;};zhymMapObjectManager.prototype.setObjectGroupManagementType=function(t){this.cR=t;};zhymMapObjectManager.prototype.setMapLanguageTag=function(t){this.eo=t;};zhymMapObjectManager.prototype.setInfowin=function(t){this.bG=t;};zhymMapObjectManager.prototype.setCenterPlacemark=function(t){this.aP=t;};zhymMapObjectManager.prototype.setRequestURL=function(t){this.bV=t;};zhymMapObjectManager.prototype.setContactAttrs=function(t){this.aQ=t;};zhymMapObjectManager.prototype.setUserContact=function(t){this.bq=t;};zhymMapObjectManager.prototype.setUserUser=function(t){this.aD=t;};zhymMapObjectManager.prototype.setServiceDirection=function(t){this.bz=t;};zhymMapObjectManager.prototype.setIcoIcon=function(t){this.bB=t;};zhymMapObjectManager.prototype.setIcoUtils=function(t){this.bO=t;};zhymMapObjectManager.prototype.setIcoDir=function(t){this.bF=t;};zhymMapObjectManager.prototype.setArticleID=function(t){this.cK=t;this.fF='a-markergroup'+t+"_";};zhymMapObjectManager.prototype.setPlacemarkRating=function(t){this.aw=t;};zhymMapObjectManager.prototype.setPlacemarkTitleTag=function(t){this.dO=t;};zhymMapObjectManager.prototype.setPlacemarkCreationInfo=function(t){this.fC=t;};zhymMapObjectManager.prototype.setPlacemarkDateFormat=function(t){this.fa=t;};zhymMapObjectManager.prototype.setHoverInfoBubble=function(t){this.J=t;};zhymMapObjectManager.prototype.setHoverInfoWindow=function(t){this.C=t;};zhymMapObjectManager.prototype.setHoverMarkerType=function(t){this.R=t;};zhymMapObjectManager.prototype.setUserMarkersFilter=function(t){this.bs=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPlacemarkCategotyList=function(t){this.ao=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPlacemarkGroupList=function(t){this.by=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setExcludePlacemarkList=function(t){this.aH=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPlacemarkList=function(t){this.ah=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPathCategotyList=function(t){this.cg=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPathGroupList=function(t){this.dH=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setExcludePathList=function(t){this.de=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPathTagList=function(t){this.en=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPlacemarkTagList=function(t){this.ft=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setPathList=function(t){this.cV=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.setMapID=function(t){this.bK=String(t).replace(/\s+/g,"");};zhymMapObjectManager.prototype.enableObjectGroupManagement=function(){this.az=true;};zhymMapObjectManager.prototype.enablePlacemarkList=function(){this.er=true;};zhymMapObjectManager.prototype.enablePlacemarkGroupManagement=function(t){this.bI=true;if(t==2){this.cc=true;this.cD=[];}};zhymMapObjectManager.prototype.enablePathGroupManagement=function(t){this.aZ=true;};zhymMapObjectManager.prototype.disablePlacemarkClusterizationClickZoom=function(){this.cs=false;};zhymMapObjectManager.prototype.enablePathXGroupManagement=function(t){this.eB=true;if(t==22){this.cC=true;this.bP=[];}};zhymMapObjectManager.prototype.enablePlacemarkClusterization=function(){this.ay=true;};zhymMapObjectManager.prototype.enablePlacemarkClusterizationByGroup=function(){this.bm=true;};zhymMapObjectManager.prototype.setMarkerListPos=function(t){this.cw=t;};zhymMapObjectManager.prototype.setMarkerListContent=function(t){this.cQ=t;};zhymMapObjectManager.prototype.setMarkerListAction=function(t){this.dM=t;};zhymMapObjectManager.prototype.setMarkerListCSSStyle=function(t){this.ck=t;};zhymMapObjectManager.prototype.PlacemarkAdd=function(L,co,T,K){zhymMapObjectManager.prototype.cE(this,L,co,T,K);};zhymMapObjectManager.prototype.cE=function(fi,L,co,T,K){var k=fi;var bv=L;var bi;k.bN[co]=T;if(typeof k.aY[bv]!=='undefined'){k.aY[bv]=1;bi=k.bL[bv];bi.push(T);k.bL[bv]=bi;}else{k.aY[bv]=1;k.bL[bv]=[T];}};zhymMapObjectManager.prototype.PathAdd=function(L,bH){zhymMapObjectManager.prototype.dh(this,L,bH);};zhymMapObjectManager.prototype.PathXAdd=function(L,bH){zhymMapObjectManager.prototype.ep(this,L,bH);};zhymMapObjectManager.prototype.dh=function(fi,L,bH){var k=fi;var bv=L;var bi;if(typeof k.ct[bv]!=='undefined'){k.ct[bv]=1;bi=k.bE[bv];bi.push(bH);k.bE[bv]=bi;}else{k.ct[bv]=1;k.bE[bv]=[bH];}};zhymMapObjectManager.prototype.allObjectsAddPlacemark=function(cq,T){zhymMapObjectManager.prototype.eL(this,cq,T);};zhymMapObjectManager.prototype.eL=function(fi,eW,T){var k=fi;var bv=eW;var bi;if(typeof k.eU[bv]!=='undefined'){bi=k.eU[bv];bi.push(T);k.eU[bv]=bi;}else{k.eU[bv]=[T];}};zhymMapObjectManager.prototype.ep=function(fi,L,bH){var k=fi;var bv=L;var bi;if(typeof k.fr[bv]!=='undefined'){k.fr[bv]=1;bi=k.dS[bv];bi.push(bH);k.dS[bv]=bi;}else{k.fr[bv]=1;k.dS[bv]=[bH];}};zhymMapObjectManager.prototype.PlacemarkCount=function(){return this.bL.length;};zhymMapObjectManager.prototype.dq=function(ee,dn){var F;var aG=ee;var aU;for(var i=0;i<aG.length;i++){F=aG[i];aU=this.G[i];if((typeof F!=='undefined')&&(F!=null)){if((typeof aU!=='undefined')&&(aU!=null)){if(this.az&&this.bI){if(aU!=0){this.aI(i,dn);}else{this.cT(i,dn);}}else{this.aI(i,dn);}}else{this.aI(i,dn);}}}};zhymMapObjectManager.prototype.ce=function(){var k=this;var di;var bv;var F;var eu;var cr;var bY=[k.aY,k.ct,k.fr];for(var cY=0;cY<bY.length;cY++){di=bY[cY];for(var i=0;i<di.length;i++){bv=di[i];cr=0;if((typeof bv!=='undefined')&&(bv!=null)){if(k.au=="10"||k.au=="11"||k.au=="12"||k.au=="20"||k.au=="21"||k.au=="22"){F=k.bL[i];if((typeof F!=='undefined')&&(F!=null)){for(var ag=0;ag<F.length;ag++){cr=cr+1;}}}if(k.au=="10"||k.au=="11"||k.au=="12"||k.au=="30"||k.au=="31"||k.au=="32"){F=k.bE[i];if((typeof F!=='undefined')&&(F!=null)){for(var ag=0;ag<F.length;ag++){cr=cr+1;}}}if(k.au=="10"||k.au=="11"||k.au=="12"||k.au=="30"||k.au=="31"||k.au=="32"){F=k.dS[i];if((typeof F!=='undefined')&&(F!=null)){for(var ag=0;ag<F.length;ag++){cr=cr+1;}}}}if(k.au=="10"||k.au=="11"||k.au=="12"||k.au=="20"||k.au=="21"||k.au=="22"||k.au
13=="30"||k.au=="31"||k.au=="32"){if(cr!=0){eu=document.getElementById("s-markergroup_"+i);if(eu!=null){eu.innerHTML=' '+cr+' ';}}}}}};zhymMapObjectManager.prototype.ab=function(L,aB){var ai=aB;var bg;var bu;var bv;var eu;var ak;if((typeof ai!=='undefined')&&(ai!=null)){if(this.az&&this.bI){this.cD=[];var aE=this.cD;var dc=this.bP;var cG=[];var aU=this.G[L];if((typeof aU!=='undefined')&&(aU==1)){if(this.ay){if(this.bm){bg=this.al[L];bg.add(ai);}else{bg=this.al[0];bg.add(ai);}}else{for(var ag=0;ag<ai.length;ag++){bu=ai[ag];ak=this.map;ak.geoObjects.add(bu);}}if(this.cc){ak=this.map;if(ak.geoObjects.getLength()>0){if(ak.geoObjects.getBounds()!=null){ak.geoObjects.each(function(el,i){if(el instanceof ymaps.Placemark){aE.push(el.geometry.getBounds());}else if(el instanceof ymaps.Clusterer){var fN=el.getGeoObjects();for(var eQ=0,l=fN.length;eQ<l;eQ++){var fg=fN[eQ];aE.push(fg.geometry.getBounds());}}});if(aE.length>0){cG=cG.concat(aE);}if(dc.length>0){cG=cG.concat(dc);}if(cG.length>0){if(cG.length==1&&aE.length>0){ak.setBounds(cG[0]);ak.setZoom(ak.zoomRange.getCurrent()[1]);}else{ak.setBounds(ymaps.util.bounds.fromBounds(cG));}}}}}if(this.er){for(var ag=0;ag<ai.length;ag++){bu=ai[ag];bv="zhym_pmlist_item_"+this.cK+"_"+bu.properties.get("zhymPlacemarkID");eu=document.getElementById(bv);if(eu!=null){eu.style.display='block';}}}}}else{if(this.ay){if(this.bm){bg=this.al[L];bg.add(ai);}else{bg=this.al[0];bg.add(ai);}}else{for(var ag=0;ag<ai.length;ag++){bu=ai[ag];ak=this.map;ak.geoObjects.add(bu);}}if(this.er){for(var ag=0;ag<ai.length;ag++){bu=ai[ag];bv="zhym_pmlist_item_"+this.cK+"_"+bu.properties.get("zhymPlacemarkID");eu=document.getElementById(bv);if(eu!=null){eu.style.display='block';}}}}}};zhymMapObjectManager.prototype.aN=function(L,aB){var ai=aB;var bg;var bu;var bv;var eu;var ak;if((typeof ai!=='undefined')&&(ai!=null)){if(this.az&&this.bI){this.cD=[];var aE=this.cD;var dc=this.bP;var cG=[];var aU=this.G[L];if((typeof aU==='undefined')||(aU==0)){if(this.ay){if(this.bm){bg=this.al[L];bg.remove(ai);}else{bg=this.al[0];bg.remove(ai);}}else{for(var ag=0;ag<ai.length;ag++){bu=ai[ag];ak=this.map;ak.geoObjects.remove(bu);}}if(this.cc){ak=this.map;if(ak.geoObjects.getLength()>0){if(ak.geoObjects.getBounds()!=null){ak.geoObjects.each(function(el,i){if(el instanceof ymaps.Placemark){aE.push(el.geometry.getBounds());}else if(el instanceof ymaps.Clusterer){var fN=el.getGeoObjects();for(var eQ=0,l=fN.length;eQ<l;eQ++){var fg=fN[eQ];aE.push(fg.geometry.getBounds());}}});if(aE.length>0){cG=cG.concat(aE);}if(dc.length>0){cG=cG.concat(dc);}if(cG.length>0){if(cG.length==1&&aE.length>0){ak.setBounds(cG[0]);ak.setZoom(ak.zoomRange.getCurrent()[1]);}else{ak.setBounds(ymaps.util.bounds.fromBounds(cG));}}}}}if(this.er){for(var ag=0;ag<ai.length;ag++){bu=ai[ag];bv="zhym_pmlist_item_"+this.cK+"_"+bu.properties.get("zhymPlacemarkID");eu=document.getElementById(bv);if(eu!=null){eu.style.display='none';}}}}}else{if(this.ay){if(this.bm){bg=this.al[L];bg.remove(ai);}else{bg=this.al[0];bg.remove(ai);}}else{for(var ag=0;ag<ai.length;ag++){bu=ai[ag];ak=this.map;ak.geoObjects.remove(bu);}}if(this.er){for(var ag=0;ag<ai.length;ag++){bu=ai[ag];bv="zhym_pmlist_item_"+this.cK+"_"+bu.properties.get("zhymPlacemarkID");eu=document.getElementById(bv);if(eu!=null){eu.style.display='none';}}}}}};zhymMapObjectManager.prototype.aI=function(L,dn){var ai=dn[L];this.ab(L,ai);};zhymMapObjectManager.prototype.cT=function(L,dn){var ai=dn[L];this.aN(L,ai);};zhymMapObjectManager.prototype.ClusterAdd=function(L,ar){this.al[L]=ar;};zhymMapObjectManager.prototype.aq=function(fi,v,bD){if(v.dataexists==1){var k=fi;var aR=parseInt(v.actionbyclick);var bM=parseInt(v.zoombyclick);var ak=k.map;bD.properties.set("zhymPlacemark_actionbyclick",aR);bD.properties.set("zhymPlacemark_zoombyclick",bM);if(aR==0){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}}else if(aR==1){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}var O=eval(v.contentstringheader);bD.properties.set("balloonContentHeader",O);bD.properties.set("zhymBalloonContentHeader",O);O=eval(v.contentstringbody);bD.properties.set("balloonContentBody",O);bD.properties.set("zhymBalloonContentBody",O);O=eval(v.contentstringheadercluster);bD.properties.set("clusterCaption",O);bD.properties.set("zhymClusterCaption",O);bD.balloon.open();}else if(aR==2){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}var cI=v.hrefsite;bD.properties.set("zhymPlacemark_sitelocation",cI);window.open(cI);}else if(aR==3){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}var cI=v.hrefsite;bD.properties.set("zhymPlacemark_sitelocation",cI);window.location=cI;}else{alert("Unexpected action by click: "+v.actionbyclick);}bD.properties.set("zhymPlacemarkConfigLoaded",1);}else{}};zhymMapObjectManager.prototype.cO=function(fi,bD){var k=fi;var aR=parseInt(bD.properties.get("zhymPlacemark_actionbyclick"));var bM=parseInt(bD.properties.get("zhymPlacemark_zoombyclick"));var ak=k.map;if(aR==0){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}}else if(aR==1){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}var O=bD.properties.get("zhymBalloonContentHeader");bD.properties.set("balloonContentHeader",O);O=bD.properties.get("zhymBalloonContentBody");bD.properties.set("balloonContentBody",O);O=bD.properties.get("zhymClusterCaption");bD.properties.set("clusterCaption",O);}else if(aR==2){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}var cI=bD.properties.get("zhymPlacemark_sitelocation");
13window.open(cI);}else if(aR==3){if(bM!=100){ak.setCenter(bD.geometry.getCoordinates());ak.setZoom(bM);}var cI=bD.properties.get("zhymPlacemark_sitelocation");window.location=cI;}else{alert("Unexpected action by click: "+v.actionbyclick);}};zhymMapObjectManager.prototype.GetPlacemarkAJAX=function(V){var bw=this.bV+'index.php?option=com_zhyandexmap&no_html=1&format=raw&task=getAJAXPlacemarkList';var ak=this.map;var fl=this.bK;var ff=this.ah;var ej=this.aH;var eD=this.by;var aW=this.ao;var bo=this.bs;var k=this;var aE=ak.getBounds();var aa=this.aC;var fD=this.ft;var av={mapid:fl,placemarklistid:ff,explacemarklistid:ej,grouplistid:eD,categorylistid:aW,taglistid:fD,usermarkersfilter:bo,placemarkloadtype:aa,x1:aE[0][0],y1:aE[0][1],x2:aE[1][0],y2:aE[1][1],};if(V=='mootools'){var dr=new Request({url:bw,method:'post',data:av,async:true,onSuccess:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=JSON.decode(responseText);zhymMapObjectManager.prototype.aA(V,k,bc);},onRequest:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},onFailure:function(xhr){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert(xhr.status+','+xhr.statusText+','+xhr.responseText);}}).send();}else if(V=='jquery'){var ae=k.aj;ae.ajax({url:bw,type:'post',data:av,dataType:'json',async:true,success:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=responseText;zhymMapObjectManager.prototype.aA(V,k,bc);},beforeSend:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},fail:function(xhr,textStatus){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert("Error"+textStatus);}});}};zhymMapObjectManager.prototype.eZ=function(V,fi,ed){var k=fi;var bf=ed;var bv;var bA;if(k.cs){bA=0;}else{bA=1;}var bw=k.bV+'index.php?option=com_zhyandexmap&no_html=1&format=raw&task=getAJAXPlacemarks';var av={ajaxarray:bf,mapmarkerlistpos:k.cw,mapmarkerlistcontent:k.cQ,mapmarkerlistaction:k.dM,mapmarkerlistcssstyle:k.ck,getdetails:bA,contactattrs:k.aQ,usercontact:k.bq,useruser:k.aD,servicedirection:k.bz,iconicon:k.bB,iconutil:k.bO,icondir:k.bF,articleid:k.cK,placemarkrating:k.aw,placemarktitletag:k.dO,language:k.eo,showcreateinfo:k.fC,placemarkdateformat:k.fa,placemarklistautoclose:k.ew};if(V=='mootools'){var dr=new Request({url:bw,method:'post',data:av,async:true,onSuccess:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=JSON.decode(responseText);zhymMapObjectManager.prototype.da(V,k,bc);},onRequest:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},onFailure:function(xhr){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert(xhr.status+','+xhr.statusText+','+xhr.responseText);}}).send();}else if(V=='jquery'){var ae=k.aj;ae.ajax({url:bw,type:'post',data:av,dataType:'json',async:true,success:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=responseText;zhymMapObjectManager.prototype.da(V,k,bc);},beforeSend:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},fail:function(xhr,textStatus){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert("Error"+textStatus);}});}};zhymMapObjectManager.prototype.aA=function(V,fi,aK){if(aK.dataexists==1){var bJ=aK.markers;var k=fi;var bf=[];var bv;var fv=k.fn;var cN;cN=0;for(var i=0;i<bJ.length;i++){bv=bJ[i].id;if(typeof k.bN[bv]!=='undefined'){}else{bf.push(bv);if(fv!=0){cN+=1;if(cN>=fv){cN=0;var ba=bf.slice(0);zhymMapObjectManager.prototype.eZ(V,k,ba);bf=[];}}}}var ba=bf.slice(0);if(ba.length!=0){zhymMapObjectManager.prototype.eZ(V,k,ba);}bf=[];}else{}};zhymMapObjectManager.prototype.da=function(V,fi,v){var aG=[];var cv=[];var bi;var dP;if(v.dataexists==1){var bJ=v.markers;var k=fi;var bv;var aV;for(var i=0;i<bJ.length;i++){bv=bJ[i].id;aV=bJ[i].markergroup;if(typeof k.bN[bv]!=='undefined'){}else{dP=k.dC(V,k,bJ[i]);if(k.cw!=0){var dz;if(k.cQ<100){dz='var markerUL = document.getElementById("YMapsMarkerUL'+k.cK+'");';}else{dz='var markerUL = document.getElementById("YMapsMarkerTABLEBODY'+k.cK+'");';}if(bJ[i].placemarklistcontent!=""){eval(dz+bJ[i].placemarklistcontent);}}if((typeof aG[aV]!=='undefined')&&(aG[aV]!=null)){aG[aV]+=1;bi=cv[aV];bi.push(dP);cv[aV]=bi;}else{aG[aV]=1;cv[aV]=[dP];}}}k.dq(aG,cv);k.refreshPlacemarkListSearch();k.ce();k.cS();}else{}};zhymMapObjectManager.prototype.dC=function(V,fi,an){var k=fi;var bj=[an.longitude,an.latitude];var aF=new ymaps.Placemark(bj);if(parseInt(an.actionbyclick)==1){aF.options.set("hasBalloon",true);}
13else{aF.options.set("hasBalloon",false);}aF.properties.set("hintContent",an.title);if(an.xxx_getdetails="1"){var O=eval(an.xxx_contentstringheader);aF.properties.set("balloonContentHeader",O);O=eval(an.xxx_contentstringbody);aF.properties.set("balloonContentBody",O);O=eval(an.xxx_contentstringheadercluster);aF.properties.set("clusterCaption",O);}if(an.openbaloon==1){k.cu=aF;k.dJ=1;}if((parseInt(an.overridemarkericon)==1)&&(parseInt(an.publishedgroup)==1)){if(parseInt(an.groupshowiconcontent)==0){if((an.groupiconofsetx!="")&&(an.groupiconofsety!="")){var bb=new Image();bb.onload=function(){var aX;if(an.groupicontype.substring(0,8)=="default#"){aX=7;}else{aX=this.width/2;}var bU=parseInt(an.groupiconofsetx)-aX;var ad=parseInt(an.groupiconofsety)-this.height;if(k.bp!="2.0"){aF.options.set("iconLayout",'default#image');}aF.options.set("iconImageHref",k.bB+an.groupicontype.replace("#","%23")+".png");aF.options.set("iconImageSize",[this.width,this.height]);aF.options.set("iconImageOffset",[bU,ad]);};bb.src=k.bB+an.groupicontype.replace("#","%23")+".png";}else{var bb=new Image();bb.onload=function(){if(k.bp!="2.0"){aF.options.set("iconLayout",'default#image');}aF.options.set("iconImageHref",k.bB+an.groupicontype.replace("#","%23")+".png");aF.options.set("iconImageSize",[this.width,this.height]);};bb.src=k.bB+an.groupicontype.replace("#","%23")+".png";}}else{if(an.grouppreseticontype!=""){aF.options.set("preset",an.grouppreseticontype);}else{aF.options.set("preset","twirl#blueStretchyIcon");}if(parseInt(an.groupshowiconcontent)==1){if(an.grouppresettitle!=""){aF.properties.set("iconContent",an.grouppresettitle);}else{aF.properties.set("iconContent",an.title);}}}}else{if(parseInt(an.showiconcontent)==0){if((an.iconofsetx!="")&&(an.iconofsety!="")){var bb=new Image();bb.onload=function(){var aX;if(an.icontype.substring(0,8)=="default#"){aX=7;}else{aX=this.width/2;}var bU=parseInt(an.iconofsetx)-aX;var ad=parseInt(an.iconofsety)-this.height;if(k.bp!="2.0"){aF.options.set("iconLayout",'default#image');}aF.options.set("iconImageHref",k.bB+an.icontype.replace("#","%23")+".png");aF.options.set("iconImageSize",[this.width,this.height]);aF.options.set("iconImageOffset",[bU,ad]);};bb.src=k.bB+an.icontype.replace("#","%23")+".png";}else{var bb=new Image();bb.onload=function(){if(k.bp!="2.0"){aF.options.set("iconLayout",'default#image');}aF.options.set("iconImageHref",k.bB+an.icontype.replace("#","%23")+".png");aF.options.set("iconImageSize",[this.width,this.height]);};bb.src=k.bB+an.icontype.replace("#","%23")+".png";}}else{if(an.preseticontype!=""){aF.options.set("preset",an.preseticontype);}else{aF.options.set("preset","twirl#blueStretchyIcon");}if(parseInt(an.showiconcontent)==1){if(an.presettitle!=""){aF.properties.set("iconContent",an.presettitle);}else{aF.properties.set("iconContent",an.title);}}}}zhymMapObjectManager.prototype.cE(k,an.markergroup,an.id,aF,an);
13aF.properties.set("zhymPlacemarkID",an.id);aF.properties.set("zhymContactAttrs",k.aQ);aF.properties.set("zhymUserContact",k.bq);aF.properties.set("zhymUserUser",k.aD);aF.properties.set("zhymOriginalPosition",aF.geometry.getCoordinates());aF.properties.set("zhymTitle",an.title);aF.properties.set("zhymIncludeInList",an.includeinlist);k.allObjectsAddPlacemark(an.id,aF);zhymMapObjectManager.prototype.as(V,k,aF);if(k.R){if(an.do_hover!=""){zhymMapObjectManager.prototype.aS(V,k,aF);}}if(k.aP==an.id){k.map.setCenter(bj);}return aF;};zhymMapObjectManager.prototype.cS=function(){var k=this;var aF;if(k.dJ==1){aF=k.cu;aF.events.fire("click",new ymaps.Event({target:aF}));}};zhymMapObjectManager.prototype.PlacemarkListAction=function(cq){var k=this;var ak=k.map;var ev=k.fE;var dW=k.ew;if(typeof k.eU[cq]!=='undefined'){var fm=k.eU[cq];var es=fm[0];var fs=es.geometry.getCoordinates();if(k.dM==0){ak.setCenter(fs);if(dW!=0){ev.deselect();}}else if(k.dM==1){es.events.fire("click",new ymaps.Event({target:es}));if(dW!=0){ev.deselect();}}else if(k.dM==11){ak.setCenter(fs);es.events.fire("click",new ymaps.Event({target:es}));if(dW!=0){ev.deselect();}}else{ak.setCenter(fs);if(dW!=0){ev.deselect();}}}};zhymMapObjectManager.prototype.PlacemarkAddListeners=function(V,an){var k=this;k.as(V,k,an);};zhymMapObjectManager.prototype.as=function(V,fi,am){am.properties.set("zhymPlacemarkConfigLoaded",0);am.events.add('click',function(event){var k=fi;var bw=k.bV+'index.php?option=com_zhyandexmap&no_html=1&format=raw&task=getPlacemarkDetails';var av={id:am.properties.get("zhymPlacemarkID"),contactattrs:am.properties.get("zhymContactAttrs"),usercontact:am.properties.get("zhymUserContact"),useruser:am.properties.get("zhymUserUser"),servicedirection:k.bz,iconicon:k.bB,iconutil:k.bO,icondir:k.bF,articleid:k.cK,placemarkrating:k.aw,placemarktitletag:k.dO,language:k.eo,showcreateinfo:k.fC,placemarkdateformat:k.fa};var aL=am;if(am.properties.get("zhymPlacemarkConfigLoaded")=="1"){zhymMapObjectManager.prototype.cO(k,am,event);}else{if(V=='mootools'){var dr=new Request({url:bw,method:'post',data:av,async:true,onSuccess:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=JSON.decode(responseText);zhymMapObjectManager.prototype.aq(k,bc,aL);},onRequest:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},onFailure:function(xhr){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert(xhr.status+','+xhr.statusText+','+xhr.responseText);}}).send();}else if(V=='jquery'){var ae=k.aj;ae.ajax({url:bw,type:'post',data:av,dataType:'json',async:true,success:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=responseText;zhymMapObjectManager.prototype.aq(k,bc,aL);},beforeSend:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},fail:function(xhr,textStatus){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert("Error"+textStatus);}});}}});};zhymMapObjectManager.prototype.PlacemarkAddHoverListeners=function(V,an){var k=this;zhymMapObjectManager.prototype.aS(V,k,an);};zhymMapObjectManager.prototype.aS=function(V,fi,am){var k=fi;};zhymMapObjectManager.prototype.bh=function(fi,v,bD){if(v.dataexists==1){var k=fi;}else{}};zhymMapObjectManager.prototype.GroupStateDefine=function(L,bn){this.G[L]=bn;};zhymMapObjectManager.prototype.dE=function(L,ax){var ai=ax;var bx;var aU;var ak;if((typeof ai!=='undefined')&&(ai!=null)){if(this.az&&this.aZ){aU=this.G[L];if((typeof aU!=='undefined')&&(aU==1)){for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.add(bx);}}}else{for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.add(bx);}}}};zhymMapObjectManager.prototype.cn=function(L,ax){var ai=ax;var bx;var aU;var ak;if((typeof ai!=='undefined')&&(ai!=null)){if(this.az&&this.aZ){aU=this.G[L];if((typeof aU==='undefined')||(aU==0)){for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.remove(bx);}}}else{for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.remove(bx);}}}};zhymMapObjectManager.prototype.eb=function(L,ax){var ai=ax;var bx;var aU;var ak;if((typeof ai!=='undefined')&&(ai!=null)){if(this.az&&this.eB){this.bP=[];var aE=this.bP;var dp=this.cD;var cG=[];aU=this.G[L];if((typeof aU!=='undefined')&&(aU==1)){for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.add(bx);}if(this.cC){ak=this.map;if(ak.geoObjects.getLength()>0){if(ak.geoObjects.getBounds()!=null){ak.geoObjects.each(function(el,i){if((el instanceof ymaps.Polyline)||(el instanceof ymaps.Polygon)||(el instanceof ymaps.Circle)||(el instanceof ymaps.Rectangle)){aE.push(el.geometry.getBounds());}});if(aE.length>0){cG=cG.concat(aE);}if(dp.length>0){cG=cG.concat(dp);}if(cG.length>0){if(cG.length==1&&dp.length>0){ak.setBounds(cG[0]);ak.setZoom(ak.zoomRange.getCurrent()[1]);}else{ak.setBounds(ymaps.util.bounds.fromBounds(cG));}}}}}}}else{for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.add(bx);}}}};zhymMapObjectManager.prototype.fh=function(L,ax){var ai=ax;var bx;var aU;var ak;if((typeof ai!=='undefined')&&(ai!=null)){if(this.az&&this.eB){this.bP=[];var aE=this.bP;var dp=this.cD;var cG=[];aU=this.G[L];if((typeof aU==='undefined')||(aU==0)){for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.remove(bx);}if(this.cC){ak=this.map;if(ak.geoObjects.getLength()>0){if(ak.geoObjects.getBounds()!=null){ak.geoObjects.each(function(el,i){if((el instanceof ymaps.Polyline)||(el instanceof ymaps.Polygon)||(el instanceof ymaps.Circle)||(el instanceof ymaps.Rectangle)){aE.push(el.geometry.getBounds());}});if(aE.length>0){cG=cG.concat(aE);}if(dp.length>0){cG=cG.concat(dp);}if(cG.length>0){if(cG.length==1&&dp.length>0){ak.setBounds(cG[0]);ak.setZoom(ak.zoomRange.getCurrent()[1]);}else{ak.setBounds(ymaps.util.bounds.fromBounds(cG));}}}}}}}else{for(var ag=0;ag<ai.length;ag++){bx=ai[ag];ak=this.map;ak.geoObjects.remove(bx);}}}};zhymMapObjectManager.prototype.GroupStateToggle=function(L){if(this.az){if(this.cR=="OnlyOneActive"){this.GroupStateHideAll();var aU=this.G[L];if((typeof aU==='undefined')||(aU==0)){this.GroupStateShow(L);}else{this.GroupStateHide(L);}}else{var aU=this.G[L];if((typeof aU==='undefined')||(aU==0)){this.GroupStateShow(L);}else{this.GroupStateHide(L);}}}};zhymMapObjectManager.prototype.GroupStateShow=function(L){var F;if(this.az){var aU=this.G[L];if((typeof aU==='undefined')||(aU==0)){this.G[L]=1;if(this.bI){F=this.bL[L];if(typeof F!=='undefined'){this.ab(L,F);}}if(this.aZ){F=this.bE[L];if(typeof F!=='undefined'){this.dE(L,F);}}if(this.eB){F=this.dS[L];if(typeof F!=='undefined'){this.eb(L,F);}}if(this.cX==1){var fM=this.fF+L;var af=document.getElementById(fM);ez(af,"active");}else if(this.cX==2){var ae=this.aj;var fM="#"+this.fF+L;var cr=ae(fM).hasClass("active");if(!cr){ae(fM).addClass("active");}}else{var fM=this.fF+L;var af=document.getElementById(fM);af.addClass("active");}}}};zhymMapObjectManager.prototype.GroupStateHide=function(L){var F;if(this.az){var aU=this.G[L];if((typeof aU!=='undefined')&&(aU==1)){this.G[L]=0;if(this.bI){F=this.bL[L];if(typeof F!=='undefined'){this.aN(L,F);}}if(this.aZ){F=this.bE[L];if(typeof F!=='undefined'){this.cn(L,F);}}if(this.eB){F=this.dS[L];if(typeof F!=='undefined'){this.fh(L,F);}}if(this.cX==1){var fM=this.fF+L;var af=document.getElementById(fM);eI(af,"active");}else if(this.cX==2){var ae=this.aj;var fM="#"+this.fF+L;var cr=ae(fM).hasClass("active");if(cr){ae(fM).removeClass("active");}}else{var fM=this.fF+L;var af=document.getElementById(fM);af.removeClass("active");}}}};zhymMapObjectManager.prototype.GroupStateShowAll=function(){var bv;if(this.az){for(var i=1;i<this.G.length;i++){bv=this.G[i];if(typeof bv!=='undefined'){this.GroupStateShow(i);}}}};zhymMapObjectManager.prototype.GroupStateHideAll=function(){var bv;if(this.az){for(var i=1;i<this.G.length;i++){bv=this.G[i];if(typeof bv!=='undefined'){this.GroupStateHide(i);}}}};zhymMapObjectManager.prototype.InitializeByGroupState=function(){var bv;var F;for(var i=0;i<this.G.length;i++){bv=this.G[i];if(typeof bv!=='undefined'){if(this.az){if(this.bI){if(bv==1){F=this.bL[i];if(typeof F!=='undefined'){this.ab(i,F);}}else{F=this.bL[i];if(typeof F!=='undefined'){this.aN(i,F);}}}else{F=this.bL[i];if(typeof F!=='undefined'){this.ab(i,F);}}}else{F=this.bL[i];if(typeof F!=='undefined'){this.ab(i,F);}}if(this.az){if(this.aZ){if(bv==1){F=this.bE[i];if(typeof F!=='undefined'){this.dE(i,F);}}else{F=this.bE[i];if(typeof F!=='undefined'){this.cn(i,F);}}}else{F=this.bE[i];if(typeof F!=='undefined'){this.dE(i,F);}}}else{F=this.bE[i];if(typeof F!=='undefined'){this.dE(i,F);}}if(this.az){if(this.eB){if(bv==1){F=this.dS[i];if(typeof F!=='undefined'){this.eb(i,F);}}else{F=this.dS[i];if(typeof F!=='undefined'){this.fh(i,F);}}}else{F=this.dS[i];if(typeof F!=='undefined'){this.eb(i,F);}}}else{F=this.dS[i];if(typeof F!=='undefined'){this.eb(i,F);}}}}this.ce();};zhymMapObjectManager.prototype.PlacemarkRateMouseOver=function(cq,cU,dv){var k=this;var aJ;for(var i=1;i<=cU;i++){aJ=document.getElementById("placemarkRateImage"+cq+"_"+i);aJ.src=k.bO+"star1_10.png";}for(var i=cU+1;i<=dv;i++){aJ=document.getElementById("placemarkRateImage"+cq+"_"+i);aJ.src=k.bO+"star1_00.png";}};zhymMapObjectManager.prototype.PlacemarkRateMouseOut=function(cq,cU,dv){var k=this;var aJ;for(var i=1;i<=dv;i++){aJ=document.getElementById("placemarkRateImage"+cq+"_"+i);aJ.src=k.bO+"star1_00.png";}};zhymMapObjectManager.prototype.PlacemarkRateDivMouseOut=function(cq,dv){var k=this;zhymMapObjectManager.prototype.PlacemarkRateDivShowRate(k,cq,dv);};zhymMapObjectManager.prototype.PlacemarkRateDivShowRate=function(fi,cq,dv){var k=fi;var dk=dv;if(k.bN[cq]===undefined){alert("Unable to find placemark with ID = "+cq);}else{var cP=k.bN[cq];var cJ=cP.properties.get("zhymRating");var dF=Math.floor(cJ);var cd;var aJ;if(cJ>dk){cJ=dk;dF=dk;}cd=0;if(cJ==0){cd++;aJ=document.getElementById("placemarkRateImage"+cq+"_"+cd);aJ.src=k.bO+"star0_00.png";}else if(dF==0&&cJ>0){cd++;aJ=document.getElementById("placemarkRateImage"+cq+"_"+cd);aJ.src=k.bO+"star0_05.png";}else{for(var i=0;i<dF;i++){cd++;aJ=document.getElementById("placemarkRateImage"+cq+"_"+cd);aJ.src=k.bO+"star0_10.png";}if(Math.ceil((cJ-dF)*10)>4){cd++;aJ=document.getElementById("placemarkRateImage"+cq+"_"+cd);aJ.src=k.bO+"star0_05.png";}}for(var i=cd;i<dk;i++){aJ=document.getElementById("placemarkRateImage"+cq+"_"+(i+1));aJ.src=k.bO+"star0_00.png";}}};zhymMapObjectManager.prototype.PlacemarkRateDivText=function(fi,cq,cf){var k=fi;if(k.bN[cq]===undefined){alert("Unable to find placemark with ID = "+cq);}else{var dg=document.getElementById("rateContentResult"+cq);dg.innerHTML=cf;}};zhymMapObjectManager.prototype.PlacemarkRateUpdate=function(V,cq,cL,dv,eF){var k=this;if(k.bN[cq]===undefined){alert("Unable to find placemark with ID = "+cq);}else{var bw=k.bV+'index.php?option=com_zhyandexmap&no_html=1&format=raw&task=setPlacemarkRating';var av={id:cq,rating:cL,language:eF};
13if(V=='mootools'){var dr=new Request({url:bw,method:'post',data:av,async:true,onSuccess:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=JSON.decode(responseText);zhymMapObjectManager.prototype.be(k,bc,cq,dv);},onRequest:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},onFailure:function(xhr){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert(xhr.status+','+xhr.statusText+','+xhr.responseText);}}).send();}else if(V=='jquery'){var ae=k.aj;ae.ajax({url:bw,type:'post',data:av,dataType:'json',async:true,success:function(responseText){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';var bc=responseText;zhymMapObjectManager.prototype.be(k,bc,cq,dv);},beforeSend:function(){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='block';},fail:function(xhr,textStatus){var H=document.getElementById("YMapsLoading"+k.cK);H.style.display='none';alert("Error"+textStatus);}});}}};zhymMapObjectManager.prototype.be=function(fi,v,cq,dv){var k=fi;if(v.dataexists==1){if(k.bN[cq]===undefined){alert("Unable to find placemark with ID = "+cq);}else{var cP=k.bN[cq];cP.set("zhymRating",v.averagerating);zhymMapObjectManager.prototype.PlacemarkRateDivShowRate(k,cq,dv);zhymMapObjectManager.prototype.PlacemarkRateDivText(k,cq,v.errortext);}}else{zhymMapObjectManager.prototype.PlacemarkRateDivText(k,cq,v.errortext);}};zhymMapObjectManager.prototype.setMapBounds=function(db,bZ,dI,cj){var k=this;var cz=[bZ,db,cj,dI];var ak=k.map;k.dj=cz;ak.events.add("boundschange",function(){var cz=k.dj;var ak=k.map;var dN=ak.getCenter();var ds=dN[0],df=dN[1],bC=cz[3],aM=cz[2],ap=cz[1],bk=cz[0];if(aM<bk){bk=cz[2];aM=cz[0];}if(bC<ap){ap=cz[3];bC=cz[1];}if((df<=aM&&df>=bk)&&(ds<=bC&&ds>=ap))return;if(df<bk)df=bk;if(df>aM)df=aM;if(ds<ap)ds=ap;if(ds>bC)ds=bC;var aT=[];aT.push(ds);aT.push(df);ak.setCenter(aT);});};zhymMapObjectManager.prototype.enablePlacemarkListSearch=function(){var k=this;k.bX=1;zhymMapObjectManager.prototype.cW(k);};zhymMapObjectManager.prototype.refreshPlacemarkListSearch=function(){var k=this;zhymMapObjectManager.prototype.cW(k);};zhymMapObjectManager.prototype.cW=function(fi){var k=fi;var ae=k.aj;var fm,bJ,bd;var av=[];var eA;if(k.bX==1){fm=k.eU;for(var i=0;i<fm.length;i++){bJ=fm[i];if((typeof bJ!=='undefined')&&(bJ!=null)){bd=bJ[0];if((typeof bd!=='undefined')&&(bd!=null)){if(bd.properties.get("zhymIncludeInList")==1){eA=new Object();eA.label=bd.properties.get("zhymTitle");eA.value=bd.properties.get("zhymPlacemarkID");av.push(eA);}else{}}}}ae("#YMapsMarkerListSearchAutocomplete"+k.cK).autocomplete({source:av,focus:function(event,ui){if((typeof ui.item!=='undefined')&&(ui.item!=null)){ae("#YMapsMarkerListSearchAutocomplete"+k.cK).val(ui.item.label);}return false;},select:function(event,ui){if((typeof ui.item!=='undefined')&&(ui.item!=null)){var fu="zhym_pmlist_item_"+k.cK+"_"+ui.item.value;var eG=document.getElementById(fu);if(typeof eG.onclick=="function"){eG.onclick.apply(eG);}else{}ae("#YMapsMarkerListSearchAutocomplete"+k.cK).val(ui.item.label);}return false;}});}};zhymMapObjectManager.prototype.bW=function(){alert("... ShowArray ... begin ");alert("... ShowArray ... end ");};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.