Type.registerNamespace("FriendsCategories");var limitBy12RegEx=new RegExp(/[^\s]{12}/mg);function getElementsByClassName(E,C,D){var A=new Array();if(E){var F=E.getElementsByTagName(C);for(var B=0;B<F.length;B++){if(F[B].className.indexOf(D)!=-1){Array.add(A,F[B])}}}return A}FriendsCategories.UrlHelper=function(){};FriendsCategories.UrlHelper.registerClass("FriendsCategories.UrlHelper");FriendsCategories.UrlHelper=function(A){this.fullUrl=A;this.basePath=this.fullUrl;this.query="";if(this.fullUrl.indexOf("?")>-1){qSplit=this.fullUrl.split("?");for(var B=1;B<qSplit.length;B++){this.query+=qSplit[B]}if(this.query.indexOf("#")>-1){this.query=this.query.substring(0,this.query.indexOf("#"))}this.basePath=qSplit[0]}};FriendsCategories.UrlHelper.prototype={GetQueryPair:function(B){var A=this.query.indexOf(B+"=")-1;if(A>-1){var C=this.query.indexOf("&",A+1);if(C==-1){C=this.query.length}return this.query.substring(A,C)}return null},GetQueryValue:function(A){var B=this.GetQueryPair(A);if(B!=null&&B.indexOf("=")>-1){return B.split("=")[1]}else{return null}},SetQueryValue:function(A,C,B){if(B){C=escape(C)}if(this.query.length>0){var D=this.GetQueryPair(A);if(D!=null){this.query=this.query.replace(D,"&"+A+"="+C)}else{this.query+="&"+A+"="+C}}else{this.query=A+"="+C}},RemoveQueryPair:function(A){var B=this.GetQueryPair(A);if(B!=null){this.query=this.query.replace(B,"")}},ToUrl:function(){return this.basePath+"?"+this.query}};function submitFormOnEnter(C,B){var D=B?B:window.event;if(!D){return true}if((D.which==13)||(D.keyCode==13)){var A=$get(C);A.click();return false}return true}function resetBox(A){if(A.defaultValue==A.value){A.value="";A.className="inp"}}function blurBox(A){if(A.value==""){A.value=A.defaultValue;A.className="inp grey"}}function ResetSearchText(A){if(A.className=="inp grey"){A.value="";A.className="inp"}}function BlurSearchText(A){if(A.value==""){A.value=MySpaceRes.ViewAllFriendsPage.SearchWithin;A.className="inp grey"}}function ValidateSearchText(A){if(searchTextBox.className=="inp grey"||searchTextBox.value.length==0){return false}self.location.href=A;return false}function CheckSearchTextBox(){if(searchTextBox==null){return}if(searchTextBox.value==MySpaceRes.ViewAllFriendsPage.SearchWithin){searchTextBox.className="inp grey"}else{searchTextBox.className="inp"}}Type.registerNamespace("MySpace.FriendsUI");MySpace.FriendsUI.ResizeImage=function(C,D,A){var B=C.target;if(B&&B.width>0&&B.height>0){if(!D){D=70}if(!A){A=90}if(B.height>B.width){B.height=A;B.width=parseInt((B.width*A)/B.height)}else{B.height=parseInt((B.height*D)/B.width);B.width=D}Sys.UI.DomElement.removeCssClass(B,"notVisible")}};function setServicePath(A){MySpace.Web.Modules.Friends.Services.FriendsService.set_path(A);Sys.Net.WebRequestManager.add_invokingRequest(onReqInvoke);Sys.Application.add_unload(onCatPgUnload)}function onReqInvoke(B,A){A.get_webRequest().get_headers()["hashChecker"]=$get("hashChecker").value}function onCatPgUnload(B,A){Sys.Net.WebRequestManager.remove_invokingRequest(onReqInvoke)}function ExitSuggestionPopup(){var A=parent.window.get_iframepopup();if(null!==A&&"undefined"!==typeof(A)){A.hide()}}function wireUpQuickPost(){if(MySpace&&MySpace.UI){if(MySpace.UI.ProfileCommentQuickPostPopup){var E=MySpace.Utils.Selector.query("a.bdayAddComment");for(var D=0;D<E.length;D++){$addHandler(E[D],"click",MySpace.UI.ProfileCommentQuickPostPopup.show)}}if(MySpace.UI.MessagingQuickPostPopup){var B=MySpace.Utils.Selector.query("a.bdaySendMsg");for(var D=0;D<B.length;D++){var A=B[D].href.match(/friendid=(\d+)/i);if(A&&A[1]){var C=parseInt(A[1])}$addHandler(B[D],"click",Function.createCallback(MySpace.UI.MessagingQuickPostPopup.show,C))}}}}Type.registerNamespace("FriendsCategories");FriendsCategories.AjaxToolTip=function(){this.targetElCss;this.targetElTag;this.tTipContent;this.tTipCss;this.tTipPtrCss;this.tTipTextCss;this.tTipShowOnFocus;this.targets=[];this._element=null;this.fixLocation;FriendsCategories.AjaxToolTip.initializeBase(this)};FriendsCategories.AjaxToolTip.prototype={_tTipUpHtml:"<div id='divPopup' class='{0}'><div id='{1}' class='{2}'>{3}</div><div id='{4}' class='{5}'>{6}</div></div>",_isSetUp:false,get_targets:function(){return this.targets},initialize:function(){if(!this.tTipCss){this.tTipCss="PopupDiv"}if(!this.tTipPtrCss){this.tTipPtrCss="PopupPointer"}if(!this.tTipTextCss){this.tTipTextCss="PopupText"}if(this.targetElCss){this.targets=getElementsByClassName(document.body,this.targetElTag,this.targetElCss)}if(this.targets){for(var A=0;A<this.targets.length;A++){$addHandlers(this.targets[A],{mouseover:this.show,mouseout:this.hide},this);if(this.tTipShowOnFocus){$addHandlers(this.targets[A],{focus:this.show,blur:this.hide},this)}}}if(!this.fixLocation){this.fixLocation=0}if(this.tTipContent){this.tTipContent=this._decodedHtml(this.tTipContent)}FriendsCategories.AjaxToolTip.callBaseMethod(this,"initialize")},dispose:function(){if(this.targets){for(var A=0;A<this.targets.length;A++){$clearHandlers(this.targets[A])}}this._element=null;FriendsCategories.AjaxToolTip.callBaseMethod(this,"dispose")},setContent:function(A){this.tTipContent=A;if(this._element){this._element.firstChild.childNodes[(this._element.location==3?1:0)].innerHTML=this.tTipContent}},_setUp:function(){this._element=document.createElement("div");this._element.innerHTML=this._buildTTip("up");var A=this._element.style;A.position="absolute";A.height="auto";A.left="0px";A.top="0px";A.zIndex=50;document.body.appendChild(this._element);this._isSetUp=true},_buildTTip:function(A){if(A=="up"){return String.format(this._tTipUpHtml,this.tTipCss,"divPtr",this.tTipPtrCss,"","divPopupText",this.tTipTextCss,this.tTipContent)}else{return String.format(this._tTipUpHtml,this.tTipCss,"divPopupText",this.tTipTextCss+"Above",this.tTipContent,"divPtr",this.tTipPtrCss+"down","")}},_positionToolTip:function(E){var A=Sys.UI.DomElement.getBounds(E);var C=this._getWindowSize();var B=MySpace.UI.getElementsByClassName("addToFriendsContentOL",document)[0];if(B){var F=Sys.UI.DomElement.getBounds(B)}var D=MySpace.UI.getElementsByClassName("addToFriendsContent",document)[0];if(this.fixLocation!=3&&(this.fixLocation==1||(A.y-this._getScrollPos())+A.height+this._element.firstChild.clientHeight>C.height)){if(this._element.location!=1){this._element.innerHTML=this._buildTTip("down")}if(B&&F){this._element.style.top=(A.y-F.y)-(this._element.firstChild.clientHeight+2)+"px"}else{this._element.style.top=A.y-this._element.firstChild.clientHeight+"px"}this._element.location=1}else{if(this._element.location!=3){this._element.innerHTML=this._buildTTip("up")}if(B&&F){this._element.style.top=(A.y-F.y)+(A.height+2)+"px"}else{this._element.style.top=A.y+A.height+"px"}this._element.location=3}if(B&&F||D){this._element.style.left=(A.x-167)+"px"}else{this._element.style.left=A.x+"px"}},_getWindowSize:function(){var B=0,A=0;if(typeof(window.innerWidth)=="number"){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth;A=document.body.clientHeight}}}return{width:B,height:A}},_getScrollPos:function(){var A=document.body.scrollTop;if(A==0){if(window.pageYOffset){A=window.pageYOffset}else{A=(document.body.parentElement)?document.body.parentElement.scrollTop:0}}return A},show:function(A){var B=A.target;if(!this._isSetUp){this.setContent(this.tTipContent);this._setUp()}if(!this._element||B.dispalyed){return false}B.dispalyed=true;this._positionToolTip(B);this._element.style.visibility="visible";return false},hide:function(A){var B=A.target;if(this._element){this._element.style.visibility="hidden";this._element.style.left="0px";this._element.style.top="0px";B.dispalyed=false}},_decodedHtml:function(B){var A=document.createElement("div");if(B!=null&&B.length>0){B=this._encodeAmpersands(B);A.innerHTML=B}else{return""}return A.innerText||A.textContent||B},_encodeAmpersands:function(A){A=A.replace(/&$/g,"&amp;");A=A.replace(/\s&$/g," &amp;");A=A.replace(/\s&\s/g," &amp; ");return A}};FriendsCategories.AjaxToolTip.registerClass("FriendsCategories.AjaxToolTip",Sys.Component);FriendsCategories.TimeOutAjaxToolTip=function(){FriendsCategories.TimeOutAjaxToolTip.initializeBase(this)};FriendsCategories.TimeOutAjaxToolTip.prototype={_hideDelay:500,_timerID:0,_timeOEvt:null,get_hideDelay:function(){return this._hideDelay},set_hideDelay:function(A){this._hideDelay=A},initialize:function(){FriendsCategories.TimeOutAjaxToolTip.callBaseMethod(this,"initialize");if(this.targets){for(var A=0;A<this.targets.length;A++){$clearHandlers(this.targets[A]);$addHandler(this.targets[A],"mouseover",Function.createDelegate(this,this._toShow));$addHandler(this.targets[A],"mouseout",Function.createDelegate(this,this._checkToHide))}}},dispose:function(){FriendsCategories.TimeOutAjaxToolTip.callBaseMethod(this,"dispose")},_clearTimerID:function(){if(this._timerID){clearTimeout(this._timerID);this._timerID=0}},_toShow:function(A){if(!A.target.dispalyed){FriendsCategories.TimeOutAjaxToolTip.callBaseMethod(this,"show",[A]);$addHandler(this._element,"mouseover",Function.createDelegate(this,this._cancelHide));$addHandler(this._element,"mouseout",Function.createDelegate(this,this._enableHide))}},_cancelHide:function(A){this._mOverTT=true},_enableHide:function(A){this._mOverTT=false},_checkToHide:function(A){this._clearTimerID();this._timeOEvt=A;this._timerID=window.setTimeout(Function.createDelegate(this,this._dHide),this._hideDelay)},_dHide:function(){this._clearTimerID();if(this._mOverTT){this._timerID=window.setTimeout(Function.createDelegate(this,this._dHide),this._hideDelay)}else{$clearHandlers(this._element);this.hide(this._timeOEvt)}}};FriendsCategories.TimeOutAjaxToolTip.registerClass("FriendsCategories.TimeOutAjaxToolTip",FriendsCategories.AjaxToolTip);Type.registerNamespace("FriendsCategories");FriendsCategories.ViewFriends=function(){this._catDD;this._cId;this._cName;this._cPriv;this._cDesc;this._isReqOwner;this._rndFrndHref;this._ownViewo;this._exViewTTo;this.MAX_DD_NAME_LEN=30;this.MAX_AB_NAME_LEN=17};FriendsCategories.ViewFriends.registerClass("FriendsCategories.ViewFriends");var _viewFriendso;FriendsCategories.ViewFriends.getObj=function(C,B,F,A,E,G,D){if(!_viewFriendso){_viewFriendso=new FriendsCategories.ViewFriends();_viewFriendso._rndFrndHref=G;_viewFriendso.initialize(C,B,F,A,E,D)}return _viewFriendso};FriendsCategories.ViewFriends.prototype={initialize:function(C,B,F,A,E,D){FriendsCategories.ViewFriends.initializeBase(this);this._cId=C;this._cName=B;this._cDesc=F;this._cPriv=A;this._cType=D;this._isReqOwner=E;var G=$get("myfriends_display");if(G){this._catDD=G.getElementsByTagName("select")[0]}this.setViewHideTips();this.setExViewTips();this.setRndHlpTip();if(this._isReqOwner){this.setEditCat();this.setOwnerViewTips()}else{this.setVisitorViewTips()}},setEditCat:function(){this._ownViewo=getElementsByClassName($get("myfriends"),"div","categoryListView")[0];if(this._ownViewo){var D=getElementsByClassName(this._ownViewo,"a","_editCatLink");if(D.length>0){var B=new FriendsCategories.EditCat();B.init(D[0],this._cId,this._cName,this._cDesc,this._cPriv,this._cType);B.addEditCatClicked(Function.createDelegate(this,this.editCatCB))}var A=getElementsByClassName(this._ownViewo,"a","categoryNameLabel")[0];A.innerHTML=this._encodeAmpersands(this._cName.call(TextFilterWBR));var C=getElementsByClassName(this._ownViewo,"p","categoryDescLabel")[0];if(C){C.innerHTML=this._encodeAmpersands(this._cDesc)}MySpace.Util.applyWBRToElement(C,{frequency:12})}},setViewHideTips:function(){var A=$create(FriendsCategories.AjaxToolTip,{targetElCss:"hiddenTTip",targetElTag:"img",tTipContent:MySpaceRes.FriendCategories.HiddenFriendTooltip,tTipShowOnFocus:0})},setOwnerViewTips:function(){var B=new Sys.StringBuilder("");B.append("<div id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipHelpText);B.append("</div>");B.append("<br />");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.JustMeCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipJustMe);B.append("</span>");B.append("<br />");B.append("<br />");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.MembersOnlyCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipMembersOnly);B.append("</span>");B.append("<br />");B.append("<br />");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.EveryoneCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipEveryone);B.append("</span>");B.append("<br />");var A=$create(FriendsCategories.AjaxToolTip,{targetElCss:"categoryHelpImg",targetElTag:"img",tTipCss:"BluePopupDiv",tTipPtrCss:"BluePopupPointer",tTipTextCss:"BluePopupText",tTipShowOnFocus:0});A.tTipContent=B},setVisitorViewTips:function(){var B=new Sys.StringBuilder("");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.MembersOnlyCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipMembersOnly);B.append("</span>");B.append("<br />");B.append("<br />");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.EveryoneCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipEveryone);B.append("</span>");B.append("<br />");var A=$create(FriendsCategories.AjaxToolTip,{targetElCss:"categoryHelpImg",targetElTag:"img",tTipCss:"BluePopupDiv",tTipPtrCss:"BluePopupPointer",tTipTextCss:"BluePopupText",tTipShowOnFocus:0});A.tTipContent=B},setRndHlpTip:function(){var C=$get("_rndHlpTipImg");if(C){var B=new Sys.StringBuilder(MySpaceRes.ViewAllFriendsPage.FriendsRandomziedTooltip1);B.append("<br /><br />");B.append(String.format(MySpaceRes.ViewAllFriendsPage.FriendsRandomziedTooltip2,"<a href="+this._rndFrndHref+">","</a>"));var A=$create(FriendsCategories.TimeOutAjaxToolTip,{targets:[C],tTipShowOnFocus:0});A.tTipContent=B}},setExViewTips:function(){var A=$get("_exViewHideTip");if(A){this._exViewTTo=$create(FriendsCategories.AjaxToolTip,{targets:[A],targetElTag:"img",tTipShowOnFocus:0});if($get("hideMeButton").firstChild.getAttribute("IsPublic")=="false"){this._exViewTTo.setContent(MySpaceRes.ViewAllFriendsPage.UnHideToolTip)}else{this._exViewTTo.setContent(MySpaceRes.ViewAllFriendsPage.HideToolTip)}}},editCatCB:function(D,G){if(G.cName){this._catDD.options[this._catDD.selectedIndex].innerHTML=G.cName;var B=this._catDD.options[this._catDD.selectedIndex].text;if(B.length>this.MAX_DD_NAME_LEN){B=B.substring(0,this.MAX_DD_NAME_LEN)+"..."}this._catDD.options[this._catDD.selectedIndex].innerHTML=B;B=G.cName;var A=getElementsByClassName(this._ownViewo,"a","categoryNameLabel")[0];A.innerHTML=this._encodeAmpersands(B.call(TextFilterWBR));B=G.cName;if(G.cName.length>this.MAX_AB_NAME_LEN){B=G.cName.substring(0,this.MAX_AB_NAME_LEN)+"..."}var F=getElementsByClassName(document.body,"a","catName");for(var C=0;C<F.length;C++){F[C].innerHTML=B}}if(G.cDesc!="undefined"&&G.cDesc!=null){var E=getElementsByClassName(this._ownViewo,"p","categoryDescLabel")[0];E.innerHTML=this._encodeAmpersands(G.cDesc);MySpace.Util.applyWBRToElement(E,{frequency:12});if(G.isTopFriend&&G.el){G.el.innerHTML=G.cDesc.length?MySpaceRes.ViewAllFriendsPage.TopFriendsEditDescription:MySpaceRes.ViewAllFriendsPage.TopFriendsAddDescription}}if(G.cPriv){getElementsByClassName(this._ownViewo,"span","categoryDefBold")[0].innerHTML=G.cPriv}},setCategoryPrivacyStatus:function(D,B,E,A,G){var C=E.getAttribute("IsPublic")=="false";var F=getElementsByClassName($get("myfriends"),"img","hiddenCatImage")[0];MySpace.Web.Modules.Friends.Services.FriendsService.UpdateMembershipStatus(D,C);if(C){E.innerHTML=A;E.setAttribute("IsPublic","true");_viewFriendso._exViewTTo.setContent(MySpaceRes.ViewAllFriendsPage.HideToolTip);F.style.visibility="hidden"}else{E.innerHTML=G;E.setAttribute("IsPublic","false");_viewFriendso._exViewTTo.setContent(MySpaceRes.ViewAllFriendsPage.UnHideToolTip);F.style.visibility="visible"}},_encodeAmpersands:function(A){A=A.replace(/&$/g,"&amp;");A=A.replace(/\s&$/g," &amp;");A=A.replace(/\s&\s/g," &amp; ");return A}};FriendsCategories.ViewCats=function(){this._isReqOwner;this._catIds;this._catNames;this._catDescs;this._catPrivs};FriendsCategories.ViewCats.registerClass("FriendsCategories.ViewCats");FriendsCategories.ViewCats.prototype={initialize:function(D,B,K,H,C,F,I){FriendsCategories.ViewCats.initializeBase(this);this._isReqOwner=D;this._catIds=B;this._catNames=H;this._catPrivs=F;this._catDescs=C;var J=getElementsByClassName($get("myfriends"),"div","categoryListView");this._adjustOwnerImgs();for(var A=0;A<J.length;A++){var G=getElementsByClassName(J[A],"a","_editCatLink");if(G.length>0){var E=new FriendsCategories.EditCat();E.init(G[0],this._catIds[A],this._catNames[A],this._catDescs[A],this._catPrivs[A],K[A]);E.addEditCatClicked(Function.createDelegate(J[A],this.editCatCB))}}if(this._isReqOwner&&(!I)){this.setOwnerViewTips()}else{this.setVisitorViewTips()}this.setHiddenViewTips();this.setCatWBR();this.setHideLinksTips()},_adjustOwnerImgs:function(){var C=MySpace.UI.getElementsByClassName("ownerimagecontainer");if(C){for(var A=0;A<C.length;A++){var B=C[A].getElementsByTagName("img")[0];if(B.readyState=="complete"||B.complete){MySpace.FriendsUI.ResizeImage({target:B},60,70)}else{$addHandler(B,"load",Function.createPartial(this,MySpace.FriendsUI.ResizeImage,60,70))}}}},setCatWBR:function(){var C=getElementsByClassName($get("myfriends"),"a","categoryNameLabel");for(var A=0;A<C.length;A++){MySpace.Util.applyWBRToElement(C[A],{frequency:12})}var B=getElementsByClassName($get("myfriends"),"p","categoryDescLabel");for(var A=0;A<B.length;A++){MySpace.Util.applyWBRToElement(B[A],{frequency:12})}},editCatCB:function(C,D){if(D.cName){var A=getElementsByClassName(this,"a","categoryNameLabel")[0];A.innerHTML=viewCatso._encodeAmpersands(D.cName.call(TextFilterWBR))}if(D.cPriv){var E=getElementsByClassName(this,"span","categoryDefBold")[0];E.innerHTML=D.cPriv}if(D.cDesc!="undefined"&&D.cDesc!=null){var B=getElementsByClassName(this,"p","categoryDescLabel")[0];B.innerHTML=viewCatso._encodeAmpersands(D.cDesc);MySpace.Util.applyWBRToElement(B,{frequency:12});if(D.isTopFriend&&D.el){D.el.innerHTML=D.cDesc.length?MySpaceRes.ViewAllFriendsPage.TopFriendsEditDescription:MySpaceRes.ViewAllFriendsPage.TopFriendsAddDescription}}},setOwnerViewTips:function(){var A=new Sys.StringBuilder("");A.append("<div id='' class='toolTipDefText'>");A.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipHelpText);A.append("</div>");A.append("<br />");A.append("<span id='' class='toolTipDefLabel'>");A.append(MySpaceRes.ViewAllFriendsPage.JustMeCategorySecurityLabel);A.append(":&nbsp;</span>");A.append("<span id='' class='toolTipDefText'>");A.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipJustMe);A.append("</span>");A.append("<br />");A.append("<br />");A.append("<span id='' class='toolTipDefLabel'>");A.append(MySpaceRes.ViewAllFriendsPage.MembersOnlyCategorySecurityLabel);A.append(":&nbsp;</span>");A.append("<span id='' class='toolTipDefText'>");A.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipMembersOnly);A.append("</span>");A.append("<br />");A.append("<br />");A.append("<span id='' class='toolTipDefLabel'>");A.append(MySpaceRes.ViewAllFriendsPage.EveryoneCategorySecurityLabel);A.append(":&nbsp;</span>");A.append("<span id='' class='toolTipDefText'>");A.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipEveryone);A.append("</span>");A.append("<br />");var B=$create(FriendsCategories.AjaxToolTip,{targetElCss:"categoryHelpImg",targetElTag:"img",tTipCss:"BluePopupDiv",tTipPtrCss:"BluePopupPointer",tTipTextCss:"BluePopupText",tTipShowOnFocus:0});B.tTipContent=A},setVisitorViewTips:function(){var B=new Sys.StringBuilder("");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.MembersOnlyCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipMembersOnly);B.append("</span>");B.append("<br />");B.append("<br />");B.append("<span id='' class='toolTipDefLabel'>");B.append(MySpaceRes.ViewAllFriendsPage.EveryoneCategorySecurityLabel);B.append(":&nbsp;</span>");B.append("<span id='' class='toolTipDefText'>");B.append(MySpaceRes.ViewAllFriendsPage.PrivacyTooltipEveryone);B.append("</span>");B.append("<br />");var A=$create(FriendsCategories.AjaxToolTip,{targetElCss:"categoryHelpImg",targetElTag:"img",tTipCss:"BluePopupDiv",tTipPtrCss:"BluePopupPointer",tTipTextCss:"BluePopupText",tTipShowOnFocus:0});A.tTipContent=B},setHiddenViewTips:function(){var B=new Sys.StringBuilder("");B.append("<div id='' class=''>");B.append(MySpaceRes.ViewAllFriendsPage.ToolTipHiddenFriends);B.append("</div>");var A=$create(FriendsCategories.AjaxToolTip,{targetElCss:"hiddenFriendsImg",targetElTag:"img",tTipCss:"BluePopupDiv2",tTipPtrCss:"BluePopupPointer2",tTipTextCss:"BluePopupText2",tTipShowOnFocus:0});A.tTipContent=B},setHideLinksTips:function(){var A=getElementsByClassName($get("myfriends"),"img","hidelinktooltip");if(A!=null&&A.length>0){this._hideLinkCatTip=$create(FriendsCategories.AjaxToolTip,{tTipCss:"BluePopupDiv2",tTipPtrCss:"BluePopupPointer2",tTipTextCss:"BluePopupText2",tTipShowOnFocus:0});for(var B=0;B<A.length;B++){$addHandlers(A[B],{mouseover:this.ShowHideLinkTip,mouseout:this.HideHideLinkTip},this)}}},ShowHideLinkTip:function(A){if(this._hideLinkCatTip){var B=(A.target.getAttribute("IsPublic")=="true");if(B){this._hideLinkCatTip.setContent(MySpaceRes.ViewAllFriendsPage.HideToolTip)}else{this._hideLinkCatTip.setContent(MySpaceRes.ViewAllFriendsPage.UnHideToolTip)}this._hideLinkCatTip.show(A)}},HideHideLinkTip:function(A){this._hideLinkCatTip.hide(A)},_encodeAmpersands:function(A){A=A.replace(/&$/g,"&amp;");A=A.replace(/\s&$/g," &amp;");A=A.replace(/\s&\s/g," &amp; ");return A}};var viewCatso=new FriendsCategories.ViewCats();Type.registerNamespace("MySpace.FriendsCategories.SearchText");MySpace.FriendsCategories.SearchText=function(){this._searchInputId=null;this._searchUrl=null;this._attachFriendSelector=false;this._displayUserId=null;MySpace.FriendsCategories.SearchText.initializeBase(this)};MySpace.FriendsCategories.SearchText.prototype={_quickFindBtn:null,_searchInput:null,_urlHelper:null,_fSelectorCreated:false,initialize:function(){MySpace.FriendsCategories.SearchText.callBaseMethod(this,"initialize");this._searchInput=$get(this._searchInputId);if(this._searchInput){$addHandler(this._searchInput,"blur",Function.createDelegate(this,this.onBlurSearchText));$addHandler(this._searchInput,"focus",Function.createDelegate(this,this.onFocusSearchText));$addHandler(this._searchInput,"keypress",Function.createDelegate(this,this.submitFormOnEnter))}this._quickFindBtn=$get("quickfindbutton");if(this._quickFindBtn){$addHandler(this._quickFindBtn,"click",Function.createDelegate(this,this.onClickQuickFind))}this._urlHelper=new FriendsCategories.UrlHelper(this._searchUrl);this._CheckSearchTextBox()},dispose:function(){this._searchInput=null;this._quickFindBtn=null;MySpace.FriendsCategories.SearchText.callBaseMethod(this,"dispose")},onBlurSearchText:function(){if(this._searchInput.value==""){this._searchInput.value=MySpaceRes.ViewAllFriendsPage.SearchWithin;this._searchInput.className="inp grey"}},onFocusSearchText:function(){if(this._attachFriendSelector&&!this._fSelectorCreated){MySpace.UI.addDeferredScript("F_AutoSelectorDeferred.js",Function.createDelegate(this,this.attachFriendSelector));this._fSelectorCreated=true;setTimeout(Function.createDelegate(this,function(){this._searchInput.focus()}),1)}if(this._searchInput.className=="inp grey"){this._searchInput.value="";this._searchInput.className="inp"}},submitFormOnEnter:function(A){A=A||window.event;if(!A){return}if((A.which==13)||(A.keyCode==13)||(A.charCode==13)){this._quickFindBtn.click();A.preventDefault()}},onClickQuickFind:function(A){A=A||window.event;if(!A){return}if(this._searchInput.className=="inp grey"||this._searchInput.value.trim().length==0){return}if(location.href.toLowerCase().indexOf("user.edittopfriends")!=-1){return}this._urlHelper.SetQueryValue("qFriends",encodeURIComponent(this._searchInput.value.trim()),false);location.href=this._urlHelper.ToUrl();A.preventDefault()},_CheckSearchTextBox:function(){if(!this._searchInput){return}if(this._searchInput.value==MySpaceRes.ViewAllFriendsPage.SearchWithin){this._searchInput.className="inp grey"}else{this._searchInput.className="inp"}},attachFriendSelector:function(){if(!this._searchInput){return}var A=this._searchInput;var B=this;$create(MySpace.UI.FriendSelector,{minimumPrefixLength:1,firstRowSelected:false,showSelectedUserImg:true,userId:this._displayUserId,useWebService:true},{itemSelected:function(E,D){A.value=D.get_value()?D.get_value().DisplayName:"";B._quickFindBtn.click();var C=getElementsByClassName($get("friends_search"),"div","friendSelect")[0];if(C){if(D.get_value()){B._quickFindBtn.style.marginTop=(C.offsetHeight-B._quickFindBtn.offsetHeight)/2+"px";C.style.padding="1px"}else{C.style.padding="4px";B._quickFindBtn.style.marginTop="-3px"}}}},null,this._searchInput);MySpace.UI.addStyles(".searchcaption{clear:both;} .friendSelect{float:left;padding:4px;} input.inp {border:0 none; padding:0px;} .friendSelect .selected{width:100%;}",false,"FriendQuickSearchFriendSelector")}};MySpace.FriendsCategories.SearchText.registerClass("MySpace.FriendsCategories.SearchText",Sys.Component);FriendsCategories.EditCat=function(){this._catId;this._catName;this._catDesc;this._catPrivacy;this._newPrivacy=null;this._editP;this._pEl;this._isTopCat=false;this._el;this.OnCatDescEnter=false};FriendsCategories.EditCat.registerClass("FriendsCategories.EditCat");FriendsCategories.EditCat.prototype={init:function(D,C,A,F,E,B){FriendsCategories.EditCat.initializeBase(this);this._catId=C;this._catName=A;this._catPrivacy=E;this._catDesc=F;this._el=D;this._isTopCat=(B==2);$addHandler(D,"click",Function.createDelegate(this,this._showEditPop))},editCategoryPopup:function(){var F=this._catId+"btnSave";var H=this._catId+"charCnt";var C=this._catId+"charDescCnt";var G=this._catId+"valReq";var D=68-this._decodedHtml(this._catName).length;if(D<0){D=0}var B=100-this._decodedHtml(this._catDesc).length;if(B<0){B=0}var E=new Sys.StringBuilder();E.append("<label for='category_name' class='popUpCategoryName'>"+MySpaceRes.ViewAllFriendsPage.CategoryNameField+"</label>");if(this._isTopCat){E.append("<label class='popUpCategoryName fCatTitle'>"+MySpaceRes.ViewAllFriendsPage.ddlTopFriends+"</label>")}else{E.append("<br /><input class='popUpEditInput' name='CategoryName' type='text' value=\""+this._catName+'"');E.append(" maxlength='68' id='CategoryName' class='popUpEditInput' onbeforepaste='doBeforePaste(this);' onchange='limitInput(this, \""+H+'", "'+F+'", "'+G+"\", event);' onkeyup='limitInput(this, \""+H+'", "'+F+'", "'+G+"\", event);' onkeypress='limitInput(this, \""+H+'", "'+F+'", "'+G+"\", event);' onpaste='doPaste(this, \""+H+"\");' maxLength='68' />");E.append("<span id='"+G+"' class='cNameErr' style='color:Red;visibility:hidden;'>*</span>");E.append("<span id='charsLeft' class='popUpCharsLeft'  >");E.append("<span id='"+H+"'>");E.append(D);E.append("</span><span  class='catcreatetotal'>/68</span></span>");E.append("<div id='customErr' class='popUpCustomErr'></div><p/>")}E.append("<p><label for='category_name' class='popUpCategoryName'>"+MySpaceRes.ViewAllFriendsPage[this._isTopCat?"TopFriendCatDescriptionLabel":"CategoryEditDescriptionLabel"]+"</label><br />");E.append("<textarea class='popUpEditInputDesc' name='CategoryDesc' ");E.append(" maxlength='100' id='CategoryDesc' class='popUpEditInput' onbeforepaste='doBeforePaste(this);' onchange='limitInput(this, \""+C+'", "'+F+"\",null, event);' onkeyup='limitInput(this, \""+C+'", "'+F+"\", null, event);' onkeypress='limitInput(this, \""+C+'", "'+F+"\", null, event);' onpaste='doPaste(this, \""+C+"\");' maxLength='100' > "+this._catDesc+"</textarea>");E.append("<span class='popUpCharsLeftDesc'>");E.append("<span id='"+C+"'>");E.append(B);E.append("</span><span  class='catcreatetotal'>/100</span></span></p>");if(this._isTopCat){E.append("<div id='customErr' class='popUpCustomErr'></div><p/>")}else{E.append("<p><label for='privacy' class='popUpViewableBy'>");E.append(MySpaceRes.ViewAllFriendsPage.ViewableByLabel);E.append("</label><br />");E.append("<div id='popUpPrivWrap' class='popUpPrivWrap'>");E.append("<span id='PrivacyList' class='buttonList'>");E.append("<input id='PrivacyList_0' class='popUpRadio' type='radio' name='PrivacyList' value='Private' /><label for='PrivacyList_0' class='popUpDefaultText'>");E.append(MySpaceRes.ViewAllFriendsPage.JustMeCategorySecurityLabel);E.append("</label><br />");E.append("<input id='PrivacyList_1' class='popUpRadio' type='radio' name='PrivacyList' value='MembersOnly' /><label for='PrivacyList_1' class='popUpDefaultText'>");E.append(MySpaceRes.ViewAllFriendsPage.MembersOnlyCategorySecurityLabel);E.append("<span class='popUpDefaultText'>&nbsp;");E.append(MySpaceRes.ViewAllFriendsPage.MembersOnlyDescriptionText);E.append("</span></label><br />");E.append("<input id='PrivacyList_2' class='popUpRadio' type='radio' name='PrivacyList' value='Public' checked='checked' /><label for='PrivacyList_2' class='popUpDefaultText'>");E.append(MySpaceRes.ViewAllFriendsPage.EveryoneCategorySecurityLabel);E.append("<span class='popUpDefaultText'>&nbsp;");E.append(MySpaceRes.ViewAllFriendsPage.SameAsProfileDescriptionText);E.append("</span></label></span><br /></p>");E.append("</div>")}E.append("<hr class='popUpHzLine' /><br /><div id='createButtons'>");E.append("<div id='popUpSavingCat' class='popUpSavingCat'>"+MySpaceRes.ViewAllFriendsPage.SavingCategory+"</div>");E.append("<button id='cancelBtn' class='submitBtn cancelGrey' type='button'><span>"+MySpaceRes.ViewAllFriendsPage.CancelButtonText+"</span></button>&nbsp;&nbsp;");E.append("<button id='"+F+"' class='submitBtn' type='submit'><span>"+MySpaceRes.ViewAllFriendsPage.SaveButtonText+"</span></button>");E.append("</div>");this._editP=this._createEditPop(E.toString(),MySpaceRes.ViewAllFriendsPage.EditCategoryLink);this._pEl=this._editP._element;var A=$get("CategoryDesc",this._pEl);if(A){$addHandler(A,"keydown",Function.createDelegate(this,this.removeEnter))}var I=getElementsByClassName(this._pEl,"button","submitBtn");$addHandler(I[0],"click",Function.createDelegate(this,this._popOverCancel));$addHandler(I[1],"click",Function.createDelegate(this,this._popOverCB));this._catNameBox=getElementsByClassName(this._pEl,"textarea","popUpEditInput")[0];this._catDescBox=getElementsByClassName(this._pEl,"textarea","popUpEditInputDesc")[0];this._pErr=getElementsByClassName(this._pEl,"div","popUpCustomErr")[0]},removeEnter:function(A){if(A.keyCode==13){A.preventDefault();A.stopPropagation();this.OnCatDescEnter=true;return false}},_decodedHtml:function(B){var A=document.createElement("div");if(B!=null&&B.length>0){B=this._encodeAmpersands(B);A.innerHTML=B}else{return""}return A.innerText||A.textContent||B},_encodeAmpersands:function(A){A=A.replace(/&$/g,"&amp;");A=A.replace(/\s&$/g," &amp;");A=A.replace(/\s&\s/g," &amp; ");return A},_updateCatInfo:function(){var C=$get(this._catId+"charCnt");if(C){var B=this._decodedHtml(this._catName);var E=68-(B?B.length:0);if(E<0){E=0}C.innerHTML=E}var F=this._catId+"charDescCnt";var A=this._decodedHtml(this._catDesc);var D=100-(this._pEl,"span",A?A.length:0);if(D<0){D=0}$get(F).innerHTML=D;this._catNameBox.value=B;this._catDescBox.value=A},_createEditPop:function(C,D,E){var B=document.createElement("div");B.innerHTML="<div class='friendsPopup_wrapper' style='z-index:1000201;left:0px;width:100%;display:none;visibility:hidden;'><div class='friendsPopup_box'><a></a><div class='friendsPopup_title'></div><div class='friendsPopup_content'></div><div class='friendsPopup_buttons'></div></div></div>";var A=$create(MySpace.UI._Popup,{title:D,content:C,callback:E},null,null,B.firstChild);return A},_showEditPop:function(A){if(!this._editP){this.editCategoryPopup()}var B=getElementsByClassName(this._pEl,"input","popUpRadio");if(B){for(var C=0;C<B.length;C++){if(B[C].value==this._catPrivacy){B[C].checked=true}}}this._setSelects(false);this._editP.show();this._updateCatInfo();A.preventDefault()},_setSelects:function(C){if(browser.isIE6x){var B=document.getElementsByTagName("select");if(B){for(var A=0;A<B.length;A++){B[A].style.visibility=C?"visible":"hidden"}}}},_popOverCB:function(B){var A=null;var F=null;this._newPrivacy=null;if(this._pEl){var E=MySpace.UI.getElementsByClassName("popUpEditInput",this._pEl)[0];if(E){A=E.value;if(A.length==0){getElementsByClassName(this._pEl,"span","cNameErr")[0].style.visibility="visible";return}if(A==this._catName){A=null}}}if(this._pEl){F=getElementsByClassName(this._pEl,"textarea","popUpEditInputDesc")[0].value;if(F==this._catDesc){F=null}}var C=getElementsByClassName(this._pEl,"input","popUpRadio");if(C){for(var D=0;D<C.length;D++){if(C[D].checked&&C[D].value!=this._catPrivacy){this._newPrivacy=C[D].value}}}if(A||this._newPrivacy||(F!=null)){getElementsByClassName(this._pEl,"div","popUpSavingCat")[0].style.visibility="visible";MySpace.Web.Modules.Friends.Services.FriendsService.UpdateExistingCategory(this._catId,A,F,this._newPrivacy,this._onCatEdited,this._onCatEditFailed,this)}else{if(!this.OnCatDescEnter){this._popOverCancel()}}this.OnCatDescEnter=false},_popOverCancel:function(A){getElementsByClassName(this._pEl,"div","popUpSavingCat")[0].style.visibility="hidden";var B=getElementsByClassName(this._pEl,"span","cNameErr");B&&B.length&&(B[0].style.visibility="hidden");this._pErr&&(this._pErr.style.display="none");this._setSelects(true);this._editP._hide()},_onCatEdited:function(A,C,B){C._pErr&&(C._pErr.style.display="none");getElementsByClassName(C._pEl,"div","popUpSavingCat")[0].style.visibility="hidden";if(!A.HasError){C._popOverCancel();if(A.Result){C._catName=A.Result}if(A.Privacy){C._catPrivacy=C._newPrivacy}if(A.Description!="undefined"&&A.Description!=null){C._catDesc=A.Description}C._raiseEvent("editCatClicked",{cName:A.Result,cDesc:A.Description,cPriv:A.Privacy,isTopFriend:C._isTopCat,el:C._el})}else{if(C._pErr){C._pErr.style.display="block";C._pErr.innerHTML=A.Result}}},_onCatEditFailed:function(A,C,B){},addEditCatClicked:function(A){this._getEvents().addHandler("editCatClicked",A)},_getEvents:function(){if(!this._events){this._events=new Sys.EventHandlerList()}return this._events},_raiseEvent:function(B,A){var C=this._getEvents().getHandler(B);if(C){if(!A){A=Sys.EventArgs.Empty}C(this,A)}}};function doBeforePaste(A){maxLength=A.attributes.maxLength.value;if(maxLength){event.returnValue=false}}function doPaste(D,A){maxLength=D.attributes.maxLength.value;value=D.value;if(maxLength){event.returnValue=false;maxLength=parseInt(maxLength);var E=D.document.selection.createRange();var C=maxLength-value.length+E.text.length;var B=window.clipboardData.getData("Text").substr(0,C);E.text=B}A.innerHTML=D.attributes.maxLength.value-D.value.length}function limitInput(E,C,B,A,D){C=document.getElementById(C);if(A){$get(A).style.visibility="hidden"}if(E.value.length>E.attributes.maxLength.value){E.value=E.value.substring(0,E.attributes.maxLength.value)}C.innerHTML=E.attributes.maxLength.value-E.value.length;if(B&&submitFormOnEnter(B,D)){return false}if(!D){if(window.event){D=window.event}else{return}}if(typeof(D.keyCode)=="46"){D=D.keyCode;C.innerHTML=E.attributes.maxLength.value-E.value.length}else{if(typeof(D.which)=="46"){D=D.which;C.innerHTML=E.attributes.maxLength.value-E.value.length}else{if(typeof(D.charCode)=="46"){D=D.charCode;C.innerHTML=E.attributes.maxLength.value-E.value.length}else{return}}}}function DeleteCategory(D,C,A){var B=confirm(A);if(B==true){__catPostBack("DELETE:"+C)}else{return false}}function __catPostBack(A){var C=document.forms.aspnetForm;if(!C){C=document.aspnetForm}if(!C.onsubmit||(C.onsubmit()!=false)){if(!C.__EVENTARGUMENT){var B=document.createElement("input");B.setAttribute("type","hidden");B.setAttribute("name","__EVENTARGUMENT");B.setAttribute("id","__EVENTARGUMENT");C.appendChild(B)}C.__EVENTARGUMENT.value=A;C.submit()}}function CustomFailureHandler(A,B){var C=$get("err_name_"+A.CategoryId);$get("name_valid_"+A.CategoryId).style.display="inline";if(B=="UpdateCategoryName"){$get("edit_name_"+A.CategoryId).style.display="block";$get("char_view_"+A.CategoryId).style.display="block";C.style.display="block";if(typeof(A)!="undefined"&&A.Result!=""){C.innerHTML=A.Result}}if(B=="UpdateCategoryPrivacy"){C.style.display="block";C.innerHTML=A.Result}}function ModifyViewStatus(H,B,G,E){var D=$get(H);var F=$get(G);var A=$get(E);var C=(D.getAttribute("IsPublic")=="false");MySpace.Web.Modules.Friends.Services.FriendsService.UpdateMembershipStatus(B,C);if(C){D.className="hidemelink";A.style.display="none";D.innerHTML=MySpaceRes.FriendCategories.HideMe;D.setAttribute("IsPublic","true");F.setAttribute("IsPublic","true")}else{D.className="unhidemelink";A.style.display="";D.innerHTML=MySpaceRes.FriendCategories.ShowMe;D.setAttribute("IsPublic","false");F.setAttribute("IsPublic","false")}}Type.registerNamespace("MySpace.Web.Modules.Friends.Services");MySpace.Web.Modules.Friends.Services.FriendsService=function(){MySpace.Web.Modules.Friends.Services.FriendsService.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MySpace.Web.Modules.Friends.Services.FriendsService.prototype={UpdateExistingCategory:function(E,D,F,B,C,A,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"UpdateExistingCategory",false,{categoryId:E,categoryName:D,categoryDescription:F,categoryPrivacy:B},C,A,G)},UpdateMembershipStatus:function(A,C,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"UpdateMembershipStatus",false,{categoryIdString:A,isPublic:C},D,B,E)},SaveUpdatedFullName:function(C,A,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"SaveUpdatedFullName",false,{firstName:C,lastName:A},D,B,E)},GetCategories:function(B,A,C){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetCategories",false,{},B,A,C)},CreateCategory:function(B,A,D,C,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"CreateCategory",false,{name:B,privacy:A},D,C,E)},AddFriendToCategory:function(A,C,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"AddFriendToCategory",false,{categoryIdString:A,friendIds:C},D,B,E)},RemoveFriendFromCategory:function(A,C,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"RemoveFriendFromCategory",false,{categoryIdString:A,friendIds:C},D,B,E)},GetMoreFriends:function(B,D,E,A,F,C,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetMoreFriends",false,{categoryIdString:B,pagesize:D,lastFriendId:E,pageNo:A},F,C,G)},RemoveAllFriends:function(A,C,B,D){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"RemoveAllFriends",false,{categoryIdString:A},C,B,D)},GetAlphaFriends:function(G,E,D,C,B,A,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetAlphaFriends",false,{alphaQuery:G,leftNavCatgoryIDstring:E,categoryId:D,themeName:C},B,A,F)},GetPagingFriends:function(A,C,E,B,H,K,D,F,J,I,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetPagingFriends",false,{leftNavCatgoryIDstring:A,categorySelector:C,themeName:E,alphaQuery:B,pageNum:H,jump:K,firstID:D,lastID:F},J,I,G)},UpdateFriendStatusMood:function(B,A,D,C,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"UpdateFriendStatusMood",false,{selectedStatus:B,selectedMood:A},D,C,E)},GetFriendStatusMoods:function(B,A,C){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetFriendStatusMoods",false,{},B,A,C)},GetCategoryList:function(B,A,C){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetCategoryList",false,{},B,A,C)},GetStatusMoods:function(D,G,B,F,A,E,C,H){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetStatusMoods",false,{userId:D,personalFeed:G,includeHistory:B,categoryId:F,pageNumber:A},E,C,H)},DeleteStatusMood:function(C,D,B,E,A,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"DeleteStatusMood",false,{userId:C,timeTick:D,token:B},E,A,F)},DeleteStatusMoodWithTicks:function(C,D,B,E,A,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"DeleteStatusMoodWithTicks",false,{userId:C,timeTick:D,token:B},E,A,F)},AddFriendToIMContacts:function(B,C,A,D){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"AddFriendToIMContacts",false,{friendIds:B},C,A,D)},RemoveFriendFromIMContacts:function(B,C,A,D){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"RemoveFriendFromIMContacts",false,{friendIds:B},C,A,D)},AddAllFriendsToIMContacts:function(B,A,C){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"AddAllFriendsToIMContacts",false,{},B,A,C)},RemoveAllContacts:function(B,A,C){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"RemoveAllContacts",false,{},B,A,C)},GetMoreIMFriends:function(E,C,D,A,F,B,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetMoreIMFriends",false,{isRegularContact:E,pagesize:C,lastFriendId:D,pageNo:A},F,B,G)},GetIMAlphaFriends:function(F,D,C,B,A,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetIMAlphaFriends",false,{alphaQuery:F,categoryId:D,themeName:C},B,A,E)},GetIMPagingFriends:function(B,D,A,G,J,C,E,I,H,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetIMPagingFriends",false,{categorySelector:B,themeName:D,alphaQuery:A,pageNum:G,jump:J,firstID:C,lastID:E},I,H,F)},FindFriendsGet:function(C,A,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"FindFriendsGet",true,{userId:C,searchChar:A},D,B,E)},FindFriends:function(C,A,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"FindFriends",false,{userId:C,searchChar:A},D,B,E)},BelongsToCategoryInfo:function(C,B,D,A,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"BelongsToCategoryInfo",false,{category:C,friendIds:B},D,A,E)},BelongsToIMContactsInfo:function(B,C,A,D){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"BelongsToIMContactsInfo",false,{friendIds:B},C,A,D)},SendSuggestions:function(D,B,C,A,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"SendSuggestions",false,{suggestId:D,friendIds:B},C,A,E)},GetAlphabarSuggestedFriends:function(E,A,H,B,F,D,C,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetAlphabarSuggestedFriends",false,{themeName:E,categorySelector:A,alphaQuery:H,friendsPerPage:B,suggestId:F},D,C,G)},GetPagedSuggestedFriends:function(D,B,A,G,L,C,E,H,K,J,I,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetPagedSuggestedFriends",false,{themeName:D,categorySelector:B,alphaQuery:A,pageNum:G,jump:L,firstID:C,lastID:E,friendsPerPage:H,suggestId:K},J,I,F)},FindSuggestFriendsGet:function(C,A,E,D,B,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"FindSuggestFriendsGet",true,{userId:C,searchChar:A,suggestId:E},D,B,F)},FindSuggestFriends:function(C,A,E,D,B,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"FindSuggestFriends",false,{userId:C,searchChar:A,suggestId:E},D,B,F)},GetPagedTopFriends:function(D,B,A,G,J,C,E,I,H,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetPagedTopFriends",false,{topFriendsIds:D,categorySelector:B,alphaQuery:A,pageNum:G,jump:J,firstID:C,lastID:E},I,H,F)},GetPagedTopFriendsMoreParams:function(D,B,A,G,K,C,E,H,J,I,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetPagedTopFriendsMoreParams",false,{topFriendsIds:D,categorySelector:B,alphaQuery:A,pageNum:G,jump:K,firstID:C,lastID:E,friendsPerPage:H},J,I,F)},GetPagedTopFriendsWithSearch:function(E,C,B,H,L,D,F,I,A,K,J,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetPagedTopFriendsWithSearch",false,{topFriendsIds:E,categorySelector:C,alphaQuery:B,pageNum:H,jump:L,firstID:D,lastID:F,friendsPerPage:I,searchValue:A},K,J,G)},GetAlphabarTopFriends:function(C,A,F,D,B,E){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetAlphabarTopFriends",false,{topFriendsIds:C,categorySelector:A,alphaQuery:F},D,B,E)},GetAlphabarTopFriendsMoreParams:function(D,A,G,B,E,C,F){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetAlphabarTopFriendsMoreParams",false,{topFriendsIds:D,categorySelector:A,alphaQuery:G,friendsPerPage:B},E,C,F)},GetAlphabarTopFriendsWithSearch:function(E,A,H,C,B,F,D,G){return this._invoke(MySpace.Web.Modules.Friends.Services.FriendsService.get_path(),"GetAlphabarTopFriendsWithSearch",false,{topFriendsIds:E,categorySelector:A,alphaQuery:H,friendsPerPage:C,searchType:B},F,D,G)}};MySpace.Web.Modules.Friends.Services.FriendsService.registerClass("MySpace.Web.Modules.Friends.Services.FriendsService",Sys.Net.WebServiceProxy);MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance=new MySpace.Web.Modules.Friends.Services.FriendsService();MySpace.Web.Modules.Friends.Services.FriendsService.set_path=function(A){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._path=A};MySpace.Web.Modules.Friends.Services.FriendsService.get_path=function(){return MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._path};MySpace.Web.Modules.Friends.Services.FriendsService.set_timeout=function(A){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._timeout=A};MySpace.Web.Modules.Friends.Services.FriendsService.get_timeout=function(){return MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._timeout};MySpace.Web.Modules.Friends.Services.FriendsService.set_defaultUserContext=function(A){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._userContext=A};MySpace.Web.Modules.Friends.Services.FriendsService.get_defaultUserContext=function(){return MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._userContext};MySpace.Web.Modules.Friends.Services.FriendsService.set_defaultSucceededCallback=function(A){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._succeeded=A};MySpace.Web.Modules.Friends.Services.FriendsService.get_defaultSucceededCallback=function(){return MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._succeeded};MySpace.Web.Modules.Friends.Services.FriendsService.set_defaultFailedCallback=function(A){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._failed=A};MySpace.Web.Modules.Friends.Services.FriendsService.get_defaultFailedCallback=function(){return MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance._failed};MySpace.Web.Modules.Friends.Services.FriendsService.set_path("/Modules/Friends/Services/FriendsService.asmx");MySpace.Web.Modules.Friends.Services.FriendsService.UpdateExistingCategory=function(D,C,F,B,E,A,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.UpdateExistingCategory(D,C,F,B,E,A,G)};MySpace.Web.Modules.Friends.Services.FriendsService.UpdateMembershipStatus=function(A,C,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.UpdateMembershipStatus(A,C,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.SaveUpdatedFullName=function(C,A,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.SaveUpdatedFullName(C,A,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.GetCategories=function(B,A,C){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetCategories(B,A,C)};MySpace.Web.Modules.Friends.Services.FriendsService.CreateCategory=function(B,A,D,C,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.CreateCategory(B,A,D,C,E)};MySpace.Web.Modules.Friends.Services.FriendsService.AddFriendToCategory=function(A,C,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.AddFriendToCategory(A,C,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.RemoveFriendFromCategory=function(A,C,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.RemoveFriendFromCategory(A,C,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.GetMoreFriends=function(B,D,E,A,F,C,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetMoreFriends(B,D,E,A,F,C,G)};MySpace.Web.Modules.Friends.Services.FriendsService.RemoveAllFriends=function(A,C,B,D){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.RemoveAllFriends(A,C,B,D)};MySpace.Web.Modules.Friends.Services.FriendsService.GetAlphaFriends=function(G,E,C,B,D,A,F){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetAlphaFriends(G,E,C,B,D,A,F)};MySpace.Web.Modules.Friends.Services.FriendsService.GetPagingFriends=function(A,C,F,B,J,K,E,G,I,D,H){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetPagingFriends(A,C,F,B,J,K,E,G,I,D,H)};MySpace.Web.Modules.Friends.Services.FriendsService.UpdateFriendStatusMood=function(B,A,D,C,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.UpdateFriendStatusMood(B,A,D,C,E)};MySpace.Web.Modules.Friends.Services.FriendsService.GetFriendStatusMoods=function(B,A,C){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetFriendStatusMoods(B,A,C)};MySpace.Web.Modules.Friends.Services.FriendsService.GetCategoryList=function(B,A,C){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetCategoryList(B,A,C)};MySpace.Web.Modules.Friends.Services.FriendsService.GetStatusMoods=function(D,G,B,E,A,F,C,H){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetStatusMoods(D,G,B,E,A,F,C,H)};MySpace.Web.Modules.Friends.Services.FriendsService.DeleteStatusMood=function(C,D,B,E,A,F){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.DeleteStatusMood(C,D,B,E,A,F)};MySpace.Web.Modules.Friends.Services.FriendsService.DeleteStatusMoodWithTicks=function(C,D,B,E,A,F){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.DeleteStatusMoodWithTicks(C,D,B,E,A,F)};MySpace.Web.Modules.Friends.Services.FriendsService.AddFriendToIMContacts=function(B,C,A,D){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.AddFriendToIMContacts(B,C,A,D)};MySpace.Web.Modules.Friends.Services.FriendsService.RemoveFriendFromIMContacts=function(B,C,A,D){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.RemoveFriendFromIMContacts(B,C,A,D)};MySpace.Web.Modules.Friends.Services.FriendsService.AddAllFriendsToIMContacts=function(B,A,C){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.AddAllFriendsToIMContacts(B,A,C)};MySpace.Web.Modules.Friends.Services.FriendsService.RemoveAllContacts=function(B,A,C){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.RemoveAllContacts(B,A,C)};MySpace.Web.Modules.Friends.Services.FriendsService.GetMoreIMFriends=function(E,C,D,A,F,B,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetMoreIMFriends(E,C,D,A,F,B,G)};MySpace.Web.Modules.Friends.Services.FriendsService.GetIMAlphaFriends=function(F,C,B,D,A,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetIMAlphaFriends(F,C,B,D,A,E)};MySpace.Web.Modules.Friends.Services.FriendsService.GetIMPagingFriends=function(B,E,A,I,J,D,F,H,C,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetIMPagingFriends(B,E,A,I,J,D,F,H,C,G)};MySpace.Web.Modules.Friends.Services.FriendsService.FindFriendsGet=function(C,A,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.FindFriendsGet(C,A,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.FindFriends=function(C,A,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.FindFriends(C,A,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.BelongsToCategoryInfo=function(C,B,D,A,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.BelongsToCategoryInfo(C,B,D,A,E)};MySpace.Web.Modules.Friends.Services.FriendsService.BelongsToIMContactsInfo=function(B,C,A,D){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.BelongsToIMContactsInfo(B,C,A,D)};MySpace.Web.Modules.Friends.Services.FriendsService.SendSuggestions=function(D,B,C,A,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.SendSuggestions(D,B,C,A,E)};MySpace.Web.Modules.Friends.Services.FriendsService.GetAlphabarSuggestedFriends=function(D,A,H,B,F,E,C,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetAlphabarSuggestedFriends(D,A,H,B,F,E,C,G)};MySpace.Web.Modules.Friends.Services.FriendsService.GetPagedSuggestedFriends=function(E,B,A,I,L,D,F,J,K,H,C,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetPagedSuggestedFriends(E,B,A,I,L,D,F,J,K,H,C,G)};MySpace.Web.Modules.Friends.Services.FriendsService.FindSuggestFriendsGet=function(C,A,E,D,B,F){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.FindSuggestFriendsGet(C,A,E,D,B,F)};MySpace.Web.Modules.Friends.Services.FriendsService.FindSuggestFriends=function(C,A,E,D,B,F){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.FindSuggestFriends(C,A,E,D,B,F)};MySpace.Web.Modules.Friends.Services.FriendsService.GetPagedTopFriends=function(E,B,A,I,J,D,F,H,C,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetPagedTopFriends(E,B,A,I,J,D,F,H,C,G)};MySpace.Web.Modules.Friends.Services.FriendsService.GetPagedTopFriendsMoreParams=function(E,B,A,I,K,D,F,J,H,C,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetPagedTopFriendsMoreParams(E,B,A,I,K,D,F,J,H,C,G)};MySpace.Web.Modules.Friends.Services.FriendsService.GetPagedTopFriendsWithSearch=function(F,C,B,J,L,E,G,K,A,I,D,H){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetPagedTopFriendsWithSearch(F,C,B,J,L,E,G,K,A,I,D,H)};MySpace.Web.Modules.Friends.Services.FriendsService.GetAlphabarTopFriends=function(C,A,F,D,B,E){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetAlphabarTopFriends(C,A,F,D,B,E)};MySpace.Web.Modules.Friends.Services.FriendsService.GetAlphabarTopFriendsMoreParams=function(D,A,G,B,E,C,F){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetAlphabarTopFriendsMoreParams(D,A,G,B,E,C,F)};MySpace.Web.Modules.Friends.Services.FriendsService.GetAlphabarTopFriendsWithSearch=function(E,A,H,C,B,F,D,G){MySpace.Web.Modules.Friends.Services.FriendsService._staticInstance.GetAlphabarTopFriendsWithSearch(E,A,H,C,B,F,D,G)};var gtc=Sys.Net.WebServiceProxy._generateTypedConstructor;if(typeof(MySpace.Web.Modules.Friends.Services.CategoryResponse)==="undefined"){MySpace.Web.Modules.Friends.Services.CategoryResponse=gtc("MySpace.Web.Modules.Friends.Services.CategoryResponse");MySpace.Web.Modules.Friends.Services.CategoryResponse.registerClass("MySpace.Web.Modules.Friends.Services.CategoryResponse")}Type.registerNamespace("MySpace.Web.Modules.Friends.Classes");if(typeof(MySpace.Web.Modules.Friends.Classes.ManageFriendsResult)==="undefined"){MySpace.Web.Modules.Friends.Classes.ManageFriendsResult=gtc("MySpace.Web.Modules.Friends.Classes.ManageFriendsResult");MySpace.Web.Modules.Friends.Classes.ManageFriendsResult.registerClass("MySpace.Web.Modules.Friends.Classes.ManageFriendsResult")}if(typeof(MySpace.Web.Modules.Friends.Classes.FriendsAjaxResult)==="undefined"){MySpace.Web.Modules.Friends.Classes.FriendsAjaxResult=gtc("MySpace.Web.Modules.Friends.Classes.FriendsAjaxResult");MySpace.Web.Modules.Friends.Classes.FriendsAjaxResult.registerClass("MySpace.Web.Modules.Friends.Classes.FriendsAjaxResult")}if(typeof(MySpace.Web.Modules.Friends.Services.MoodStatusUpdateResult)==="undefined"){MySpace.Web.Modules.Friends.Services.MoodStatusUpdateResult=gtc("MySpace.Web.Modules.Friends.Services.MoodStatusUpdateResult");MySpace.Web.Modules.Friends.Services.MoodStatusUpdateResult.registerClass("MySpace.Web.Modules.Friends.Services.MoodStatusUpdateResult")}if(typeof(MySpace.Web.Modules.Friends.Services.MoodStatusGetResult)==="undefined"){MySpace.Web.Modules.Friends.Services.MoodStatusGetResult=gtc("MySpace.Web.Modules.Friends.Services.MoodStatusGetResult");MySpace.Web.Modules.Friends.Services.MoodStatusGetResult.registerClass("MySpace.Web.Modules.Friends.Services.MoodStatusGetResult")}if(typeof(MySpace.Web.Modules.Friends.Services.DefaultStatusMoodFilters)==="undefined"){MySpace.Web.Modules.Friends.Services.DefaultStatusMoodFilters=gtc("MySpace.Web.Modules.Friends.Services.DefaultStatusMoodFilters");MySpace.Web.Modules.Friends.Services.DefaultStatusMoodFilters.registerClass("MySpace.Web.Modules.Friends.Services.DefaultStatusMoodFilters")}if(typeof(MySpace.Web.Modules.Friends.Services.StatusMoodResult)==="undefined"){MySpace.Web.Modules.Friends.Services.StatusMoodResult=gtc("MySpace.Web.Modules.Friends.Services.StatusMoodResult");MySpace.Web.Modules.Friends.Services.StatusMoodResult.registerClass("MySpace.Web.Modules.Friends.Services.StatusMoodResult")}if(typeof(MySpace.Web.Modules.Friends.Services.QuickFindResult)==="undefined"){MySpace.Web.Modules.Friends.Services.QuickFindResult=gtc("MySpace.Web.Modules.Friends.Services.QuickFindResult");MySpace.Web.Modules.Friends.Services.QuickFindResult.registerClass("MySpace.Web.Modules.Friends.Services.QuickFindResult")}if(typeof(MySpace.Web.Modules.Friends.Classes.PageFriendsInfo)==="undefined"){MySpace.Web.Modules.Friends.Classes.PageFriendsInfo=gtc("MySpace.Web.Modules.Friends.Classes.PageFriendsInfo");MySpace.Web.Modules.Friends.Classes.PageFriendsInfo.registerClass("MySpace.Web.Modules.Friends.Classes.PageFriendsInfo")}if(typeof(MySpace.Web.Modules.Friends.Services.FriendsService_QuickFindSuggestResult)==="undefined"){MySpace.Web.Modules.Friends.Services.FriendsService_QuickFindSuggestResult=gtc("MySpace.Web.Modules.Friends.Services.FriendsService+QuickFindSuggestResult");MySpace.Web.Modules.Friends.Services.FriendsService_QuickFindSuggestResult.registerClass("MySpace.Web.Modules.Friends.Services.FriendsService_QuickFindSuggestResult")}function toggleAllCheckBoxes(B){var A=document.getElementsByTagName("input");for(var C=0;C<A.length;C++){if(A[C].type==="checkbox"){A[C].checked=B}}}function setAll(B){if(B){return}var A=document.getElementsByTagName("input");for(var C=0;C<A.length;C++){if(A[C].type==="checkbox"&&A[C].name==="selectAll"){A[C].checked=B}}}function areAnyChecked(){var A=document.getElementsByTagName("input");for(var B=0;B<A.length;B++){if(A[B].type==="checkbox"){if(A[B].checked){return true}}}return false}function confirmDelete(F,E){var C=false;var D=0;var A=document.getElementsByTagName("input");for(var B=0;B<A.length;B++){if(A[B].type==="checkbox"){if(A[B].checked&&A[B].id.indexOf("friendid")>-1){C=true;D++}}}if(!C){alert(E);return false}else{F=F.replace("{0}",D);return confirm(F)}};