perfUI.content.userContentType={Album:0,Picture:1,Video:2,User:3,Blog:4};perfUI.content.userContentTag=function(B,C,A){this.tagId=C||0;this.tagName=A||"";this.dataSource=B||null;this.init=function(){if(!this.dataSource){return }this.tagId=PERF.parseNodeNumeric(this.dataSource,"tagId");this.tagName=PERF.parseNode(this.dataSource,"tagName")};this.init()};perfUI.content.userContent=function(B,C){var A=this;this.UserId=B;this.DataSource=C||null;this.Container=null;this.AlbumId=0;this.Subject="";this.Description="";this.AccessId=0;this.AccessDescr="";this.DateCreated="";this.DateModified="";this.IsOwner=false;this.CategoryId=0;this.CategoryDescr="";this.ThumbUrl="";this.ThumbLinkUrl="";this.AllowComments=0;this.AllowCommentsDescr="";this.Comments=[];this.Tags=[];this.TotalComments=0;this.TotalCommentsNew=0;this.TotalFavored=0;this.IsFavorite=false;this.PercentApproval=0;this.PerfCount=0;this.AllowApproval=0;this.AllowApprovalDescr="";this.TotalViews=0;this.TotalViewCurrent=0;this.SubmittedBy="";this.SubmittedByGUID="";this.DateSubmitted="";this.DateDiffSubmitted="";this.getTagsLinks=function(G){var F="";for(var E=0;E<this.Tags.length;E++){var D=this.Tags[E];perfUI.util.addEl(G,"a",{"href":this.getTagUrl(D),"text":D.tagName+" "})}};this.getTagsString=function(){var E="";for(var D=0;D<this.Tags.length;D++){E+=(this.Tags[D].tagName+" ")}return E.trim()};this.loadTags=function(G){G=G||this.DataSource;if(!G){return }var H=G.getElementsByTagName("tags");if(H.length>0){H=H[0].getElementsByTagName("tag");if(H.length==0){var D=new perfUI.content.userContentTag(null,0,PERF.parseNode(G,"tags"));this.Tags.push(D);return }for(var F=0;F<H.length;F++){var E=H[F];var D=new perfUI.content.userContentTag(E);this.Tags.push(D)}}};this.loadComments=function(F){if(!perfUI.content.userComment){return }F=F||this.DataSource;if(!F){return }var H=F.getElementsByTagName("comment");if(H.length>0){for(var E=0;E<H.length;E++){var D=H[E];var G=new perfUI.content.userComment(D);G.ContentTypeId=this.getContentId();this.Comments.push(G)}}};this.loadRating=function(D){this.AllowApproval=PERF.parseNodeNumeric(D,"allowApproval");this.AllowApprovalDescr=PERF.parseNode(D,"allowApprovalReason");this.PercentApproval=PERF.parseNode(D,"approvalPercent");this.PerfsCount=PERF.parseNode(D,"perfs")};this.loadIsFavorite=function(D){this.IsFavorite=PERF.parseNodeBool(D,"myFavorite")};this.loadFavoredBy=function(D){this.TotalFavored=PERF.parseNodeNumeric(D,"favoredBy")}};perfUI.content.userContent.prototype.loadProperties=function(A){A=A||this.DataSource;if(A==null||A==undefined){return }this.DataSource=A;this.AlbumId=PERF.parseNodeNumeric(A,"albumId");this.ThumbUrl=PERF.parseNode(A,"thumbUrl");this.ThumbLinkUrl=PERF.parseNode(A,"link");this.Subject=PERF.parseNode(A,"subject");this.Description=PERF.parseNode(A,"description");this.AccessId=PERF.parseNodeNumeric(A,"access");this.AccessDescr=PERF.parseNode(A,"accessName");this.DateCreated=PERF.parseNode(A,"dateCreated");this.DateModified=PERF.parseNode(A,"dateLastUpdated");this.TotalComments=PERF.parseNodeNumeric(A,"totalComments");this.TotalCommentsNew=PERF.parseNodeNumeric(A,"newComments");this.IsOwner=PERF.parseNodeBool(A,"isOwner");this.CategoryId=PERF.parseNodeNumeric(A,"categoryId");this.CategoryDescr=PERF.parseNode(A,"categoryName");this.loadRating(A);this.TotalViews=PERF.parseNodeNumeric(A,"views");this.TotalViewsCurrent=PERF.parseNodeNumeric(A,"viewsToday");this.SubmittedBy=PERF.parseNode(A,"submitterName");this.SubmittedByGUID=PERF.parseNode(A,"submitterId");this.DateSubmitted=PERF.parseNode(A,"dateSubmitted");this.DateDiffSubmitted=PERF.parseNode(A,"dateSubmitted2");this.loadFavoredBy(A);this.loadIsFavorite(A);this.loadTags(A);this.AllowComments=PERF.parseNodeNumeric(A,"allowComments");this.AllowCommentsDescr=PERF.parseNode(A,"allowCommentsReason");this.loadComments(this.DataSource.getElementsByTagName("comments")[0])};perfUI.content.userContent.prototype.buildSocialBookmark=function(B,G,C){var F=this;G=G||"Perfspot.com - "+F.Subject;C=C||F.getViewDetailsUrl();var E=addNode(B,"a");var A=function(){addthis_url=C;addthis_title=G;return addthis_click(this)};YAHOO.util.Event.addListener(E,"click",A);var D=addNode(E,"img");D.src="http://s9.addthis.com/button1-bm.gif";D.alt="AddThis Social Bookmark Button";D.style.width="125px";D.style.height="16px";D.style.border="0";return D}