YAHOO.util.Attribute=function(D,C){if(C){this.owner=C;this.configure(D,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(H,L){var I;var G=this.owner;var K=this.name;var J={type:K,prevValue:this.getValue(),newValue:H};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(G,H)){return false;}if(!L){I=G.fireBeforeChangeEvent(J);if(I===false){return false;}}if(this.method){this.method.call(G,H);}this.value=H;this._written=true;J.type=K;if(!L){this.owner.fireChangeEvent(J);}return true;},configure:function(F,E){F=F||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var D in F){if(D&&YAHOO.lang.hasOwnProperty(F,D)){this[D]=F[D];if(E){this._initialConfig[D]=F[D];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(B){this.setValue(this.value,B);}};(function(){var B=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(A){this._configs=this._configs||{};var D=this._configs[A];if(!D){return undefined;}return D.value;},set:function(F,A,H){this._configs=this._configs||{};var G=this._configs[F];if(!G){return false;}return G.setValue(A,H);},getAttributeKeys:function(){this._configs=this._configs;var A=[];var F;for(var E in this._configs){F=this._configs[E];if(B.hasOwnProperty(this._configs,E)&&!B.isUndefined(F)){A[A.length]=E;}}return A;},setAttributes:function(A,F){for(var E in A){if(B.hasOwnProperty(A,E)){this.set(E,A[E],F);}}},resetValue:function(A,D){this._configs=this._configs||{};if(this._configs[A]){this.set(A,this._configs[A]._initialConfig.value,D);return true;}return false;},refresh:function(A,G){this._configs=this._configs;A=((B.isString(A))?[A]:A)||this.getAttributeKeys();for(var F=0,H=A.length;F<H;++F){if(this._configs[A[F]]&&!B.isUndefined(this._configs[A[F]].value)&&!B.isNull(this._configs[A[F]].value)){this._configs[A[F]].refresh(G);}}},register:function(D,A){this.setAttributeConfig(D,A);},getAttributeConfig:function(E){this._configs=this._configs||{};var F=this._configs[E]||{};var A={};for(E in F){if(B.hasOwnProperty(F,E)){A[E]=F[E];}}return A;},setAttributeConfig:function(F,E,A){this._configs=this._configs||{};E=E||{};if(!this._configs[F]){E.name=F;this._configs[F]=this.createAttribute(E);}else{this._configs[F].configure(E,A);}},configureAttribute:function(F,E,A){this.setAttributeConfig(F,E,A);},resetAttributeConfig:function(A){this._configs=this._configs||{};this._configs[A].resetConfig();},subscribe:function(D,A){this._events=this._events||{};if(!(D in this._events)){this._events[D]=this.createEvent(D);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(A){var D="before";D+=A.type.charAt(0).toUpperCase()+A.type.substr(1)+"Change";A.type=D;return this.fireEvent(A.type,A);},fireChangeEvent:function(A){A.type+="Change";return this.fireEvent(A.type,A);},createAttribute:function(A){return new YAHOO.util.Attribute(A,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var J=YAHOO.util.Dom,H=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(B,A){if(arguments.length){this.init(B,A);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(A){A=A.get?A.get("element"):A;this.get("element").appendChild(A);},getElementsByTagName:function(A){return this.get("element").getElementsByTagName(A);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(B,A){B=B.get?B.get("element"):B;A=(A&&A.get)?A.get("element"):A;this.get("element").insertBefore(B,A);},removeChild:function(A){A=A.get?A.get("element"):A;this.get("element").removeChild(A);return true;},replaceChild:function(B,A){B=B.get?B.get("element"):B;A=A.get?A.get("element"):A;return this.get("element").replaceChild(B,A);},initAttributes:function(A){},addListener:function(B,C,A,D){var E=this.get("element");D=D||this;E=this.get("id")||E;var F=this;if(!this._events[B]){if(this.DOM_EVENTS[B]){YAHOO.util.Event.addListener(E,B,function(N){if(N.srcElement&&!N.target){N.target=N.srcElement;}F.fireEvent(B,N);},A,D);}this.createEvent(B,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(A,B){this.unsubscribe.apply(this,arguments);},addClass:function(A){J.addClass(this.get("element"),A);},getElementsByClassName:function(A,B){return J.getElementsByClassName(A,B,this.get("element"));},hasClass:function(A){return J.hasClass(this.get("element"),A);},removeClass:function(A){return J.removeClass(this.get("element"),A);},replaceClass:function(A,B){return J.replaceClass(this.get("element"),A,B);},setStyle:function(A,B){var C=this.get("element");if(!C){return this._queue[this._queue.length]=["setStyle",arguments];}return J.setStyle(C,A,B);},getStyle:function(A){return J.getStyle(this.get("element"),A);},fireQueue:function(){var B=this._queue;for(var A=0,C=B.length;A<C;++A){this[B[A][0]].apply(this,B[A][1]);}},appendTo:function(B,A){B=(B.get)?B.get("element"):J.get(B);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:B});A=(A&&A.get)?A.get("element"):J.get(A);var C=this.get("element");if(!C){return false;}if(!B){return false;}if(C.parent!=B){if(A){B.insertBefore(C,A);}else{B.appendChild(C);}}this.fireEvent("appendTo",{type:"appendTo",target:B});},get:function(C){var A=this._configs||{};var B=A.element;if(B&&!A[C]&&!YAHOO.lang.isUndefined(B.value[C])){return B.value[C];}return H.prototype.get.call(this,C);},setAttributes:function(A,E){var B=this.get("element");for(var C in A){if(!this._configs[C]&&!YAHOO.lang.isUndefined(B[C])){this.setAttributeConfig(C);}}for(var D=0,F=this._configOrder.length;D<F;++D){if(A[this._configOrder[D]]!==undefined){this.set(this._configOrder[D],A[this._configOrder[D]],E);}}},set:function(C,A,D){var B=this.get("element");if(!B){this._queue[this._queue.length]=["set",arguments];if(this._configs[C]){this._configs[C].value=A;}return;}if(!this._configs[C]&&!YAHOO.lang.isUndefined(B[C])){K.call(this,C);}return H.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,B,A){var C=this.get("element");if(C&&!this._configs[D]&&!YAHOO.lang.isUndefined(C[D])){K.call(this,D,B);}else{H.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(D);},getAttributeKeys:function(){var B=this.get("element");var A=H.prototype.getAttributeKeys.call(this);for(var C in B){if(!this._configs[C]){A[C]=A[C]||B[C];}}return A;},createEvent:function(A,B){this._events[A]=true;H.prototype.createEvent.apply(this,arguments);},init:function(A,B){G.apply(this,arguments);}};var G=function(B,C){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];C=C||{};C.element=C.element||B||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var A=false;if(YAHOO.lang.isString(B)){K.call(this,"id",{value:C.element});}if(J.get(B)){A=true;I.call(this,C);L.call(this,C);}YAHOO.util.Event.onAvailable(C.element,function(){if(!A){I.call(this,C);}this.fireEvent("available",{type:"available",target:C.element});},this,true);YAHOO.util.Event.onContentReady(C.element,function(){if(!A){L.call(this,C);}this.fireEvent("contentReady",{type:"contentReady",target:C.element});},this,true);};var I=function(A){this.setAttributeConfig("element",{value:J.get(A.element),readOnly:true});};var L=function(A){this.initAttributes(A);this.setAttributes(A,true);this.fireQueue();};var K=function(C,A){var B=this.get("element");A=A||{};A.name=C;A.method=A.method||function(D){B[C]=D;};A.value=A.value||B[C];this._configs[C]=new YAHOO.util.Attribute(A,this);};YAHOO.augment(YAHOO.util.Element,H);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.5.2",build:"1076"});perfUI.widgets.languages=function(){var B=this;var A=function(D,E,C){this.id=E||"";this.name=C||"";this.init=function(){if(D){this.id=PERF.parseNodeNumeric(D,"id");this.name=PERF.parseNode(D,"name");}};this.init();};this.loadLanguagesDropDown=function(E,D){D=D||"0";var C=function(I){for(var H=0;H<I.length;H++){var F=I[H];var G=addNode(E,"option");G.value=String(F.id);G.innerHTML="&nbsp;"+F.name;}if(String(D).trim().length>0){E.value=String(D).trim();}};this.getLanguagesCollection(C);};this.getLanguagesCollection=function(H){var E=[];var F={url:"/api/callna.asp",params:"?Function=GetLanguages"};var D=function(I){H(E);};var C=function(I){var J=I.responseXML;var L=J.getElementsByTagName("languages")[0];if(L!=null){var M=L.getElementsByTagName("language");for(var K=0;K<M.length;K++){E.push(new A(M[K]));}}H(E);};var G={success:C,failure:D,scope:B};YAHOO.util.Connect.asyncRequest("GET",F.url+F.params,G,null);};};perfUI.widgets.splitButton=function(B){var E=YAHOO.util.Dom;var F=perfUI.util.addEl;var C;var A=new perfUI.widgets.menu(B);var D="";this.containerCss="yui-skin-sam";this.getMenu=function(){return A;};this.getType=function(){return D;};this.destroy=function(){C=null;A=null;};this.setType=function(H,G){D=H;switch(H){case"delete":C=F(B,"DIV",{"class":"deleteImg"});break;case"link":C=F(B,"a",{"innerHTML":G,"class":"splitButtonLink"});break;case"dropDownList":C=F(B,"div",{"class":"pullDown left"});break;default:C=B;break;}};this.setEl=function(G){C=G;};this.addMenuItem=function(G){A.addItems([G]);};this.addMenuItems=function(G){A.addItems(G);};this.toggleMenu=function(G){YAHOO.util.Event.purgeElement(C,false,"click");if(A.menuClosed){A.show(G);}else{A.closeMenu(G);}YAHOO.util.Event.addListener(C,"click",this.toggleMenu,this,true);};this.render=function(){if(!E.hasClass(B,this.containerCss)){}E.addClass(B,this.containerCss);A.render(B);switch(D){case"dropDownList":YAHOO.util.Event.addListener(C,"click",this.toggleMenu,this,true);break;default:YAHOO.util.Event.addListener(C,"click",A.show,A,true);break;}};};perfUI.widgets.showHideContainer=function(I,A,C,K){var L=this;this.autoEvents=K==undefined?true:K;this.isCollapsed=C==undefined?false:C;this.onExpandClick=new YAHOO.util.CustomEvent("onExpandClick",this);this.onCollapseClick=new YAHOO.util.CustomEvent("onCollapseClick",this);this.onExpand=new YAHOO.util.CustomEvent("onExpand",this);this.onCollapse=new YAHOO.util.CustomEvent("onCollapse",this);var E="showHideIcon";var H=I.className+" "+E+" "+E+"Collapse";var D=I.className+" "+E+" "+E+"Expand";var B="Hover";var G=I.className+" showHideIconLoading";this.setLoadingIconCss=function(){I.className=G;};this.doCollapse=function(){A.style.display="none";this.isCollapsed=true;I.className=D;I.title="Click to Expand";this.onCollapse.fire();};this.doExpand=function(M){A.style.display="block";this.isCollapsed=false;I.className=H;I.title="Click to Collapse";this.onExpand.fire();};this.toggle=function(){if(I.className.indexOf(H.trim())>=0){this.onCollapseClick.fire();if(this.autoEvents){this.doCollapse();}}else{this.onExpandClick.fire();if(this.autoEvents){this.doExpand();}}};var J=function(){I.className+=B;};var F=function(){I.className=I.className.replace(B,"");};I.className=E;if(this.isCollapsed){this.doCollapse();}else{this.doExpand();}YAHOO.util.Event.addListener(I,"click",this.toggle,this,true);YAHOO.util.Event.addListener(I,"mouseover",J,this,true);YAHOO.util.Event.addListener(I,"mouseout",F,this,true);};perfUI.widgets.ToolTip=function(B,A){if(typeof(tipobj)=="undefined"){tipobj=document.createElement("DIV");tipobj.id="dhtmltooltip";}if(typeof(pointerobj)=="undefined"){pointerobj=document.createElement("DIV");pointerobj.id="dhtmlpointer";pointerobj.appendChild(document.createElement("DIV"));}this.tipobj=tipobj;tipobj.style.zIndex="100";tipobj.style.width="200px";B.txt=A;B.onmouseover=perfUI.widgets.ToolTip.mouseover;this.setBackgroundColor=function(C){pointerobj.firstChild.style.borderTopColor=C;pointerobj.firstChild.style.borderBottomColor=C;tipobj.style.backgroundColor=C;};this.setBackgroundColor("lightyellow");};perfUI.widgets.ToolTip.mouseout=function(){this.onmousemove=null;this.onmouseout=null;tipobj.parentNode.removeChild(tipobj);pointerobj.parentNode.removeChild(pointerobj);};perfUI.widgets.ToolTip.mouseover=function(){if(document.all&&document.readyState!="complete"){return;}tipobj.style.visibility="hidden";tipobj.style.top="0px";tipobj.style.left="0px";document.body.appendChild(tipobj);if(typeof this.txt=="object"){while(tipobj.childNodes.length){tipobj.removeChild(tipobj.firstChild);}tipobj.appendChild(this.txt);}else{tipobj.innerHTML=this.txt;}document.body.appendChild(pointerobj);this.onmousemove=perfUI.widgets.ToolTip.mousemove;this.onmouseout=perfUI.widgets.ToolTip.mouseout;};perfUI.widgets.ToolTip.mousemove=function(G){var G=YAHOO.util.Event.getEvent(G);var C=YAHOO.util.Event.getPageX(G);var A=YAHOO.util.Event.getPageY(G);var D=12;var B=10;var K=10;var J=14;var F=YAHOO.util.Dom.getViewportWidth()-G.clientX-D;var E=YAHOO.util.Dom.getViewportHeight()-G.clientY-B;var I=F>=tipobj.offsetWidth;var H=E>=tipobj.offsetHeight;tipobj.style.left=C+(!I?0-tipobj.offsetWidth:D-K)+"px";tipobj.style.top=A+(!H?0-tipobj.offsetHeight-B:B+J)+"px";tipobj.style.visibility="visible";pointerobj.style.top=A+B+(H?0:-21)+"px";pointerobj.style.left=C+(I?D:0-D-15)+"px";pointerobj.className="pointerobj"+(H?"Up":"Bottom")+(I?"Right":"Left");};perfUI.widgets.activityIndicator=function(B){B=B||document.body;var A=null;var C=function(){A=new YAHOO.widget.Panel("pageActivityIndicator",{width:"200px",fixedcenter:false,close:false,draggable:false,zindex:4,modal:true,visible:false});A.setBody('<div class="activityLoadingDialog"><p>loading, please wait...</p></div>');A.render(B);};C();this.show=function(){A.show();};this.hide=function(){A.hide();};this.center=function(){A.center();};};perfUI.widgets.reportAbuse=function(B){var C=this;var F=perfUI.util.addEl;var A=[{"value":"1","text":perfTranslator.getValue(1191),"control":null},{"value":"2","text":perfTranslator.getValue(1192),"control":null},{"value":"3","text":perfTranslator.getValue(1193),"control":null},{"value":"4","text":perfTranslator.getValue(1194),"control":null},{"value":"5","text":perfTranslator.getValue(1195),"control":null},{"value":"6","text":perfTranslator.getValue(1196),"control":null},{"value":"7","text":perfTranslator.getValue(1197),"control":null},{"value":"8","text":perfTranslator.getValue(413),"control":null}];var D=A;var E="";this.getSelectedValue=function(){return E;};this.clearSelectedValue=function(){var I=this.getOptions();for(var H=0;H<I.length;H++){var G=I[H].control;if(G){G.checked=false;}}this.setSelectedValue("");};this.setSelectedValue=function(G){E=G;};this.setOptions=function(G){D=G;};this.getOptions=function(){return D;};this.isHidden=function(){if(B.style.display=="none"){return true;}else{return false;}};this.toggle=function(){if(this.isHidden()){this.show();}else{this.hide();}};this.hide=function(){B.style.display="none";};this.show=function(){B.style.display="block";};this.send=function(G,L,K){K||this.getSelectedValue();var I="/report.asp?s="+L+"&b="+G+"&r="+K;try{var H=getHttpRequestObj();H.open("GET",I,true);H.send(null);}catch(J){}};this.render=function(){var L=F(B,"div",{"class":"optionlist"});var J=this.getOptions();for(var I=0;I<J.length;I++){var K=F(L,"div",{"class":"radio"});var H=F(K,"radio",{"value":J[I].value,"name":"reason"});var G=function(N,M){M.checked=true;C.setSelectedValue(M.value);};F(K,"label",{"innerHTML":J[I].text});YAHOO.util.Event.addListener(K,"click",G,H);J[I].control=H;}};};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(C,H,B){var F=perfUI.util.addEl;var E=this;H=H||"Perfspot.com - "+E.Subject;B=B||E.getViewDetailsUrl();var I=F(C,"a",{"href":"http://www.addthis.com/bookmark.php"});var D=function(){addthis_url=B;addthis_title=H;return addthis_open(this,"",B,H);};var A=function(){return addthis_close();};var G=function(){return addthis_sendto();};YAHOO.util.Event.addListener(I,"click",G);YAHOO.util.Event.addListener(I,"mouseover",D);YAHOO.util.Event.addListener(I,"mouseout",A);var J=addNode(I,"img");J.src="http://s9.addthis.com/button1-bm.gif";J.alt="AddThis Social Bookmark Button";J.style.width="125px";J.style.height="16px";J.style.border="0";return J;};perfUI.content.user=function(B,C){var A=this;this.userId=B;this.userGUID="";this.isPerson=false;this.dataSource=C;this.displayName="";this.status="";this.thumbUrl="";this.pictureUrl="";this.gender="";this.age=0;this.online=false;this.dateLastLogin="";this.location1="";this.location2="";this.location3="";this.mutualFriendsCount=0;this.AllowComments=0;this.AllowCommentsDescr="";this.Comments=[];this.getContentType=function(){return perfUI.content.userContentType.User;};this.getContentId=function(){return this.userId;};this.attachToolTip=function(E){var D=perfUI.widgets.ToolTip;if(!D){return;}var G=new Image();G.src=this.thumbUrl;var F='<div class="tooltip"><img src="'+G.src+'" border=0></div>';var H=new D(E,F);H.tipobj.style.width="100px";H.tipobj.style.backgroundColor="#FFF";};this.getMutualFriendsUrl=function(){return"http://www.perfspot.com/mutualfriends.asp?id="+this.userGUID;};this.getAllFriendsUrl=function(){return"http://www.perfspot.com/allfriends.asp?id="+this.userGUID;};this.getSuggestFriendsUrl=function(){return"http://www.perfspot.com/suggest.asp?id="+this.userGUID;};this.getSendMessageUrl=function(){return"http://www.perfspot.com/messagepost.asp?id="+this.userGUID;};this.getProfileUrl=function(){return"http://www.perfspot.com/profile.asp?uid="+this.userGUID;};this.getPostMessageUrl=function(){return"http://www.perfspot.com/profile.asp?uid="+this.userGUID+"&post=1";};this.loadComments=function(F){if(!perfUI.content.userComment){return;}F=F||this.dataSource;if(F==null||F==undefined){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=G.user.userId;this.Comments.push(G);}}};this.initUser=function(){if(this.dataSource!=null){this.loadProperties();}};this.initUser();};perfUI.content.user.prototype.loadProperties=function(B){B=B||this.dataSource;if(B==null||B==undefined){return;}this.dataSource=B;var A=PERF.parseNodeNumeric(B,"userId");this.userId=A>0?A:this.userId;this.displayName=PERF.parseNode(B,"displayName");this.status=PERF.parseNode(B,"status");this.thumbUrl=PERF.parseNode(B,"thumbUrl");if(this.thumbUrl.trim().length==0){this.thumbUrl=PERF.parseNode(B,"thumbnailUrl");}this.pictureUrl=PERF.parseNode(B,"pictureUrl");this.gender=PERF.parseNode(B,"gender");this.age=PERF.parseNodeNumeric(B,"age");this.online=PERF.parseNodeBool(B,"online");this.dateLastLogin=PERF.parseNode(B,"lastlogin");this.location1=PERF.parseNode(B,"location1");this.location2=PERF.parseNode(B,"location2");this.location3=PERF.parseNode(B,"location3");this.userGUID=PERF.parseNode(B,"userCode");this.isPerson=PERF.parseNodeBool(B,"person");this.AllowComments=PERF.parseNodeNumeric(B,"allowComments");this.AllowCommentsDescr=PERF.parseNode(B,"allowCommentsReason");this.mutualFriendsCount=PERF.parseNodeNumeric(B,"mutualFriends");this.loadComments();};perfUI.content.userVideo=function(B,C){var A=this;perfUI.content.userVideo.superclass.constructor.call(this,B,C);this.VideoId=0;this.PoweredById=0;this.Subject="";this.Runtime=0;this.AllowComments=B>0?1:0;this.getContentType=function(){return perfUI.content.userContentType.Video;};this.getContentId=function(){return this.VideoId;};this.getFavoritesUrl=function(D){D=D?D:this.SubmittedByGUID;return"/favorites.asp?t=7&id="+D;};this.loadProperties=function(D){D=D||this.DataSource;if(D==null||D==undefined){return;}this.DataSource=D;this.VideoId=PERF.parseNodeNumeric(D,"videoId");this.PoweredById=PERF.parseNodeNumeric(D,"truveoId");this.Runtime=PERF.parseNodeNumeric(D,"runtime");perfUI.content.userVideo.superclass.loadProperties.call(this);};this.init=function(){if(this.DataSource!=null){this.loadProperties();}};this.init();};YAHOO.extend(perfUI.content.userVideo,perfUI.content.userContent);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);function PagerSimple(A,B){var D=this;var C=perfUI.util.addEl;this.pagerContainer=null;this.pagerDescrContainer=null;this.headerContainer=null;this.pagesContainer=null;this.footerContainer=null;this.Container=A||null;this.CurrentPage=1;this.TotalRecords=0;this.PageSize=1;this.Step=1;this.PagerCss="";this.DataSourceDescription="";this.DataSource=B||null;this.NoRecordDescription="There are 0 "+this.DataSourceDescription;this.Page=function(E,G,F){this.DataSource=E||null;this.DataFrom=G||0;this.DataTo=F||0;};this.Pages=[];this.AlwaysShow=false;this.AlwaysCycle=false;this.ShowDescription=false;this.onPageLoad=new YAHOO.util.CustomEvent("onPageLoad",this);this.ParseXmlProperties=function(E){if(!E){return;}var F=E.getElementsByTagName("paging")[0];if(F==null){return;}this.PageSize=PERF.parseNodeNumeric(F,"pageSize");this.CurrentPage=PERF.parseNodeNumeric(F,"pageNumber");this.TotalRecords=PERF.parseNodeNumeric(F,"totalRecords");};this.pageDisableCss="pageDisable";this.pageHoverCss="pageHover";this.pageCss="page";this.addPageRollOver=function(E){YAHOO.util.Event.addListener(E,"mouseover",this.pageHoverOn);YAHOO.util.Event.addListener(E,"mouseout",this.pageHoverOff);};this.pageHoverOff=function(E){this.className=this.className.replace(D.pageHoverCss,"");};this.pageHoverOn=function(E){if(this.className.indexOf("selectedPage")<0&&this.className.indexOf(D.pageDisableCss)<0){this.className+=" "+D.pageHoverCss;}};this.buildTotalsDescription=function(){if(this.DataSourceDescription.trim().length>0){var E=addNode(this.pagercontainer,"span","","totals");addNode(E,"strong","","",String(this.TotalRecords));addNode(E,"label","","","&nbsp;"+this.DataSourceDescription);}};this.buildPagerFiringObjectsBase=function(){this.Container.innerHTML="";this.pagercontainer=C(this.Container,"ul",{"class":"pager"});if(this.Pages.length>1||this.AlwaysShow){this.headerContainer=C(this.pagercontainer,"li");this.pagesContainer=C(this.pagercontainer,"li");this.footerContainer=addNode(this.pagercontainer,"li");}};this.buildPagerFiringObjects=function(){var F="Previous";var H=perfTranslator.getValue(1784);if(H.trim().length>0){F=H;}this.buildPagerFiringObjectsBase();if(this.Pages.length>1||this.AlwaysShow){var G=addNode(this.headerContainer,"div");var F="Previous";var H=perfTranslator.getValue(1784);if(H.trim().length>0){F=H;}this.buildGoToPreviousPage(G,F);var F="Next";var H=perfTranslator.getValue(1783);if(H.trim().length>0){F=H;}var E=this.buildGoToNextPage(F);this.buildGoToLastPage(E);}};this.buildPagerPages=function(J){if(J!=null){this.DataSource=J;}this.TotalRecords=(this.TotalRecords<=0&&this.DataSource!=null)?this.DataSource.length:this.TotalRecords;var I=this.TotalRecords;if(this.DataSource==null&&I<=0){return;}var G=1;var E=0;var L=0;for(var F=0;F<I;){G=this.Pages.length>0?(this.Pages[this.Pages.length-1].DataTo+1):1;L=G+(this.PageSize-1);E=L<I?L:I;var H=this.DataSource!=null?this.DataSource.slice(F,E):[];var K=new this.Page(H,G,E);this.Pages.push(K);F=E;}};this.buildGoToFirstPage=function(){};this.buildGoToLastPage=function(E){};this.buildPageLinks=function(E){if(E==undefined){E=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var F=addNode(this.pagesContainer,"strong","","",String(this.CurrentPage)+" of "+this.Pages.length);}if(!E){this.onPageLoad.fire(this);}};this.loadPreviousPage=function(E){D.loadPage(E,D.CurrentPage-1);};this.loadNextPage=function(E){D.loadPage(E,D.CurrentPage+1);};this.loadPage=function(G,E){var F=Number(E);if(F==D.CurrentPage){return;}if(D.AlwaysCycle){if(F<=0){D.CurrentPage=D.Pages.length;}else{if(F>D.Pages.length){D.CurrentPage=1;}else{D.CurrentPage=Number(E);}}}else{if(F<=0||F>D.Pages.length){return;}else{D.CurrentPage=Number(E);}}D.buildPageLinks();};}PagerSimple.prototype.Render=function(C,B,A){this.Container.innerHTML="";this.Pages=[];if(C){this.TotalRecords=C.length;}else{this.TotalRecords=B||this.TotalRecords;}this.buildPagerPages(C);this.buildPagerFiringObjects();this.buildTotalsDescription();this.buildPageLinks(A);};PagerSimple.prototype.buildGoToPreviousPage=function(B,C){var F="Go to Previous Page";var A=perfTranslator.getValue(1785);if(A.trim().length>0){F=A;}var E=addNode(B,"div","","pagePrevious");E.title=F;YAHOO.util.Event.addListener(E,"click",this.loadPreviousPage);if(C!=undefined){var D=addNode(B,"a","","pagePrevious",C);D.title=F;PERF.makeLink(D);YAHOO.util.Event.addListener(D,"click",this.loadPreviousPage);}};PagerSimple.prototype.buildGoToNextPage=function(C){var F="Go to Next Page";var B=perfTranslator.getValue(1786);if(B.trim().length>0){F=B;}var A=addNode(this.footerContainer,"div");if(C!=undefined){var E=addNode(A,"a","","pageNext",C);var F=F;var B=perfTranslator.getValue(1786);if(B.trim().length>0){F=B;}E.title=F;PERF.makeLink(E);YAHOO.util.Event.addListener(E,"click",this.loadNextPage);}var D=addNode(A,"div","","pageNext");D.title=F;YAHOO.util.Event.addListener(D,"click",this.loadNextPage);return A;};function PagerControl(B,C,A,D){var E=this;PagerControl.superclass.constructor.call(this,A,D);this.PageSize=B;this.Step=C;this.Render=function(H,G,F){if(this.Container.className.indexOf("pagerAdvanced")<0){this.Container.className+=" pagerAdvanced";}PagerControl.superclass.Render.call(this,H,G,F);};this.buildPagerFiringObjects=function(){this.buildPagerFiringObjectsBase();if(this.Pages.length>1||this.AlwaysShow){var F=addNode(this.headerContainer,"div","","left");this.buildGoToPreviousPage(F);var G=this.buildGoToNextPage();this.buildGoToLastPage(G);}};this.buildGoToFirstPage=function(){var F=addNode(this.headerContainer,"div");var G=addNode(F,"a","","left","First");G.title="Go to First Page";PERF.makeLink(G);YAHOO.util.Event.addListener(G,"click",this.loadPage,1);return F;};this.buildGoToLastPage=function(F){var G=addNode(F,"a","","","Last");G.title="Go to Last Page";PERF.makeLink(G);YAHOO.util.Event.addListener(G,"click",this.loadPage,this.Pages.length);};this.buildGoToNextPage=function(){return PagerControl.superclass.buildGoToNextPage.call(this);};this.buildPageLinks=function(F){if(F==undefined){F=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var H=Math.floor((this.CurrentPage/this.Step))*this.Step;if((this.CurrentPage%this.Step)==0){H-=this.Step;}for(var J=H+1;J<=this.Pages.length&&J<=(H+this.Step);J++){var G=J==this.CurrentPage?"selectedPage":"";var I=addNode(this.pagesContainer,"a","",G,String(J));PERF.makeLink(I);YAHOO.util.Event.addListener(I,"click",this.loadPage,J);}}if(!F){this.onPageLoad.fire(this);}};}YAHOO.extend(PagerControl,PagerSimple);function CommentsPagerControl(B,A){var C=this;CommentsPagerControl.superclass.constructor.call(this,A,null);this.DataSourceDescription="discussions";this.buildTotalsDescription=function(){};this.buildPageLinks=function(F){if(F==undefined){F=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var E=perfTranslator.getValue(765);var D="";if(E.trim().length>0){D=new String(perfTranslator.parseValue(E,[String(this.Pages[this.CurrentPage-1].DataFrom),String(this.Pages[this.CurrentPage-1].DataTo),String(this.TotalRecords)]));}else{D="Showing "+String(this.Pages[this.CurrentPage-1].DataFrom)+" - "+String(this.Pages[this.CurrentPage-1].DataTo)+' of <span class="peachDarkText">'+String(this.TotalRecords)+" "+this.DataSourceDescription+"</span>";}var G=addNode(this.pagesContainer,"strong","","",D);this.pagercontainer.style.width="auto";}if(!F){this.onPageLoad.fire(this);}};}YAHOO.extend(CommentsPagerControl,PagerSimple);function MediaPagerControl(B,C,A,D){var E=this;MediaPagerControl.superclass.constructor.call(this,A,D);this.PageSize=B;this.Step=C;this.Render=function(H,G,F){if(this.Container.className.indexOf("pagerMedia")<0){this.Container.className+=" pagerMedia";}MediaPagerControl.superclass.Render.call(this,H,G,F);};this.containerPrevious=null;this.containerNext=null;this.buildPagerFiringObjects=function(){this.buildPagerFiringObjectsBase();if(this.Pages.length>1||this.AlwaysShow){var G="Previous";var H=perfTranslator.getValue(1784);if(H.trim().length>0){G=H;}this.buildGoToPreviousPage(this.headerContainer,G);this.pagesContainer=addNode(this.pagesContainer,"span");var G="Next";var H=perfTranslator.getValue(1783);if(H.trim().length>0){G=H;}var F=this.buildGoToNextPage(G);}};this.buildGoToPreviousPage=function(G,H){var I="Go to Previous Page";var F=perfTranslator.getValue(1785);if(F.trim().length>0){I=F;}this.containerPrevious=addNode(G,"span","",this.pageCss,"&lt;&nbsp;"+(H?H:""));this.containerPrevious.title=I;YAHOO.util.Event.addListener(this.containerPrevious,"click",this.loadPreviousPage);this.addPageRollOver(this.containerPrevious);};this.buildGoToNextPage=function(G){var H="Go to Next Page";var F=perfTranslator.getValue(1786);if(F.trim().length>0){H=F;}this.containerNext=addNode(this.footerContainer,"span","",this.pageCss,(G?G:"")+"&nbsp;&gt;");this.containerNext.title=H;YAHOO.util.Event.addListener(this.containerNext,"click",this.loadNextPage);this.addPageRollOver(this.containerNext);};this.buildPage=function(F){var G=this.pageCss;G+=F==this.CurrentPage?" selectedPage":"";var H=addNode(this.pagesContainer,"span","",G,String(F));YAHOO.util.Event.addListener(H,"click",this.loadPage,F);this.addPageRollOver(H);};this.buildTotalsDescription=function(){if(this.ShowDescription){var G="pagerDescription";if(this.pagerDescrContainer!=null){this.pagerDescrContainer.innerHTML="";if(!YAHOO.util.Dom.hasClass(this.pagerDescrContainer,G)){YAHOO.util.Dom.addClass(this.pagerDescrContainer,G);}}else{this.pagerDescrContainer=addNode(this.pagercontainer,"div","",G);}var H="";if(this.Pages.length>0){var F=perfTranslator.getValue(765);if(F.trim().length>0){H=new String(perfTranslator.parseValue(F,[String(this.Pages[this.CurrentPage-1].DataFrom),String(this.Pages[this.CurrentPage-1].DataTo),String(this.TotalRecords)]));}else{H=new String("Displaying&nbsp;<strong>"+this.Pages[this.CurrentPage-1].DataFrom)+"-"+String(this.Pages[this.CurrentPage-1].DataTo)+"</strong>&nbsp;of&nbsp;"+String(this.TotalRecords)+"&nbsp;"+this.DataSourceDescription;}}else{H=this.NoRecordDescription;}this.pagerDescrContainer.innerHTML=H;}};this.buildPageLinks=function(F){if(F==undefined){F=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var H=Math.floor((this.CurrentPage/this.Step))*this.Step;if((this.CurrentPage%this.Step)==0){H-=this.Step;}var G=H+this.Step;if(this.Pages.length<G){G=this.Pages.length;}this.buildPage(1);if(this.CurrentPage>this.Step){addNode(this.pagesContainer,"span","","ellipse","...");}for(var I=H+1;I<=G;I++){if(I>1){this.buildPage(I);if(I==G&&I<this.Pages.length){addNode(this.pagesContainer,"span","","ellipse","...");this.buildPage(this.Pages.length);}}}if(this.CurrentPage==1){this.containerPrevious.className+=" "+this.pageDisableCss;}else{this.containerPrevious.className=this.containerPrevious.className.replace(this.pageDisableCss,"");}if(this.CurrentPage==this.Pages.length){this.containerNext.className+=" "+this.pageDisableCss;}else{this.containerNext.className=this.containerNext.className.replace(this.pageDisableCss,"");}}if(!F){this.onPageLoad.fire(this);}};}YAHOO.extend(MediaPagerControl,PagerSimple);perfUI.content.userComment=function(B){var A=this;this.DataSource=B;this.CommentId=0;this.user=null;this.DateCreated="";this.Body="";this.TotalReplies=0;this.LanguageId=0;this.ParentId=0;this.ContentType=null;this.ContentTypeId=0;this.AllowDelete=0;this.AllowReportAbuse=0;this.AllowReplyMessage=0;this.AllowReplyComment=1;this.loadProperties=function(D){D=D||this.DataSource;if(D==null||D==undefined){return;}this.DataSource=D;this.DateCreated=PERF.parseNode(D,"date");this.Body=PERF.parseNode(D,"message");this.CommentId=PERF.parseNode(D,"commentId");this.UserId=PERF.parseNodeNumeric(D,"userId");this.TotalReplies=PERF.parseNodeNumeric(D,"replies");this.LanguageId=PERF.parseNodeNumeric(D,"languageId");this.ParentId=PERF.parseNodeNumeric(D,"parentId");this.UserGUID=PERF.parseNode(D,"userCode");this.AllowDelete=PERF.parseNodeNumeric(D,"allowDelete");this.AllowReportAbuse=PERF.parseNodeNumeric(D,"allowAbuse");var C=D.getElementsByTagName("allowReply");if(C!=null&&C.length==1){this.AllowReplyComment=PERF.parseNodeNumeric(D,"allowReply");}this.AllowReplyMessage=PERF.parseNodeNumeric(D,"allowMessage");this.user=new perfUI.content.user(0,D);};this.init=function(){if(this.DataSource!=null){this.loadProperties();}};this.init();};perfUI.widgets.userCommentsWidget=function(B,C,A,E){scopeWidget=this;var D=perfUI.util.addEl;this.UserId=B||0;this.ContentType=C||0;this.ContentObject=null;this.Container=A||null;this.CurrentLanguageId=0;this.Caption=perfTranslator.getValue(285).trim().length==0?"Comments":perfTranslator.getValue(285);this.Languages=null;this.Tree=null;this.LoginRedirectUrl="";this.AllowComments=0;this.languageFilter=null;this.commentEditor=null;this.commentEditorPanelContainer=A||null;this.commentEditorPanel=null;this.commentEditorPreviewContainer=null;this.headerContainer=null;this.totalCommentsLabel=null;this.commentEditorSubmitMethod=E||null;this.afterRenderComplete=new YAHOO.util.CustomEvent("afterRenderComplete",this);this.treeObject=!this.treeObject?perfUI.widgets.userCommentsWidgetCommentTree:this.treeObject;this.loadNodeComments=function(I){I.children=new Array();for(var G=0;G<this.ContentObject.Comments.length;G++){var L=this.ContentObject.Comments[G];var F=new this.Tree.nodeObject(L,I);if(L.TotalReplies>0){var K=new perfUI.widgets.userCommentsWidgetCommentReplyNode(F,false);}}if(I.pagers==undefined){I.pager.ParseXmlProperties(this.ContentObject.DataSource);}else{for(var G=0;G<I.pagers.length;G++){var H=I.pagers[G];var J=this.ContentObject.DataSource?this.ContentObject.DataSource:this.ContentObject.dataSource;H.ParseXmlProperties(J);}}I.loadComplete();};this.loadLanguageFilter=function(){if(!this.Languages){return;}var G=this.headerContainer;this.languageFilter=addNode(G,"select","","textbox right");var L=this.Languages.getElementsByTagName("language");for(var N=0;N<L.length;N++){var J=L[N];var H=J.getElementsByTagName("id")[0].childNodes[0].nodeValue;var F=J.getElementsByTagName("name")[0].childNodes[0].nodeValue;var I=addNode(this.languageFilter,"option");I.innerHTML=F;I.value=H;}this.languageFilter.value=this.CurrentLanguageId;var K=perfTranslator.getValue(2490);addNode(G,"label","","right",(K.trim().length>0?K:"Select Language")+":");var M=function(O){this.CurrentLanguageId=Number(this.languageFilter.value);this.loadRootComments();};YAHOO.util.Event.addListener(this.languageFilter,"change",M,this,true);};this.getCommentEditorBodyContainer=function(){return this.commentEditor.get("textarea");};this.getCommentEditorBodyHtml=function(){return this.commentEditor.getContent();};this.buildCommentEditorFooter=function(L,J){var O="toggleSelected";var S=this.commentEditor;var N=this.commentEditorPanel.getFooter();N.innerHTML="";var P=S.getContainer();P.style.display="block";var K=this.commentEditorPreviewContainer;K.style.display="none";var R=addNode(N,"center");var F=perfTranslator.getValue(808);var G=addNode(R,"button","","buttonnew",F.trim().length>0?F:"Post Comment");YAHOO.util.Event.addListener(G,"click",L,J);var Q=perfTranslator.getValue(701);var M=addNode(R,"button","","buttonnew",Q.trim().length>0?Q:"Cancel");YAHOO.util.Event.addListener(M,"click",this.HideCommentEditor,this,true);var H=perfTranslator.getValue(809);var U=addNode(R,"a","","",H.trim().length>0?H:"Preview Comment");PERF.makeLink(U);var T=function(){var W=scopeWidget.getCommentEditorBodyHtml();var Y={url:"/api/callna.asp",params:"?function=CustomEncode"};var X=function(a){};var V=function(a){var b=a.responseXML;var f="";try{f=b.getElementsByTagName("response")[0].childNodes[0].nodeValue;}catch(d){}K.innerHTML=f;var c=perfTranslator.getValue(784);M.value=c.trim().length>0?c:"Edit";YAHOO.util.Event.removeListener(M,"click");YAHOO.util.Event.addListener(M,"click",I);U.style.display="none";P.style.display="none";K.style.display="block";};var Z={success:V,failure:X,scope:scopeWidget};W="html="+Url.encode(W);YAHOO.util.Connect.asyncRequest("POST",Y.url+Y.params,Z,W);};var I=function(){M.value=Q.trim().length>0?Q:"Cancel";YAHOO.util.Event.addListener(M,"click",scopeWidget.HideCommentEditor,scopeWidget,true);U.style.display="inline";K.style.display="none";P.style.display="block";};YAHOO.util.Event.addListener(U,"click",T,this,true);};this.buildCommentEditorPanel=function(H){this.commentEditorPanelContainer=addNode(this.commentEditorPanelContainer,"div","","postCommentEditor");this.commentEditorPanel=new perfUI.widgets.panel(this.commentEditorPanelContainer,"540px");this.commentEditorPanel.setBody();this.commentEditorPanel.setFooter();this.commentEditorPanel.render();var K=this.commentEditorPanel.getBody();this.commentEditorPanel.activityIndicator=D(K,"div",{"class":"activityIndicatorLoadModule","innerHTML":"<p>"+perfTranslator.getValue(1864).toLowerCase()+"...</p>"});this.commentEditorPanel.show();this.commentEditorPanel.center();if(!perfUI.widgets.perfEditor){var G=this;var J="";perfUI.util.insertClientScript('var tinyMCE_GZ = {loaded:true}; var tinyMCEPreInit = {suffix:"",base : "'+J+'/includes/js/tinymce/jscripts/tiny_mce"};');var I=function(){tinymce.dom.Event._pageInit();var L=function(){G.buildCommentEditor(H);};var M=perfUI.util.loadClientResource("/includes/js/perfUI/build/perfEditor.js","js",{"fn":L,"obj":G,"scope":true});};var F=perfUI.util.loadClientResource("/includes/js/tinymce/jscripts/tiny_mce/tiny_mce.js","js",{"fn":I,"obj":this,"scope":true});}};this.buildCommentEditor=function(F){if(this.commentEditor){return;}if(document.body.className.indexOf("yui-skin-sam")<0){document.body.className+=" yui-skin-sam";}var H=this.commentEditorPanel.getBody();var G=D(H,"textarea",{"id":"postCommentEditor"+this.UserId,"style":"display:none"});this.commentEditor=new perfUI.widgets.perfEditor(G.id);this.commentEditor.onPostRender.add(F);this.commentEditorPreviewContainer=addNode(H,"div");this.commentEditorPreviewContainer.style.display="none";this.commentEditorPreviewContainer.className="previewPost";this.commentEditor.render();};this.onSuccessDeleteComment=function(F){var G=F.responseXML;var H=this.Tree.hasErrors(F);if(!H){this.loadResponseContentObject(G);this.Render();this.HideCommentEditor();}};this.onSuccessAddNewComment=function(I,G,M,K){M=M||null;var H=G.responseXML;var J=this.Tree.hasErrors(G);if(!J){var L=this.Tree.getResponseResult(G,this.addCommentsParam);if(L.trim().length>0){alert(L);}if(K){this.loadResponseContentObject(H);if(M!=null){this.buildHeaderContents();var F=null;if(M.children.length>0){M.removeChildren();}M.appendCommentReplyBoxContainer();F=new perfUI.widgets.userCommentsWidgetCommentReplyNode(M,true);F.comment.TotalReplies=this.ContentObject.Comments.length;M.renderChildren();this.loadNodeComments(F);}else{this.Render();}}this.HideCommentEditor();}I.value="Post Comment";I.disabled=false;};this.attachShowCommentEditorEvent=function(F){scopeWidget.ShowCommentEditor(F);};this.getContentIdParam=function(){return this.ContentObject.getContentId();};};perfUI.widgets.userCommentsWidget.prototype.ShowCommentEditor=function(B){switch(this.AllowComments){case 0:location.href=this.LoginRedirectUrl;return;case 1:break;case 2:if(this.ContentObject.AllowCommentsDescr.trim().length>0){alert(this.ContentObject.AllowCommentsDescr);}else{var C=perfTranslator.getValue(2492);alert(C.trim().length==0?"You do not have the necessary permission to post comments.":C);}return;}var A=function(){scopeWidget.buildCommentEditorFooter(scopeWidget.commentEditorSubmitMethod,B);scopeWidget.commentEditorPanel.show();if(scopeWidget.commentEditorPanel.activityIndicator){scopeWidget.commentEditorPanel.activityIndicator.style.display="none";}scopeWidget.commentEditor.show();scopeWidget.commentEditorPanel.center();scopeWidget.commentEditor.focus();};if(this.commentEditorPanel==null){this.buildCommentEditorPanel(A);}else{A();}};perfUI.widgets.userCommentsWidget.prototype.HideCommentEditor=function(){if(this.commentEditor!=null){this.commentEditor.setContent("");this.commentEditor.hideAll();}if(this.commentEditorPanel!=null){this.commentEditorPanel.hide();}};perfUI.widgets.userCommentsWidget.prototype.LoadLanguagesXml=function(A){var C=null;if(typeof(A)=="string"){if(YAHOO.env.ua.ie>0){C=new ActiveXObject("Microsoft.XMLDOM");}else{if(document.implementation&&document.implementation.createDocument){C=document.implementation.createDocument("","",null);if(DOMParser){Document.prototype.loadXML=function(H){var F=new DOMParser();var D=F.parseFromString(H,"text/xml");while(this.hasChildNodes()){this.removeChild(this.lastChild);}for(var E=0;E<D.childNodes.length;E++){var G=this.importNode(D.childNodes[E],true);this.appendChild(G);}};}}}C.loadXML(A);}else{var B=A.getElementsByTagName("languages");if(B!=null&&B.length==1){C=B[0];}}this.Languages=C;};perfUI.widgets.userCommentsWidget.prototype.buildHeaderContents=function(A){this.headerContainer.innerHTML="";var F=addNode(this.headerContainer,"div","","left");addNode(F,"strong","","left peachDarkText",this.Caption);var C=addNode(F,"div","","left");addNode(C,"div","","postComment");var E=perfTranslator.getValue(808);var B=addNode(C,"a","","left",E.trim().length>0?E:"Post Comment");PERF.makeLink(B);var D=function(){scopeWidget.ShowCommentEditor();};YAHOO.util.Event.addListener(C,"click",D);this.loadLanguageFilter();};perfUI.widgets.userCommentsWidget.prototype.renderTree=function(C,F,D,A){this.Container=C||this.Container;if(this.Container==null){return;}this.Container.innerHTML="";var E=addNode(this.Container,"div","","separator");this.headerContainer=addNode(this.Container,"div","","caption bgSection left");this.buildHeaderContents();var C=addNode(this.Container,"div","","bgContainer bglb clear");this.Tree=new this.treeObject(C);this.Tree.loadNodeDataMethod=F;this.Tree.postCommentMethod=D;this.Tree.deleteCommentMethod=A;var B=this.Tree.getRoot();this.loadNodeComments(B);};perfUI.widgets.userCommentsWidget.prototype.addNewComment=function(H,D,K,J){J=J==undefined?true:J;var B=YAHOO.util.Event.getTarget(H);var E=this.getCommentEditorBodyHtml();var I=D?D.comment.ContentTypeId:this.getContentIdParam();var G=(D?D.pager:(this.Tree?this.Tree.getRoot().pager:null));if(E.trim().length==0){var A=perfTranslator.getValue(2488);alert(A.trim().length>0?A:"You have not entered any text.");return;}E=E.replace(new RegExp("&lt;embed ","g"),"&lt;embed wmode=opaque ");var N={url:"/api/call.asp",params:"?Function="+this.addCommentsParam+"&UserID="+this.UserId+"&"+this.contentIdParam+"="+I+"&page="+(G?G.CurrentPage:"1")+"&numrecords="+(G?G.PageSize:"10")+"&lid="+this.CurrentLanguageId+"&ParentID="+(D?D.comment.CommentId:"0")+"&refresh="+(J?"1":"0")+"&sid="+Math.random()};var F=function(Q){this.handleFailure(Q);};var C=function(Q){this.onSuccessAddNewComment(B,Q,D,J);};var P={success:C,failure:F,scope:scopeWidget};B.disabled=true;var M=perfTranslator.getValue(2487);B.value=M.trim().length>0?M:"Submitting ...";var O=this.AlbumType==1?"perfnights":"";var L=this.ContentObject.CategoryId>0?this.ContentObject.CategoryId:"";LOTCC.bcpw("act","posting comments","int",K,"med",K,"int",L,"med",O);E="m="+Url.encode(E);YAHOO.util.Connect.asyncRequest("POST",N.url+N.params,P,E);};perfUI.widgets.userCommentsWidget.prototype.loadRootComments=function(B){var C=this;var G=this.ContentObject.getContentId();var E={url:"/api/call.asp",params:"?Function="+this.loadRootCommentsParam+"&UserID="+this.UserId+"&"+this.contentIdParam+"="+G+"&page="+(this.Tree?this.Tree.getRoot().pager.CurrentPage:"1")+"&lid="+this.CurrentLanguageId+"&ParentID=0&sid="+Math.random()};var D=function(H){this.handleFailure(H);};var A=function(H){var I=H.responseXML;this.loadResponseContentObject(I);if(B){B();}else{this.Render();}this.Tree.root.containerActivity.style.display="none";};var F={success:A,failure:D,scope:C};YAHOO.util.Connect.asyncRequest("GET",E.url+E.params,F,null);};perfUI.widgets.userCommentsWidget.prototype.loadNodeData=function(A,E){var J=this;var D=this.ContentObject.getContentId();var G={url:"/api/call.asp",params:"?Function="+this.loadRootCommentsParam+"&UserID="+scopeWidget.UserId+"&"+this.contentIdParam+"="+D+"&page="+A.pager.CurrentPage+"&lid="+scopeWidget.CurrentLanguageId+"&ParentID="+(A.comment?A.comment.CommentId:"0")+"&sid="+Math.random()};var C=function(K){this.handleFailure(K);};var B=function(K){var L=K.responseXML;this.loadResponseContentObject(L);this.loadNodeComments(A);};var I={success:B,failure:C,scope:J};var H=this.AlbumType==1?"perfnights":"";var F=this.ContentObject.CategoryId>0?this.ContentObject.CategoryId:"";LOTCC.bcpw("act","checking comments","int",E,"med",E,"int",F,"med",H);YAHOO.util.Connect.asyncRequest("GET",G.url+G.params,I,null);};perfUI.widgets.userCommentsWidget.prototype.deleteNodeData=function(A){var I=this;var F=this.getContentIdParam();var E=this.Tree?this.Tree.getRoot().pager:null;var C=perfTranslator.getValue(482);if(!confirm(C.trim().length==0?"Are you sure you want to delete this comment?":C)){return;}var G={url:"/api/call.asp",params:"?Function="+this.deleteCommentsParam+"&UserID="+this.UserId+"&"+this.contentIdParam+"="+F+"&lid="+this.CurrentLanguageId+"&ParentID="+A.comment.CommentId+"&page="+(E?E.CurrentPage:"1")+"&numrecords="+(E?E.PageSize:"10")+"&sid="+Math.random()};var D=function(J){this.handleFailure(J);};var B=function(J){this.onSuccessDeleteComment(J);};var H={success:B,failure:D,scope:I};YAHOO.util.Connect.asyncRequest("GET",G.url+G.params,H,null);};perfUI.widgets.blogCommentsWidget=function(B,A){var D=this;var C=function(F,E){D.addNewComment(F,E);};perfUI.widgets.blogCommentsWidget.superclass.constructor.call(this,B,perfUI.content.userContentType.Blog,A,C);this.AlbumType=0;this.contentIdParam="blogid";this.loadRootCommentsParam="Media.Blogs.GetBlogComments";this.deleteCommentsParam="Media.Blogs.DeleteBlogComment";this.addCommentsParam="Media.Blogs.InsertBlogComment";this.loadResponseContentObject=function(F){this.LoadLanguagesXml(F);var E=new perfUI.content.userAlbum(this.UserId,F.getElementsByTagName("album")[0]);this.ContentObject=E.Blogs[0];};this.addNewComment=function(F,E){perfUI.widgets.blogCommentsWidget.superclass.addNewComment.call(D,F,E,"blogs");};this.loadRootComments=function(){perfUI.widgets.blogCommentsWidget.superclass.loadRootComments.call(D);};this.loadNodeData=function(E){perfUI.widgets.blogCommentsWidget.superclass.loadNodeData.call(D,E,"blogs");};this.deleteNodeData=function(E){perfUI.widgets.blogCommentsWidget.superclass.deleteNodeData.call(D,E);};this.Render=function(F){var G=this.loadNodeData;var E=this.attachShowCommentEditorEvent;var H=this.deleteNodeData;perfUI.widgets.blogCommentsWidget.superclass.renderTree.call(this,F,G,E,H);D.afterRenderComplete.fire();};};YAHOO.extend(perfUI.widgets.blogCommentsWidget,perfUI.widgets.userCommentsWidget);perfUI.widgets.pictureCommentsWidget=function(B,A){var D=this;var C=function(F,E){D.addNewComment(F,E);};perfUI.widgets.pictureCommentsWidget.superclass.constructor.call(this,B,perfUI.content.userContentType.Picture,A,C);this.AlbumType=0;this.contentIdParam="pictureid";this.loadRootCommentsParam="Media.Pictures.GetPictureComments";this.deleteCommentsParam="Media.Pictures.DeletePictureComment";this.addCommentsParam="Media.Pictures.InsertPictureComment";this.loadResponseContentObject=function(F){this.LoadLanguagesXml(F);var E=new perfUI.content.userAlbum(this.UserId,F.getElementsByTagName("album")[0]);this.ContentObject=E.Pictures[0];};this.addNewComment=function(F,E){perfUI.widgets.pictureCommentsWidget.superclass.addNewComment.call(D,F,E,"pictures");};this.loadRootComments=function(){perfUI.widgets.pictureCommentsWidget.superclass.loadRootComments.call(D);};this.loadNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.loadNodeData.call(D,E,"pictures");};this.deleteNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.deleteNodeData.call(D,E);};this.Render=function(F){var G=this.loadNodeData;var E=this.attachShowCommentEditorEvent;var H=this.deleteNodeData;perfUI.widgets.pictureCommentsWidget.superclass.renderTree.call(this,F,G,E,H);D.afterRenderComplete.fire();};};YAHOO.extend(perfUI.widgets.pictureCommentsWidget,perfUI.widgets.userCommentsWidget);perfUI.widgets.videoCommentsWidget=function(B,A){var D=this;var C=function(F,E){D.addNewComment(F,E);};perfUI.widgets.videoCommentsWidget.superclass.constructor.call(this,B,perfUI.content.userContentType.Video,A,C);this.contentIdParam="videoid";this.loadRootCommentsParam="Media.Videos.GetVideoComments";this.deleteCommentsParam="Media.Videos.DeleteVideoComment";this.addCommentsParam="Media.Videos.InsertVideoComment";this.loadResponseContentObject=function(F){this.LoadLanguagesXml(F);var E=new perfUI.content.userAlbum(this.UserId,F.getElementsByTagName("album")[0]);this.ContentObject=E.Videos[0];};this.addNewComment=function(F,E){perfUI.widgets.pictureCommentsWidget.superclass.addNewComment.call(D,F,E,"videos");};this.loadRootComments=function(E){perfUI.widgets.pictureCommentsWidget.superclass.loadRootComments.call(D,E);};this.loadNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.loadNodeData.call(D,E,"videos");};this.deleteNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.deleteNodeData.call(D,E);};this.Render=function(F){var E=function(){var H=D.loadNodeData;var G=D.attachShowCommentEditorEvent;var I=D.deleteNodeData;perfUI.widgets.videoCommentsWidget.superclass.renderTree.call(D,F,H,G,I);D.afterRenderComplete.fire();};if(this.Tree==null){this.loadRootComments(E);}else{E();}};};YAHOO.extend(perfUI.widgets.videoCommentsWidget,perfUI.widgets.userCommentsWidget);perfUI.widgets.userCommentsWidgetCommentTree=function(A){this.container=A;this.loadNodeDataMethod=null;this.postCommentMethod=null;this.deleteCommentMethod=null;this.root=null;this.nodeCount=0;this.nodeObject=!this.nodeObject?perfUI.widgets.userCommentsWidgetCommentNode:this.nodeObject;this.hasErrors=function(B){var C=B.responseXML;var D=C.getElementsByTagName("errors");if(D.length==1){var E=PERF.parseNode(D[0],"error");alert(E);return true;}return false;};this.getResponseResult=function(B,F){var C=B.responseXML;var E=C.getElementsByTagName("function");for(var D=0;D<E.length;D++){if(E[D].getAttribute("id")==F){return result=PERF.parseNode(E[D],"result");}}return"";};this.getRoot=function(){return this.root;};this.init=function(){this.root=new this.nodeObject();this.root.tree=this;this.root.depth=-1;this.root.container=this.container;this.root.containerBody=this.container;var B=perfTranslator.getValue(1864);this.root.containerActivity=perfUI.util.addEl(this.container,"div",{"class":"activityIndicator","innerHTML":"<p>"+(B.trim().length==0?"loading":B)+"...</p>"});this.root.containerActivity.style.display="none";this.root.childNodesContainer=addNode(this.container,"div");};this.init();};perfUI.widgets.userCommentsWidgetCommentNode=function(C,A,B){this.container=null;this.containerBody=null;this.comment=C;this.isExpanded=B==undefined?true:B;this.showThumbnail=this.showThumbnail?this.showThumbnail:false;this.pager=new CommentsPagerControl();this.toggle=null;this.toggleLabel=null;this.parent=A;this.children=new Array();this.childNodesContainer=null;this.containerActivity=null;this.tree=null;this.depth=-1;this.commentEditorSubmitMethod=null;this.renderChildren=function(){for(var E=0;E<this.children.length;E++){var D=this.children[E];D.buildContainer();if(D.children.length>0){D.children[0].buildContainer();}}};this.removeChildren=function(){this.childNodesContainer.parentNode.removeChild(this.childNodesContainer);this.childNodesContainer=null;this.children=new Array();};this.appendCommentBoxContainer=function(D){return addNode(D,"div","","commentBox");};this.appendCommentReplyBoxContainer=function(){this.childNodesContainer=this.appendCommentBoxContainer(this.containerBody);this.childNodesContainer.className+=" rpl";};this.appendHeader=function(D){return addNode(D,"div","","hdr");};this.appendShowHideIcon=function(D){return addNode(D,"div");};this.postCommentMethodEvent=function(D){this.tree.postCommentMethod(this);};this.deleteCommentMethodEvent=function(D){this.tree.deleteCommentMethod(this);};this.renderPager=function(D){if(this.pager.Container==null){var F=D||this.containerBody;var E=addNode(F,"div");this.pager.Container=E;this.pager.Render(null,this.pager.TotalRecords,true);this.pager.onPageLoad.subscribe(this.pagerFireEvent,this,true);addNode(this.containerBody,"br");}};this.buildContainer=function(){var T=C.TotalReplies>0?true:false;var K=this.appendCommentBoxContainer(this.parent.childNodesContainer);var E=this.appendHeader(K);if(this.comment.AllowReportAbuse==1){var O=addNode(E,"span","r"+this.comment.CommentId,"reportIcon");var J=perfTranslator.getValue(1189);O.title=J.trim().length==0?"Report Abuse":J;var M=function(){reportit(3,this.comment.user.userId,"",this.comment.CommentId);};YAHOO.util.Event.addListener(O,"click",M,this,true);}if(this.comment.AllowDelete==1){var P=addNode(E,"span","","deleteCommentIcon");var R=perfTranslator.getValue(316);P.title=R.trim().length==0?"Delete Comment":R;YAHOO.util.Event.addListener(P,"click",this.deleteCommentMethodEvent,this,true);}if(this.comment.AllowReplyMessage==1){var D=addNode(E,"span","","replyMessage");var Q=perfTranslator.getValue(2485);D.title=Q.trim().length==0?"Reply with Message":Q;var N=function(){location.href="http://www.perfspot.com/messagepost.asp?id="+this.comment.user.userGUID+"&cid="+this.comment.CommentId;};YAHOO.util.Event.addListener(D,"click",N,this,true);}if(this.comment.AllowReplyComment==1){var F=addNode(E,"span","","replyComment");var S=perfTranslator.getValue(2484);F.title=S.trim().length==0?"Reply with Comment":S;YAHOO.util.Event.addListener(F,"click",this.postCommentMethodEvent,this,true);}if(this.showThumbnail){var I=function(){location.href=this.comment.user.getProfileUrl();};var H=addNode(E,"img","","thumbnailSmall");H.src=this.comment.user.thumbUrl;YAHOO.util.Event.addListener(H,"click",I,this,true);}var G=addNode(E,"a","","displayName",this.comment.user.displayName);G.href=this.comment.user.getProfileUrl();this.comment.user.attachToolTip(G);if(this.showThumbnail){addNode(E,"br");}var U=perfTranslator.getValue(217).trim().length==0?"Date":perfTranslator.getValue(217);addNode(E,"span","","datePosted",U+":&nbsp;"+C.DateCreated);var L=this.appendBody(K);addNode(L,"div","","commentBody",this.comment.Body);if(T){this.appendCommentReplyBoxContainer();}this.container=K;};this.init=function(){if(this.parent!=null){this.tree=this.parent.tree;this.parent.children.push(this);this.depth=this.parent.depth+1;}this.commentEditorSubmitMethod=this.addNewComment;};this.init();};perfUI.widgets.userCommentsWidgetCommentNode.prototype.pagerFireEvent=function(A){if(this.containerActivity){this.containerActivity.style.display="block";}this.containerActivity.style.display="block";this.tree.loadNodeDataMethod(this);};perfUI.widgets.userCommentsWidgetCommentNode.prototype.loadComplete=function(){if(this.childNodesContainer!=null){this.childNodesContainer.innerHTML="";}this.renderChildren();if(this.pager.TotalRecords>this.pager.PageSize){this.renderPager();}if(this.toggle!=null){this.buildHideRepliesLabel();this.toggle.doExpand();}if(this.containerActivity){this.containerActivity.style.display="none";}};perfUI.widgets.userCommentsWidgetCommentNode.prototype.appendBody=function(B){var A=addNode(B,"div","","bdy");this.containerBody=A;return A;};perfUI.widgets.userCommentsWidgetCommentReplyNode=function(A,B){perfUI.widgets.userCommentsWidgetCommentReplyNode.superclass.constructor.call(this,A.comment,A,B);this.pager.DataSourceDescription="replies";this.buildHeaderContents=function(){};this.buildContainer=function(){this.container=this.parent.childNodesContainer;this.container.innerHTML="";var E=this.appendHeader(this.container);E.className+=" rplhdr";var D=this.appendShowHideIcon(E);this.toggleLabel=addNode(E,"a");PERF.makeLink(this.toggleLabel);if(this.isExpanded){this.buildHideRepliesLabel();}else{this.buildShowRepliesLabel();}var C=this.appendBody(this.container);this.toggle=new perfUI.widgets.showHideContainer(D,C,!this.isExpanded);this.toggle.autoEvents=false;YAHOO.util.Event.addListener(this.toggleLabel,"click",this.toggle.toggle,this.toggle,true);this.toggle.onExpandClick.subscribe(this.expand,this,true);this.toggle.onCollapseClick.subscribe(this.collapse,this,true);this.childNodesContainer=addNode(C,"div");};this.expand=function(){if(this.children.length==0){this.buildLoadingRepliesLabel();this.toggle.setLoadingIconCss();this.tree.loadNodeDataMethod(this);}else{this.buildHideRepliesLabel();this.toggle.doExpand();}};this.collapse=function(){this.buildShowRepliesLabel();this.toggle.doCollapse();};this.buildHideRepliesLabel=function(){var C=perfTranslator.getValue(2494);if(C.trim().length==0){this.toggleLabel.innerHTML="Hide "+String(this.comment.TotalReplies)+" Replies to this Comment";}else{this.toggleLabel.innerHTML=perfTranslator.parseValue(C,[String(this.comment.TotalReplies)]);}};this.buildShowRepliesLabel=function(){var C=perfTranslator.getValue(2493);if(C.trim().length==0){this.toggleLabel.innerHTML="View "+String(this.comment.TotalReplies)+" Replies to this Comment";}else{this.toggleLabel.innerHTML=perfTranslator.parseValue(C,[String(this.comment.TotalReplies)]);}};this.buildLoadingRepliesLabel=function(){var C=perfTranslator.getValue(1864);this.toggleLabel.innerHTML=(C.trim().length==0?"Loading":C)+"...";};};YAHOO.extend(perfUI.widgets.userCommentsWidgetCommentReplyNode,perfUI.widgets.userCommentsWidgetCommentNode);function ContentSharingWidget(C,B,A){var E=this;var D=null;this.maxAllowedRecipients=30;this.selectionTool=function(F){this.Container=F;this.BodyContainer=null;this.ButtonCancel=null;this.ButtonSubmit=null;this.Input=null;this.ResultsContainer=null;this.AutoComp=null;this.MessageContainer=null;this.SelectedItems=[];this.SelectedArrowToItems=[];this.LanguageFilter=null;this.defaultValue="Enter friend's name or email address above.";};this.loadLanguagesFilter=function(){var F=new perfUI.widgets.languages();F.loadLanguagesDropDown(this.LanguageFilter,B);};this.autoCompleteSearchFriends=function(){var G="/api/call.asp";var I=new YAHOO.util.XHRDataSource(G,["user","displayName","isMe","thumbnailUrl","userId"]);I.responseType=YAHOO.util.XHRDataSource.TYPE_XML;I.responseSchema={resultNode:"user",fields:["displayName","userId","isMe","thumbnailUrl","userCode"]};I.scriptQueryAppend="Function=Media.Pictures.GetFriendsAuto&UserID="+this.UserId;var Q=function(S,W){var V=[];var Y=S.displayName.split(" ");var X=false;for(var U=0;U<Y.length;U++){var T=Y[U];if(!X){var Z=T.toLowerCase().indexOf(W);if(Z>=0){if(Z>0){V.push(T.substr(0,Z));}V.push(" ","<strong>",T.substr(Z,W.length),"</strong>",T.substr(Z+W.length));X=true;}else{V.push(" ",T);}}else{V.push(" ",T);}}return V.join("").trim();};var H=function(W,V,U){var T=Q(W,V);var S=['<img class="thumbnail" src="',W.thumbnailUrl,'"></img><span class="displayName">',T,(W.isMe.toLowerCase()=="true"?'<em class="txtdblue">&nbsp;*me</em>':""),"</span>"];return(S.join(""));};var J={autoHighlight:true,useShadow:false,resultTypeList:false,formatResult:H,minQueryLength:0,animVert:true,queryMatchContains:true,delimChar:new Array(";",","),typeAhead:true};var R=new YAHOO.widget.AutoComplete(D.Input,D.ResultsContainer,I,J);R.appendItems=[];var M=function(){R.setBody("<ul><li>"+D.defaultValue+"</li></ul>");D.ResultsContainer.childNodes[0].style.height="19px";};var L=function(S){if(D.Input.value.trim().length==0){M();}};R.textboxFocusEvent.subscribe(L);var O=function(S,T){if(D.Input.value.trim().length==0){M();}};R.textboxKeyEvent.subscribe(O);var F=function(U,T){var S=perfTranslator.getValue(1864);S=(S.trim().length<=0?"loading":S)+"...";this.setBody('<ul class="noData"><li>'+S+"</li></ul>");this.alwaysShowContainer=true;this._toggleContainer(true);};R.dataRequestEvent.subscribe(F);var K=function(T,S){if(S[2].length==0){R.alwaysShowContainer=true;R.setBody("<ul><li>You can type an email address... </li></ul>");}else{R.alwaysShowContainer=false;}};R.dataReturnEvent.subscribe(K);var N=function(T,S){R.alwaysShowContainer=false;D.SelectedItems.push(S[2]);};R.itemSelectEvent.subscribe(N);var P=function(U,T){var S=T[1];var V=this.getListItemData(S);D.SelectedArrowToItems.push(V);};R.itemArrowToEvent.subscribe(P);return R;};this.buildWidget=function(){var N=YAHOO.env.ua.ie>0?280:250;var V=YAHOO.env.ua.ie>0?330:305;this.Recipients=new Array();this.Container.getBody().innerHTML="";D=new E.selectionTool();D.Container=addNode(this.Container.getBody(),"div","","sharingWidget");D.Container.style.display="none";var G=addNode(D.Container,"div","","header");addNode(G,"strong","","peachDarkText left","Share With Friends");var L=addNode(G,"div","","closeIcon");YAHOO.util.Event.addListener(L,"click",E.Close,E,true);var O=addNode(D.Container,"div","","dialogBody clear");D.ContainerBody=O;var I=addNode(O,"div","","albumFrameIcon_dragDrop");var b=addNode(I,"img","","dragDropPlayer_albumsEditor");var M="";var P="";var R="";var J=this.ContentObj.getContentType();switch(J){case perfUI.content.userContentType.Album:M=this.ContentObj.CoverImageUrl;P=this.ContentObj.Subject;R=this.ContentObj.Description;break;case perfUI.content.userContentType.Picture:M=this.ContentObj.PictureUrl;P=this.ContentObj.Subject;R=this.ContentObj.Description;break;case perfUI.content.userContentType.Video:var Z=this.ContentObj;M=Z.ThumbUrl;P=Z.Subject;R="";break;case perfUI.content.userContentType.Blog:var H=this.ContentObj;M=H.getIconUrl();P=H.Subject;R="";break;}b.src=M;var X=addNode(O,"p","","left");addNode(X,"strong","","txtdblue",P);addNode(X,"br");addNode(X,"span","","txtdblue",R);var a=addNode(O,"div","","formz");var W=addNode(a,"div","","row");addNode(W,"label","","left","To:");var F=addNode(W,"textarea","","textbox");F.title="Maximum "+this.maxAllowedRecipients+" recipients.";F.style.height="40px";var T=addNode(W,"div");D.Input=F;D.ResultsContainer=T;D.AutoComp=E.autoCompleteSearchFriends();var K=addNode(a,"div","","row");addNode(K,"label","","left","Message:");D.MessageContainer=addNode(K,"textarea","","textbox");var U=addNode(a,"div","","row");addNode(U,"label","","left","Language:");this.LanguageFilter=addNode(U,"select","","textbox");this.loadLanguagesFilter();var S=addNode(O,"div","","footer clear");var Y=addNode(S,"button","","buttonnew","Submit");YAHOO.util.Event.addListener(Y,"click",this.submitRecipients,this,true);var Q=addNode(S,"button","","buttonnew","Cancel");YAHOO.util.Event.addListener(Q,"click",this.Close,this,true);D.ButtonCancel=Q;D.ButtonSubmit=Y;D.Container.style.display="block";};this.UserId=C;this.ContentObj=null;this.Container=A||null;this.Recipients=new Array();this.onSubmitRecipients=new YAHOO.util.CustomEvent("recipientsSubmit",this);this.Render=function(F){if(F!=undefined&&this.Container==null){YAHOO.util.Dom.addClass(F,"yui-skin-sam");this.Container=new perfUI.widgets.panel(F);this.Container.setBody();this.Container.render();}};this.Load=function(F){this.ContentObj=F;this.buildWidget();this.Container.center();this.Container.show();this.Container.center();};this.Close=function(F){this.Container.hide();};this.displaySubmitStatus=function(G){D.ContainerBody.innerHTML="";var F=addNode(D.ContainerBody,"div","","statusMsg");addNode(F,"p","","",G);var H=addNode(F,"button","","buttonnew","Close");YAHOO.util.Event.addListener(H,"click",E.Close,E,true);};this.submitRecipients=function(J){var M="";if(D.Input.value.trim().length==0){alert("Please enter your friend's name or email in the list.");D.Input.focus();return;}var F=[];F=D.Input.value.split(/[;,]/);var P=F.clean(" ");if(F.length==0){this.displayUnableToSubmit("Unable to share at this time. Please try again.");return;}if(F.length>this.maxAllowedRecipients){alert("You have included "+F.length+" recipients. You may not exceed "+this.maxAllowedRecipients+" recipients.");D.Input.focus();return;}D.ButtonSubmit.value="Sending...";var O=function(){var b=null;if(YAHOO.env.ua.ie>0){b=new ActiveXObject("Microsoft.XMLDOM");}else{if(document.implementation&&document.implementation.createDocument){b=document.implementation.createDocument("","",null);}}if(b==null){scopeEditor.throwErrorGeneral(msgBrowserNotCompatible);}var h=b.createElement("functions");b.appendChild(h);var R=b.createElement("function");h.appendChild(R);var Q=b.createAttribute("id");var V=E.ContentObj.getContentType();switch(V){case perfUI.content.userContentType.Album:case perfUI.content.userContentType.Picture:M="Media.Pictures.ShareAlbum";break;case perfUI.content.userContentType.Video:M="Media.Videos.ShareVideo";break;case perfUI.content.userContentType.Blog:M="Media.Blogs.ShareBlog";break;}Q.nodeValue=M;var U=b.createElement("album");R.appendChild(U);var c=b.createElement("albumId");U.appendChild(c);c.appendChild(b.createTextNode(E.ContentObj.AlbumId));var f="";switch(V){case perfUI.content.userContentType.Album:f="album";break;case perfUI.content.userContentType.Picture:f="picture";break;case perfUI.content.userContentType.Video:f="video";break;case perfUI.content.userContentType.Blog:f="blog";break;}var p=b.createElement(f+"s");U.appendChild(p);var Z=b.createElement(f);p.appendChild(Z);var S=b.createElement(f+"Id");Z.appendChild(S);S.appendChild(b.createTextNode(E.ContentObj.getContentId()));var Y=b.createElement("message");R.appendChild(Y);Y.appendChild(b.createCDATASection(Url.encode(D.MessageContainer.value)));var o=b.createElement("recipients");R.appendChild(o);var n=b.createElement("friends");o.appendChild(n);var W=b.createElement("emails");o.appendChild(W);for(var e=0;e<F.length;e++){var X=F[e].trim().toLowerCase();var g=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(g.test(X)){var T=b.createElement("emailAddress");T.appendChild(b.createCDATASection(Url.encode(X)));W.appendChild(T);}else{var d=false;for(var m=0;m<D.SelectedItems.length;m++){if(K(b,n,X,D.SelectedItems[m])){d=true;break;}}if(!d){for(var l=0;l<D.SelectedArrowToItems.length;l++){if(K(b,n,X,D.SelectedArrowToItems[l])){break;}}}}}var a="";if(YAHOO.env.ua.ie>0){a=b.xml;}else{if(XMLSerializer){var k=new XMLSerializer();a=k.serializeToString(b);}}return a;};var K=function(U,Q,T,S){if(T==S.displayName.toLowerCase()){var R=U.createElement("userId");R.appendChild(U.createTextNode(S.userId));Q.appendChild(R);return true;}};var G="xml="+O();var L={url:"/api/call.asp",params:"?Function="+M+"&UserID="+this.UserId+"&lid="+this.LanguageFilter.value};var I=function(Q){this.throwErrorGeneral(msgGeneric);};var H=function(R){var Q=PERF.parseNodeBool(R.responseXML,"success");var S="";if(Q){S="A message has been successfully sent to your friends.";}else{S="Unable to share at this time. Please try again.";}this.displaySubmitStatus(S);};var N={success:H,failure:I,scope:E};YAHOO.util.Connect.asyncRequest("POST",L.url+L.params,N,G);};}perfUI.widgets.panel=function(A,K,F,L){var D=YAHOO.util.Dom;var H=perfUI.util.addEl;var M=YAHOO.util.Event;var Q=null;var C=null;var E=null;var G=null;var J=null;var N=null;var I=null;var O=null;var P=false;var B=false;this.container=A||null;this.width=K||"auto";this.height=F||"auto";this.panelCss="";this.elementCss="yui-panel";this.headerCss="hd";this.bodyCss="bd";this.footerCss="ft";this.modal=L==undefined?true:L;this.afterRenderComplete=new YAHOO.util.CustomEvent("afterRenderComplete",this);this.onShowEvent=new YAHOO.util.CustomEvent("onShowEvent",this);this.onHideEvent=new YAHOO.util.CustomEvent("onHideEvent",this);this.afterRenderComplete.subscribe(function(){B=true;},this);this.isRendered=function(){return B;};this.setMask=function(R){Q=R;};this.getMask=function(){return Q;};this.setElement=function(R){C=R;};this.getElement=function(){return C;};this.setHeader=function(R){if(!R||(typeof R=="string"&&R.trim().length==0)){N="";}else{E=R;}};this.setDraggable=function(R){R=(R==null?true:R);if(!this.isRendered()){P=R;}else{if(R){if(this.getHeader()){if(!this.dragDrop){this.dragDrop=new YAHOO.util.DD(this.container);}this.dragDrop.setHandleElId(this.getHeader());}}else{if(this.dragDrop&&this.getHeader()){this.dragDrop.unreg();}}}};this.getHeader=function(){return E;};this.setHeaderTemplate=function(R){N=R;};this.getHeaderTemplate=function(){return N;};this.setBodyTemplate=function(R){I=R;};this.getBodyTemplate=function(){return I;};this.setFooterTemplate=function(R){O=R;};this.getFooterTemplate=function(){return O;};this.setBody=function(R){if(!R||(typeof R=="string"&&R.trim().length==0)){I="";}else{G=R;}};this.getBody=function(){return G;};this.setFooter=function(R){if(!R||(typeof R=="string"&&R.trim().length==0)){O="";}else{J=R;}};this.getFooter=function(){return J;};this.isDraggable=function(){return P;};this.makeModal=function(){var R=this.getMask();var S=this.getElement();D.setStyle(this.container,"position","absolute");if(!R){var R=new perfUI.widgets.panelMask();this.setMask(R);R.stack(this.container);}var T=function(){var U=this.getMask();if(U){U.destroy();}U=null;};M.addListener(window,"resize",this.center,this,true);};};perfUI.widgets.panel.prototype.center=function(){var C=YAHOO.util.Dom;var I=10;var A=this.container;var G=A.offsetWidth,D=A.offsetHeight,F=C.getViewportWidth(),B=C.getViewportHeight(),H,E;if(G<F){H=(F/2)-(G/2)+C.getDocumentScrollLeft();}else{H=I+C.getDocumentScrollLeft();}if(D<B){E=(B/2)-(D/2)+C.getDocumentScrollTop();}else{E=I+C.getDocumentScrollTop();}C.setXY(A,[parseInt(H,10),parseInt(E,10)]);};perfUI.widgets.panel.prototype.render=function(){var H=perfUI.util.addEl;if(typeof this.container=="string"){this.container=document.getElementById(this.container);}var G=this.getHeaderTemplate();var F=this.getBodyTemplate();var B=this.getFooterTemplate();var E=this.getElement();if(!E){E=H(this.container,"div",{"class":this.elementCss});E.style.display="none";E.style.width=this.width;E.style.height=this.height;this.setElement(E);if(this.getHeader()){E.appendChild(this.getHeader());}else{if(G!=null){var C=H(E,"div",{"class":this.headerCss,"innerHTML":G});this.setHeader(C);}}if(this.getHeader()==null&&this.isDraggable()){var C=H(E,"div",{"class":this.headerCss,"innerHTML":"&nbsp;","style":"background-color:#023F8F;width:100%"});this.setHeader(C);}if(this.isDraggable()){this.dragDrop=new YAHOO.util.DD(this.container);this.dragDrop.setHandleElId(this.getHeader());}if(this.getBody()){E.appendChild(this.getBody());}else{if(F!=null){var A=H(E,"div",{"class":this.bodyCss,"innerHTML":F});this.setBody(A);}}if(this.getFooter()){E.appendChild(this.getFooter());}else{if(B!=null){var D=H(E,"div",{"class":this.footerCss,"innerHTML":B});this.setFooter(D);}}if(this.modal){this.makeModal();}this.afterRenderComplete.fire();}};perfUI.widgets.panel.prototype.hide=function(){var A=this.getMask();if(A){A.hide();}var B=this.getElement();B.style.display="none";this.onHideEvent.fire();};perfUI.widgets.panel.prototype.show=function(){if(this.modal){this.center();}var A=this.getMask();if(A){A.show();}var B=this.getElement();B.style.display="block";B.style.visibility="inherit";this.onShowEvent.fire();};perfUI.widgets.panelMask=function(){var B=YAHOO.util.Dom;var E=perfUI.util.addEl;var A=null;var D="mask";var C="masked";this.useOpaqueEmbed=true;this.getElement=function(){return A;};this.setOpaqueEmbed=function(G){if(!G){G=document.body;}var H=G.getElementsByTagName("embed");for(var F=0;F<H.length;F++){H[F].setAttribute("wmode","opaque");}var I=G.getElementsByTagName("object");for(var F=0;F<I.length;F++){if(!B.hasClass(I[F],"hide-object-tag")){B.addClass(I[F],"hide-object-tag");}}};this.showObjectTags=function(G){if(!G){G=document.body;}var H=G.getElementsByTagName("object");for(var F=0;F<H.length;F++){B.removeClass(H[F],"hide-object-tag");}};this.hide=function(){A.style.display="none";B.removeClass(document.body,C);this.showObjectTags();};this.show=function(){if(this.useOpaqueEmbed){this.setOpaqueEmbed();}B.addClass(document.body,C);this.size();A.style.display="block";};this.size=function(){A.style.height=B.getDocumentHeight()+"px";A.style.width=B.getDocumentWidth()+"px";A.innerHTML="";this.divToMask(A);};this.stack=function(G){var H=B.getStyle(G,"zIndex");var F=B.getStyle(A,"zIndex");if(YAHOO.lang.isUndefined(H)||isNaN(H)||H<=0){H=999;B.setStyle(G,"zIndex",String(H));}if(YAHOO.lang.isUndefined(F)||isNaN(F)){F=998;B.setStyle(A,"zIndex",String(F));}if(H<F){B.setStyle(G,"zIndex",String(F+1));}else{B.setStyle(A,"zIndex",String(H-1));}};this.destroy=function(){document.body.removeChild(A);};this.init=function(){var F=null;F=document.createElement("div");F.innerHTML="&#160;";A=F.cloneNode(true);this.divToMask(A);A.style.display="none";document.body.insertBefore(A,document.body.firstChild);if(YAHOO.env.ua.gecko&&this.platform=="mac"){B.addClass(A,"block-scrollbars");}YAHOO.util.Event.addListener(window,"resize",this.size,this,true);};this.divToMask=function(K){var J,I,H;var F=document.body.scrollWidth;F=F>2000?2000:F;var G=document.body.scrollHeight;K.style.position="absolute";K.style.top="0";K.style.left="0";if(YAHOO.env.ua.ie==0){K.style.opacity="0.7";K.style.backgroundColor="black";}else{K.style.overflow="hidden";for(I=0;I<F;I+=500){for(H=0;H<G;H+=500){if(YAHOO.env.ua.ie>=7){J=K.appendChild(document.createElement("IMG"));J.src="/images/v3/dov.png";}if(YAHOO.env.ua.ie==6){J=K.appendChild(document.createElement("DIV"));J.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/v3/dov.png',sizingMethod='scale')";}J.style.position="absolute";J.style.top=H+"px";J.style.left=I+"px";J.style.height="500px";J.style.width="500px";}}}};this.init();};perfUI.widgets.modalEditor=function(A,G,D,H){this.editorClass=perfUI.widgets.perfEditor;perfUI.widgets.modalEditor.superclass.constructor.call(this,A,G,D,H);var I=this;var E=perfUI.util.addEl;var C=YAHOO.util.Dom;var F=null;var B=function(){I.buildEditorFooter();I.afterRenderComplete.fire();};this.modal=H==undefined?true:H;this.editorPreviewContainer=null;this.buttonSubmit=null;this.buttonCancel=null;this.buttonPreview=null;this.editorWidth=G;this.editorHeight=D;this.onSubmitContent=new YAHOO.util.CustomEvent("onSubmitContent",this);this.onSubmitError=new YAHOO.util.CustomEvent("onSubmitError",this);this.getEditor=function(){return F;};this.setEditor=function(J){F=J;};this.hideEditor=function(){var J=this.getEditor();if(J!=null){J.setContent("");J.hideAll();}};this.showEditor=function(){var J=this.getEditor();if(J!=null){J.show();}};this.getContent=function(){var J=this.getEditor();if(J){return J.getContent({format:"raw"});}};this.setContent=function(J){var K=this.getEditor();if(K){K.setContent(J,{format:"raw"});}};this.render=function(){var J=this.getEditor();if(J!=null){J.render();}};this.init=function(){if(!C.hasClass(this.container,"postCommentEditor")){C.addClass(this.container,"postCommentEditor");}if(!C.hasClass(document.body,"yui-skin-sam")){C.addClass(document.body,"yui-skin-sam");}this.setBody();this.setFooter();perfUI.widgets.modalEditor.superclass.render.call(this);this.initPerfEditor();};this.initPerfEditor=function(){var M=this.getBody();var L=E(M,"textarea",{"id":"perfEditor"});var J=String(this.width).indexOf("px")>0?this.width.substr(0,this.width.indexOf("px")):this.width;if(!this.editorClass){this.editorClass=perfUI.widgets.perfEditor;}var K=new this.editorClass(L.id,null,this.editorWidth,this.editorHeight);this.setEditor(K);K.onInit.add(B);this.editorPreviewContainer=E(M,"div");this.editorPreviewContainer.style.display="none";this.editorPreviewContainer.className="previewPost";};this.init();};YAHOO.extend(perfUI.widgets.modalEditor,perfUI.widgets.panel);perfUI.widgets.modalEditor.prototype.show=function(){perfUI.widgets.modalEditor.superclass.show.call(this);this.showEditor();if(this.modal){this.center();}};perfUI.widgets.modalEditor.prototype.hide=function(){this.hideEditor();perfUI.widgets.modalEditor.superclass.hide.call(this);};perfUI.widgets.modalEditor.prototype.previewContent=function(){var C=this;var B=this.getContent();var E=this.getEditor().getContainer();var F={url:"/api/callna.asp",params:"?function=CustomEncode"};var D=function(H){};var A=function(H){var I=H.responseXML;var M="";try{M=I.getElementsByTagName("response")[0].childNodes[0].nodeValue;}catch(L){}this.editorPreviewContainer.innerHTML=M;if(this.buttonCancel.get&&this.buttonCancel.get("container")&&this.buttonCancel.get("container").style.display=="none"){this.buttonCancel.get("container").style.display="inline";}this.setFooterButtonText(this.buttonCancel,this.getEditButtonText());this.setFooterButtonEvent(this.buttonCancel,"click",null);this.setFooterButtonEvent(this.buttonCancel,"click","cancelPreview");this.buttonPreview.style.display="none";E.style.display="none";var K=E.getElementsByTagName("table")[0];var J=Number(K.style.height.replace("px",""))-12;this.editorPreviewContainer.style.height=J+"px";this.editorPreviewContainer.style.display="block";};var G={success:A,failure:D,scope:C};B="html="+Url.encode(B);YAHOO.util.Connect.asyncRequest("POST",F.url+F.params,G,B);};perfUI.widgets.modalEditor.prototype.setFooterButtonText=function(A,B){switch(A.tagName){case"INPUT":A.value=B;break;case"A":A.innerHTML=B;break;default:if(typeof A=="object"&&A.set){A.set("label",B);}}};perfUI.widgets.modalEditor.prototype.setFooterButtonEvent=function(D,C,A){var B=YAHOO.util.Event;switch(D.tagName){case"INPUT":case"A":if(A){B.addListener(D,"click",this[A],this,true);}else{B.removeListener(D,"click");}break;default:if(typeof D=="object"&&D.set){if(A){D.addListener(C,this[A],null,this,true);}else{D.removeListener(C);}}}};perfUI.widgets.modalEditor.prototype.cancelPreview=function(){this.setFooterButtonText(this.buttonCancel,this.getCancelButtonText());this.setFooterButtonEvent(this.buttonCancel,"click","hide");this.buttonPreview.style.display="inline";this.editorPreviewContainer.style.display="none";var A=this.getEditor().getContainer();A.style.display="block";};perfUI.widgets.modalEditor.prototype.getCancelButtonText=function(){var A=perfTranslator.getValue(701);return A.trim().length>0?A:"Cancel";};perfUI.widgets.modalEditor.prototype.getEditButtonText=function(){var A=perfTranslator.getValue(784);return A.trim().length>0?A:"Edit";};perfUI.widgets.modalEditor.prototype.buildEditorFooter=function(){var I=perfUI.util.addEl;var Q=this;var J=this.getBody();var H=this.getFooter();H.innerHTML="";var O=this.getEditor();var K=O.getContainer();K.style.display="block";var F=this.editorPreviewContainer;F.style.display="none";var M=I(H,"center");var B=perfTranslator.getValue(320);var D=I(M,"span",{"class":"submit"});var C=I(D,"button",{"id":"modalEditor_submit","class":"buttonnew","value":(B.trim().length>0?B:"Submit")});this.buttonSubmit=C;var A=function(){this.cancelPreview();this.submitContent();};YAHOO.util.Event.addListener(C,"click",A,this,true);var L=this.getCancelButtonText();var N=I(M,"span",{"class":"cancel"});var G=I(N,"button",{"id":"modalEditor_cancel","class":"buttonnew","value":L});this.buttonCancel=G;YAHOO.util.Event.addListener(G,"click",this.hide,this,true);var E=perfTranslator.getValue(434);var P=I(M,"a",{"innerHTML":(E.trim().length>0?E:"Preview")});this.buttonPreview=P;PERF.makeLink(P);YAHOO.util.Event.addListener(P,"click",this.previewContent,this,true);};perfUI.widgets.modalEditor.prototype.submitContent=function(){this.onSubmitContent.fire();};function VariableContentsLoader(A,D,F,E,I,G){var H=this;var C="Your albums are currently unavailable.";var B="Your browser does not support this action.";this.UserId=D||0;this.UserGUID=I||"";this.DataSource=null;this.Container=A||null;this.ContainerEditor=null;this.ContainerFooter=null;this.ContainerLeftColumn=null;this.ContainerContent=null;this.ContainerContentDescr=null;this.ContainerRightColumn=null;this.ContainerRating=null;this.ContainerFavoredBy=null;this.CurrentLoadedRequestedIndex=-1;this.CurrentLoadedAlbum=null;this.Breadcrumb=F;this.Pager=new PagerSimple();this.Pager.AlwaysCycle=true;this.SharingWidget=null;this.LoginRedirectUrl=E||"";this.LanguageId=G||0;this.HomeDirectory="";this.bannerRightCol=null;this.containerCss="viewContents";this.containerWidget=null;this.requestedContent=[];this.buildSubmittedDate=function(J,L){var K=addNode(J,"div","","spacer");addNode(K,"strong","","","Submitted on:");addNode(K,"br");addNode(K,"label","","",L);};this.buildFavoredBy=function(J){addNode(this.ContainerFavoredBy,"strong","","","Favored by:");addNode(this.ContainerFavoredBy,"br");var L=String(J)+(J==1?" person":" people");if(J>0){var K=addNode(this.ContainerFavoredBy,"a","","",L);PERF.makeLink(K);}else{var K=addNode(this.ContainerFavoredBy,"label","","",L);}};this.pagerFireEvent=function(){this.requestContent(this.requestedContent[this.Pager.CurrentPage-1]);};this.scrollHeights=function(){var J=YAHOO.util.Region;var K=J.getRegion(this.ContainerLeftColumn).bottom;var L=J.getRegion(this.ContainerRightColumn).bottom;if(L>=K+5){this.ContainerLeftColumn.className=this.ContainerLeftColumn.className.replace("bordergrayRight","");this.ContainerRightColumn.className=this.ContainerRightColumn.className.replace("bordergrayLeft","");this.ContainerRightColumn.className+=" bordergrayLeft";}else{this.ContainerRightColumn.className=this.ContainerRightColumn.className.replace("bordergrayLeft","");this.ContainerLeftColumn.className=this.ContainerLeftColumn.className.replace("bordergrayRight","");this.ContainerLeftColumn.className+=" bordergrayRight";}};this.buildAddToFavorites=function(K){this.ContainerAddToFavorites.innerHTML="";YAHOO.util.Event.purgeElement(this.ContainerAddToFavorites);addNode(this.ContainerAddToFavorites,"div","","addToFavoritesIcon");if(K.IsFavorite){var J=K.getFavoritesUrl(this.UserGUID);var L=addNode(this.ContainerAddToFavorites,"a","","peachDarkText","Already Favored");L.href=J;var M=function(){location.href=J;};YAHOO.util.Event.addListener(this.ContainerAddToFavorites,"click",M,this,true);}else{var L=addNode(this.ContainerAddToFavorites,"a","","","Add to Favorites");PERF.makeLink(L);YAHOO.util.Event.addListener(this.ContainerAddToFavorites,"click",this.addToFavorites,this,true);}};this.displayRating=function(L,J,R){switch(L){default:var N=addNode(this.ContainerRating,"div","","clear");var Q=addNode(N,"div","","left");addNode(Q,"strong","","","Rate Now");var P=addNode(N,"div","","rateIcons right");var M=addNode(P,"div","","left ratePositiveIcon");var K=addNode(P,"div","","right rateNegativeIcon");M.title="Give this picture a thumbs up!";K.title="Give this picture a thumbs down!";addNode(this.ContainerRating,"br");var O=function(S,T){if(L==0){location.href=J;}else{R(T);}};YAHOO.util.Event.addListener(M,"click",O,"1");YAHOO.util.Event.addListener(K,"click",O,"0");break;}};this.buildRating=function(){};this.buildSectionHeader=function(N,L){var M=addNode(this.ContainerRightColumn,"div","","sectionHeader");var K=addNode(M,"div","","separator");if(L){K.style.borderTop="none";}var J=addNode(M,"div","","bordergray bgSection");addNode(J,"strong","","peachDarkText",N);};this.buildDetailsColumn=function(){this.ContainerRightColumn=addNode(this.ContainerEditor,"div","","rightColumn left");this.buildSectionHeader("Perf Rating&nbsp;",true);this.ContainerRating=addNode(this.ContainerRightColumn,"div","","rating bordergray");this.buildRating();this.buildContentActions();this.buildAdditionalInfo();};this.getRequestedIndex=function(K){for(var J=0;J<this.requestedContent.length;J++){if(K==this.requestedContent[J]){return J;}}return -1;};this.requestContent=function(J){};this.loadRequestedResponse=function(J){var K=J.responseXML;var M=K.getElementsByTagName("functions")[0];if(M==null){H.throwErrorGeneral();return;}this.DataSource=M.getElementsByTagName("function")[0];var L=this.DataSource.getElementsByTagName("errors");if(L.length==1){return;}};this.throwErrorGeneral=function(){alert(C);};this.handleFailure=function(J){this.throwErrorGeneral(C);};this.postComment=function(){this.CommentsWidget.ShowCommentEditor();};this.init=function(){var J=perfUI.util.addEl;this.Container.className+=this.containerCss+" left";this.activityContainer=J(this.Container,"div");this.sharingContainer=J(this.Container,"div");this.popUpContainer=J(this.Container,"div");this.containerWidget=new perfUI.widgets.panel(this.popUpContainer);this.containerWidget.setBody("");this.containerWidget.render();this.Pager.onPageLoad.subscribe(this.pagerFireEvent,this,true);this.SharingWidget=new ContentSharingWidget(this.UserId,this.LanguageId);this.SharingWidget.Render(this.sharingContainer);};this.init();}VariableContentsLoader.prototype.shareContent=function(A){if(this.UserId<=0){location.href=this.CommentsWidget.LoginRedirectUrl;return;}if(this.CurrentLoadedAlbum.AccessId!=1){alert("You can only share Level 1 (Everyone) Content.");return;}this.SharingWidget.Load(A);};VariableContentsLoader.prototype.refreshBannerRightCol=function(F){this.bannerRightCol=document.getElementById("b160600");if(this.bannerRightCol!=null){var D=function(I){var J=I.src;I.src="about:blank";I.src=J;};var H=this.bannerRightCol.src;var E=H.toLowerCase().indexOf("section_code");if(E>0){var C="";var G="section_code";var B=PERF.getQueryStringParameterValue(G,H).trim();if(B.length==0){D(this.bannerRightCol);}else{var A=String(F);if(A!=B){this.bannerRightCol.src=H.replace((G+"="+B),(G+"="+A));}else{D(this.bannerRightCol);}}}}};VariableContentsLoader.prototype.buildContentActionsFullView=function(A,B){B=B||"Full View";var D=addNode(A,"div","","left");addNode(D,"div","","displayFullScreenIcon");var C=addNode(D,"a","","",B);PERF.makeLink(C);YAHOO.util.Event.addListener(D,"click",this.displaySlideshow,this,true);};VariableContentsLoader.prototype.buildContentActions=function(D){var I=this;var C=this.CurrentLoadedAlbum;this.buildSectionHeader("Actions");var A=addNode(this.ContainerRightColumn,"div","","options bordergray");this.buildContentActionsFullView(A);addNode(A,"br").clear="all";var G=addNode(A,"div","","left");addNode(G,"div","","shareAlbumIcon");var H=addNode(G,"a","","","Share with Friends");PERF.makeLink(H);YAHOO.util.Event.addListener(G,"click",this.shareContent,this,true);addNode(A,"br");this.ContainerAddToFavorites=addNode(A,"div","","left");this.buildAddToFavorites(D);addNode(A,"br");var F=addNode(A,"div","","left");if(YAHOO.env.ua.ie<=0){F.style.paddingBottom="0";}addNode(F,"div","","postComment");var E=addNode(F,"a","","","Post a Comment");PERF.makeLink(E);YAHOO.util.Event.addListener(F,"click",this.postComment,this,true);addNode(A,"br");var B=addNode(A,"div","","left");D.buildSocialBookmark(B,"Perfspot.com - "+C.Subject+(D.Subject.length>0?(": "+D.Subject):""),D.getUrl(I.HomeDirectory));if(YAHOO.env.ua.ie>0){addNode(A,"br").clear="all";}else{B.style.margin="10px 0 -10px 0";}};VariableContentsLoader.prototype.buildAdditionalInfo=function(C){this.buildSectionHeader("Additional Info");var A=addNode(this.ContainerRightColumn,"div","","bordergray");var G=addNode(A,"div","","spacer");addNode(G,"strong","","","Category:");addNode(G,"br");if(C.CategoryDescr.trim().length>0){var E=addNode(G,"a","","",C.CategoryDescr);E.href=C.getCategoryUrl();}else{addNode(G,"label","","","None");}var K=addNode(A,"div","","spacer");addNode(K,"strong","","","Submitted by:");addNode(K,"br");var H=addNode(K,"a","","",C.SubmittedBy);H.href="/profile.asp?uid="+C.SubmittedByGUID;this.buildSubmittedDate(A,C.DateSubmitted);if(this.CurrentLoadedAlbum.LogoInnerHtml.trim().length>0){var B=addNode(A,"div","","spacer",this.CurrentLoadedAlbum.LogoInnerHtml);}var D=C.getEmbeddedUrl();if(D.trim().length>0){var J=addNode(A,"div","","spacer");addNode(J,"strong","","","Embed:");addNode(J,"br");var F=addNode(J,"textbox","","textbox txtgr");F.value=D;}var M=function(){this.select();};YAHOO.util.Event.addListener(F,"focus",M);var I=addNode(A,"div","","spacer");addNode(I,"strong","","","Url:");addNode(I,"br");var L=addNode(I,"textbox","","textbox txtgr");YAHOO.util.Event.addListener(L,"focus",M);L.value=C.getUrl(this.HomeDirectory);};VariableContentsLoader.prototype.LoadRequestedContent=function(A,B){this.requestedContent=B.split(",");var C=this.getRequestedIndex(A);if(C<0){this.throwErrorGeneral();return;}this.requestContent(A);if(this.ContainerActivity!=null){this.ContainerActivity.style.display="none";}};VariableContentsLoader.prototype.BuildComments=function(A){var B=addNode(this.ContainerEditor,"div","","comments left clear");this.CommentsWidget.AllowComments=A.AllowComments;this.CommentsWidget.ContentObject=A;this.CommentsWidget.Container=B;this.CommentsWidget.Render();};VariableContentsLoader.prototype.buildEditor=function(D){var C=this.ContainerEditor==null?false:true;this.Container.style.visibility="hidden";this.ContainerLeftColumn=null;this.ContainerRightColumn=null;if(!C){this.ContainerEditor=addNode(this.Container,"div","","left bordergray");}this.ContainerEditor.innerHTML="";this.ContainerLeftColumn=addNode(this.ContainerEditor,"div","","mediumPictureView left");this.ContainerLeftColumn.style.width="620px";var A=addNode(this.ContainerLeftColumn,"div","","caption");var F=addNode(A,"div","","left");var B=this.CurrentLoadedAlbum.Subject.trim().length>45?(this.CurrentLoadedAlbum.Subject.substr(0,45)+"..."):this.CurrentLoadedAlbum.Subject;addNode(F,"strong","","peachDarkText",B);if(this.Breadcrumb.trim().length>0){var E=addNode(F,"span","","breadcrumb");E.innerHTML=this.Breadcrumb;}this.Pager.Container=addNode(A,"div","","pagerSection right");this.Pager.Render(null,this.requestedContent.length,true);this.ContainerContent=addNode(this.ContainerLeftColumn,"p","","centerX");var G=addNode(this.ContainerLeftColumn,"div");this.ContainerFooter=G;this.ContainerContentDescr=addNode(G,"p","","description");this.buildDetailsColumn();this.buildComments();if(C){this.refreshBannerRightCol(D.CategoryId);}};function VariableVideosLoader(A,D,F,B,C){var E=this;this.contentType=perfUI.content.userContentType.Video;VariableVideosLoader.superclass.constructor.call(this,A,D,F,B,"",C);this.HomeDirectory="http://www.perfspot.com/videos/";this.CurrentLoadedVideo=null;this.CommentsWidget=new perfUI.widgets.videoCommentsWidget(this.UserId,this.Container,this.LoginRedirectUrl);this.LoadComments=function(G){this.CurrentLoadedAlbum=new perfUI.content.userAlbum(this.UserId);this.CurrentLoadedAlbum.AccessId=1;this.CurrentLoadedAlbum.Videos[0]=new perfUI.content.userVideo(this.UserId);this.CurrentLoadedAlbum.Videos[0].VideoId=G;this.CurrentLoadedVideo=this.CurrentLoadedAlbum.Videos[0];this.CommentsWidget.LoginRedirectUrl=this.LoginRedirectUrl;this.buildEditor();};this.shareContent=function(){VariableVideosLoader.superclass.shareContent.call(this,this.CurrentLoadedVideo);};this.buildEditor=function(){this.Container.style.display="none";this.ContainerEditor=addNode(this.Container,"div");this.buildComments();this.Container.style.display="block";};this.buildComments=function(){var G=function(){this.CurrentLoadedAlbum.Videos[0]=this.CommentsWidget.ContentObject;this.CurrentLoadedVideo=this.CurrentLoadedAlbum.Videos[0];};this.CommentsWidget.afterRenderComplete.subscribe(G,this,true);VariableVideosLoader.superclass.BuildComments.call(this,this.CurrentLoadedAlbum.Videos[0]);};this.initVideos=function(){this.Container.className+=" videos";};this.initVideos();}YAHOO.extend(VariableVideosLoader,VariableContentsLoader);