userAlbumType={UserAlbum:0,Nights:1,Lights:2};perfUI.content.userAlbum=function(B,C,A){var D=this;perfUI.content.userAlbum.superclass.constructor.call(this,B,C,true);this.TopAlbumIndex=0;this.CoverImageId=0;this.CoverImageUrl="";this.LogoInnerHtml="";this.TotalContents=0;this.AlbumType=0;this.Pictures=[];this.Videos=[];this.Blogs=[];this.getContentType=function(){return perfUI.content.userContentType.Album};this.getContentId=function(){return this.AlbumId};this.setCover=function(E){this.CoverImageId=E.PictureId;this.CoverImageUrl=E.ThumbUrl;if(this.Container!=null&&this.Container.tagName=="IMG"){this.Container.src=this.CoverImageUrl}};this.deleteAlbum=function(E){var F={url:"/api/call.asp",params:"?Function=Media.Pictures.DeleteAlbum&UserID="+this.UserId+"&AlbumID="+this.AlbumId};this.saveChanges(F.url+F.params,E)};this.updateTopAlbum=function(E){this.TopAlbumIndex=E;var F={url:"/api/call.asp",params:"?Function=Media.Pictures.UpdateAlbumTop3&UserID="+this.UserId+"&AlbumID="+this.AlbumId+"&Top3="+this.TopAlbumIndex};this.saveChanges(F.url+F.params)};this.updateAccess=function(E){this.AccessId=E;var F={url:"/api/call.asp",params:"?Function=Media.Pictures.UpdateAlbumAccess&UserID="+this.UserId+"&AlbumID="+this.AlbumId+"&Access="+this.AccessId};this.saveChanges(F.url+F.params)};this.saveChanges=function(G,F){var H=function(J){this.throwErrorGeneral("Unable to save changes.")};var E=function(J){if(F){F()}return };var I={success:E,failure:H,scope:D};YAHOO.util.Connect.asyncRequest("POST",G,I,null)};this.throwErrorMsg=function(E){alert(E)};this.loadProperties=function(E){E=E||this.DataSource;if(E==null||E==undefined){return }this.DataSource=E;this.TopAlbumIndex=PERF.parseNodeNumeric(E,"top3");this.CoverImageId=PERF.parseNodeNumeric(E,"coverId");this.CoverImageUrl=PERF.parseNode(E,"coverPictureUrl");this.TotalContents=PERF.parseNodeNumeric(E,"counts");this.LogoInnerHtml=PERF.parseNode(E,"logo");this.AlbumType=PERF.parseNodeNumeric(E,"nightsType");perfUI.content.userAlbum.superclass.loadProperties.call(this)};this.loadPictures=function(G){if(G!=null&&G.getElementsByTagName("picture").length>0){if(A==undefined){if(perfUI.content.userPhoto!=undefined){A=perfUI.content.userPhoto}}if(A!=undefined){var I=G.getElementsByTagName("picture");for(var H=0;H<I.length;H++){var E=I[H];var F=new A(this.UserId,E);F.AlbumId=this.AlbumId;this.Pictures.push(F)}}}};this.loadVideos=function(H){if(H!=null&&H.getElementsByTagName("video").length>0){var G=H.getElementsByTagName("video");for(var I=0;I<G.length;I++){var E=G[I];var F=new perfUI.content.userVideo(this.UserId,E);F.AlbumId=this.AlbumId;this.Videos.push(F)}}};this.loadBlogs=function(G){if(G!=null&&G.getElementsByTagName("blog").length>0){var I=G.getElementsByTagName("blog");for(var H=0;H<I.length;H++){var F=I[H];var E=new perfUI.content.userBlog(this.UserId,F);E.AlbumId=this.AlbumId;this.Blogs.push(E)}}};this.init=function(){if(this.DataSource!=null){this.loadProperties();var F=this.DataSource.getElementsByTagName("pictures")[0];this.loadPictures(F);var G=this.DataSource.getElementsByTagName("videos")[0];this.loadVideos(G);var E=this.DataSource.getElementsByTagName("blogs")[0];this.loadBlogs(E)}};this.init()};YAHOO.extend(perfUI.content.userAlbum,perfUI.content.userContent);perfUI.content.eventsAlbum=function(A,B){var C=this;perfUI.content.eventsAlbum.superclass.constructor.call(this,A,B);this.Venue="";this.VenueAddress="";this.VenueCity="";this.VenueState="";this.VenueZip="";this.VenueCountry="";this.EventDate="";this.loadProperties=function(D){this.Venue=PERF.parseNode(D,"venue");this.VenueAddress=PERF.parseNode(D,"address");this.VenueCity=PERF.parseNode(D,"city");this.VenueState=PERF.parseNode(D,"state");this.VenueZip=PERF.parseNode(D,"zip");this.VenueCountry=PERF.parseNode(D,"country");this.EventDate=PERF.parseNode(D,"eventDate")};this.initEvents=function(){if(this.DataSource!=null){this.loadProperties(this.DataSource)}};this.initEvents()};YAHOO.extend(perfUI.content.eventsAlbum,perfUI.content.userAlbum);perfUI.content.userAlbumAdvanced=function(A,B){var C=this;perfUI.content.userAlbumAdvanced.superclass.constructor.call(this,A,B);this.DragDropPlayer=null};YAHOO.extend(perfUI.content.userAlbumAdvanced,perfUI.content.userAlbum)