if(!MySpace.Application.keyDisabled("MSPLinksConvertAll")){var changeLinksHrefRegex=new RegExp(/(\.|^)((myspace|msplinks|googlesyndication)\.com)|(doubleclick.net)|(lnk.ms)$/i);var changeLinksProtocolRegex=new RegExp(/javascript:/i);for(var i=0;i<document.links.length;i++){var l=document.links[i];if(!changeLinksProtocolRegex.test(l.protocol)&&!changeLinksHrefRegex.test(l.hostname)&&l.hostname.toLowerCase()!="localhost"){l.oldHref=l.href;l.href="http://www.msplinks.com/"+l.href;l.onmousemove=function(){try{window.status=this["oldHref"]}catch(A){}}}}}Type.registerNamespace("MySpace.Utils.Media");MySpace.Utils.Media.loadStaticContent=function(K){K=K||document;var P=K.getElementsByTagName("img");for(var E=0;E<P.length;E++){if(!P[E].getAttribute("MaxWidth")&&!P[E].getAttribute("MaxHeight")&&P[E].getAttribute("source")){if(P[E].parentNode.parentNode.style.display=="-moz-inline-box"){P[E].parentNode.parentNode.style.display="";setTimeout(function(){P[E].parentNode.parentNode.style.display="-moz-inline-box"},0)}P[E].src=P[E].getAttribute("source")}}var Q=K.getElementsByTagName("object");if(Q){for(var E=0;E<Q.length;E++){if(Q[E].getAttribute("movie")){var B=Q[E].getAttribute("movie");try{Q[E].LoadMovie(0,B);var O=Q[E].getAttribute("disableAutoPlay");if(O==undefined||O==""){Q[E].Play()}continue}catch(G){}var N=Q[E].getAttribute("height");var C=Q[E].getAttribute("width");var J="";var I=Q[E].getElementsByTagName("param");for(var L=0;L<I.length;L++){try{if(I[L].getAttribute("name").toLowerCase()==="flashvars"){J=I[L].getAttribute("value");break}}catch(G){}}var D=new SWFObject(B,"obj"+Math.random(),C,N,"8","#FFFFFF");if(J){var F=J.split(/\&/);for(var M=0;M<F.length;M++){var H=F[M].split("=");if(H.length==2){D.addVariable(H[0],H[1])}}}var A=document.createElement("div");Q[E].parentNode.insertBefore(A,Q[E]);D.write(A);Q[E].parentNode.removeChild(Q[E])}}}};try{if(!MySpace.Application.keyDisabled("JS_ProfilePageStaticMediaPreloader")){MySpace.Utils.Media.loadStaticContent()}}catch(e){}Type.registerNamespace("MySpace.UI");Date.prototype.addDays=function(A){this.setDate(this.getDate()+A);return this};MySpace.UI.hideElements=function(B,A){for(var C=0;C<B.length;C++){var E=document.getElementsByTagName(B[C]);for(var D=0;D<E.length;D++){if(A){E[D].setAttribute("origvis",E[D].style.visibility)}E[D].style.visibility=A?"hidden":(E[D].getAttribute("origvis")?E[D].getAttribute("origvis"):"")}}};MySpace.WebRequest=function(){throw"Cannot instantiate static class."};MySpace.WebRequest.invoke=function(J,I,C,G,A,F,H){if(!C){C={}}var D=new Sys.Net.WebRequest();if(!I){if(typeof C==="string"){var E=(typeof C!=="string")?Sys.Serialization.JavaScriptSerializer.serialize(C):C}if(E==="{}"){E=""}D.set_body(E)}D.set_url(Sys.Net.WebRequest._createUrl(J,(I)?C:{}));D.add_completed(B);if(H&&H>0){D.set_timeout(H)}D.invoke();function B(M,L){if(M.get_responseAvailable()){var P=M.get_statusCode();var K=null;try{var R=M.getResponseHeader("Content-Type");if(R.startsWith("application/json")){K=M.get_object()}else{if(R.startsWith("text/xml")){K=M.get_xml()}else{K=M.get_responseData()}}}catch(O){}if((P<200)||(P>=300)){if(A){if(!K){K=new Sys.Net.WebServiceError(false,"WebRequest failed for an unknown reason.","","")}K._statusCode=P;A(K,F)}else{var N;if(K){N=K.get_exceptionType()+"-- "+K.get_message()}else{N=M.get_responseData()}window.alert("WebRequest Failed: "+N)}}else{if(G){G(K,F)}}}else{var Q;if(M.get_timedOut()){Q="WebRequest timed out."}else{Q="WebRequest failed for an unknown reason."}if(A){A(new Sys.Net.WebServiceError(M.get_timedOut(),Q,"",""),F)}else{alert(Q)}}}return D};MySpace.WebRequest.registerClass("MySpace.WebRequest");MySpace.CMS=function(){throw"Cannot instantiate static class."};MySpace.CMS.cache={};MySpace.CMS.getContent=function(D,E,C){var A=MySpace.CMS.cache[D];if(A&&new Date()<A.expire){E(A.response);return null}MySpace.WebRequest.invoke("/Modules/Common/HttpHandlers/CMS.ashx",false,"placementId="+D,B,null,C,0);function B(H,G){var F=new Date();F.setTime(F.getTime()+120000);MySpace.CMS.cache[D]={response:H,expire:F};if(E){E(H,G)}}return null};MySpace.CMS.track=function(A){MySpace.WebRequest.invoke("/Modules/Common/HttpHandlers/CMSClick.ashx?_i="+A,true,null,null,Function.emptyFunction,null,0)};MySpace.CMS.trackV2=function(D,E){var A=D.href;var C=(D.target&&D.target!="");var B="/Modules/Common/HttpHandlers/CMSClick.ashx?_i="+E+"&t="+new Date().getTime();MySpace.WebRequest.invoke(B,true,null,function(){if(!C){location.href=A}},function(){if(!C){location.href=A}},null,2000);if(!C){return false}};MySpace.CMS.registerClass("MySpace.CMS");if(typeof MySpace.Cookies.MSCulture!=="undefined"){var d=new Date();MySpace.Cookies.MSCulture.get_values().timeZone=(d.getTimezoneOffset()/-60);MySpace.Cookies.save(MySpace.Cookies.MSCulture,".myspace.com",new Date().addDays(7))}MySpace.Beacon=new (function(){$addHandler(window,"load",function(){if((MySpace.BeaconData)){var C=swfobject.getFlashPlayerVersion();MySpace.BeaconData.cef=(document.cookie?1:0);MySpace.BeaconData.cfv=C.major+":"+C.minor+":"+C.release;B(MySpace.BeaconData)}});this.Request=function(D){if(MySpace.BeaconData&&MySpace.BeaconData.pggd){beaconData={};beaconData.dsid="3";beaconData.dsv="1";beaconData.pggd=MySpace.BeaconData.pggd;beaconData.t=MySpace.BeaconData.t;beaconData.ct=A();beaconData.kvp="";var C=1;if(D){for(var E in D){beaconData.kvp+=E+"="+encodeURIComponent(D[E]);if(C<D.length){beaconData.kvp+="&"}}}B(beaconData)}};function B(E){var D="http://b.myspace.com/b.ashx?";if(MySpace.BeaconAddress&&MySpace.BeaconAddress.length>0){D=MySpace.BeaconAddress}E.ct=A();for(var C in E){D+=C+"="+encodeURIComponent(E[C])+"&"}var F=document.createElement("iframe");F.height="1";F.width="1";F.setAttribute("style","border:0;");F.setAttribute("src",D);document.body.appendChild(F)}function A(){var D=new Date();var C=(D.getTime()/1000)*1000;return C}})();MySpace.CultureSwitchPrompt=function(){throw"Cannot instantiate static class."};MySpace.CultureSwitchPrompt.getContent=function(A,D,C){MySpace.WebRequest.invoke("/Modules/Common/HttpHandlers/CultureSwitch.ashx",false,"culture="+A+"&userid="+MySpace.ClientContext.UserId,B,null,C,0);function B(F,E){if(D){D(F,E)}}return null};MySpace.CultureSwitchPrompt.registerClass("MySpace.CultureSwitchPrompt");MySpace.UI.Header=function(){throw"Cannot instantiate static class."};MySpace.UI.Header.languageLinkClick=function(A,E,B){MySpace.CultureSwitchPrompt.getContent(A,C);function C(G){var I=Sys.Serialization.JavaScriptSerializer.deserialize(G);var H=MySpace.UI.Popup.create("","");H._element.innerHTML="<div class='popup_box2'><a class='popup_ex'></a><div class='popup_title'></div><div class='popup_content2'></div><div class='popup_buttons'></div></div>";H._box=H._element.firstChild;H.set_content(I.content);H.set_title(I.header);H.add_button(I.continuebtn);H.add_button(I.cancelbtn,true).isCancel=true;H.set_state({culture:A,domain:E});H.addCssClass("popupChangeLanguage");H.show(F)}function F(H,G){var I=H.get_state();if(G.target.isCancel){MySpace.Cookies.MSCulture.get_values().PreferredCulturePending=A.replace("-","*");MySpace.Cookies.save(MySpace.Cookies.MSCulture,".myspace.com",new Date().addDays(7));if(E.length==0){window.location.reload(false)}return}MySpace.Cookies.MSCulture.get_values().PreferredCulturePending=A;MySpace.Cookies.MSCulture.get_values().PreferredCulture=A;MySpace.Cookies.save(MySpace.Cookies.MSCulture,".myspace.com",new Date().addDays(7));var J=H._box.childNodes[2].getElementsByTagName("input");if(J[1]!=null&&J[1].checked){Sys.Net.WebServiceProxy.invoke("/Services/GeoLocation.asmx","SavePreferredCulture",false,{culture:I.culture},D,D,null,0);return}D()}function D(){if(E.length>0){window.location="http://"+E}else{window.location.reload(true)}}};function popLanguageOverlay(A,B){MySpace.UI.Header.languageLinkClick(A,B,1)}MySpace.UI.Header.gamesLinkClick=function(B){var A=MySpace.UI.Popup.create("","");A._element.innerHTML="<div class='popup_box2'><a class='popup_ex'></a><div class='popup_title'></div><div class='popup_content2' style='padding:20px'></div><div class='popup_buttons'></div></div>";A._box=A._element.firstChild;A.set_content(MySpaceRes.CultureSpecific.GamesPromptEnglish+"<div style='color:#039'>"+MySpaceRes.International.GamesPromptLocal+"</div>");A.set_title(MySpaceRes.International.GamesPromptTitle);A.add_button(MySpaceRes.Header.Continue);A.add_button(MySpaceRes.Header.Cancel,true).isCancel=true;A.addCssClass("popupChangeLanguage");A.show(C);function C(E,D){if(D.target.isCancel){return}window.location=B}};MySpace.UI.Header.registerClass("MySpace.UI.Header");MySpace.UI.getElementsByClassName=function(F,E){E=E||document;F=" "+F+" ";var A=E.all||E.getElementsByTagName("*");var B=A.length,D=[],C;for(C=0;C<B;C++){if((" "+A[C].className+" ").indexOf(F)!==-1){D[D.length]=A[C]}}return D};MySpace.UI.getComputedStyle=function(C){switch(Sys.Browser.agent){case Sys.Browser.Safari:var B;if(C instanceof HTMLElement){var A=C.ownerDocument.defaultView;B=A.getComputedStyle(C,null);if(!B&&C.style){C.style.display="";B=A.getComputedStyle(C,null)}}return B||{};case Sys.Browser.InternetExplorer:return C.nodeType==1?C.currentStyle:{};default:return C instanceof HTMLElement?C.ownerDocument.defaultView.getComputedStyle(C,null):{}}};MySpace.UI.getContentBox=function(D){var B=MySpace.UI.getComputedStyle(D);var A={h:parseFloat(B.paddingTop)+parseFloat(B.paddingBottom),w:parseFloat(B.paddingLeft)+parseFloat(B.paddingRight)};var C={h:(B.borderTopStyle!="none"?parseFloat(B.borderTopWidth):0)+(B.borderBottomStyle!="none"?parseFloat(B.borderBottomWidth):0),w:(B.borderLeftStyle!="none"?parseFloat(B.borderLeftWidth):0)+(B.borderRightStyle!="none"?parseFloat(B.borderRightWidth):0)};return{h:D.clientHeight-A.h-C.h,w:D.clientWidth-A.w-C.w}};MySpace.UI.addStyles=function(D,A,C){if(C){if(MySpace.UI.addStyles._added[C]){return}MySpace.UI.addStyles._added[C]=true}var E;if(document.createStyleSheet){if(A){E=document.createStyleSheet("",0)}else{E=document.createStyleSheet()}}else{E=document.createElement("style");var B=document.getElementsByTagName("head")[0];if(A){B.insertBefore(E,B.childNodes[0])}else{B.appendChild(E)}}if(Sys.Browser.agent==Sys.Browser.InternetExplorer){E.cssText=D}else{if(Sys.Browser.agent==Sys.Browser.Safari){E.innerText=D}else{E.innerHTML=D}}};MySpace.UI.addStyles._added={};MySpace.UI.addScript=function(scriptUrl,evalText,callback){if(evalText&&eval(evalText)){if(callback){callback()}return}var scriptNode=document.createElement("script");scriptNode.src=scriptUrl;document.getElementsByTagName("head")[0].appendChild(scriptNode);if(evalText){var interval=window.setInterval(function(){if(eval(evalText)){window.clearInterval(interval);if(callback){callback()}}},200)}};Sys.UI.Control.overlaps=function(D,B){var H=(D.x>=B.x&&D.x<=(B.x+B.width));var C=((D.x+D.width)>=B.x&&(D.x+D.width)<=B.x+B.width);var G=((D.x<B.x)&&((D.x+D.height)>(B.x+B.height)));var E=(D.y>=B.y&&D.y<=(B.y+B.height));var A=((D.y+D.height)>=B.y&&(D.y+D.height)<=B.y+B.height);var F=((D.y<B.y)&&((D.y+D.height)>(B.y+B.height)));if((H||C||G)&&(E||A||F)){return true}return false};MySpace.Utils.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(A,B){return A&&A.hasOwnProperty(B)}:function(A,B){return !(typeof(A[B])==="undefined"&&A.constructor.prototype[B]!==A[B])};Type.registerNamespace("MySpace.FlashDetection");MySpace.FlashDetection=function(){return this};MySpace.FlashDetection.prototype={getFlashVersion:function(B){var A=B.match(/[\d]+/g);A.length=3;return A.join(".")},removeFlashVersionPrefix:function(B){var A=B.split(" ");if(A.length==1){return A}else{if(A.length>1){return A[1]}else{return B}}},hasRequiredFlashVersion:function(C){var D=(C.toString()+".0.0");var E=C;var F=0;var M="0.0.0";var H=(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(H){var J=navigator.plugins["Shockwave Flash"].description.split(" ");for(var G=0;G<J.length;++G){if(isNaN(parseInt(J[G]))){continue}M=J[G]}F=M>=E}else{if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.appVersion.indexOf("Win")!=-1)){try{var K=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");var A=this.removeFlashVersionPrefix(K.GetVariable("$version"));var M=this.getFlashVersion(A)}catch(I){try{var K=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");A=K.GetVariable("$version");M=this.getFlashVersion(A)}catch(I){try{var K=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");A=K.GetVariable("$version");M="6.0.21"}catch(I){try{var K=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");A=K.GetVariable("$version");M=this.getFlashVersion(A)}catch(I){}}}}var L=M.split(".");var B=D.split(".");B[0]=parseInt(B[0],10);B[1]=parseInt(B[1],10);B[2]=parseInt(B[2],10);L[0]=parseInt(L[0],10);L[1]=parseInt(L[1],10);L[2]=parseInt(L[2],10);F=(L[0]>B[0]||(L[0]==B[0]&&L[1]>B[1])||(L[0]==B[0]&&L[1]==B[1]&&L[2]>=B[2]))?true:false}}return F}};new function(){var A=$get("intlLink");if(A){$addHandler(A,"click",msglobalnav.toggleInternationalLinks)}}();Type.registerNamespace("MySpace.UI.Effects");MySpace.UI.Effects.Glitz=function(){throw Error.invalidOperation()};MySpace.UI.Effects.Glitz.interpolate=function(C,B,A,D){if(D){A=100*D(A/100)}return C+(B-C)*(A/100)};MySpace.UI.Effects.Glitz.setElementOpacity=function(B,A){if(B.filters){if(A==1){B.style.cssText=B.style.cssText.replace(/FILTER:[^;]*;?/i,"")}else{B.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+A*100+")"}}else{B.style.opacity=A}};MySpace.UI.Effects.Easing={linear:function(A){return A},quadIn:function(A){return A*A},quadOut:function(A){return A*(A-2)*-1},quadInOut:function(A){A=A*2;if(A<1){return Math.pow(A,2)/2}return -1*((--A)*(A-2)-1)/2},quartIn:function(A){return Math.pow(A,4)},quartOut:function(A){return -1*(Math.pow(A-1,4)-1)},quartInOut:function(A){A=A*2;if(A<1){return Math.pow(A,4)/2}A-=2;return -1/2*(Math.pow(A,4)-2)},circIn:function(A){return -1*(Math.sqrt(1-Math.pow(A,2))-1)},circOut:function(A){A=A-1;return Math.sqrt(1-Math.pow(A,2))},circInOut:function(A){A=A*2;if(A<1){return -1/2*(Math.sqrt(1-Math.pow(A,2))-1)}A-=2;return 1/2*(Math.sqrt(1-Math.pow(A,2))+1)},backIn:function(B){var A=1.70158;return Math.pow(B,2)*((A+1)*B-A)},backOut:function(B){B=B-1;var A=1.70158;return Math.pow(B,2)*((A+1)*B+A)+1},backInOut:function(B){var A=1.70158*1.525;B=B*2;if(B<1){return(Math.pow(B,2)*((A+1)*B-A))/2}B-=2;return(Math.pow(B,2)*((A+1)*B+A)+2)/2},elasticIn:function(C){if(C==0){return 0}if(C==1){return 1}var B=0.3;var A=B/4;C=C-1;return -1*Math.pow(2,10*C)*Math.sin((C-A)*(2*Math.PI)/B)},elasticOut:function(C){if(C==0){return 0}if(C==1){return 1}var B=0.3;var A=B/4;return Math.pow(2,-10*C)*Math.sin((C-A)*(2*Math.PI)/B)+1},elasticInOut:function(C){if(C==0){return 0}C=C*2;if(C==2){return 1}var B=0.3*1.5;var A=B/4;if(C<1){C-=1;return -0.5*(Math.pow(2,10*C)*Math.sin((C-A)*(2*Math.PI)/B))}C-=1;return 0.5*(Math.pow(2,-10*C)*Math.sin((C-A)*(2*Math.PI)/B))+1},bounceIn:function(A){return(1-MySpace.UI.Effects.Easing.bounceOut(1-A))},bounceOut:function(D){var B=7.5625;var C=2.75;var A;if(D<(1/C)){A=B*Math.pow(D,2)}else{if(D<(2/C)){D-=(1.5/C);A=B*Math.pow(D,2)+0.75}else{if(D<(2.5/C)){D-=(2.25/C);A=B*Math.pow(D,2)+0.9375}else{D-=(2.625/C);A=B*Math.pow(D,2)+0.984375}}}return A},bounceInOut:function(A){if(A<0.5){return MySpace.UI.Effects.Easing.bounceIn(A*2)/2}return(MySpace.UI.Effects.Easing.bounceOut(A*2-1)/2)+0.5}};MySpace.UI.Effects.Animation=function(){MySpace.UI.Effects.Animation.initializeBase(this)};MySpace.UI.Effects.Animation.prototype={_duration:1,_fps:25,_target:null,_tickHandler:null,_timer:null,_percentComplete:0,_percentDelta:null,_parentAnimation:null,get_duration:function(){return this._duration},set_duration:function(A){this._duration=A},get_fps:function(){return this._fps},set_fps:function(A){this._fps=A},get_isActive:function(){return this._timer!==null},get_isPlaying:function(){return this._timer!==null&&this._timer.get_enabled()},get_percentComplete:function(){return this._percentComplete},get_target:function(){return this._target},set_target:function(A){this._target=A},add_ended:function(A){this.get_events().addHandler("ended",A)},remove_ended:function(A){this.get_events().removeHandler("ended",A)},add_started:function(A){this.get_events().addHandler("started",A)},remove_started:function(A){this.get_events().removeHandler("started",A)},dispose:function(){if(this._timer){this._timer.dispose();this._timer=null}this._tickHandler=null;this._target=null;MySpace.UI.Effects.Animation.callBaseMethod(this,"dispose")},getAnimatedValue:function(){throw Error.notImplemented()},onEnd:function(){},onStart:function(){},onStep:function(A){this.setValue(this.getAnimatedValue(A))},pause:function(){if(!this._parentAnimation){if(this._timer){this._timer.set_enabled(false);this.raisePropertyChanged("isPlaying")}}},play:function(){if(!this._parentAnimation){var A=true;if(!this._timer){A=false;if(!this._tickHandler){this._tickHandler=Function.createDelegate(this,this._onTimerTick)}this._timer=new MySpace.Timer;this._timer.set_interval(1000/this._fps);this._timer.add_tick(this._tickHandler);this._percentDelta=100/(this._duration*this._fps);this.onStart();this._updatePercentComplete(0,true)}this._timer.set_enabled(true);this.raisePropertyChanged("isPlaying");if(!A){this.raisePropertyChanged("isActive")}}},setOwner:function(A){this._parentAnimation=A},setValue:function(){throw Error.notImplemented()},stop:function(){if(!this._parentAnimation){var A=this._timer;this._timer=null;if(A){A.dispose();this._updatePercentComplete(100);this.onEnd();var B=this.get_events().getHandler("ended");if(B){B(this,null)}this.raisePropertyChanged("isPlaying");this.raisePropertyChanged("isActive")}}},_onTimerTick:function(){this._updatePercentComplete(this._percentComplete+this._percentDelta,true)},_updatePercentComplete:function(B,A){if(B>100){B=100}this._percentComplete=B;this.raisePropertyChanged("percentComplete");if(A){this.onStep(B)}if(B===100){this.stop()}}};MySpace.UI.Effects.Animation.registerClass("MySpace.UI.Effects.Animation",Sys.Component);MySpace.UI.Effects.PropertyAnimation=function(){MySpace.UI.Effects.PropertyAnimation.initializeBase(this)};MySpace.UI.Effects.PropertyAnimation.prototype={_property:null,_propertyKey:null,get_property:function(){return this._property},set_property:function(A){this._property=A},get_propertyKey:function(){return this._propertyKey},set_propertyKey:function(A){this._propertyKey=A},add_ended:function(A){this.get_events().addHandler("ended",A)},remove_ended:function(A){this.get_events().removeHandler("ended",A)},add_started:function(A){this.get_events().addHandler("started",A)},remove_started:function(A){this.get_events().removeHandler("started",A)},setValue:function(A){if(this._propertyKey){this.get_target()[this._property][this._propertyKey]=A}else{this.get_target()[this._property]=A}}};MySpace.UI.Effects.PropertyAnimation.registerClass("MySpace.UI.Effects.PropertyAnimation",MySpace.UI.Effects.Animation);MySpace.UI.Effects.InterpolatedAnimation=function(){MySpace.UI.Effects.InterpolatedAnimation.initializeBase(this)};MySpace.UI.Effects.InterpolatedAnimation.prototype={_startValue:null,_endValue:null,_easingFunction:null,get_endValue:function(){return this._endValue},set_endValue:function(A){this._endValue=A},get_startValue:function(){return this._startValue},set_startValue:function(A){this._startValue=A},get_easingFunction:function(){return this._easingFunction},set_easingFunction:function(A){this._easingFunction=A}};MySpace.UI.Effects.InterpolatedAnimation.registerClass("MySpace.UI.Effects.InterpolatedAnimation",MySpace.UI.Effects.PropertyAnimation);MySpace.UI.Effects.DiscreteAnimation=function(){MySpace.UI.Effects.DiscreteAnimation.initializeBase(this);this._values=[]};MySpace.UI.Effects.DiscreteAnimation.prototype={get_values:function(){return this._values},set_values:function(A){this._values=A},getAnimatedValue:function(B){var A=Math.round(B/100*(this._values.length-1));return this._values[A]}};MySpace.UI.Effects.DiscreteAnimation.registerClass("MySpace.UI.Effects.DiscreteAnimation",MySpace.UI.Effects.PropertyAnimation);MySpace.UI.Effects.NumberAnimation=function(){MySpace.UI.Effects.NumberAnimation.initializeBase(this)};MySpace.UI.Effects.NumberAnimation.prototype={_integralValues:false,get_integralValues:function(){return this._integralValues},set_integralValues:function(A){this._integralValues=A},getAnimatedValue:function(B){var A=MySpace.UI.Effects.Glitz.interpolate(this.get_startValue(),this.get_endValue(),B,this.get_easingFunction());if(this._integralValues){A=Math.round(A)}return A}};MySpace.UI.Effects.NumberAnimation.registerClass("MySpace.UI.Effects.NumberAnimation",MySpace.UI.Effects.InterpolatedAnimation);MySpace.UI.Effects.LengthAnimation=function(){MySpace.UI.Effects.LengthAnimation.initializeBase(this)};MySpace.UI.Effects.LengthAnimation.prototype={_unit:"px",get_unit:function(){return this._unit},set_unit:function(A){this._unit=A},getAnimatedValue:function(B){var A=MySpace.UI.Effects.Glitz.interpolate(this.get_startValue(),this.get_endValue(),B,this.get_easingFunction());return Math.round(A)+this._unit}};MySpace.UI.Effects.LengthAnimation.registerClass("MySpace.UI.Effects.LengthAnimation",MySpace.UI.Effects.InterpolatedAnimation);MySpace.UI.Effects.CompositeAnimation=function(){MySpace.UI.Effects.CompositeAnimation.initializeBase(this);this._animations=[]};MySpace.UI.Effects.CompositeAnimation.prototype={get_animations:function(){return this._animations},add_animation:function(A){this._animations.push(A)},getAnimatedValue:function(){throw Error.invalidOperation()},dispose:function(){for(var A=0;A<this._animations.length;A++){this._animations[A].dispose()}this._animations=null;MySpace.UI.Effects.CompositeAnimation.callBaseMethod(this,"dispose")},onEnd:function(){for(var A=0;A<this._animations.length;A++){this._animations[A].onEnd()}},onStart:function(){for(var A=0;A<this._animations.length;A++){this._animations[A].onStart()}},onStep:function(A){for(var B=0;B<this._animations.length;B++){this._animations[B].onStep(A)}}};MySpace.UI.Effects.CompositeAnimation.registerClass("MySpace.UI.Effects.CompositeAnimation",MySpace.UI.Effects.Animation);MySpace.UI.Effects.ColorAnimation=function(G,F,E,D,C,B,A){MySpace.UI.Effects.ColorAnimation.initializeBase(this,[G,F,E,D,C,B,A]);this._start=null;this._end=null;this._interpolateRed=false;this._interpolateGreen=false;this._interpolateBlue=false};MySpace.UI.Effects.ColorAnimation.prototype={onStart:function(){MySpace.UI.Effects.ColorAnimation.callBaseMethod(this,"onStart");this._start=MySpace.UI.Effects.ColorAnimation.getRGB(this.get_startValue());this._end=MySpace.UI.Effects.ColorAnimation.getRGB(this.get_endValue());this._interpolateRed=(this._start.Red!=this._end.Red);this._interpolateGreen=(this._start.Green!=this._end.Green);this._interpolateBlue=(this._start.Blue!=this._end.Blue)},getAnimatedValue:function(B){var D=this._start.Red;var C=this._start.Green;var A=this._start.Blue;if(this._interpolateRed){D=Math.round(MySpace.UI.Effects.Glitz.interpolate(D,this._end.Red,B,this.get_easingFunction()))}if(this._interpolateGreen){C=Math.round(MySpace.UI.Effects.Glitz.interpolate(C,this._end.Green,B,this.get_easingFunction()))}if(this._interpolateBlue){A=Math.round(MySpace.UI.Effects.Glitz.interpolate(A,this._end.Blue,B,this.get_easingFunction()))}return MySpace.UI.Effects.ColorAnimation.toColor(D,C,A)},set_startValue:function(A){if(this._startValue!=A){this._startValue=A;this.raisePropertyChanged("startValue")}},set_endValue:function(A){if(this._endValue!=A){this._endValue=A;this.raisePropertyChanged("endValue")}}};MySpace.UI.Effects.ColorAnimation.getRGB=function(A){if(!A||A.length!=7){throw String.format(AjaxControlToolkit.Resources.Animation_InvalidColor,A)}return{Red:parseInt(A.substr(1,2),16),Green:parseInt(A.substr(3,2),16),Blue:parseInt(A.substr(5,2),16)}};MySpace.UI.Effects.ColorAnimation.toColor=function(F,E,B){var D=F.toString(16);var C=E.toString(16);var A=B.toString(16);if(D.length==1){D="0"+D}if(C.length==1){C="0"+C}if(A.length==1){A="0"+A}return"#"+D+C+A};MySpace.UI.Effects.ColorAnimation.registerClass("MySpace.UI.Effects.ColorAnimation",MySpace.UI.Effects.InterpolatedAnimation);MySpace.UI.Effects.FadeEffect=function(){throw Error.invalidOperation()};MySpace.UI.Effects.FadeEffect.prototype={FadeIn:0,FadeOut:1};MySpace.UI.Effects.FadeEffect.registerEnum("MySpace.UI.Effects.FadeEffect");MySpace.UI.Effects.FadeAnimation=function(){MySpace.UI.Effects.FadeAnimation.initializeBase(this)};MySpace.UI.Effects.FadeAnimation.prototype={_effect:MySpace.UI.Effects.FadeEffect.FadeIn,get_effect:function(){return this._effect},set_effect:function(A){this._effect=A},getAnimatedValue:function(C){var B=0,A=1;if(this._effect===MySpace.UI.Effects.FadeEffect.FadeOut){B=1;A=0}return MySpace.UI.Effects.Glitz.interpolate(B,A,C)},onStart:function(){var A=0;if(this._effect===MySpace.UI.Effects.FadeEffect.FadeOut){A=1}this.setValue(A);if(A==0){this.get_target().style.visibility="visible"}},onEnd:function(){var A=1;if(this._effect===MySpace.UI.Effects.FadeEffect.FadeOut){A=0}this.setValue(A);if(A==0){this.get_target().style.visibility="hidden"}},setValue:function(A){MySpace.UI.Effects.Glitz.setElementOpacity(this.get_target(),A)}};MySpace.UI.Effects.FadeAnimation.registerClass("MySpace.UI.Effects.FadeAnimation",MySpace.UI.Effects.Animation);MySpace.UI.Effects.SlideEffect=function(){throw Error.invalidOperation()};MySpace.UI.Effects.SlideEffect.prototype={SlideIn:0,SlideOut:1};MySpace.UI.Effects.SlideEffect.registerEnum("MySpace.UI.Effects.SlideEffect");MySpace.UI.Effects.SlidingAnimation=function(){MySpace.UI.Effects.SlidingAnimation.initializeBase(this)};MySpace.UI.Effects.SlidingAnimation.prototype={_effect:MySpace.UI.Effects.SlideEffect.SlideIn,get_effect:function(){return this._effect},set_effect:function(A){this._effect=A},initialize:function(){this.get_target().style.overflow="hidden";var A=this.get_target().style.display;this.get_target().style.display="block";this.set_property("style");this.set_propertyKey("height");if(this._effect===MySpace.UI.Effects.SlideEffect.SlideIn){this.set_startValue(MySpace.UI.getContentBox(this.get_target()).h);this.set_endValue(0)}else{this.set_startValue(0);this.set_endValue(MySpace.UI.getContentBox(this.get_target()).h)}this.get_target().style.display=A},onStart:function(){if(this._effect===MySpace.UI.Effects.SlideEffect.SlideOut){this.get_target().style.display="block"}},onEnd:function(){if(this._effect===MySpace.UI.Effects.SlideEffect.SlideIn){this.get_target().style.display="none"}}};MySpace.UI.Effects.SlidingAnimation.registerClass("MySpace.UI.Effects.SlidingAnimation",MySpace.UI.Effects.LengthAnimation);MySpace.UI.AutoCompleteBehavior=function(A){MySpace.UI.AutoCompleteBehavior.initializeBase(this,[A]);this._servicePath=null;this._serviceMethod=null;this._serviceParams=null;this._isJsonpService=false;this._contextKey=null;this._useContextKey=false;this._minimumPrefixLength=3;this._completionItems=null;this._completionInterval=1000;this._completionListWrapperID=null;this._completionListElementID=null;this._completionListAlwaysVisible=false;this._currentPrefix=null;this._selectIndex=-1;this._enableCaching=true;this._enableCacheSubstrings=false;this._flyoutHasFocus=false;this._textBoxHasFocus=false;this._completionListCssClass=null;this._completionListItemCssClass=null;this._completionListFixedHeight=null;this._completionListMaxHeight=200;this._completionListWidth=null;this._lazyLoadPlaceholderHeight=null;this._groupHeaderCssClass=null;this._highlightedItemCssClass=null;this._delimiterCharacters=null;this._firstRowSelected=false;this._showOnlyCurrentWordInCompletionListItem=false;this._webRequest=null};MySpace.UI.AutoCompleteBehavior.prototype={initialize:function(){MySpace.UI.AutoCompleteBehavior.callBaseMethod(this,"initialize");this._popupBehaviorHiddenHandler=Function.createDelegate(this,this._popupHidden);this._tickHandler=Function.createDelegate(this,this._onTimerTick);this._focusHandler=Function.createDelegate(this,this._onGotFocus);this._blurHandler=Function.createDelegate(this,this._onLostFocus);this._keyDownHandler=Function.createDelegate(this,this._onKeyDown);this._mouseDownHandler=Function.createDelegate(this,this._onListMouseDown);this._mouseUpHandler=Function.createDelegate(this,this._onListMouseUp);this._mouseOverHandler=Function.createDelegate(this,this._onListMouseOver);this._mouseOutHandler=Function.createDelegate(this,this._onListMouseOut);this._completionListBlurHandler=Function.createDelegate(this,this._onCompletionListBlur);this._completionListScrollHandler=Function.createDelegate(this,this._drawMissingItems);this._bodyClickHandler=Function.createDelegate(this,this._onBodyClick);this._timer=new MySpace.Timer();this._timer.set_interval(this._completionInterval);this._timer.add_tick(this._tickHandler);var A=this.get_element();this.initializeTextBox(A);if(this._completionListElementID!==null){this._completionListElement=$get(this._completionListElementID)}if(this._completionListElement==null){this._completionListElement=document.createElement("div");this._completionListElement.id=this.get_id()+"_completionListElem";A.parentNode.insertBefore(this._completionListElement,A.nextSibling)}if(this._completionListWrapperID){this._completionListWrapper=$get(this._completionListWrapperID)}else{this._completionListWrapper=this._completionListElement}this.initializeCompletionList();if(this._completionListAlwaysVisible){this._onTimerTick()}else{this._popupBehavior=$create(MySpace.UI.PopupBehavior,{id:this.get_id()+"PopupBehavior",parentElement:A,positioningMode:MySpace.UI.PositioningMode.BottomLeft},null,null,this._completionListWrapper);this._popupBehavior.add_hidden(this._popupBehaviorHiddenHandler);if(this._onShow){this._popupBehavior.set_onShow(this._onShow)}if(this._onHide){this._popupBehavior.set_onHide(this._onHide)}}},dispose:function(){if(this._popupBehavior){if(this._popupBehaviorHiddenHandler){this._popupBehavior.remove_hidden(this._popupBehaviorHiddenHandler)}this._popupBehavior.dispose();this._popupBehavior=null}if(this._timer){this._timer.dispose();this._timer=null}var A=this.get_element();if(A){$removeHandler(A,"focus",this._focusHandler);$removeHandler(A,"blur",this._blurHandler);$removeHandler(A,"keydown",this._keyDownHandler);$removeHandler(this._completionListElement,"blur",this._completionListBlurHandler);$removeHandler(this._completionListElement,"scroll",this._completionListScrollHandler);$removeHandler(this._completionListElement,"mousedown",this._mouseDownHandler);$removeHandler(this._completionListElement,"mouseup",this._mouseUpHandler);$removeHandler(this._completionListElement,"mouseover",this._mouseOverHandler);$removeHandler(this._completionListElement,"mouseout",this._mouseOutHandler)}if(this._bodyClickHandler){$removeHandler(document.body,"click",this._bodyClickHandler);this._bodyClickHandler=null}this._popupBehaviorHiddenHandler=null;this._tickHandler=null;this._focusHandler=null;this._blurHandler=null;this._keyDownHandler=null;this._completionListBlurHandler=null;this._mouseDownHandler=null;this._mouseUpHandler=null;this._mouseOverHandler=null;this._mouseOutHandler=null;MySpace.UI.AutoCompleteBehavior.callBaseMethod(this,"dispose")},initializeTextBox:function(A){A.autocomplete="off";A.setAttribute("autocomplete","off");$addHandler(A,"focus",this._focusHandler);$addHandler(A,"blur",this._blurHandler);$addHandler(A,"keydown",this._keyDownHandler)},initializeCompletionList:function(){var B=this._completionListElement;var D=this._completionListWrapper;var C=B.style;if(this._completionListCssClass){Sys.UI.DomElement.addCssClass(B,this._completionListCssClass)}else{C.textAlign="left";C.overflow="auto";C.overflowX="hidden";C.cursor="default";C.padding="0px";C.margin="0px! important";if(Sys.Browser.agent===Sys.Browser.Safari){C.border="solid 1px gray";C.backgroundColor="white";C.color="black"}else{C.border="solid 1px buttonshadow";C.backgroundColor="window";C.color="windowtext"}if(this._completionListAlwaysVisible){if(this.get_servicePath()){C.background='url("'+MySpace.StaticContentBase+'/modules/common/static/img/loadercircles.gif") center center no-repeat'}}else{D.style.visibility="hidden"}var A=Sys.UI.DomElement.getBounds(this.get_element());this._completionListElement.style.width=(this.get_completionListWidth()||Math.max(1,A.width-2))+"px"}if(this._completionListFixedHeight){C.height=this._completionListFixedHeight+"px"}$addHandler(B,"mousedown",this._mouseDownHandler);$addHandler(B,"mouseup",this._mouseUpHandler);$addHandler(B,"mouseover",this._mouseOverHandler);$addHandler(B,"mouseout",this._mouseOutHandler);$addHandler(B,"blur",this._completionListBlurHandler);$addHandler(B,"scroll",this._completionListScrollHandler);$addHandler(document.body,"click",this._bodyClickHandler)},_currentCompletionWord:function(){var D=this.get_value();var B=D;if(this.get_isMultiWord()){var C=this._getCurrentWordStartIndex();var A=this._getCurrentWordEndIndex(C);if(A<=C){B=D.substring(C)}else{B=D.substring(C,A)}}return B},_getCursorIndex:function(){return this.get_element().selectionStart},_getCurrentWordStartIndex:function(){var D=this.get_value().substring(0,this._getCursorIndex());var A=0;var E=-1;for(var C=0;C<this._delimiterCharacters.length;++C){var B=D.lastIndexOf(this._delimiterCharacters.charAt(C));if(B>E){E=B}}A=E;if(A>=this._getCursorIndex()){A=0}return A<0?0:A+1},_getCurrentWordEndIndex:function(A){var F=this.get_value();var E=F.substring(A);var B=0;for(var D=0;D<this._delimiterCharacters.length;++D){var C=E.indexOf(this._delimiterCharacters.charAt(D));if(C>0&&(C<B||B==0)){B=C}}return B<=0?F.length:B+A},get_isMultiWord:function(){return(this._delimiterCharacters!=null)&&(this._delimiterCharacters!="")},_getTextWithInsertedWord:function(A){var H=A;var G=0;var F=this.get_value();if(this.get_isMultiWord()){var E=this._getCurrentWordStartIndex();var C=this._getCurrentWordEndIndex(E);var B="";var D="";if(E>0){B=F.substring(0,E)}if(C>E){D=F.substring(C)}H=B+A+D}return H},_hideCompletionList:function(){if(!(this._popupBehavior&&this._popupBehavior.get_visible())){return}var A=new Sys.CancelEventArgs();this.raiseHiding(A);if(A.get_cancel()){return}this.hidePopup()},showPopup:function(){if(this._popupBehavior){this._popupBehavior.show();this.raiseShown(Sys.EventArgs.Empty)}},hidePopup:function(){if(this._popupBehavior){this._popupBehavior.hide()}else{this._popupHidden()}},_popupHidden:function(){this._completionListElement.innerHTML="";this._selectIndex=-1;this._flyoutHasFocus=false;this.raiseHidden(Sys.EventArgs.Empty)},_highlightItem:function(C){var B=this._completionListElement.childNodes;for(var A=0;A<B.length;A++){var D=B[A];if(D._highlighted){D._highlighted=false;if(this._completionListItemCssClass){Sys.UI.DomElement.removeCssClass(D,this._highlightedItemCssClass);Sys.UI.DomElement.addCssClass(D,this._completionListItemCssClass)}else{if(Sys.Browser.agent===Sys.Browser.Safari){D.style.backgroundColor="white";D.style.color="black"}else{D.style.backgroundColor="window";D.style.color="windowtext"}}this.raiseItemOut(new MySpace.UI.AutoCompleteItemEventArgs(D,D.firstChild.nodeValue,D._value))}}if(C){if(this._highlightedItemCssClass){Sys.UI.DomElement.removeCssClass(C,this._completionListItemCssClass);Sys.UI.DomElement.addCssClass(C,this._highlightedItemCssClass)}else{if(Sys.Browser.agent===Sys.Browser.Safari){C.style.backgroundColor="lemonchiffon"}else{C.style.backgroundColor="highlight";C.style.color="highlighttext"}}C._highlighted=true;if(!C._isPlaceholder){this.raiseItemOver(new MySpace.UI.AutoCompleteItemEventArgs(C,C.firstChild.nodeValue,C._value))}}},_onBodyClick:function(A){var B=A.target;while(B){if(B==this._completionListWrapper){return}B=B.parentNode}this._onCompletionListBlur(A)},_onCompletionListBlur:function(A){this._hideCompletionList()},_getCompletionItem:function(A){while(A){if(A.parentNode==this._completionListElement&&!A._isGroupHeader){return A}A=A.parentNode}},_onListMouseDown:function(B){var A=this._getCompletionItem(B.target);if(A){this._setText(A);this._flyoutHasFocus=false;B.stopPropagation()}else{this._flyoutHasFocus=true}},_onListMouseUp:function(A){if(!this._flyoutHasFocus){try{this.get_element().focus()}catch(B){}}},_onListMouseOver:function(B){var A=B.target;if(A!==this._completionListElement){A=this._getCompletionItem(A);if(A){this._highlightItem(A);this._selectIndex=Array.indexOf(A.parentNode.childNodes,A)}}},_onListMouseOut:function(B){if(B.target==this._completionListElement){this._highlightItem(null)}else{var A=this._getCompletionItem(B.target);if(A&&A._highlighted){this._highlightItem(null)}}},_onGotFocus:function(A){this._textBoxHasFocus=true;if(this._flyoutHasFocus){this._hideCompletionList()}if((this._minimumPrefixLength==0)&&(!this.get_value())){this._timer.set_enabled(true)}},_onKeyDown:function(C){this._timer.set_enabled(false);var A=C.keyCode?C.keyCode:C.rawEvent.keyCode;if(A===Sys.UI.Key.esc){if(this._popupBehavior&&this._popupBehavior.get_visible()){this._hideCompletionList();C.preventDefault();C.stopPropagation()}}else{if(A===Sys.UI.Key.up){var B=this._getAdjacentItemIndex(this._selectIndex,-1);if(B>=0){this._selectIndex=B;this._handleScroll(this._completionListElement.childNodes[B],B);this._highlightItem(this._completionListElement.childNodes[B]);C.stopPropagation();C.preventDefault()}}else{if(A===Sys.UI.Key.down){var B=this._getAdjacentItemIndex(this._selectIndex,1);if(B<this._completionListElement.childNodes.length){this._selectIndex=B;this._handleScroll(this._completionListElement.childNodes[B],B);this._highlightItem(this._completionListElement.childNodes[B]);C.stopPropagation();C.preventDefault()}}else{if(A===Sys.UI.Key.enter){if(this._selectIndex!==-1){this._setText(this._completionListElement.childNodes[this._selectIndex]);C.preventDefault();C.stopPropagation()}else{this.hidePopup()}}else{if(A===Sys.UI.Key.tab){if(this._selectIndex!==-1){this._setText(this._completionListElement.childNodes[this._selectIndex])}}else{this._timer.set_enabled(true)}}}}}},_getAdjacentItemIndex:function(A,C){var B=this._completionListElement.childNodes;do{A+=C}while(A>=0&&A<B.length&&B[A]._isGroupHeader);return A},_handleScroll:function(F,E){var C=this._completionListElement,B=F.offsetHeight||0,G=F.offsetParent==C,H=G?0:C.offsetTop;var A=F.offsetTop-H+B-C.scrollTop-C.offsetHeight;if(A>0){C.scrollTop+=A}var D=C.scrollTop-F.offsetTop+H;if(D>0){C.scrollTop-=D}},_handleFlyoutFocus:function(){if(!this._textBoxHasFocus){if(!this._flyoutHasFocus){if(this._webRequest){this._webRequest.get_executor().abort();this._webRequest=null}this._hideCompletionList()}else{}}},_onLostFocus:function(){this._textBoxHasFocus=false;this._timer.set_enabled(false);window.setTimeout(Function.createDelegate(this,this._handleFlyoutFocus),500)},_onMethodComplete:function(A,B){this._webRequest=null;if(this._completionListElement){this._completionListElement.style.backgroundImage=""}this._update(B,A,true)},_onMethodFailed:function(C,A,B){this._webRequest=null},_onTimerTick:function(D,C){this._timer.set_enabled(false);var E=this._currentCompletionWord();if(E.trim().length<this._minimumPrefixLength){this._currentPrefix=null;this._update("",null,false);return}var A=(!this._popupBehavior||this._popupBehavior.get_visible());if((this._currentPrefix!==E||!A)||((E=="")&&(this._minimumPrefixLength==0)&&!this._webRequest)){this._currentPrefix=E;if(this._cache){var B=this._getCachedItems(E);if(B){this._update(E,B,false);return}}var C=new Sys.CancelEventArgs();this.raisePopulating(C);if(C.get_cancel()){return}this._fetchCompletionItems(E)}},_getCachedItems:function(B){if(!this._cache){return null}if(this._cache[B]){return this._cache[B]}if(this.get_enableCacheSubstrings()){for(var A in this._cache){if(B.startsWith(A)){this._completionItems=this._cache[A];return this.getCompletionItems(B)}}}return null},_fetchCompletionItems:function(C){if(this._servicePath&&(this._isJsonpService||this._serviceMethod)){var D={prefixText:this._currentPrefix};if(this._serviceParams){for(var A in this._serviceParams){D[A]=this._serviceParams[A]}}if(this._useContextKey){D.contextKey=this._contextKey}if(this._isJsonpService){MySpace.Net.JsonpWebServiceProxy.invoke(this.get_servicePath(),D,Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodFailed),null,C)}else{if(this._webRequest){this._webRequest.get_executor().abort();this._webRequest=null}this._webRequest=Sys.Net.WebServiceProxy.invoke(this.get_servicePath(),this.get_serviceMethod(),false,D,Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodFailed),C)}}else{var B=this.getCompletionItems(C);if(B){this._update(C,B)}}},getCompletionItems:function(D){D=D.toLowerCase();var C=[];for(var A=0;A<this._completionItems.length;A++){var B=this._completionItems[A];if((B.text||B).toLowerCase().startsWith(D)){C.push(this._completionItems[A])}}return C},_setText:function(A){var C=null;if(A){C=A._text||(A.firstChild?A.firstChild.nodeValue:null)}this._timer.set_enabled(false);var B=this._showOnlyCurrentWordInCompletionListItem?this._getTextWithInsertedWord(C):C;this.set_value(B,true);this.raiseItemSelected(new MySpace.UI.AutoCompleteItemEventArgs(A,C,A?A._value:null));this._currentPrefix=this._currentCompletionWord();this._hideCompletionList()},_update:function(E,H,J){if(J&&this.get_enableCaching()){if(!this._cache){this._cache={}}this._cache[E]=H}this._currentCompletionItems=H;if((!this._completionListAlwaysVisible&&!this._textBoxHasFocus)||(E!=this._currentCompletionWord())){this._hideCompletionList();return}if(this._completionListAlwaysVisible||(H&&H.length)){this._completionListElement.innerHTML="";this._selectIndex=-1;var L=null,K=null,I=null,C=null,B=this._lazyLoadPlaceholderHeight;for(var D=0;D<H.length;D++){if(H[D]&&H[D].groupHeader){C=this.createGroupHeader(H[D])}else{if(B){C=document.createElement("div");C.style.height=B+"px";C._isPlaceholder=true}else{C=this.createCompletionItem(H[D]);if(L==null){L=C}}}this._completionListElement.appendChild(C)}var G=Sys.UI.DomElement.getBounds(this.get_element());this._completionListElement.style.width=(this.get_completionListWidth()||Math.max(1,G.width-2))+"px";var F=new Sys.EventArgs();F.completionItems=H;this.raisePopulated(F);var A=new Sys.CancelEventArgs();this.raiseShowing(A);if(!A.get_cancel()){if(!this._completionListFixedHeight){this._completionListElement.style.height="1px"}this.showPopup();if(!this._completionListFixedHeight){this._completionListElement.style.height="";if(this._completionListElement.offsetHeight>this._completionListMaxHeight){this._completionListElement.style.height=this._completionListMaxHeight+"px"}}this._completionListElement.scrollTop=0;if(this._firstRowSelected&&(L!=null)){this._highlightItem(L);this._selectIndex=0}this._drawMissingItems()}}else{this._hideCompletionList()}},_drawMissingItems:function(){var F=this._completionListElement,D=F.childNodes[0]&&(F.childNodes[0].offsetParent==F),E=D?0:F.offsetTop,I=E+F.scrollTop-4*this._lazyLoadPlaceholderHeight,G=I+F.offsetHeight+8*this._lazyLoadPlaceholderHeight,H=F.childNodes.length,A=null;for(var C=0;C<H;C++){A=F.childNodes[C];if(A.offsetTop<I){continue}if(A.offsetTop>G){break}if(A._isPlaceholder){var B=this.createCompletionItem(this._currentCompletionItems[C]);F.replaceChild(B,A);if(this._selectIndex==-1&&this._firstRowSelected){this._highlightItem(B);this._selectIndex=C}}}},createCompletionItem:function(C){var B=document.createElement("div");var E,D;if(C&&C.text){E=C.text;D=C.value}else{E=C;D=C}var F=this._showOnlyCurrentWordInCompletionListItem?E:this._getTextWithInsertedWord(E);B.innerHTML=F;B._value=D;if(this._completionListItemCssClass){Sys.UI.DomElement.addCssClass(B,this._completionListItemCssClass)}else{var A=B.style;A.padding="0px";A.textAlign="left";A.textOverflow="ellipsis";A.cursor="pointer";if(Sys.Browser.agent===Sys.Browser.Safari){A.backgroundColor="white";A.color="black"}else{A.backgroundColor="window";A.color="windowtext"}}return B},createGroupHeader:function(C){var B=document.createElement("div");B.appendChild(document.createTextNode(C.groupHeader));B._isGroupHeader=true;if(this._groupHeaderCssClass){Sys.UI.DomElement.addCssClass(B,this._groupHeaderCssClass)}else{var A=B.style;A.fontWeight="bold";A.fontStyle="italic"}return B},get_value:function(){var B=this.get_element();var A=Sys.UI.Behavior.getBehaviorByName(B,"DefaultTextboxBehavior");return A?A.get_value():B.value},set_value:function(D,C){var B=this.get_element();var A=Sys.UI.Behavior.getBehaviorByName(B,"DefaultTextboxBehavior");if(A){A.set_value(D)}else{B.value=D||""}if(!C){this._onTimerTick()}},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShow},set_onShow:function(A){if(this._popupBehavior){this._popupBehavior.set_onShow(A)}else{this._onShow=A}},onShow:function(){if(this._popupBehavior){this._popupBehavior.onShow()}},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHide},set_onHide:function(A){if(this._popupBehavior){this._popupBehavior.set_onHide(A)}else{this._onHide=A}},onHide:function(){if(this._popupBehavior){this._popupBehavior.onHide()}},get_visible:function(){return this._popupBehavior&&this._popupBehavior.get_visible()},get_completionItems:function(){return this._completionItems},set_completionItems:function(A){this._completionItems=A},get_completionInterval:function(){return this._completionInterval},set_completionInterval:function(A){this._completionInterval=A},get_completionList:function(){return this._completionListElement},set_completionList:function(A){this._completionListElement=A},get_minimumPrefixLength:function(){return this._minimumPrefixLength},set_minimumPrefixLength:function(A){this._minimumPrefixLength=A},get_serviceMethod:function(){return this._serviceMethod},set_serviceMethod:function(A){this._serviceMethod=A},get_servicePath:function(){return this._servicePath},set_servicePath:function(A){this._servicePath=A},get_serviceParams:function(){return this._serviceParams},set_serviceParams:function(A){this._serviceParams=A},get_isJsonpService:function(){return this._isJsonpService},set_isJsonpService:function(A){this._isJsonpService=A},get_contextKey:function(){return this._contextKey},set_contextKey:function(A){this._contextKey=A;this.set_useContextKey(true)},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(A){this._useContextKey=A},get_enableCaching:function(){return this._enableCaching},set_enableCaching:function(A){this._enableCaching=A},get_enableCacheSubstrings:function(){return this._enableCacheSubstrings},set_enableCacheSubstrings:function(A){this._enableCacheSubstrings=A},get_completionListWrapperID:function(){return this._completionListWrapperID},set_completionListWrapperID:function(A){this._completionListWrapperID=A},get_completionListElementID:function(){return this._completionListElementID},set_completionListElementID:function(A){this._completionListElementID=A},get_completionListAlwaysVisible:function(){return this._completionListAlwaysVisible},set_completionListAlwaysVisible:function(A){this._completionListAlwaysVisible=A},get_completionListCssClass:function(){return this._completionListCssClass},set_completionListCssClass:function(A){this._completionListCssClass=A},get_completionListItemCssClass:function(){return this._completionListItemCssClass},set_completionListItemCssClass:function(A){this._completionListItemCssClass=A},get_completionListFixedHeight:function(){return this._completionListFixedHeight},set_completionListFixedHeight:function(A){this._completionListFixedHeight=A},get_completionListMaxHeight:function(){return this._completionListMaxHeight},set_completionListMaxHeight:function(A){this._completionListMaxHeight=A},get_completionListWidth:function(){return this._completionListWidth},set_completionListWidth:function(A){this._completionListWidth=A},get_lazyLoadPlaceholderHeight:function(){return this._lazyLoadPlaceholderHeight},set_lazyLoadPlaceholderHeight:function(A){this._lazyLoadPlaceholderHeight=A},get_groupHeaderCssClass:function(){return this._groupHeaderCssClass},set_groupHeaderCssClass:function(A){this._groupHeaderCssClass=A},get_highlightedItemCssClass:function(){return this._highlightedItemCssClass},set_highlightedItemCssClass:function(A){this._highlightedItemCssClass=A},get_delimiterCharacters:function(){return this._delimiterCharacters},set_delimiterCharacters:function(A){this._delimiterCharacters=A},get_firstRowSelected:function(){return this._firstRowSelected},set_firstRowSelected:function(A){this._firstRowSelected=A},get_showOnlyCurrentWordInCompletionListItem:function(){return this._showOnlyCurrentWordInCompletionListItem},set_showOnlyCurrentWordInCompletionListItem:function(A){this._showOnlyCurrentWordInCompletionListItem=A},add_populating:function(A){this.get_events().addHandler("populating",A)},remove_populating:function(A){this.get_events().removeHandler("populating",A)},raisePopulating:function(A){var B=this.get_events().getHandler("populating");if(B){B(this,A)}},add_populated:function(A){this.get_events().addHandler("populated",A)},remove_populated:function(A){this.get_events().removeHandler("populated",A)},raisePopulated:function(A){var B=this.get_events().getHandler("populated");if(B){B(this,A)}},add_showing:function(A){this.get_events().addHandler("showing",A)},remove_showing:function(A){this.get_events().removeHandler("showing",A)},raiseShowing:function(A){var B=this.get_events().getHandler("showing");if(B){B(this,A)}},add_shown:function(A){this.get_events().addHandler("shown",A)},remove_shown:function(A){this.get_events().removeHandler("shown",A)},raiseShown:function(A){var B=this.get_events().getHandler("shown");if(B){B(this,A)}},add_hiding:function(A){this.get_events().addHandler("hiding",A)},remove_hiding:function(A){this.get_events().removeHandler("hiding",A)},raiseHiding:function(A){var B=this.get_events().getHandler("hiding");if(B){B(this,A)}},add_hidden:function(A){this.get_events().addHandler("hidden",A)},remove_hidden:function(A){this.get_events().removeHandler("hidden",A)},raiseHidden:function(A){var B=this.get_events().getHandler("hidden");if(B){B(this,A)}},add_itemSelected:function(A){this.get_events().addHandler("itemSelected",A)},remove_itemSelected:function(A){this.get_events().removeHandler("itemSelected",A)},raiseItemSelected:function(A){var B=this.get_events().getHandler("itemSelected");if(B){B(this,A)}},add_itemOver:function(A){this.get_events().addHandler("itemOver",A)},remove_itemOver:function(A){this.get_events().removeHandler("itemOver",A)},raiseItemOver:function(A){var B=this.get_events().getHandler("itemOver");if(B){B(this,A)}},add_itemOut:function(A){this.get_events().addHandler("itemOut",A)},remove_itemOut:function(A){this.get_events().removeHandler("itemOut",A)},raiseItemOut:function(A){var B=this.get_events().getHandler("itemOut");if(B){B(this,A)}}};MySpace.UI.AutoCompleteBehavior.registerClass("MySpace.UI.AutoCompleteBehavior",Sys.UI.Behavior);MySpace.UI.AutoCompleteItemEventArgs=function(A,C,B){MySpace.UI.AutoCompleteItemEventArgs.initializeBase(this);this._item=A;this._text=C;this._value=(B!==undefined)?B:null};MySpace.UI.AutoCompleteItemEventArgs.prototype={get_item:function(){return this._item},set_item:function(A){this._item=A},get_text:function(){return this._text},set_text:function(A){this._text=A},get_value:function(){return this._value},set_value:function(A){this._value=A}};MySpace.UI.AutoCompleteItemEventArgs.registerClass("MySpace.UI.AutoCompleteItemEventArgs",Sys.EventArgs);MySpace.UI.ComboBoxBehavior=function(A){MySpace.UI.ComboBoxBehavior.initializeBase(this,[A]);this._lazyLoadPlaceholderHeight=13};MySpace.UI.ComboBoxBehavior.prototype={initialize:function(){MySpace.UI.ComboBoxBehavior.callBaseMethod(this,"initialize");var A=this.get_element();var B=A.nextSibling;Sys.UI.DomElement.addCssClass(A,"msComboBox");if(B&&Sys.UI.DomElement.containsCssClass(B,"msComboBoxArrow")){this._arrowNode=B}else{B=this._arrowNode=document.createElement("img");B.src="http://x.myspacecdn.com/modules/common/static/img/spacer.gif";B.className="msComboBoxArrow";B.style.height=(A.offsetHeight-2)+"px";if(navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1){Sys.UI.DomElement.addCssClass(B,"msComboBoxArrowSafari")}if(A.nextSibling){A.parentNode.insertBefore(B,A.nextSibling)}else{A.parentNode.appendChild(B)}}$addHandler(B,"click",Function.createDelegate(this,this._toggleComboBoxList))},_toggleComboBoxList:function(A){if(this._popupBehavior&&this._popupBehavior.get_visible()){this.hidePopup()}else{this._textBoxHasFocus=true;this._showingFullList=true;this._fetchCompletionItems("");this._showingFullList=false}A.stopPropagation()},_onKeyDown:function(B){var A=B.keyCode?B.keyCode:B.rawEvent.keyCode;if(A==Sys.UI.Key.down&&this._popupBehavior&&!this._popupBehavior.get_visible()){this._toggleComboBoxList(B)}else{MySpace.UI.ComboBoxBehavior.callBaseMethod(this,"_onKeyDown",arguments)}},_currentCompletionWord:function(){if(this._showingFullList){return""}else{return MySpace.UI.ComboBoxBehavior.callBaseMethod(this,"_currentCompletionWord")}},get_completionListWidth:function(){var A=Sys.UI.DomElement.getBounds(this.get_element());return A.width+(this._arrowNode?this._arrowNode.offsetWidth:0)-2}};MySpace.UI.ComboBoxBehavior.registerClass("MySpace.UI.ComboBoxBehavior",MySpace.UI.AutoCompleteBehavior);MySpace.UI._DragDropManager=function(){};MySpace.UI._DragDropManager.prototype={_instance:null,_events:null,add_dragStart:function(A){this.get_events().addHandler("dragStart",A)},remove_dragStart:function(A){this.get_events().removeHandler("dragStart",A)},get_events:function(){if(!this._events){this._events=new Sys.EventHandlerList}return this._events},add_dragStop:function(A){this.get_events().addHandler("dragStop",A)},remove_dragStop:function(A){this.get_events().removeHandler("dragStop",A)},add_afterDragStart:function(A){this.get_events().addHandler("afterDragStart",A)},remove_afterDragStart:function(A){this.get_events().removeHandler("afterDragStart",A)},_getInstance:function(){if(!this._instance){this._instance=new MySpace.UI.GenericDragDropManager;this._instance.initialize();this._instance.add_dragStart(Function.createDelegate(this,this._raiseDragStart));this._instance.add_dragStop(Function.createDelegate(this,this._raiseDragStop))}return this._instance},afterDragStart:function(){this._getInstance().afterDragStart()},startDragDrop:function(A,C,B){this._getInstance().startDragDrop(A,C,B)},registerDropTarget:function(A){this._getInstance().registerDropTarget(A)},unregisterDropTarget:function(A){this._getInstance().unregisterDropTarget(A)},dispose:function(){delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this)},_raiseDragStart:function(B,A){var C=this.get_events().getHandler("dragStart");if(C){C(this,A)}},_raiseDragStop:function(B,A){var C=this.get_events().getHandler("dragStop");if(C){C(this,A)}}};MySpace.UI._DragDropManager.registerClass("MySpace.UI._DragDropManager");MySpace.UI.DragDropManager=new MySpace.UI._DragDropManager;MySpace.UI.DragDropEventArgs=function(C,A,B){this._dragMode=C;this._dataType=A;this._data=B};MySpace.UI.DragDropEventArgs.prototype={get_dragMode:function(){return this._dragMode||null},get_dragDataType:function(){return this._dataType||null},get_dragData:function(){return this._data||null}};MySpace.UI.DragDropEventArgs.registerClass("MySpace.UI.DragDropEventArgs");MySpace.UI.IDragSource=function(){};MySpace.UI.IDragSource.prototype={get_dragDataType:function(){throw Error.notImplemented()},getDragData:function(){throw Error.notImplemented()},get_dragMode:function(){throw Error.notImplemented()},onDragStart:function(){throw Error.notImplemented()},onDrag:function(){throw Error.notImplemented()},onDragEnd:function(){throw Error.notImplemented()}};MySpace.UI.IDragSource.registerInterface("MySpace.UI.IDragSource");MySpace.UI.IDropTarget=function(){};MySpace.UI.IDropTarget.prototype={get_dropTargetElement:function(){throw Error.notImplemented()},canDrop:function(){throw Error.notImplemented()},drop:function(){throw Error.notImplemented()},onDragEnterTarget:function(){throw Error.notImplemented()},onDragLeaveTarget:function(){throw Error.notImplemented()},onDragInTarget:function(){throw Error.notImplemented()}};MySpace.UI.IDropTarget.registerInterface("MySpace.UI.IDropTarget");MySpace.UI.DragMode=function(){throw Error.invalidOperation()};MySpace.UI.DragMode.prototype={Copy:0,Move:1};MySpace.UI.DragMode.registerEnum("MySpace.UI.DragMode");MySpace.UI.GenericDragDropManager=function(){MySpace.UI.GenericDragDropManager.initializeBase(this)};MySpace.UI.GenericDragDropManager.prototype={_dropTargets:null,_radius:10,_activeDragVisual:null,_activeContext:null,_activeDragSource:null,_underlyingTarget:null,_oldOffset:null,_potentialTarget:null,_isDragging:false,_mouseUpHandler:null,_mouseMoveHandler:null,_scrollEdgeConst:40,_scrollByConst:10,_scroller:null,_scrollDeltaX:null,_scrollDeltaY:null,_keyPressHandler:null,add_dragStart:function(A){this.get_events().addHandler("dragStart",A)},remove_dragStart:function(A){this.get_events().removeHandler("dragStart",A)},add_dragStop:function(A){this.get_events().addHandler("dragStop",A)},remove_dragStop:function(A){this.get_events().removeHandler("dragStop",A)},add_afterDragStart:function(A){this.get_events().addHandler("afterDragStart",A)},remove_afterDragStart:function(A){this.get_events().removeHandler("afterDragStart",A)},initialize:function(){MySpace.UI.GenericDragDropManager.callBaseMethod(this,"initialize");this._mouseUpHandler=Function.createDelegate(this,this.mouseUpHandler);this._mouseMoveHandler=Function.createDelegate(this,this.mouseMoveHandler);this._keyPressHandler=Function.createDelegate(this,this.keyPressHandler);this._scroller=new MySpace.Timer;this._scroller.set_interval(10);this._scroller.add_tick(Function.createDelegate(this,this.scrollerTickHandler))},dispose:function(){if(this._dropTargets){for(var A=0;A<this._dropTargets;A++){this.unregisterDropTarget(this._dropTargets[A])}this._dropTargets=null}MySpace.UI.GenericDragDropManager.callBaseMethod(this,"dispose")},afterDragStart:function(){},startDragDrop:function(C,A,B){this._activeDragSource=C;this._activeDragVisual=A;this._activeContext=B;var F=window._event;if(this._isDragging){return}this._underlyingTarget=null;var H={x:F.clientX,y:F.clientY};A.originalPosition=A.style.position;A.style.position="absolute";document._lastPosition=H;A.startingPoint=H;var E=this.getScrollOffset(A,true);A.startingPoint=this.addPoints(A.startingPoint,E);if(A.style.position=="absolute"){A.startingPoint=this.subtractPoints(A.startingPoint,Sys.UI.DomElement.getLocation(A))}else{var J=parseInt(A.style.left),I=parseInt(A.style.top);if(isNaN(J)){J="0"}if(isNaN(I)){I="0"}A.startingPoint=this.subtractPoints(A.startingPoint,{x:J,y:I})}this._prepareForDomChanges();C.onDragStart();var D=new MySpace.UI.DragDropEventArgs(C.get_dragMode(),C.get_dragDataType(),C.getDragData(B)),G=this.get_events().getHandler("dragStart");if(G){G(this,D)}this._recoverFromDomChanges();this._wireEvents();this._drag(true);var K=this.get_events().getHandler("afterDragStart");if(K){K(this)}},_stopDragDrop:function(B){this._scroller.set_enabled(false);var C=window._event;if(this._activeDragSource){this._unwireEvents();if(!B){B=this._underlyingTarget==null}if(!B&&this._underlyingTarget){this._underlyingTarget.drop(this._activeDragSource.get_dragMode(),this._activeDragSource.get_dragDataType(),this._activeDragSource.getDragData(this._activeContext))}this._activeDragSource.onDragEnd(B);var A=this.get_events().getHandler("dragStop");if(A){A(this,Sys.EventArgs.Empty)}this._activeDragVisual.style.position=this._activeDragVisual.originalPosition;this._activeDragSource=null;this._activeContext=null;this._activeDragVisual=null;this._isDragging=false;this._potentialTarget=null;C.preventDefault()}},_drag:function(C){var F=window._event,G={x:F.clientX,y:F.clientY};document._lastPosition=G;var E=this.getScrollOffset(this._activeDragVisual,true),B=this.addPoints(this.subtractPoints(G,this._activeDragVisual.startingPoint),E);var D=Sys.UI.DomElement.getBounds(this._activeDragVisual);if(B.x<0){B.x=0}else{if(B.x+D.width>document.body.offsetWidth){B.x=document.body.offsetWidth-D.width}}if(B.y<0){B.y=0}if(!C&&parseInt(this._activeDragVisual.style.left)==B.x&&parseInt(this._activeDragVisual.style.top)==B.y){return}Sys.UI.DomElement.setLocation(this._activeDragVisual,B.x,B.y);this._prepareForDomChanges();this._activeDragSource.onDrag();this._recoverFromDomChanges();this._potentialTarget=this._findPotentialTarget(this._activeDragSource,this._activeDragVisual);var A=this._potentialTarget!=this._underlyingTarget||this._potentialTarget==null;if(A&&this._underlyingTarget!=null){this._leaveTarget(this._activeDragSource,this._underlyingTarget)}if(this._potentialTarget!=null){if(A){this._underlyingTarget=this._potentialTarget;this._enterTarget(this._activeDragSource,this._underlyingTarget)}else{this._moveInTarget(this._activeDragSource,this._underlyingTarget)}}else{this._underlyingTarget=null}this._autoScroll()},_wireEvents:function(){Sys.UI.DomEvent.addHandler(document,"mouseup",this._mouseUpHandler);Sys.UI.DomEvent.addHandler(document,"mousemove",this._mouseMoveHandler);Sys.UI.DomEvent.addHandler(document,"keypress",this._keyPressHandler)},_unwireEvents:function(){Sys.UI.DomEvent.removeHandler(document,"keypress",this._keyPressHandler);Sys.UI.DomEvent.removeHandler(document,"mousemove",this._mouseMoveHandler);Sys.UI.DomEvent.removeHandler(document,"mouseup",this._mouseUpHandler)},registerDropTarget:function(A){if(!this._dropTargets){this._dropTargets=[]}Array.add(this._dropTargets,A)},unregisterDropTarget:function(A){if(this._dropTargets){Array.remove(this._dropTargets,A)}},mouseUpHandler:function(A){window._event=A;this._stopDragDrop(false)},mouseMoveHandler:function(A){window._event=A;this._drag()},keyPressHandler:function(B){window._event=B;var A=B.keyCode?B.keyCode:B.rawEvent.keyCode;if(A==27){this._stopDragDrop(true)}},_autoScroll:function(){var A=window._event,B=this.getBrowserRectangle();if(B.width>0){this._scrollDeltaX=this._scrollDeltaY=0;if(A.clientX<B.x+this._scrollEdgeConst){this._scrollDeltaX=-this._scrollByConst}else{if(A.clientX>B.width-this._scrollEdgeConst){this._scrollDeltaX=this._scrollByConst}}if(A.clientY<B.y+this._scrollEdgeConst){this._scrollDeltaY=-this._scrollByConst}else{if(A.clientY>B.height-this._scrollEdgeConst){this._scrollDeltaY=this._scrollByConst}}if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){this._scroller.set_enabled(true)}else{this._scroller.set_enabled(false)}}},scrollerTickHandler:function(){var D=document.body.scrollLeft,B=document.body.scrollTop;var A=this.getBrowserRectangle();var H=(document.documentElement.scrollTop+A.height+this._scrollEdgeConst)<document.body.offsetHeight;var I=(document.documentElement.scrollLeft+A.width+this._scrollEdgeConst)<document.body.offsetWidth;window.scrollBy(I?this._scrollDeltaX:0,H?this._scrollDeltaY:0);var E=document.body.scrollLeft,C=document.body.scrollTop,G=this._activeDragVisual,F={x:parseInt(G.style.left)+(E-D),y:parseInt(G.style.top)+(C-B)};Sys.UI.DomElement.setLocation(G,F.x,F.y)},_getDropTarget:function(A){while(A){if(A._dropTarget!=null){return A._dropTarget}A=A.parentNode}return null},_dragDrop:function(){if(this._isDragging){return}this._isDragging=true;this._activeDragVisual.dragDrop();document.selection.empty()},_moveInTarget:function(A,B){this._prepareForDomChanges();B.onDragInTarget(A.get_dragMode(),A.get_dragDataType(),A.getDragData(this._activeContext));this._recoverFromDomChanges()},_enterTarget:function(A,B){this._prepareForDomChanges();B.onDragEnterTarget(A.get_dragMode(),A.get_dragDataType(),A.getDragData(this._activeContext));this._recoverFromDomChanges()},_leaveTarget:function(A,B){this._prepareForDomChanges();B.onDragLeaveTarget(A.get_dragMode(),A.get_dragDataType(),A.getDragData(this._activeContext));this._recoverFromDomChanges()},_findPotentialTarget:function(A){var K=window._event;if(!this._dropTargets){return null}var D=A.get_dragDataType(),E=A.get_dragMode(),F=A.getDragData(this._activeContext),M=this.getScrollOffset(document.body,true),C=K.clientX+M.x,B=K.clientY+M.y,J={x:C-this._radius,y:B-this._radius,width:this._radius*2,height:this._radius*2};for(var N=0;N<this._dropTargets.length;N++){var O=this._dropTargets[N],G=O.canDrop(E,D,F);if(!G){continue}var L=O.get_dropTargetElement(),I=Sys.UI.DomElement.getBounds(L),H=Sys.UI.Control.overlaps(J,I);if(H||L===document.body){return O}}return null},_prepareForDomChanges:function(){this._oldOffset=Sys.UI.DomElement.getLocation(this._activeDragVisual)},_recoverFromDomChanges:function(){var B=Sys.UI.DomElement.getLocation(this._activeDragVisual);if(this._oldOffset.x!=B.x||this._oldOffset.y!=B.y){this._activeDragVisual.startingPoint=this.subtractPoints(this._activeDragVisual.startingPoint,this.subtractPoints(this._oldOffset,B));scrollOffset=this.getScrollOffset(this._activeDragVisual,true);var A=this.addPoints(this.subtractPoints(document._lastPosition,this._activeDragVisual.startingPoint),scrollOffset);Sys.UI.DomElement.setLocation(this._activeDragVisual,A.x,A.y)}},addPoints:function(B,A){return{x:B.x+A.x,y:B.y+A.y}},subtractPoints:function(B,A){return{x:B.x-A.x,y:B.y-A.y}},getScrollOffset:function(C,B){var E=C.scrollLeft,D=C.scrollTop;if(B){var A=C.parentNode;while(A!=null&&A.scrollLeft!=null){E+=A.scrollLeft;D+=A.scrollTop;if(A==document.body&&(E!=0&&D!=0)){break}A=A.parentNode}}return{x:E,y:D}},getBrowserRectangle:function(){return{x:0,y:0,width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}},getNextSibling:function(A){for(A=A.nextSibling;A!=null;A=A.nextSibling){if(A.innerHTML!=null){return A}}return null},hasParent:function(A){return A.parentNode!=null&&A.parentNode.tagName!=null}};MySpace.UI.GenericDragDropManager.registerClass("MySpace.UI.GenericDragDropManager",Sys.Component);MySpace.UI.FriendSelector=function(A){MySpace.UI.FriendSelector.initializeBase(this,[A]);this._minimumPrefixLength=1;this._lazyLoadPlaceholderHeight=25;this._firstRowSelected=true;this._completionInterval=300;this._completionListItemCssClass="friendSelectItem";this._highlightedItemCssClass="friendSelectItem friendSelectHighlighted";this._groupHeaderCssClass="friendSelectHeader";this._showUserImg=true;this._showUserName=true;this._showRealName=true;this._showSelectedUserImg=true;this._selectedFriend=null;this._enableCaching=true;this._enableCacheSubstrings=true};MySpace.UI.FriendSelector.prototype={initialize:function(){MySpace.UI.FriendSelector.callBaseMethod(this,"initialize");this.addStyles();var C=this.get_element();var E=this.wrapperDiv=document.createElement("div");var B=C.offsetWidth;E.style.width=B+"px";E.className="friendSelect";this._selectedNode=document.createElement("div");this._selectedNode.className="selected";E.appendChild(this._selectedNode);if(this.get_showSelectedUserImg()){this._selectedImage=document.createElement("img");this._selectedNode.appendChild(this._selectedImage)}this._selectedDisplayNameNode=document.createElement("div");this._selectedDisplayNameNode.className="displayName";this._selectedNode.appendChild(this._selectedDisplayNameNode);var A=document.createElement("div");A.className="close";$addHandler(A,"click",Function.createDelegate(this,this._clearSelection));this._selectedNode.appendChild(A);var D=document.createElement("div");D.style.clear="both";this._selectedNode.appendChild(D);C.parentNode.replaceChild(E,this.get_element());C.style.width=(B-2)+"px";E.appendChild(C);if(this._popupBehavior){this._popupBehavior.set_parentElement(E)}},addStyles:function(){MySpace.UI.addStyles(".friendSelect { padding:1px; background:#fff; border:1px solid #A5ACB2; width:200px; }.friendSelect input { border:none; width:100%; margin:-1px 0 0; padding-top:1px; }.friendSelect .selected { display:none; background:#BCD2E9; font-weight:bold; width:80% }.friendSelect .selected img { float:left; margin:4px 8px 0 4px; height:30px; }.friendSelect .selected .displayName { float:left; height:28px; padding:12px 0 0 4px; }.friendSelect .selected .close { float:right; height:38px; width:32px; cursor:pointer; background:url('http://x.myspacecdn.com/modules/common/static/img/friendSelectorClose.gif') center no-repeat; }.friendSelectHeader { background:#608BC1; color:#FFF; font-weight:bold; padding:2px }.friendSelectItem { padding:2px; border-bottom:1px solid #CCC; cursor:pointer; }.friendSelectItem td { vertical-align:middle; }.friendSelectItem img { width:28px; height:28px; vertical-align:middle; margin-right:3px; }.friendSelectItem .prefix { background-color:#E8F1FA; font-weight:bold; }.friendSelectItem .userName { color:#999; }.friendSelectItem .realName { display:block; }.friendSelectHighlighted { background:#E8F1FA }",true,"FriendSelector")},createCompletionItem:function(D){var C=document.createElement("div");C._value=D;C._text=D.UserId;C.className="friendSelectItem";var A=D.DisplayName?this._highlightPrefix(D.DisplayName):"",E=(this._showUserName&&D.UserName&&D.UserName!=D.UserId)?("("+this._highlightPrefix(D.UserName)+")"):"",B=(this._showRealName&&D.RealName)?this._highlightPrefix(D.RealName):"";var F=this._showUserImg?String.format("<td><img src='{0}'></td>",D.ImageUri):"";C.innerHTML=String.format("<table><tr>{0}<td>{1} <span class='userName'>{2}</span> <span class='realName'>{3}</span></td></tr></table>",F,A,E,B);return C},getCompletionItems:function(E){if(!E){if(this._recentFriends&&this._recentFriends.length){return[].concat([{groupHeader:this._recentFriendsLabel}],this._recentFriends,[{groupHeader:this._allFriendsLabel}],this._completionItems)}else{return this._completionItems}}var D=E.toLowerCase().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");var C=[],B=null;for(var A=0;A<this._completionItems.length;A++){B=this._completionItems[A];if((B.DisplayName&&B.DisplayName.toLowerCase().startsWith(D))||(this._showUserName&&B.UserName&&(B.UserName!=B.UserId)&&B.UserName.toLowerCase().startsWith(D))||(this._showRealName&&B.RealName&&B.RealName.toLowerCase().startsWith(D))){C.push(B)}}return C},addRecentFriend:function(C,A){for(var B=0;B<this._recentFriends.length;B++){if(this._recentFriends[B].UserId==C.UserId){this._recentFriends.splice(B,1);break}}this._recentFriends.unshift(C);this._recentFriends.splice(A||5)},_highlightPrefix:function(A){if(this._currentPrefix&&A.toLowerCase().startsWith(this._currentPrefix.toLowerCase())){return"<span class='prefix'>"+A.substring(0,this._currentPrefix.length)+"</span>"+A.substring(this._currentPrefix.length)}else{return A}},_setText:function(B){var A=B?B._value:null;this._selectedFriend=A;if(A){this.get_element().style.display="none";this.get_element().value=A.UserId;this._selectedNode.style.display="block";if(this.get_showSelectedUserImg()){this._selectedImage.onload=this._onImageLoad;this._selectedImage.style.visibility="hidden";this._selectedImage.src=A.ImageUri}this._selectedDisplayNameNode.innerHTML=A.DisplayName}else{this.set_value("")}this._timer.set_enabled(false);this.raiseItemSelected(new MySpace.UI.AutoCompleteItemEventArgs(B,B?B._text:null,A));this._currentPrefix=this._currentCompletionWord();this._hideCompletionList()},_clearSelection:function(A){this._setText(null);this.get_element().focus()},_onImageLoad:function(A){this.style.height="";if(this.offsetWidth>30){this.style.height=Math.round(30*30/this.offsetWidth)+"px"}this.style.marginTop=(4+(30-this.offsetHeight)/2)+"px";this.style.marginRight=(8+(30-this.offsetWidth))+"px";this.style.visibility="";this.onload=null},selectFriendById:function(B){if(B){for(var A=0;A<this._completionItems.length;A++){if(this._completionItems[A].UserId==B){this._setText({_value:this._completionItems[A]});return}}}this._setText()},set_value:function(A){this.get_element().style.display="";this._selectedNode.style.display="none";this._selectedFriend=null;MySpace.UI.FriendSelector.callBaseMethod(this,"set_value")},get_showUserImg:function(){return this._showUserImg},set_showUserImg:function(A){this._showUserImg=A},get_showUserName:function(){return this._showUserName},set_showUserName:function(A){this._showUserName=A},get_showRealName:function(){return this._showRealName},set_showRealName:function(A){this._showRealName=A},get_showSelectedUserImg:function(){return this._showSelectedUserImg},set_showSelectedUserImg:function(A){this._showSelectedUserImg=A},get_selectedFriend:function(){return this._selectedFriend},get_recentFriends:function(){return this._recentFriends},set_recentFriends:function(A){this._recentFriends=A},get_recentFriendsLabel:function(){return this._recentFriendsLabel},set_recentFriendsLabel:function(A){this._recentFriendsLabel=A},get_allFriendsLabel:function(){return this._allFriendsLabel},set_allFriendsLabel:function(A){this._allFriendsLabel=A},get_useWebService:function(A){return !!this.get_servicePath()},set_useWebService:function(A){this.set_servicePath(A?"/Modules/Common/Services/FriendAutocomplete.asmx":null);this.set_serviceMethod(A?"GetFriends":null)},get_completionListWidth:function(){return this._completionListWidth||(this.wrapperDiv&&Math.max(1,this.wrapperDiv.offsetWidth-2))}};MySpace.UI.FriendSelector.registerClass("MySpace.UI.FriendSelector",MySpace.UI.AutoCompleteBehavior);MySpace.UI.FriendSelector.showPopup=(function(){var B,A,D,E,C;return function(F){E=F;if(B){B.show();A.set_value("");C.focus();return}var G=document.createElement("div");C=document.createElement("input");C.style.width="375px";G.appendChild(C);B=MySpace.UI.Popup.create(G,"");B.set_width(400);B.set_top(50);B.show();A=$create(MySpace.UI.FriendSelector,{useWebService:true,completionListAlwaysVisible:true,completionListFixedHeight:300,minimumPrefixLength:0},{itemSelected:function(I,H){B._hide();if(E){E(H.get_value())}}},null,C);C.focus()}})();MySpace.UI.HistoryEventArgs=function(A){MySpace.UI.HistoryEventArgs.initializeBase(this);this._state=A};MySpace.UI.HistoryEventArgs.prototype={get_state:function(){return this._state}};MySpace.UI.HistoryEventArgs.registerClass("MySpace.UI.HistoryEventArgs",Sys.EventArgs);MySpace.UI._History=function(){MySpace.UI._History.initializeBase(this);this._appLoadHandler=null;this._clientId=null;this._currentEntry="";this._emptyPageUrl=null;this._historyFrame=null;this._historyInitialLength=0;this._historyLength=0;this._iframeLoadHandler=null;this._ignoreIFrame=false;this._ignoreTimer=false;this._historyPointIsNew=false;this._state={};this._timerCookie=0;this._timerHandler=null;this._uniqueId=null};MySpace.UI._History.prototype={get_stateString:function(){var A=decodeURIComponent(window.location.hash||"");if((A.length>0)&&(A.charAt(0)==="#")){A=A.substring(1)}return A},add_navigate:function(A){this.get_events().addHandler("navigate",A)},remove_navigate:function(A){this.get_events().removeHandler("navigate",A)},addHistoryPoint:function(E,F){var A=this._state;for(var B in E){var D=E[B];if(D===null){if(typeof(A[B])!=="undefined"){delete A[B]}}else{A[B]=D}}var C=Sys.Serialization.JavaScriptSerializer.serialize(A);this._ignoreIFrame=true;this._historyPointIsNew=true;this._setState(C,F)},dispose:function(){if(this._appLoadHandler){Sys.Application.remove_load(this._appLoadHandler);delete this._appLoadHandler}if(this._historyFrame){Sys.UI.DomEvent.removeHandler(this._historyFrame,"load",this._iframeLoadHandler);delete this._iframeLoadHandler;delete this._historyFrame}if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}MySpace.UI._History.callBaseMethod(this,"dispose")},initialize:function(){MySpace.UI._History.callBaseMethod(this,"initialize");this._appLoadHandler=Function.createDelegate(this,this._onApplicationLoaded);Sys.Application.add_load(this._appLoadHandler)},setServerId:function(A,B){this._clientId=A;this._uniqueId=B},setServerState:function(A){this._state.__s=A},_navigate:function(B){var C={};if(B){try{C=Sys.Serialization.JavaScriptSerializer.deserialize(B,true)}catch(D){}}if(this._uniqueId){var A=this._state.__s||"";var E=C.__s||"";if(E!==A){__doPostBack(this._uniqueId,E);this._state=C;return}}this._setState(B);this._state=C;this._raiseNavigate()},_onApplicationLoaded:function(B,A){Sys.Application.remove_load(this._appLoadHandler);delete this._appLoadHandler;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var C="__historyFrame";var F=$get(C);if(!F){throw Error.invalidOperation("For the history feature to work in IE, the page must have an iframe with id '__historyFrame' and src set to point to a page that sets its title to the 'title' querystring parameter when loaded.")}var E=F.src;this._emptyPageUrl=E+(E.indexOf("?")===-1?"?":"&")+"_state=";this._historyFrame=F;if(F.readyState==="loading"){this._ignoreIFrame=true}this._iframeLoadHandler=Function.createDelegate(this,this._onIFrameLoad);Sys.UI.DomEvent.addHandler(this._historyFrame,"load",this._iframeLoadHandler)}this._timerHandler=Function.createDelegate(this,this._onIdle);this._timerCookie=window.setTimeout(this._timerHandler,100);var D=this.get_stateString();if(D!==this._currentEntry){this._navigate(D)}},_onIdle:function(){delete this._timerCookie;var A=this.get_stateString();if(A!==this._currentEntry){if(!this._ignoreTimer){this._historyPointIsNew=false;this._navigate(A);this._historyLength=window.history.length}}else{this._ignoreTimer=false}this._timerCookie=window.setTimeout(this._timerHandler,100)},_onIFrameLoad:function(){if(!this._ignoreIFrame){var C=this._historyFrame.contentWindow.location.search;var B=C.indexOf("_state=");if((B!==-1)&&(B+7<C.length)){C=C.substring(B+7);var A=C.indexOf("&");if(A!==-1){C=C.substring(0,A)}}else{C=""}this._historyPointIsNew=false;this._navigate(C)}this._ignoreIFrame=false},_onPageRequestManagerBeginRequest:function(B,A){this._ignoreTimer=true},_onPageRequestManagerEndRequest:function(C,B){var A=B.get_dataItems()[this._clientId],F;if(typeof(A)!=="undefined"){var E=A[0];F=A[1];this.setServerState(E);this._historyPointIsNew=true}else{this._ignoreTimer=false}var D=Sys.Serialization.JavaScriptSerializer.serialize(this._state);if(D==="{}"){D=""}if(D!=this._currentEntry){this._ignoreTimer=true;this._setState(D,F);this._raiseNavigate()}},_raiseNavigate:function(){var B=this.get_events().getHandler("navigate");var A=new MySpace.UI.HistoryEventArgs(this._state);if(B){B(this,A)}if(window.pageNavigate){window.pageNavigate(this,A)}},_setState:function(C,D){if(C!==this._currentEntry){if(this._historyFrame&&this._historyPointIsNew){var A=this._emptyPageUrl+C+"&title="+encodeURIComponent(D||document.title);if(this._historyFrame.src!=A){this._ignoreIFrame=true;this._historyFrame.src=A}this._historyPointIsNew=false}this._ignoreTimer=false;this._currentEntry=C;var B=this.get_stateString();if(B==="{}"){B="";this._currentEntry=null}if(C!==B){window.location.hash=C?encodeURIComponent(C):""}if(D){document.title=D}}}};MySpace.UI._History.registerClass("MySpace.UI._History",Sys.Component);MySpace._Application.prototype.get_history=function(){var A=this._history;if(!A){A=this._history=new MySpace.UI._History();Sys.Application.registerDisposableObject(A);A.initialize()}return A};MySpace.UI.PopupBehavior=function(A){MySpace.UI.PopupBehavior.initializeBase(this,[A]);this._x=0;this._y=0;this._positioningMode=MySpace.UI.PositioningMode.Absolute;this._parentElement=null;this._parentElementID=null;this._moveHandler=null;this._firstPopup=true;this._originalParent=null;this._visible=false;this._hideOnDocumentClick=false;this._onShow=null;this._onShowEndedHandler=null;this._onHide=null;this._onHideEndedHandler=null};MySpace.UI.PopupBehavior.prototype={initialize:function(){MySpace.UI.PopupBehavior.callBaseMethod(this,"initialize");this._hidePopup();this.get_element().style.position="absolute";this._onShowEndedHandler=Function.createDelegate(this,this._onShowEnded);this._onHideEndedHandler=Function.createDelegate(this,this._onHideEnded);$addHandler(document.body,"mousedown",Function.createDelegate(this,this._onDocumentClick))},dispose:function(){var A=this.get_element();if(A){if(this._visible){this.hide()}if(this._originalParent){A.parentNode.removeChild(A);this._originalParent.appendChild(A);this._originalParent=null}A._hideWindowedElementsIFrame=null}this._parentElement=null;if(this._onShow&&this._onShowEndedHandler){this._onShow.remove_ended(this._onShowEndedHandler)}this._onShowEndedHandler=null;this._onShow=null;if(this._onHide&&this._onHideEndedHandler){this._onHide.remove_ended(this._onHideEndedHandler)}this._onHideEndedHandler=null;this._onHide=null;MySpace.UI.PopupBehavior.callBaseMethod(this,"dispose")},show:function(){if(this._visible){return}var A=new Sys.CancelEventArgs();this.raiseShowing(A);if(A.get_cancel()){return}this._visible=true;var B=this.get_element();B.style.visibility="visible";this.setupPopup();if(this._onShow){B.style.visibility="hidden";this.onShow()}else{this.raiseShown(Sys.EventArgs.Empty)}},hide:function(){if(!this._visible){return}var A=new Sys.CancelEventArgs();this.raiseHiding(A);if(A.get_cancel()){return}this._visible=false;if(this._onHide){this.onHide()}else{this._hidePopup();this._hideCleanup()}},getBounds:function(){var D=this.get_element();var F=D.offsetParent;if(!F||(F==document.documentElement)){F=document.body}var G;var H;if(this._parentElement){H=Sys.UI.DomElement.getBounds(this._parentElement);var C=Sys.UI.DomElement.getLocation(F);G={x:H.x-C.x,y:H.y-C.y}}else{H=Sys.UI.DomElement.getBounds(F);G={x:0,y:0}}var E=D.offsetWidth-(D.clientLeft?D.clientLeft*2:0);var B=D.offsetHeight-(D.clientTop?D.clientTop*2:0);if(this._firstpopup){D.style.width=E+"px";this._firstpopup=false}var A;switch(this._positioningMode){case MySpace.UI.PositioningMode.Center:A={x:Math.round(H.width/2-E/2),y:Math.round(H.height/2-B/2)};break;case MySpace.UI.PositioningMode.BottomLeft:A={x:0,y:H.height};break;case MySpace.UI.PositioningMode.BottomRight:A={x:H.width-E,y:H.height};break;case MySpace.UI.PositioningMode.TopLeft:A={x:0,y:-D.offsetHeight};break;case MySpace.UI.PositioningMode.TopRight:A={x:H.width-E,y:-D.offsetHeight};break;case MySpace.UI.PositioningMode.Right:A={x:H.width,y:0};break;case MySpace.UI.PositioningMode.Left:A={x:-D.offsetWidth,y:0};break;default:A={x:0,y:0}}A.x+=this._x+G.x;A.y+=this._y+G.y;return new Sys.UI.Bounds(A.x,A.y,E,B)},adjustPopupPosition:function(D){var B=this.get_element();if(!D){D=this.getBounds()}var A=Sys.UI.DomElement.getBounds(B);var C=false;if(A.x<0){D.x-=A.x;C=true}if(A.y<0){D.y-=A.y;C=true}if(C){Sys.UI.DomElement.setLocation(B,D.x,D.y)}},addBackgroundIFrame:function(){var A=this.get_element();if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){var B=A._hideWindowedElementsIFrame;if(!B){B=document.createElement("iframe");B.src="javascript:'<html></html>';";B.style.position="absolute";B.style.display="none";B.scrolling="no";B.frameBorder="0";B.tabIndex="-1";B.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";A.parentNode.insertBefore(B,A);A._hideWindowedElementsIFrame=B;this._moveHandler=Function.createDelegate(this,this._onMove);Sys.UI.DomEvent.addHandler(A,"move",this._moveHandler)}B.style.width=A.offsetWidth+"px";B.style.height=A.offsetHeight+"px";B.style.display=A.style.display;if(A.currentStyle&&A.currentStyle.zIndex){B.style.zIndex=A.currentStyle.zIndex}else{if(A.style.zIndex){B.style.zIndex=A.style.zIndex}}}},setupPopup:function(){var A=this.get_element();var B=this.getBounds();Sys.UI.DomElement.setLocation(A,B.x,B.y);this.adjustPopupPosition(B);A.zIndex=1000;this.addBackgroundIFrame()},_hidePopup:function(){var A=this.get_element();A.style.visibility="hidden";if(A.originalWidth){A.style.width=A.originalWidth+"px";A.originalWidth=null}},_hideCleanup:function(){var A=this.get_element();if(this._moveHandler){Sys.UI.DomEvent.removeHandler(A,"move",this._moveHandler);this._moveHandler=null}if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var B=A._hideWindowedElementsIFrame;if(B){B.style.display="none"}}this.raiseHidden(Sys.EventArgs.Empty)},_onDocumentClick:function(B){if(!this._hideOnDocumentClick||!this._visible){return}for(var A=B.target;A;A=A.parentNode){if(A==this.get_element()){return}}this.hide()},_onMove:function(){var A=this.get_element();if(A._hideWindowedElementsIFrame){A.parentNode.insertBefore(A._hideWindowedElementsIFrame,A);A._hideWindowedElementsIFrame.style.top=A.style.top;A._hideWindowedElementsIFrame.style.left=A.style.left}},get_onShow:function(){return this._onShow},set_onShow:function(A){this._onShow=A;if(A){A.set_target(this.get_element());A.add_ended(this._onShowEndedHandler)}},onShow:function(){if(this._onShow){if(this._onHide){this._onHide.stop()}this._onShow.play()}},_onShowEnded:function(){this.adjustPopupPosition();this.addBackgroundIFrame();this.raiseShown(Sys.EventArgs.Empty)},get_onHide:function(){return this._onHide},set_onHide:function(A){this._onHide=A;if(A){A.set_target(this.get_element());A.add_ended(this._onHideEndedHandler)}},onHide:function(){if(this._onHide){if(this._onShow){this._onShow.stop()}this._onHide.play()}},_onHideEnded:function(){this._hideCleanup()},get_parentElement:function(){if(!this._parentElement&&this._parentElementID){this.set_parentElement($get(this._parentElementID))}return this._parentElement},set_parentElement:function(A){this._parentElement=A},get_parentElementID:function(){if(this._parentElement){return this._parentElement.id}return this._parentElementID},set_parentElementID:function(A){this._parentElementID=A;if(this.get_isInitialized()){this.set_parentElement($get(A))}},get_positioningMode:function(){return this._positioningMode},set_positioningMode:function(A){this._positioningMode=A},get_x:function(){return this._x},set_x:function(A){if(A!=this._x){this._x=A;if(this._visible){this.setupPopup()}}},get_y:function(){return this._y},set_y:function(A){if(A!=this._y){this._y=A;if(this._visible){this.setupPopup()}}},get_visible:function(){return this._visible},get_hideOnDocumentClick:function(){return this._hideOnDocumentClick},set_hideOnDocumentClick:function(A){this._hideOnDocumentClick=A},add_showing:function(A){this.get_events().addHandler("showing",A)},remove_showing:function(A){this.get_events().removeHandler("showing",A)},raiseShowing:function(A){var B=this.get_events().getHandler("showing");if(B){B(this,A)}},add_shown:function(A){this.get_events().addHandler("shown",A)},remove_shown:function(A){this.get_events().removeHandler("shown",A)},raiseShown:function(A){var B=this.get_events().getHandler("shown");if(B){B(this,A)}},add_hiding:function(A){this.get_events().addHandler("hiding",A)},remove_hiding:function(A){this.get_events().removeHandler("hiding",A)},raiseHiding:function(A){var B=this.get_events().getHandler("hiding");if(B){B(this,A)}},add_hidden:function(A){this.get_events().addHandler("hidden",A)},remove_hidden:function(A){this.get_events().removeHandler("hidden",A)},raiseHidden:function(A){var B=this.get_events().getHandler("hidden");if(B){B(this,A)}}};MySpace.UI.PopupBehavior.registerClass("MySpace.UI.PopupBehavior",Sys.UI.Behavior);MySpace.UI.PositioningMode=function(){throw Error.invalidOperation()};MySpace.UI.PositioningMode.prototype={Absolute:0,Center:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5,Right:6,Left:7};MySpace.UI.PositioningMode.registerEnum("MySpace.UI.PositioningMode");MySpace.UI._Overlay=function(A){document.body.appendChild(A);MySpace.UI._Overlay.initializeBase(this,[A])};MySpace.UI._Overlay.prototype={_interval:null,_fadeIn:false,_opacity:0,_max:60,_fadeDelegate:null,_resizeHandler:null,_step:20,show:function(){MySpace.UI.hideElements(["iframe","object","embed","select"],true);this._fade(true)},hide:function(){MySpace.UI.hideElements(["iframe","object","embed","select"],false);this._fade(false)},add_fadeComplete:function(A){this.get_events().addHandler("fadeComplete",A)},remove_fadeComplete:function(A){this.get_events().removeHandler("fadeComplete",A)},initialize:function(){var A=this.get_element();A.id="window_overlay";A.style.zIndex="1000200";A.style.width="100%";this.set_opacity(0);Sys.UI.DomElement.setLocation(A,0,0);this._setHeight();this._resizeHandler=Function.createDelegate(this,this._setHeight);$addHandler(window,"resize",this._resizeHandler)},_setHeight:function(){var B=document.body.scrollHeight;var A=document.documentElement.clientHeight;var C=document.documentElement.scrollHeight;B=((B>C)?B:C);this.get_element().style.height=((B>A)?B:A)+"px"},_fade:function(A){this._fadeIn=A;if(A){this._element.style.visibility="visible";this._element.style.display=""}if(!this._fadeDelegate){this._fadeDelegate=Function.createDelegate(this,this._tick)}this._interval=window.setInterval(this._fadeDelegate,100)},_tick:function(){if(!this._interval){return}var C=this._step;if(!this._fadeIn){C*=-1}var A=this._opacity+C;if(A<0){A=0}else{if(A>this._max){A=this._max}}this.set_opacity(A);if(A<=0||A>=this._max){window.clearInterval(this._interval);var B=this.get_events().getHandler("fadeComplete");if(!this._fadeIn){this._element.style.visibility="hidden";this._element.style.display="none"}if(B){B(this,Sys.EventArgs.Empty)}}},get_opacity:function(){return this._opacity},set_opacity:function(B){this._opacity=B;var A=this.get_element().style;A.opacity=B*0.01;A.filter="alpha(opacity="+B+")";if(B===0){this.set_visible(false)}},dispose:function(){$removeHandler(window,"resize",this._resizeHandler);this._fadeDelegate=null;MySpace.UI._Overlay.callBaseMethod(this,"dispose")}};MySpace.UI._Overlay.registerClass("MySpace.UI._Overlay",Sys.UI.Control);window.get_overlay=function(){if(!window._overlay){window._overlay=$create(MySpace.UI._Overlay,null,null,null,document.createElement("div"))}return window._overlay};MySpace.UI._Popup=function(A){this._box=A.firstChild;MySpace.UI._Popup.initializeBase(this,[A])};MySpace.UI._Popup.prototype={_autoSize:true,_box:null,_state:null,_defaultButton:null,_callback:null,_globalCss:null,_multiple:false,_prevHeight:0,_checkHeightHandler:null,_resizeHandler:null,_timerId:null,_top:null,_left:null,_width:null,_ruleAdded:false,get_autoSize:function(){return this._autoSize},set_autoSize:function(A){this._autoSize=A},get_multiple:function(){return this._multiple},set_multiple:function(A){this._multiple=A},get_top:function(){return this._top},set_top:function(A){this._top=A},get_left:function(){return this._left},set_left:function(A){this._left=A},get_width:function(){return this._width},set_width:function(A){this._width=A;this._box.style.width=A+"px"},get_state:function(){return this._state},set_state:function(A){this._state=A},get_title:function(){return this._box.childNodes[1].innerHTML},set_title:function(A){this._box.childNodes[1].innerHTML=A},get_content:function(){return this._box.childNodes[2].innerHTML},set_content:function(A){this.clear_contents();if(typeof(A)==="object"){this._box.childNodes[2].appendChild(A)}else{this._box.childNodes[2].innerHTML=A}},get_callback:function(){return this._callback},set_callback:function(A){this._callback=A},get_showing:function(){return this._element.style.display!="none"},clear_contents:function(){var B=this._box.childNodes[2];for(var A=B.childNodes.length-1;A>=0;A--){B.removeChild(B.childNodes[A])}},add_button:function(D,B,C){var A=document.createElement("input");A.type="button";A.value=D;if(B){this._defaultButton=A}$addHandlers(A,{click:(C||this._buttonClick)},this);this._box.lastChild.appendChild(A);return A},remove_buttons:function(){var B=this._box.lastChild.childNodes;for(var A=B.length-1;A>=0;A--){$clearHandlers(B[A]);this._box.lastChild.removeChild(B[A])}},show:function(C){if(MySpace.UI._Popup._activePopup&&!this._multiple){throw"A Popup is already active."}if(C){this._callback=C}if(!this._multiple){window.get_overlay().show()}if(!this._globalCss&&this._top!==null){this._element.style.top=this._top+"px"}if(this._left!==null){this._element.style.left=this._left+"px"}if(this._width!==null){this._box.style.width=this._width+"px"}this._element.style.display="";this._element.style.visibility="visible";var A=MySpace.Utils.Selector.query("iframe,object,embed,select",this._element);for(var B=0;B<A.length;B++){A[B].style.visibility=""}if(this._defaultButton){this._defaultButton.focus()}MySpace.UI._Popup._activePopup=this;this._addFixPosRule();this._elDim=this._getAdjBounds(this._element);this._checkBoxHeight()},_addFixPosRule:function(){if(this._globalCss!==null&&!this._ruleAdded){this._globalCss.addRule(".popup_wrapper","top:"+this._top+"px");this._top=(this._top==null?this._element.offsetTop:this._top);this._globalCss.addRule(".popup_wrapper","top:expression( (ignoreMe = (document.body.scrollTop || document.documentElement.scrollTop) + "+this._top+') + "px" )');this._ruleAdded=true}},_removeFixPosRule:function(){if(this._globalCss!==null&&this._ruleAdded&&!this._multiple){this._globalCss.removeRule(this._globalCss.rules.length-1);this._globalCss.removeRule(this._globalCss.rules.length-1);this._ruleAdded=false}},_heightCheck:function(){var A=this._getBox("popup_box");var B=Sys.UI.DomElement.getBounds(A);if(parseInt(B.height)!=parseInt(this._prevHeight)||parseInt(this.get_element().scrollHeight)<parseInt(B.height)){this._checkBoxHeight()}else{clearTimeout(this._timerId);this._timerId=setTimeout(this._checkHeightHandler,2000)}},_hide:function(){clearTimeout(this._timerId);if(!this._multiple){window.get_overlay().hide()}this._element.style.display="none";MySpace.UI._Popup._activePopup=null;this._removeFixPosRule();this.get_element().style.top=(this._top?this._top+"px":"auto")},_buttonClick:function(B){this._hide();var A=this._callback;if(A){A(this,B)}},initialize:function(){this._checkHeightHandler=Function.createDelegate(this,this._heightCheck);this._resizeHandler=Function.createDelegate(this,this._checkBoxHeight);var D=this.get_element();D.parentNode.removeChild(D);document.body.appendChild(D);this._box.firstChild.isCancel=true;$addHandlers(this._box.firstChild,{click:this._buttonClick},this);MySpace.UI._Popup.callBaseMethod(this,"initialize");var C=(Sys.Browser.agent==Sys.Browser.InternetExplorer)?Sys.Browser.version:0;var A=(document.compatMode=="BackCompat");if((C==6)||(A&&C>=7)){for(var B=0;B<document.styleSheets.length;B++){if(/global.*(\.debug)*\.css/i.test(document.styleSheets[B].href)){this._globalCss=document.styleSheets[B]}}}if(this._autoSize){$addHandler(window,"resize",this._resizeHandler)}},_getAdjBounds:function(B){var C=Sys.UI.DomElement.getBounds(B);var A=(document.compatMode=="BackCompat")?document.body.scrollTop:document.documentElement.scrollTop;C.sHeight=A;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){C.y-=A}return C},_getBox:function(B){var A=this._element.getElementsByTagName("div");var C=0;while(element=A[C++]){if(element.className.indexOf(B)>-1){return element}}},_checkBoxHeight:function(A){if(!this._autoSize){return}var B=this._getBox("popup_box");var E=document.compatMode;var C=(window.innerHeight?window.innerHeight:E=="BackCompat"?document.documentElement.offsetHeight:document.documentElement.clientHeight);if(B){var D=this._getAdjBounds(B);if(!this._globalCss&&D.height<=C&&this._elDim.y+D.height>C){this.get_element().style.position="fixed";this.get_element().style.top=parseInt((C-D.height)/2)+"px"}else{if(this._elDim.y+D.height>C){this._removeFixPosRule();if(this._globalCss){this._globalCss.addRule(".popup_wrapper","top:"+(D.y+D.sHeight)+"px !important")}else{this.get_element().style.position="absolute";this.get_element().style.top=(D.y+D.sHeight)+"px"}}else{if(this._globalCss){this._globalCss.removeRule(this._globalCss.rules.length-1);this._addFixPosRule()}else{this.get_element().style.position="fixed";this.get_element().style.top=(this._top?this._top+"px":"")}}}if(!A||D.height<this._prevHeight){this._prevHeight=D.height}clearTimeout(this._timerId);this._timerId=setTimeout(this._checkHeightHandler,2000)}},dispose:function(){var B=this._box.lastChild.childNodes;for(var A=0;A<B.length;A++){$clearHandlers(B[A])}MySpace.UI._Popup.callBaseMethod(this,"dispose")},_getIsFixed:function(){var A;var C=this._box.parentNode;while(C!==null){var B=MySpace.UI.getComputedStyle(C);if(B){A=B.position;if(A==="fixed"){return true}}C=C.parentNode}return false}};MySpace.UI._Popup.registerClass("MySpace.UI._Popup",Sys.UI.Control);MySpace.UI._Popup._activePopup=null;MySpace.UI.Popup=function(){throw"Cannot instantiate static class."};MySpace.UI.Popup.create=function(D,E,F,B,A){var C=document.createElement("div");C.innerHTML="<div class='popup_wrapper' style='z-index:1000201;left:0px;width:100%;display:none;visibility:hidden;'><div class='popup_box'><a class='popup_x'></a><div class='popup_title'></div><div class='popup_content'></div><div class='popup_buttons'></div></div></div>";return $create(MySpace.UI._Popup,{title:E,content:D,callback:F,multiple:B||false,autoSize:A===undefined?true:A},null,null,C.firstChild)};MySpace.UI.Popup.generic=function(C,B,E){var A=document.createElement("div");var D=MySpace.UI.Popup.create(C,MySpaceRes.Common.Attention);D.add_button(B);A.innerHTML=C;D.show(E);return D};MySpace.UI.Popup.alert=function(A,B){new MySpace.UI.Popup.generic(A,MySpaceRes.Common.Ok,B)};MySpace.UI.Popup.confirm=function(A,C){var B=new MySpace.UI.Popup.generic(A,MySpaceRes.Common.Yes,C);B.add_button(MySpaceRes.Common.No)};MySpace.UI.Popup.registerClass("MySpace.UI.Popup");(function(){var S=function(){};var T=/^(?:([-]?\d*)(n){1}|(odd|even)$)*([-+]?\d*)$/;S.prototype={document:window.document,attrAliases:{"for":"htmlFor"},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[class~=$1]"},operators:{"=":function(V,W){return V===W},"!=":function(V,W){return V!==W},"~=":function(V,X){var W=" ";return(W+V+W).indexOf((W+X+W))>-1},"|=":function(V,W){return F("^"+W+"[-]?").test(V)},"^=":function(V,W){return V.indexOf(W)===0},"$=":function(V,W){return V.lastIndexOf(W)===V.length-W.length},"*=":function(V,W){return V.indexOf(W)>-1},"":function(V,W){return V}},pseudos:{root:function(V){return V===V.ownerDocument.documentElement},"nth-child":function(V,W){return Q(V,W)},"nth-last-child":function(V,W){return Q(V,W,null,true)},"nth-of-type":function(V,W){return Q(V,W,V.tagName)},"nth-last-of-type":function(V,W){return Q(V,W,V.tagName,true)},"first-child":function(V){return E(V.parentNode)[0]===V},"last-child":function(W){var V=E(W.parentNode);return V[V.length-1]===W},"first-of-type":function(V,W){return E(V.parentNode,V.tagName.toLowerCase())[0]},"last-of-type":function(W,X){var V=E(W.parentNode,W.tagName.toLowerCase());return V[V.length-1]},"only-child":function(W){var V=E(W.parentNode);return V.length===1&&V[0]===W},"only-of-type":function(V){return E(V.parentNode,V.tagName.toLowerCase()).length===1},empty:function(V){return V.childNodes.length===0},not:function(V,W){return !S.test(V,W)},contains:function(V,X){var W=V.innerText||V.textContent||"";return W.indexOf(X)>-1},checked:function(V){return V.checked===true}},test:function(Z,X){Z=S.document.getElementById(Z)||Z;if(!Z){return false}var W=X?X.split(","):[];if(W.length){for(var Y=0,V=W.length;Y<V;++Y){if(U(Z,W[Y])){return true}}return false}return U(Z,X)},filter:function(Y,X){Y=Y||[];var a,W=[],b=C(X);if(!Y.item){for(var Z=0,V=Y.length;Z<V;++Z){if(!Y[Z].tagName){a=S.document.getElementById(Y[Z]);if(a){Y[Z]=a}else{}}}}W=P(Y,C(X)[0]);B();return W},query:function(W,X,Y){var V=G(W,X,Y);return V}};var G=function(b,j,k,Z){var n=(k)?null:[];if(!b){return n}var X=b.split(",");if(X.length>1){var m;for(var c=0,f=X.length;c<f;++c){m=arguments.callee(X[c],j,k,true);n=k?m:n.concat(m)}H();return n}if(j&&!j.nodeName){j=S.document.getElementById(j);if(!j){return n}}j=j||S.document;var h=C(b);var g=h[N(h)],V=[],Y,W,a=h.pop()||{};if(g){W=O(g.attributes)}if(W){if(W===a.id){V=[S.document.getElementById(W)]||j}else{Y=S.document.getElementById(W);if(j===S.document||K(Y,j)){if(Y&&U(Y,null,g)){j=Y}}else{return n}}}if(j&&!V.length){V=j.getElementsByTagName(a.tag)}if(V.length){n=P(V,a,k,Z)}B();return n};var K=function(){if(document.documentElement.contains&&!(Sys.Browser.agent===Sys.Browser.Safari&&Sys.Browser.version<3)){return function(W,V){return V.contains(W)}}else{if(document.documentElement.compareDocumentPosition){return function(W,V){return !!(V.compareDocumentPosition(W)&16)}}else{return function(X,W){var V=X.parentNode;while(V){if(X===V){return true}V=V.parentNode}return false}}}}();var P=function(Y,a,b,X){var W=b?null:[];for(var Z=0,V=Y.length;Z<V;Z++){if(!U(Y[Z],"",a,X)){continue}if(b){return Y[Z]}if(X){if(Y[Z]._found){continue}Y[Z]._found=true;L[L.length]=Y[Z]}W[W.length]=Y[Z]}return W};var U=function(b,W,Z,X){Z=Z||C(W).pop()||{};if(!b.tagName||(Z.tag!=="*"&&b.tagName.toUpperCase()!==Z.tag)||(X&&b._found)){return false}if(Z.attributes.length){var a;for(var Y=0,V=Z.attributes.length;Y<V;++Y){a=b.getAttribute(Z.attributes[Y][0],2);if(a===undefined){return false}if(S.operators[Z.attributes[Y][1]]&&!S.operators[Z.attributes[Y][1]](a,Z.attributes[Y][2])){return false}}}if(Z.pseudos.length){for(var Y=0,V=Z.pseudos.length;Y<V;++Y){if(S.pseudos[Z.pseudos[Y][0]]&&!S.pseudos[Z.pseudos[Y][0]](b,Z.pseudos[Y][1])){return false}}}return(Z.previous&&Z.previous.combinator!==",")?M[Z.previous.combinator](b,Z):true};var L=[];var J=[];var R={};var H=function(){for(var W=0,V=L.length;W<V;++W){try{delete L[W]._found}catch(X){L[W].removeAttribute("_found")}}L=[]};var B=function(){if(!document.documentElement.children){return function(){for(var W=0,V=J.length;W<V;++W){delete J[W]._children}J=[]}}else{return function(){}}}();var F=function(W,V){V=V||"";if(!R[W+V]){R[W+V]=new RegExp(W,V)}return R[W+V]};var M={" ":function(W,V){while(W=W.parentNode){if(U(W,"",V.previous)){return true}}return false},">":function(W,V){return U(W.parentNode,null,V.previous)},"+":function(X,W){var V=X.previousSibling;while(V&&V.nodeType!==1){V=V.previousSibling}if(V&&U(V,null,W.previous)){return true}return false},"~":function(X,W){var V=X.previousSibling;while(V){if(V.nodeType===1&&U(V,null,W.previous)){return true}V=V.previousSibling}return false}};var E=function(){if(document.documentElement.children){return function(W,V){return(V)?W.children.tags(V):W.children||[]}}else{return function(Z,W){if(Z._children){return Z._children}var Y=[],a=Z.childNodes;for(var X=0,V=a.length;X<V;++X){if(a[X].tagName){if(!W||a[X].tagName.toLowerCase()===W){Y[Y.length]=a[X]}}}Z._children=Y;J[J.length]=Z;return Y}}}();var Q=function(W,j,m,Z){if(m){m=m.toLowerCase()}T.test(j);var h=parseInt(RegExp.$1,10),V=RegExp.$2,c=RegExp.$3,f=parseInt(RegExp.$4,10)||0,k=[];var g=E(W.parentNode,m);if(c){h=2;op="+";V="n";f=(c==="odd")?1:0}else{if(isNaN(h)){h=(V)?1:0}}if(h===0){if(Z){f=g.length-f+1}if(g[f-1]===W){return true}else{return false}}else{if(h<0){Z=!!Z;h=Math.abs(h)}}if(!Z){for(var X=f-1,Y=g.length;X<Y;X+=h){if(X>=0&&g[X]===W){return true}}}else{for(var X=g.length-f,Y=g.length;X>=0;X-=h){if(X<Y&&g[X]===W){return true}}}return false};var O=function(W){for(var X=0,V=W.length;X<V;++X){if(W[X][0]=="id"&&W[X][1]==="="){return W[X][2]}}};var N=function(X){for(var W=0,V=X.length;W<V;++W){if(O(X[W].attributes)){return W}}return -1};var D={tag:/^((?:-?[_a-z]+[\w-]*)|\*)/i,attributes:/^\[([a-z]+\w*)+([~\|\^\$\*!=]=?)?['"]?([^'"\]]*)['"]?\]*/i,pseudos:/^:([-\w]+)(?:\(['"]?(.+)['"]?\))*/i,combinator:/^\s*([>+~]|\s)\s*/};var C=function(V){var X={},a=[],b,Z=false,W;V=A(V);do{Z=false;for(var Y in D){if(!MySpace.Utils.hasOwnProperty(D,Y)){continue}if(Y!="tag"&&Y!="combinator"){X[Y]=X[Y]||[]}if(W=D[Y].exec(V)){Z=true;if(Y!="tag"&&Y!="combinator"){if(Y==="attributes"&&W[1]==="id"){X.id=W[3]}X[Y].push(W.slice(1))}else{X[Y]=W[1]}V=V.replace(W[0],"");if(Y==="combinator"||!V.length){X.attributes=I(X.attributes);X.pseudos=X.pseudos||[];X.tag=X.tag?X.tag.toUpperCase():"*";a.push(X);X={previous:X}}}}}while(Z);return a};var I=function(W){var X=S.attrAliases;W=W||[];for(var Y=0,V=W.length;Y<V;++Y){if(X[W[Y][0]]){W[Y][0]=X[W[Y][0]]}if(!W[Y][1]){W[Y][1]=""}}return W};var A=function(W){var X=S.shorthand;var Y=W.match(D.attributes);if(Y){W=W.replace(D.attributes,"REPLACED_ATTRIBUTE")}for(var a in X){if(!MySpace.Utils.hasOwnProperty(X,a)){continue}W=W.replace(F(a,"gi"),X[a])}if(Y){for(var Z=0,V=Y.length;Z<V;++Z){W=W.replace("REPLACED_ATTRIBUTE",Y[Z])}}return W};if(Sys.Browser.agent===Sys.Browser.InternetExplorer){S.prototype.attrAliases["class"]="className"}S=new S();S.patterns=D;MySpace.Utils.Selector=S})();MySpace.UI.SmileySelector=function(A){MySpace.UI.SmileySelector.initializeBase(this,[A])};MySpace.UI.SmileySelector.prototype={_showBlankSmiley:true,_smileyData:null,_spacerUrl:MySpace.StaticContentBase+"/modules/common/static/img/spacer.gif",initialize:function(){var C=this.get_element();Sys.UI.DomElement.addCssClass(C,"msSmileySelector");if(this._showBlankSmiley){this._addSmiley(C,this._spacerUrl)}for(var B=0;B<this._smileyData.smileys.length;B++){this._addSmiley(C,this._smileyData.smileys[B])}if(this._smileyData.sponsoredSmileys&&this._smileyData.sponsoredSmileys.length){var D=document.createElement("div");D.className="sponsored";D.innerHTML=this._smileyData.sponsorText||"";C.appendChild(D);var A=document.createElement("div");D.appendChild(A);for(var B=0;B<this._smileyData.sponsoredSmileys.length;B++){this._addSmiley(A,this._smileyData.sponsoredSmileys[B])}}$addHandler(C,"click",Function.createDelegate(this,this._onClickSmiley))},_addSmiley:function(C,B){var A=document.createElement("img");A.className="smiley";A.src=this._spacerUrl;A.style.backgroundImage="url('"+B+"')";A.url=B;C.appendChild(A);if(C.getElementsByTagName("img").length%7==0){C.appendChild(document.createElement("br"))}},_onClickSmiley:function(A){var B=A.target;if(B.tagName.toLowerCase()!="img"||!B.url){return}this.raiseSelected(B.url)},get_smileyData:function(){return this._smileyData},set_smileyData:function(A){this._smileyData=A},get_showBlankSmiley:function(){return this._showBlankSmiley},set_showBlankSmiley:function(A){this._showBlankSmiley=A},add_selected:function(A){this.get_events().addHandler("selected",A)},remove_selected:function(A){this.get_events().removeHandler("selected",A)},raiseSelected:function(A){var B=this.get_events().getHandler("selected");if(B){B(this,A)}}};MySpace.UI.SmileySelector.registerClass("MySpace.UI.SmileySelector",Sys.UI.Control);MySpace.UI.StatusMoodEditControl=function(A){MySpace.UI.StatusMoodEditControl.initializeBase(this,[A])};MySpace.UI.StatusMoodEditControl.prototype={inputWidth:398,shortenedURLBase:"",initialize:function(){var A=this.get_element();A.innerHTML='<div id="hsmEditControl">   <div id="hsmTitleRow">       <div id="hsmCharCount"></div>       <div id="hsmCharsLeft">'+MySpaceRes.PostTo.CharsLeft+'</div>       <div id="hsmCancelBtn" tabindex="499"></div>   </div>	<div id="hsmStatusRow">		<textarea id="hsmStatusInput" tabindex="500" style="width:'+this.inputWidth+'px;"></textarea>	</div>	<div id="hsmShortenUrlNotice" style="display:none; margin-bottom:8px;">'+MySpaceRes.Status.UrlShortened+'</div>	<div>		<div class="hsmLabel">'+MySpaceRes.Status.Mood+'</div>		<div id="hsmMoodWrapper">			<input id="hsmMoodInput" tabindex="501" maxlength="16">		</div>		<div id="hsmSmileyWrapper" tabindex="502">			<img src="'+this._spacerUrl+'" id="hsmUpdateMoodImage">			<img id="hsmSmileyArrow" src="'+this._spacerUrl+'">		</div>		<div id="hsmSmileyPalette"></div>		<div id="hsmDoneBtn" class="hsmButton" tabindex="503">'+MySpaceRes.UserPage.Update+'			<div class="hsmButtonRight"></div>		</div>		<div id="hsmUpdating">'+MySpaceRes.BrowsePage.Updating+"		</div>	</div></div>";this._charCnt=$get("hsmCharCount");this._statusInput=$get("hsmStatusInput");this._moodInput=$get("hsmMoodInput");this._updateMoodImage=$get("hsmUpdateMoodImage");this._smileyArrow=$get("hsmSmileyArrow");this._smileyPalette=$get("hsmSmileyPalette");this._doneBtn=$get("hsmDoneBtn");this._cancelBtn=$get("hsmCancelBtn");this._updatingBtn=$get("hsmUpdating");this._shortenUrlNotice=$get("hsmShortenUrlNotice");this._addHandler(this._doneBtn,"mousedown","_saveStatus");this._addHandler(this._cancelBtn,"click","hide");this._addHandler(this._moodInput,"focus","_onFocusInput");this._addHandler($get("hsmSmileyWrapper"),"click","_showSmileyPalette");this._addHandler(this._smileyPalette,"blur","_hideSmileyPalette");this._addHandler(A,"keydown","_onKeyDown");this._addHandler(A,"keypress","_onKeyPress");this._shortenUrls=(window.punymce&&punymce.Editor)&&!MySpace.Application.keyDisabled("ShortenUrlsInStatusMood");if(this._shortenUrls){this._editor=new punymce.Editor({id:"hsmStatusInput",width:this.inputWidth+4,height:40,min_height:40,toolbarType:"None",textOnly:true,plugins:this._shortenUrls?"ShortenUrls":"",shortenedURLBase:this.shortenedURLBase});this._editor.add_init(Function.createDelegate(this,this._setupEditor))}else{this._addHandler(this._statusInput,"focus","_onFocusInput");this._addHandler(this._statusInput,"paste","_onPaste")}this._moodComboBox=$create(MySpace.UI.ComboBoxBehavior,{minimumPrefixLength:1,completionItems:[this._currentMood],completionInterval:500},{itemSelected:Function.createDelegate(this,this._onMoodSelected)},null,this._moodInput);this._smileyPopupBehavior=$create(MySpace.UI.PopupBehavior,{parentElement:$get("hsmSmileyWrapper"),positioningMode:MySpace.UI.PositioningMode.BottomLeft,hideOnDocumentClick:true,x:-1,y:-2},null,null,this._smileyPalette);this._call("GetMoodLists",{},"_populateMoodList")},_setupEditor:function(){var A=this._editor.getDoc();if(A.body.addEventListener){A.body.addEventListener("paste",Function.createDelegate(this,this._onPaste),false)}else{A.body.attachEvent("onpaste",Function.createDelegate(this,this._onPaste))}this._addHandler(A,"keydown","_onKeyDown");this._addHandler(A,"keypress","_onKeyPress");this._addHandler(A,"click","_onClickEditor");this._editor.onShortenUrl.add(Function.createDelegate(this,this._onShortenUrl))},_onShortenUrl:function(){if(this._getStatusValue()!=this._previousStatus){this._shortenUrlNotice.style.display=""}},_onClickEditor:function(){this._moodComboBox.hidePopup();this._hideSmileyPalette()},show:function(A,C,B){this._previousStatus=A;this._previousMood=C;this._previousMoodUrl=B;this._setStatusValue(A);this._moodInput.value=C;this._setSmileyUrl(B||this._spacerUrl);this._updateCharCount();this._shortenUrlNotice.style.display="none";Sys.UI.DomElement.addCssClass(this._doneBtn,"hsmButtonDisabled");this.get_element().style.display="block";if(this._editor){this._editor.add_init(Function.createDelegate(this,function(){this._editor.selectAll();this._previousStatus=this._getStatusValue()}))}else{this._statusInput.focus()}},hide:function(A){if(A&&A.preventDefault){A.preventDefault()}if(this._editor){this._editor.setContent("");if(Sys.Browser.agent==Sys.Browser.InternetExplorer){this._moodInput.focus()}}this._moodComboBox.hidePopup();this.get_element().style.display="none";window.clearTimeout(this._charTimerId);this.raiseHidden()},_isDuplicate:function(){return this._getStatusValue()==this._previousStatus&&this._moodInput.value==this._previousMood&&this._currentSmileyUrl==this._previousMoodUrl},_saveStatus:function(B){if(Sys.UI.DomElement.containsCssClass(this._doneBtn,"hsmButtonDisabled")){this._cancelEvent(B);return}if(!this._isDuplicate()){if(this._saveInProgress){return}var A={status:this._getStatusValue(),mood:this._moodInput.value,smiley:this._currentSmileyUrl};this._doneBtn.focus();this._doneBtn.style.display="none";this._updatingBtn.style.display="block";this._call("SaveCustomMoodStatus",A,"_onSaveSuccess","_onSaveError");this._saveInProgress=true;this._duplicate=false}else{this._duplicate=true;this.hide()}},_onFocusInput:function(B){var A=B.target;setTimeout(function(){A.select()},50)},_getStatusValue:function(){return this._editor?this._editor.getContent().replace(/(\s|\u00a0)+/g," "):this._statusInput.value},_setStatusValue:function(A){if(this._editor){if(!A){A="<br>"}this._editor.add_init(Function.createPartial(this._editor,this._editor.setContent,A))}else{this._statusInput.value=A}},_showSmileyPalette:function(A){this._smileyPopupBehavior.show();this._smileyPalette.focus()},_hideSmileyPalette:function(A){this._smileyPopupBehavior.hide()},_onSelectSmiley:function(B,A){this._hideSmileyPalette();this._setSmileyUrl(A)},_setSmileyUrl:function(A){this._currentSmileyUrl=A;this._updateMoodImage.style.backgroundImage="url('"+A+"')"},_onKeyDown:function(A){if(!this._moodComboBox.get_visible()&&A.keyCode==13){if(A.target==this._cancelBtn){this.hide(A)}else{this._saveStatus(A)}}else{if(A.keyCode==27&&this.get_element().style.display!="none"){this.hide(A)}}},_onKeyPress:function(B){var C=this._editor?(B.target.ownerDocument==this._editor.getDoc()):(B.target==this._statusInput),A=(Sys.Browser.agent==Sys.Browser.Firefox)?B.rawEvent.charCode:B.charCode;if(C&&!B.altKey&&!B.ctrlKey&&A>=32&&this._getStatusValue().length>=400){B.preventDefault()}},_onPaste:function(A){window.setTimeout(Function.createDelegate(this,function(){var B=this._getStatusValue(),C=this._getStatusValue().substring(0,400).replace(/\n/g," ");if(B!=C){this._setStatusValue(C)}}),0)},_populateMoodList:function(A){var B=[];for(var C=0;C<A.moods.length;C++){B.push({text:A.moods[C].name,value:A.moods[C]})}this._moodComboBox.set_completionItems(B);$create(MySpace.UI.SmileySelector,{smileyData:A.smileyData},{selected:Function.createDelegate(this,this._onSelectSmiley)},null,this._smileyPalette)},_urlRegex:/\b((https?:\/\/)|(www\.)|(\S+\.com\/))\S+/gi,_updateCharCount:function(){var A=this._getStatusValue();if(this._shortenUrls){A=A.replace(this._urlRegex,this._shortenedURLBase+"123456")}var B=140-A.length;this._charCnt.innerHTML=B;this._charCnt.className=B<0?"negative":"";if(Sys.UI.DomElement.containsCssClass(this._doneBtn,"hsmButtonDisabled")&&!this._isDuplicate()){Sys.UI.DomElement.removeCssClass(this._doneBtn,"hsmButtonDisabled")}this._charTimerId=window.setTimeout(Function.createDelegate(this,this._updateCharCount),300)},_onMoodSelected:function(B,A){this._setSmileyUrl(A.get_value().smiley||this._spacerUrl)},_onSaveSuccess:function(A){this._onSaveComplete();this._saveStatusInCookie(A);this.raiseSaved(A)},_onSaveError:function(){this._onSaveComplete();var A=$get("hsmErrorText").innerHTML.replace(/<br.*>/gi,"\n");alert(A)},_onSaveComplete:function(){this._saveInProgress=false;this._doneBtn.style.display="";this._updatingBtn.style.display="none"},add_saved:function(A){this.get_events().addHandler("saved",A)},remove_saved:function(A){this.get_events().removeHandler("saved",A)},raiseSaved:function(A){var B=this.get_events().getHandler("saved");if(B){B(this,A)}},add_hidden:function(A){this.get_events().addHandler("hidden",A)},remove_hidden:function(A){this.get_events().removeHandler("hidden",A)},raiseHidden:function(A){var B=this.get_events().getHandler("hidden");if(B){B(this,A)}}};MySpace.UI.StatusMoodEditControl.registerClass("MySpace.UI.StatusMoodEditControl",MySpace.UI._StatusMoodBase);MySpace.UI.DefaultButton=function(){throw"Cannot instantiate static class."};var $defBtn=MySpace.UI.DefaultButton.render=function(C,A){if(C.parentNode&&Sys.UI.DomElement.containsCssClass(C.parentNode,"msDefBtn")){return}var B=document.createElement("span");B.className="msDefBtn";if(A){Sys.UI.DomElement.addCssClass(B,A)}C.parentNode.insertBefore(B,C);MySpace.UI.DefaultButton.attach(C);B.appendChild(C);return B};MySpace.UI.DefaultButton.attach=function(A){A.hide=function(){this.parentNode.style.display="none"};A.show=function(){this.parentNode.style.display=""};A.disable=function(){this.disabled=true;Sys.UI.DomElement.removeCssClass(this.parentNode,"msDefBtn");Sys.UI.DomElement.addCssClass(this.parentNode,"msDefBtnDisabled")};A.enable=function(){this.removeAttribute("disabled");Sys.UI.DomElement.removeCssClass(this.parentNode,"msDefBtnDisabled");Sys.UI.DomElement.addCssClass(this.parentNode,"msDefBtn")}};MySpace.UI.DefaultButton.attachAll=function(){var B=MySpace.Utils.Selector.query(".msDefBtn input");for(var A=0;A<B.length;A++){MySpace.UI.DefaultButton.attach(B[A]);if(B[A].disabled){B[A].disable()}}};MySpace.UI.DefaultButton.renderAll=function(A){var C=MySpace.Utils.Selector.query("input.msDefBtn, button.msDefBtn");for(var B=0;B<C.length;B++){$defBtn(C[B],A)}};MySpace.UI.Tooltip=function(A){this._tipDiv=document.createElement("div");this._tipDiv.innerHTML='<div style="position:absolute"></div><div class="t"><div><div></div></div></div><div class="m"><div id="fhLeftContentBorder" class="fhlborder"></div><div id="fhContent"></div><div id="fhRightContentBorder" class="fhrborder"></div><div class="clear"></div></div><div class="b"><div><div></div></div></div><iframe src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;z-index:1;"></iframe>';this._tipDiv.id="tooltipdiv";this._tipDiv.className="tooltipdiv "+this.get_cssClass();this._contentDiv=this._tipDiv.childNodes[2].childNodes[1];this._leftBorder=this._tipDiv.childNodes[2].firstChild;this._rightBorder=this._tipDiv.childNodes[2].childNodes[2];this._topBorder=this._tipDiv.childNodes[1];this._bottomBorder=this._tipDiv.childNodes[3];MySpace.UI.Tooltip.initializeBase(this,[A])};MySpace.UI.Tooltip.prototype={_arrowDiv:null,_arrowOffsetX:0,_arrowOffsetY:0,_arrowPos:null,_autoPos:true,_bottomBorder:null,_contentDiv:null,_cssClass:"",_hideDelay:500,_hideHandler:null,_hover:true,_leftBorder:null,_margin:10,_reflect:false,_rightBorder:null,_showDelay:0,_showHandler:null,_theme:"helper",_timerID:0,_tipDiv:null,_tipOffsetX:0,_tipOffsetY:0,_tipPos:"bottomright",_topBorder:null,_width:0,get_arrowOffsetX:function(){return this._arrowOffsetX},set_arrowOffsetX:function(A){this._arrowOffsetX=A},get_arrowOffsetY:function(){return this._arrowOffsetY},set_arrowOffsetY:function(A){this._arrowOffsetY=A},get_arrowPos:function(){return this._arrowPos},set_arrowPos:function(A){this._arrowPos=A},get_autoPos:function(){return this._autoPos},set_autoPos:function(A){this._autoPos=A},get_content:function(){return this._contentDiv.innerHTML},set_content:function(A){if(typeof(A)==="object"){this._contentDiv.appendChild(A)}else{this._contentDiv.innerHTML=A}},get_cssClass:function(){return this._cssClass||""},set_cssClass:function(A){this._cssClass=A},get_hideDelay:function(){return this._hideDelay},set_hideDelay:function(A){this._hideDelay=A},get_hover:function(){return this._hover},set_hover:function(A){this._hover=A},get_margin:function(){return this._margin},set_margin:function(A){this._margin=A},get_reflect:function(){return this._reflect},set_reflect:function(A){this._reflect=A},get_showDelay:function(){return this._showDelay},set_showDelay:function(A){this._showDelay=A},get_theme:function(){return this._theme},set_theme:function(A){this._theme=A},get_tipDiv:function(){return this._tipDiv},set_tipDiv:function(A){this._tipDiv=A},get_tipOffsetX:function(){return this._tipOffsetX},set_tipOffsetX:function(A){this._tipOffsetX=A},get_tipOffsetY:function(){return this._tipOffsetY},set_tipOffsetY:function(A){this._tipOffsetY=A},get_tipPos:function(){return this._tipPos},set_tipPos:function(A){this._tipPos=A},get_width:function(){return this._width},set_width:function(A){this._width=A},initialize:function(){this._hideHandler=Function.createDelegate(this,this._delayedHide);this._showHandler=Function.createDelegate(this,this._delayedShow);if(this._hover){$addHandler(this._element,"mouseover",this._showHandler);$addHandler(this._element,"mouseout",this._hideHandler);$addHandler(this._tipDiv,"mouseover",Function.createDelegate(this,this._clearTimerID));$addHandler(this._tipDiv,"mouseout",this._hideHandler)}if(this._getIsFixed()){this._tipDiv.style.position="fixed"}this._contentDiv.className=this._theme;this._tipDiv.firstChild.className=this._theme+"arrow";document.body.appendChild(this._tipDiv);this._arrowDiv=this._tipDiv.firstChild;if(this._width){this._tipDiv.style.width=this._width+"px"}},dispose:function(){$clearHandlers(this._element);document.body.removeChild(this._tipDiv);MySpace.UI.Tooltip.callBaseMethod(this,"dispose")},show:function(){this._setPos();this._tipDiv.style.display="block";this._raiseEvent("visibilityChanged")},hide:function(){this._tipDiv.style.display="none";this._raiseEvent("tooltipClosed")},_clearTimerID:function(){if(this._timerID){clearTimeout(this._timerID);this._timerID=0}},_delayedHide:function(A){this._clearTimerID();this._timerID=window.setTimeout(Function.createDelegate(this,this.hide),this._hideDelay)},_delayedShow:function(A){this._clearTimerID();this._timerID=window.setTimeout(Function.createDelegate(this,this.show),this._showDelay)},_raiseEvent:function(A){var C=this.get_events().getHandler(A);if(C){var B=new Sys.EventArgs();C(this,B)}},_setPos:function(){var P=tipY=0;var D;this._tipDiv.className="tooltipdiv "+this.get_cssClass();this._arrowDiv.className=this._theme+"arrow";this._arrowPos=null;this._rightBorder.className="fhrborder";this._leftBorder.className="fhlborder";this._topBorder.className="t";this._bottomBorder.className="b";var L=Sys.UI.DomElement.getBounds(this._element);var M=this._getTipDims();var K=document.compatMode;var C=(K=="BackCompat")?document.body.scrollLeft:document.documentElement.scrollLeft;var B=(K=="BackCompat")?document.body.scrollTop:document.documentElement.scrollTop;if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&K!="BackCompat"){L.x-=C;L.y-=B}if(!this._getIsFixed()&&Sys.Browser.agent===Sys.Browser.InternetExplorer){L.x+=C;L.y+=B}if(this._autoPos){this._setAutoPos(L,M)}var H=MySpace.UI.getComputedStyle(this._tipDiv);var F=MySpace.UI.getComputedStyle(this._arrowDiv);var J=(this._tipPos.indexOf("right")>-1?1:this._tipPos.indexOf("left")>-1?3:this._tipPos.indexOf("top")>-1?4:2);var I=M.width;if(this._width){I=this._width}P=L.x+L.width;switch(J){case 2:Sys.UI.DomElement.addCssClass(this._arrowDiv,"top");Sys.UI.DomElement.addCssClass(this._tipDiv,"tooltipbottom");break;case 3:Sys.UI.DomElement.addCssClass(this._arrowDiv,"right");Sys.UI.DomElement.addCssClass(this._tipDiv,"tooltipleft");P=L.x-I;this._rightBorder.className="fhrborderns";this._leftBorder.className="fhlborderws";this._bottomBorder.className="blc";this._topBorder.className="tlc";break;case 4:this._bottomBorder.className="bc";this._topBorder.className="tc";Sys.UI.DomElement.addCssClass(this._arrowDiv,"bottom");Sys.UI.DomElement.addCssClass(this._tipDiv,"tooltiptop");break;default:Sys.UI.DomElement.addCssClass(this._arrowDiv,"left");Sys.UI.DomElement.addCssClass(this._tipDiv,"tooltipright")}var E=F.height.replace("px","")-0;var G=F.width.replace("px","")-0;if(this._tipPos.indexOf("bottom")>-1){tipY=(this._tipPos!="bottom"?this._reflect?L.y:L.y+L.height-E-this._margin:L.y+L.height);P=(this._tipPos=="bottom"?L.x-(I/2)+(L.width/2):P);this._arrowPos=this._arrowPos||"top"}else{if(this._tipPos.indexOf("top")>-1){tipY=L.y-M.height+(this._tipPos!="top"?E+this._margin:0);P=(this._tipPos=="top"?L.x-(I/2)+(L.width/2):P);this._arrowPos=this._arrowPos||"bottom"}else{tipY=L.y-(M.height/2)+(L.height/2)-(E/2);this._arrowPos=this._arrowPos||"middle"}}this._tipDiv.style.left=(P+this._tipOffsetX)+"px";this._tipDiv.style.top=(tipY+this._tipOffsetY)+"px";var Q,A="";switch(this._arrowPos){case"bottom":Q=(this._tipPos=="top"?M.height:M.height-this._margin-E);if(this._tipPos=="top"){A=(this._arrowOffsetX+(I/2)-(G/2))+"px"}break;case"middle":Q=((M.height/2)-(E/2));break;default:Q=(this._tipPos=="bottom"?-E:this._margin);if(this._tipPos=="bottom"){A=(this._arrowOffsetX+(I/2)-(G/2))+"px"}}this._arrowDiv.style.left=A;this._arrowDiv.style.top=(Q+this._arrowOffsetY)+"px";var N=this._tipDiv.lastChild;N.width=I+"px";N.height=M.height+"px";N.style.zIndex=-1;N.style.display="block";this._tipDiv.style.height=M.height+"px";var O=MySpace.UI.getContentBox(this._contentDiv);if(browser.isIE6x&&document.compatMode!="BackCompat"){O.w+=15;I+=11}if(O.w==0||O.w>=I-10){O.w=I-11}this._contentDiv.style.width=O.w+"px";this._tipDiv.style.width=I+"px"},_setAutoPos:function(D,F){this._clearTimerID();var A=(typeof(window.pageXOffset)!=="undefined")?window.pageXOffset:document.documentElement.scrollLeft;var H=(typeof(window.pageYOffset)!=="undefined")?window.pageYOffset:document.documentElement.scrollTop;var G=(window.innerWidth?window.innerWidth:document.documentElement.clientWidth);var E=(window.innerHeight?window.innerHeight:document.documentElement.clientHeight);var C=["topleft","topright","bottomleft","bottomright"];var B=3;B=(D.x-F.width>A?(D.y-H+F.height>E&&D.y-F.height>H?(D.x+D.width+F.width<G?2:1):D.x+D.width+F.width<G?4:3):(D.y-H+F.height>E?2:4));this._tipPos=C[B-1]},_getTipDims:function(){var A=this._tipDiv.lastChild;A.style.display="none";this._contentDiv.style.width="";this._tipDiv.style.height="";this._tipDiv.style.width="";this._tipDiv.style.width=(this._width?this._width+"px":"");this._tipDiv.style.display="block";var B=Sys.UI.DomElement.getBounds(this._tipDiv);if(B.width<1){B.width=250}this._tipDiv.style.display="none";return{height:B.height,width:B.width}},_getIsFixed:function(){var A;var C=this._element.parentNode;while(C!==null){var B=MySpace.UI.getComputedStyle(C);if(B){A=B.position;if(A==="fixed"){return true}}C=C.parentNode}return false},add_tooltipClosed:function(A){this.get_events().addHandler("tooltipClosed",A)},remove_tooltipClosed:function(A){this.get_events().removeHandler("tooltipClosed",A)},add_visibilityChanged:function(A){this.get_events().addHandler("visibilityChanged",A)},remove_visibilityChanged:function(A){this.get_events().removeHandler("visibilityChanged",A)}};MySpace.UI.Tooltip.registerClass("MySpace.UI.Tooltip",Sys.UI.Control);