Type.registerNamespace("MySpace.UI.Pages");MySpace.UI.Pages.resizeObjects=function(C){if(C.nodeType!==1){return}var G=C.getElementsByTagName("OBJECT");if(G.length>0){for(var D=0;D<G.length;D++){var F=G[D].parentNode;if(F.clientWidth<1){continue}var E=F.clientWidth;var B=1;while((F&&F.className&&F.className.indexOf("autoResize")===-1)&&(B<10)){F=F.parentNode;E=F.clientWidth;B++}if(H===0){continue}var H=G[D].height;var A=G[D].width;if((!G[D]._ratio)&&(!G[D]._origWidth)){if((H!==0)&&(A!==0)){G[D]._ratio=(MySpace.UI.Pages.isValidPercent(A))?((E*(parseInt(A)/100))/H):(A/H);G[D]._origWidth=A}}if(G[D]._ratio===0){continue}if(MySpace.UI.Pages.isValidPercent(G[D]._origWidth)){G[D].height=(E*(parseInt(A)/100))/G[D]._ratio}else{if(!isNaN(G[D]._origWidth)){if(G[D]._origWidth>=E){G[D].height=E/G[D]._ratio;G[D].width=E}else{if(G[D]._origWidth!==G[D].width){G[D].height=G[D]._origWidth/G[D]._ratio;G[D].width=G[D]._origWidth}}}}}}};MySpace.UI.Pages.isValidPercent=function(B){var A=parseInt(B);return((B.lastIndexOf("%")===(B.length-1))&&(!isNaN(A))&&(A>0&&A<=100))};Type.registerNamespace("MySpace.UI.ProfileComments");MySpace.UI.ProfileComments.Update=function(A,B){var C=function(){if(B.data!=="pendingApproval"){var F=MySpace.Utils.Selector.query("div.content div.postCommentModule div.toolbar li.comments a span",null,true);if(F&&F.nodeName==="SPAN"){var E=F.innerHTML;var G=parseInt(E,10)||0;if(isNaN(G)){return}F.innerHTML=G+1}}};var D=function(){if((B.data!=="pendingApproval")&&(B.data.profileImageLink)&&(B.data.comment)&&(B.data.postedDate)){var T=MySpace.Utils.Selector.query("div.commentsModule");if(T.length==0){return}for(var M=0;M<T.length;M++){var V=T[M];var P=MySpace.Utils.Selector.query("ul.moduleList",V,true);var Q=MySpace.Utils.Selector.query("span.toolbarCount span.count",V);if(!P){window.location.reload(true)}var K=MySpace.Utils.Selector.query("ul.moduleList>li",V);for(var L=0;L<K.length;L++){var N=(L%2==0)?"odd":"even";var J=(L%2==1)?"odd":"even";Sys.UI.DomElement.removeCssClass(K[L],N);Sys.UI.DomElement.addCssClass(K[L],J)}var I=document.createElement("LI");var R=document.createElement("DIV");var O=document.createElement("DIV");var F=document.createElement("P");var E=document.createElement("DIV");var S=document.createElement("DIV");I.className="odd";R.className="user";R.innerHTML=B.data.profileImageLink;O.className="userComment";F.className="datePosted";E.className="autoResize comment";S.className="clear";F.innerHTML=B.data.postedDate;E.innerHTML=B.data.comment;I.appendChild(R);I.appendChild(O);O.appendChild(F);O.appendChild(E);O.appendChild(S);if(P.childNodes.length!==0){P.insertBefore(I,P.firstChild)}for(var L=0;L<Q.length;L++){var U=Q[L];var G=U.innerHTML;var H=parseInt(G,10)||0;if(isNaN(H)){continue}U.innerHTML=H+1}}}};if(B.friendId==MySpace.ClientContext.DisplayFriendId){C();D()}};if(MySpace.ClientMaintenanceConfigs&&typeof(MySpace.ClientMaintenanceConfigs.quickprofilecomments)==="undefined"){new function(){var B=MySpace.Utils.Selector.query("a.addComment, a.commentBack");for(var A=0;A<B.length;A++){$addHandler(B[A],"click",function(C){MySpace.UI.ProfileCommentQuickPostPopup.show(C,null,null,MySpace.UI.ProfileComments.Update)})}}()};