function FavoritesCollection(){this.Markers=new Array()}FavoritesCollection.prototype.AddById=function(A){var B=mmc.MasterMarkerFromId(A);this.Add(B)};FavoritesCollection.prototype.Add=function(B){if(B==undefined||B==""){alert("marker has to be on the map to add it to favorites. At this time, there is no marker corresponding to this property on the map.");return }if(this.Markers.length>0){for(var A=0;A<this.Markers.length;A++){if(this.Markers[A]==""){continue}if(this.Markers[A].MarkerId()==B.MarkerId()){alert("This marker has already been added to your favorites");return }}}this.Markers.push(B);this.RepopulateList();tabPane1.setSelectedIndex(2);this.Serialize()};FavoritesCollection.prototype.Clear=function(){this.Markers=new Array();this.RepopulateList();this.Serialize()};FavoritesCollection.prototype.RepopulateList=function(){document.getElementById("div_fav").innerHTML=this.ToFavoriteList()};FavoritesCollection.prototype.ToFavoriteList=function(){var A="";if(this.Markers.length>0){for(var B=0;B<this.Markers.length;B++){if(this.Markers[B]==""){continue}A+='-<a href="javascript:fc.PlaceFavorite2Map( '+this.Markers[B].MarkerId()+')">'+this.Markers[B].FavoriteLabel()+"</a><br/>"}}return A};FavoritesCollection.prototype.IndexFromId=function(A){for(var B=0;B<this.Markers.length;B++){if(this.Markers[B].IsMarker()&&this.Markers[B].MarkerId()==A){return B}}return -1};FavoritesCollection.prototype.PlaceFavorite2Map=function(C){var B=this.IndexFromId(C);if(B==-1){return }var A=this.Markers[B];var D=A.FullArray.join("|")+"<br/>";process_it(D);mmc.Zoom2Markers();tabPane1.setSelectedIndex(2)};FavoritesCollection.prototype.Serialize=function(){var A=Collection2Doc(this);setCookieStd("favorites",A);return A};FavoritesCollection.prototype.Deserialize=function(){var A=getCookie("favorites");Doc2Collection(A,this);this.RepopulateList()};FavoritesCollection.prototype.PlaceToMap=function(){var B=this.Serialize();process_it(B);mmc.Zoom2Markers();for(var A=0;A<mmc.Markers.length;A++){if(mmc.Markers[A]==""){continue}if(mmc.Markers[A].IsMarker()&&mmc.Markers[A].MapObjectType()==4){mmc.Markers[A].PicturesLoaded=true}}tabPane1.setSelectedIndex(1)};var fc=new FavoritesCollection();