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&&MySpace.UI.ProfileCommentQuickPostPopup){var B=MySpace.Utils.Selector.query("a.bdayAddComment");for(var A=0;A<B.length;A++){$addHandler(B[A],"click",MySpace.UI.ProfileCommentQuickPostPopup.show)}}};
