MySpace.Timer=function(){MySpace.Timer.initializeBase(this);this._interval=1000;this._enabled=false;this._timer=null};MySpace.Timer.prototype={get_interval:function(){return this._interval},set_interval:function(A){if(this._interval!==A){this._interval=A;this.raisePropertyChanged("interval");if(!this.get_isUpdating()&&this._timer!==null){this.restartTimer()}}},get_enabled:function(){return this._enabled},set_enabled:function(A){if(A!==this.get_enabled()){this._enabled=A;this.raisePropertyChanged("enabled");if(!this.get_isUpdating()){if(A){this._startTimer()}else{this._stopTimer()}}}},add_tick:function(A){this.get_events().addHandler("tick",A)},remove_tick:function(A){this.get_events().removeHandler("tick",A)},dispose:function(){this.set_enabled(false);this._stopTimer();MySpace.Timer.callBaseMethod(this,"dispose")},updated:function(){MySpace.Timer.callBaseMethod(this,"updated");if(this._enabled){this.restartTimer()}},_timerCallback:function(){var A=this.get_events().getHandler("tick");if(A){A(this,Sys.EventArgs.Empty)}},restartTimer:function(){this._stopTimer();this._startTimer()},_startTimer:function(){this._timer=window.setInterval(Function.createDelegate(this,this._timerCallback),this._interval)},_stopTimer:function(){window.clearInterval(this._timer);this._timer=null}};MySpace.Timer.registerClass("MySpace.Timer",Sys.Component);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);if(typeof deconcept=="undefined"){var deconcept={}}if(typeof deconcept.util=="undefined"){deconcept.util={}}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={}}deconcept.SWFObject=function(E,C,K,F,H,J,L,G,A,D){if(!document.getElementById){return}this.DETECT_KEY=D?D:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];this.addVariable("e",escape(document.location));if(E){this.setAttribute("swf",E)}if(C){this.setAttribute("id",C)}if(K){this.setAttribute("width",K)}if(F){this.setAttribute("height",F)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(J){this.addParam("bgcolor",J)}var B=L?L:"high";this.addParam("quality",B);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var I=(G)?G:window.location;this.setAttribute("xiRedirectUrl",I);this.setAttribute("redirectUrl","");if(A){this.setAttribute("redirectUrl",A)}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]||""},addParam:function(A,B){this.params[A]=B},getParams:function(){return this.params},addVariable:function(A,B){this.variables[A]=B},getVariable:function(A){return this.variables[A]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var A=[];var B;var C=this.getVariables();for(B in C){A[A.length]=B+"="+C[B]}return A},getSWFHTML:function(){var D="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}D='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'"';D+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var C=this.getParams();for(var A in C){D+=[A]+'="'+C[A]+'" '}var B=this.getVariablePairs().join("&");if(B.length>0){D+='flashvars="'+B+'"'}D+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}D='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'">';D+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var A in C){D+='<param name="'+A+'" value="'+C[A]+'" />'}var B=this.getVariablePairs().join("&");if(B.length>0){D+='<param name="flashvars" value="'+B+'" />'}D+="</object>"}return D},write:function(A){if(this.getAttribute("useExpressInstall")){var B=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(B)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof A=="string")?document.getElementById(A):A;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!==""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var C=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){C=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var D=1;var B=3;while(D){try{B++;D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new deconcept.PlayerVersion([B,0,0])}catch(E){D=null}}}else{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(E){try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");C=new deconcept.PlayerVersion([6,0,21]);D.AllowScriptAccess="always"}catch(E){if(C.major==6){return C}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}}if(D!==null){C=new deconcept.PlayerVersion(D.GetVariable("$version").split(" ")[1].split(","))}}}return C};deconcept.PlayerVersion=function(A){this.major=A[0]!==null?parseInt(A[0],10):0;this.minor=A[1]!==null?parseInt(A[1],10):0;this.rev=A[2]!==null?parseInt(A[2],10):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(D){var C=document.location.search||document.location.hash;if(D===null){return C}if(C){var B=C.substring(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("="))==D){return B[A].substring((B[A].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var C=document.getElementsByTagName("OBJECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function fixHoverForIe6(C){if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version==6){for(var A=0;A<C.length;A++){var B=C[A];if(B!=null){$addHandler(B,"mouseover",function(){Sys.UI.DomElement.addCssClass(this,"hover")});$addHandler(B,"mouseout",function(){Sys.UI.DomElement.removeCssClass(this,"hover")})}}}}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version==6){$addHandler(window,"load",function(){try{fixHoverForIe6($get("searchNavDivLeft").getElementsByTagName("li"));var B=$get("siteSearch");if(B!=null){fixHoverForIe6(B.getElementsByTagName("li"))}}catch(A){}})}function enableDistanceDropDown(A,B){var D=$get(B.distanceDivId);if(D){var C=D.getElementsByTagName("select")[0];if(C&&C.disabled){C.removeAttribute("disabled")}}}function keyPressHandler(A,B){var C=B.buttonId;var D;if(!A){A=window.event}if(window.event){D=event.keyCode}else{if(A.which){D=A.which}else{if(A.charCode){D=A.charCode}}}if(D==13){A.preventDefault();$get(B.buttonId).click();return false}return true}function searchButtonClick(A,B){doSubmit(new Array("siteSearch"))}function tabClick(B,C){var A=false;var D=C.element.getAttribute("searchType");var E=$get("type",$get("siteSearch"));if(E.value!=D){A=true;E.value=D}if(A==true){doSubmit(new Array("searchBox","previous"))}else{doSubmit(new Array("searchBox"))}}function locationClick(H,B){var C=B.element;var E=C.getAttribute("geoLocLat");var A=C.getAttribute("geoLocLong");var I=C.getAttribute("geoLocRegId");var G=C.getAttribute("geoLocCId");var D=C.getAttribute("geoLocCCode");var F=C.getAttribute("geoLocName");setSearchGeoLocation(E,A,I,G,D);$get("regionForm").getElementsByTagName("input")[0].value=F;doSubmit(new Array("siteSearch","filter","locationForm"))}function artistLocationClick(H,B){var C=B.element;var E=C.getAttribute("geoLocLat");var A=C.getAttribute("geoLocLong");var I=C.getAttribute("geoLocRegId");var G=C.getAttribute("geoLocCId");var D=C.getAttribute("geoLocCCode");var F=C.getAttribute("geoLocName");setSearchGeoLocation(E,A,I,G,D);$get("artistRegionForm").getElementsByTagName("input")[0].value=F;doSubmit(new Array("siteSearch","subFilter","locationForm"))}function setSearchGeoLocation(E,C,D,B,A){if(E.length!=0){$get("latitude").value=E}if(C.length!=0){$get("longitude").value=C}if(D.length!=0){$get("region").value=D}if(B!=0){$get("country").value=B}if(A.length!=0){$get("countryCode").value=A}}function updateButtonClick(A,B){doSubmit(new Array("siteSearch","filter"))}function updateArtistButtonClick(A,B){doSubmit(new Array("siteSearch","subFilter"))}function similarPagesClick(A){$get("qry",$get("siteSearch")).value=A;doSubmit(new Array("siteSearch"))}function UpdateQTextBox(A){if(A!=null&&A.length>0){$get("qry",$get("siteSearch")).value=A}updateButtonClick()}function doSubmit(B){if($get("type",$get("siteSearch")).value!="Local"&&$get("qry",$get("siteSearch")).value.trim().length==0&&$get("browseMode")==null){return}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&(navigator.userAgent.toLowerCase().indexOf("aol")==-1)){window.external.AutoCompleteSaveForm(document.aspnetForm)}var F=new SiteSearch.UrlHelper(document.aspnetForm.action);F.query="";var E=getElementsByTagNameMultiple(["input","textarea","select"],B);for(var D=0;D<E.length;D++){if(E[D]&&E[D].attributes!=null){if(E[D].getAttribute("type")!=null&&(E[D].getAttribute("type")=="radio"||E[D].getAttribute("type")=="checkbox")){if(E[D].checked){var C=E[D];do{if(C.getAttribute("queryID")!=null){F.SetQueryValue(C.getAttribute("queryID"),encodeURIComponent(E[D].value));break}}while((C=C.parentNode)&&C!=null)}}else{if(E[D].getAttribute("queryID")!=null&&E[D].value!=null&&E[D].value.trim().length>0){F.SetQueryValue(E[D].getAttribute("queryID"),encodeURIComponent(E[D].value))}}}}var A=F.ToUrl();self.location.href=A}function getElementsByTagNameMultiple(A,E){var D=new Array();for(var F=0;F<E.length;F++){var H=$get(E[F]);for(var C=0;C<A.length;C++){var G=H.getElementsByTagName(A[C]);for(var B=0;B<G.length;B++){D.push(G.item(B))}}}return D}function UseNoPicImage(A){A.src=noPicUrl}function wrap(A){var B=$get(A);if(B){MySpace.Util.applyWBRToElement(B,{frequency:12})}}function showAlertPopUp(A){var B=MySpace.UI.Popup.create(A,MySpaceRes.Common.Attention);B.add_button(MySpaceRes.Common.Ok,true).isCancel=true;B.show()}function openLocationForm(A,B){var C=A.rawEvent;if(!SiteSearch.locationForm){SiteSearch.locationForm=new SiteSearch.LocationForm()}SiteSearch.locationForm.open(C);return !1}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};SiteSearch=function(){};SiteSearch.UrlHelper=function(){};SiteSearch.UrlHelper=function(A){this.fullUrl=A;this.basePath=this.fullUrl;this.query="";if(this.fullUrl.indexOf("?")>-1){qSplit=this.fullUrl.split("?");for(var B=1;B<qSplit.length;B++){this.query+=qSplit[B]}if(this.query.indexOf("#")>-1){this.query=this.query.substring(0,this.query.indexOf("#"))}this.basePath=qSplit[0]}};SiteSearch.UrlHelper.prototype={GetQueryPair:function(B){var A=this.query.indexOf("&"+B+"=");if(A==-1){if(this.query.indexOf(B+"=")==0){A=0}}if(A>-1){var C=this.query.indexOf("&",A+1);if(C==-1){C=this.query.length}return this.query.substring(A,C)}return null},GetQueryValue:function(A){var B=this.GetQueryPair(A);if(B!=null&&B.indexOf("=")>-1){return B.split("=")[1]}else{return null}},SetQueryValue:function(A,C,B){if(B){C=escape(C)}if(this.query.length>0){var D=this.GetQueryPair(A);if(D!=null){this.query=this.query.replace(D,"&"+A+"="+C)}else{this.query+="&"+A+"="+C}}else{this.query=A+"="+C}},RemoveQueryPair:function(A){var B=this.GetQueryPair(A);if(B!=null){this.query=this.query.replace(B,"")}},ToUrl:function(){return this.basePath+"?"+this.query}};SiteSearch.LocationForm=function(){this.visible=false;this.locdiv=null;this.spans=null};SiteSearch.LocationForm.prototype.setStyle=function(A,C,B){A.display=this.visible?"none":"block";A.left=C+"px";A.top=B+"px"};SiteSearch.LocationForm.prototype.open=function(C){var G=17,E;var F=0,B,A=0;var D=$get("locationForm");var H=D;do{G+=H.offsetTop}while(H=H.offsetParent);E=G;this.spans=this.spans||D.getElementsByTagName("span");(C||window.event).cancelBubble=!A;if(!this.locdiv){this.locdiv=document.createElement("DIV");D.appendChild(this.locdiv).id="locationDiv";document.onclick=function(I){SiteSearch.locationForm.close(I)}}while(B=this.spans[A++]){if(F){this.setStyle(B.style,F+1,G);G+=B.offsetHeight}if(B.className=="location2"){do{F+=B.offsetLeft}while(B=B.offsetParent)}}this.locdiv.style.height=G-E+"px";this.setStyle(this.locdiv.style,F,E-1);this.visible=!this.visible};SiteSearch.LocationForm.prototype.close=function(A){SiteSearch.locationForm.visible&&SiteSearch.locationForm.open(A)};function DYMClick(A,B){var C=$get("qry",$get("siteSearch"));$get("prevQry",$get("dymPrevQry")).value=C.value;C.value=B.dym;$get("hdnOrig",$get("siteSearch")).value=B.orig;doSubmit(new Array("siteSearch","dymPrevQry"))}function onSongItemMouseOver(B,A){Sys.UI.DomElement.addCssClass(A.song,"songSearchHover")}function onSongItemMouseOut(B,A){Sys.UI.DomElement.removeCssClass(A.song,"songSearchHover")}function onSongSearchItemsUnload(){for(var B=0;B<songSearchHoverLength;B++){var A=songSearchHoverElements[B];$removeHandler(A,"mouseover",onSongItemMouseOver);$removeHandler(A,"mouseout",onSongItemMouseOut)}}function toggleAdvancedMusicFilter(){var A=MySpace.UI.getElementsByClassName("filterEmpty");if(A&&A.length==1){Sys.UI.DomElement.removeCssClass($get("subFilter"),"filterEmpty")}else{Sys.UI.DomElement.addCssClass($get("subFilter"),"filterEmpty")}}Type.registerNamespace("LocalSearch");LocalSearch.LocalPage=function(){LocalSearch.LocalPage.initializeBase(this)};LocalSearch.LocalPage.prototype={_locationTextBoxId:null,_myReviewsLink:null,initialize:function(){LocalSearch.LocalPage.callBaseMethod(this,"initialize")},submit:function(B){var A=new Array();var D=0;for(var C=0;C<B.length;C++){var E=$get(B[C]);if(E!=null){A[D++]=B[C]}}doSubmit(A)},submitAllFilters:function(){var A=new Array();if($get("localBrowseForm")){A[0]="localBrowseForm"}else{A[0]="siteSearch"}A[1]="localCategoryForm";A[2]="localSelectionFilters";A[3]="localLocationForm";A[4]="localSortByForm";this.submit(A)},GeoLocationClick:function(H,B){var C=B.element;var E=C.getAttribute("geoLocLat");var A=C.getAttribute("geoLocLong");var I=C.getAttribute("geoLocRegId");var G=C.getAttribute("geoLocCId");var D=C.getAttribute("geoLocCCode");var F=C.getAttribute("geoLocName");setSearchGeoLocation(E,A,I,G,D);if(this._locationTextBoxId!=null){$get(this._locationTextBoxId,$get("siteSearch")).value=F}this.submitAllFilters()},DisambiguationCategoryClick:function(A,B){var C=B.element.getAttribute("localCat");$get("hdnLocalCategoryFilter",$get("localCategoryForm")).value=C;this.submitAllFilters()},sortByDropDownChange:function(){this.submitAllFilters()},AddFilter:function(A,C){var B=$get(A,$get("localSelectionFilters"));if(B){B.value=C;this.submitAllFilters()}},RemoveFilter:function(A,C){var B=C.element.getAttribute("localControlId");if(B){var D=$get(B,$get("localSelectionFilters"));if(D){D.value=null;this.submitAllFilters()}}},RemoveAllFilters:function(B,E){var A=false;var F=$get("localSelectionFilters");if(F!=null){var C=F.getElementsByTagName("input");for(var D=0;D<C.length;D++){C[D].value=null;A=true}}if(A){this.submitAllFilters()}},GetDirection:function(A,D){var C=D.element;var G=C.getAttribute("localItemId");var F=C.getAttribute("localLat");var B=C.getAttribute("localLng");var E=$find("getDirectionsInstance");if(E!=null){E.ViewDirections(G,MyStuff.Enum.StuffChannelType.Local,F,B)}},dispose:function(){$clearHandlers(this._myReviewsLink)}};LocalSearch.LocalPage.Instance=function(){if(this._localPageInstance==null){this._localPageInstance=$create(LocalSearch.LocalPage,{},{},null)}return this._localPageInstance};LocalSearch.LocalPage.registerClass("LocalSearch.LocalPage",Sys.Component);LocalSearch.Map=function(B,C,A){if(typeof(Sys)!=="undefined"){Sys.Application.registerDisposableObject(this)}this._pinImage=B;this._pinImageHover=C;if(A!=undefined&&A!=null){this._locations=Sys.Serialization.JavaScriptSerializer.deserialize(A);if(this._locations==null){this._locations=[]}}this._map=this._initializeMap();this._RegisterResize();this._SetPins()};LocalSearch.Map.prototype={_map:null,_pinImage:null,_pinImageHover:null,_locations:[],_mapTopLeft:null,_initializeMap:function(){var G=null;if(GBrowserIsCompatible()){G=new GMap2(document.getElementById("localMap"));var A=new GLatLng(47.45,-122.3);var E=13;var B=13;if(this._locations.length>0){var H=this._locations[0];if(!isNaN(H.Lat)&&!isNaN(H.Lng)){A=new GLatLng(H.Lat,H.Lng)}G.setCenter(A,E);var F=false;var D=new GLatLngBounds();for(var C=0;C<this._locations.length;C++){H=this._locations[C];if(!isNaN(H.Lat)&&!isNaN(H.Lng)){D.extend(new GLatLng(H.Lat,H.Lng));F=true}}if(F){E=G.getBoundsZoomLevel(D);A=D.getCenter()}}G.setCenter(A,E<B?E:B);G.setUIToDefault()}return G},_SetPins:function(){var H=$get("localMapPopups");var C=[];for(var D=0;D<this._locations.length;D++){var G=this._locations[D];var B=new GIcon(G_DEFAULT_ICON);B.image=String.format(this._pinImage,G.SerialNumber);var A={icon:B,clickable:true};if(!isNaN(G.Lat)&&!isNaN(G.Lng)){var I=new GLatLng(G.Lat,G.Lng);var E=new GMarker(I,A);var F="popup"+D;E.popUp=this._CreatePopUp(H,F,G.Tip);E.parentMap=this._map;E.itemIndex=G.SerialNumber;E.localSearchMap=this;GEvent.addListener(E,"mouseover",function(){onMarkerHover(this)});GEvent.addListener(E,"mouseout",function(){hideTooltip()});this._map.addOverlay(E)}}},_ShowPinTooltip:function(A){var B=$get(A);if(!B){return}B.style.display="block"},_GetMapCoord:function(){var B=0;var A=0;var C=$get("localMap");do{A+=C.offsetTop;B+=C.offsetLeft}while(C=C.offsetParent);this._mapTopLeft={left:B,top:A}},_RegisterResize:function(){this._GetMapCoord();$addHandler(window,"resize",Function.createDelegate(this,this._GetMapCoord))},_CreatePopUp:function(D,A,C){if(!D){return}var B=document.createElement("DIV");B.className="localMapPopUp";B.id=A;B.innerHTML=C;$addHandler(B,"mouseover",maintainPopUpVisibility);$addHandler(B,"mouseout",hideTooltip);D.appendChild(B);return B},dispose:function(){$removeHandler(window,"resize",Function.createDelegate(this,this._GetMapCoord));var D=$get("localMapPopups");for(var C=0;C<this._locations.length;C++){var B="popup"+C;var A=$get(B,D);$clearHandlers(A)}GUnload()}};if(typeof(Sys)!=="undefined"){LocalSearch.Map.registerClass("LocalSearch.Map",Sys.Component,Sys.IDisposable)}LocalSearch.Filter=function(){LocalSearch.Filter.initializeBase(this)};LocalSearch.Filter.prototype={_sortByDropDownId:"localSortByDropDown",_sortByDropDown:null,_cssSelector:"a.localsDropdownDivLink",_items:null,initialize:function(){LocalSearch.Filter.callBaseMethod(this,"initialize");this.attachFilterHandlers();if(this._sortByDropDownId!=null){this.attachSortByDropDownHandler()}},clickFilterHandler:function(C){var A;var B;var D=C.target||C.srcElement;if(D){if(D.attributes.getNamedItem("filterId")){A=D.attributes.getNamedItem("filterId").value}if(D.attributes.getNamedItem("filterName")){B=D.attributes.getNamedItem("filterName").value}}var E="hdnLocal"+B+"Filter";LocalSearch.LocalPage.Instance().AddFilter(E,A)},attachFilterHandlers:function(){this._items=MySpace.Utils.Selector.query(this._cssSelector);if(this._items&&this._items.length){for(var A=0;A<this._items.length;A++){$addHandler(this._items[A],"click",Function.createDelegate(this,this.clickFilterHandler))}}},attachSortByDropDownHandler:function(){this._sortByDropDown=$get(this._sortByDropDownId);if(this._sortByDropDown){$addHandler(this._sortByDropDown,"change",Function.createDelegate(this,this.sortByDropDownChangeHandler))}},sortByDropDownChangeHandler:function(){LocalSearch.LocalPage.Instance().sortByDropDownChange()},removeFilterHandlers:function(){this._items=MySpace.Utils.Selector.query(this._cssSelector);if(this._items&&this._items.length){for(var A=0;A<this._items.length;A++){$clearHandlers(this._items[A])}}},dispose:function(){this.removeFilterHandlers();if(this._sortByDropDown!=null){$clearHandlers(this._sortByDropDown)}}};LocalSearch.Filter.Instance=function(){return $find("jsLocalSearchFilter")};LocalSearch.Filter.registerClass("LocalSearch.Filter",Sys.Component);function onMarkerHover(A,B){A.setImage(String.format(A.localSearchMap._pinImageHover,A.itemIndex));showTooltip(A)}function showTooltip(A){setPopUpVisible=true;tryHidePreviousOne(G);if(!A){return}var G=A.popUp;if(!G){return}var E=A.parentMap;currentPopUpDiv=G;var B=A.localSearchMap._mapTopLeft;var F=E.fromLatLngToContainerPixel(A.getPoint());G.style.display="block";var D=B.left+F.x-G.offsetWidth/2;var C=B.top+F.y+30;G.style.left=D+"px";G.style.top=C+"px";currentMarker=A}var currentPopUpDiv=null;var currentMarker=null;var setPopUpVisible=false;function hideTooltip(){setPopUpVisible=false;setTimeout(doHideTooltip,250)}function maintainPopUpVisibility(){setPopUpVisible=true}function doHideTooltip(){if(!setPopUpVisible&&currentPopUpDiv){resetMap()}}function tryHidePreviousOne(A){if(currentPopUpDiv&&A!=currentPopUpDiv){resetMap()}}function resetMap(){currentPopUpDiv.style.display="none";if(currentMarker){currentMarker.setImage(String.format(currentMarker.localSearchMap._pinImage,currentMarker.itemIndex));currentMarker=null}}SiteSearch.LocalPageDD=function(){SiteSearch.LocalPageDD.initializeBase(this)};SiteSearch.LocalPageDD.prototype={timeout:500,closetimer:0,currentLocalsDD:null,closeDelegate:null,initialize:function(){SiteSearch.LocalPageDD.callBaseMethod(this,"initialize");this.closeDelegate=Function.createDelegate(this,this.close);$addHandler(document,"click",this.closeDelegate)},openClick:function(A,B){var D=B.prefix;var C=A.rawEvent;this.cancelCloseTime();var E=$get(D+"DropdownForm");if(E!=this.currentLocalsDD){this.close()}this.currentLocalsDD=E;if(this.currentLocalsDD.style.display=="block"){this.close()}else{this.open(C,D)}},openMouseOver:function(A,B){var D=B.element.getAttribute("localPrefix");var C=A.rawEvent;this.cancelCloseTime(null,null);this.close();this.currentLocalsDD=$get(D+"DropdownForm");this.open(C,D)},open:function(D,E){(D||window.event).cancelBubble=true;var F=0;var A=$get(E+"LI");do{F+=A.offsetLeft}while(A=A.offsetParent);this.currentLocalsDD.style.left=F+"px";var B=$get(E+"Wrap");if(B!=null){var C=Sys.UI.DomElement.getBounds(B);this.currentLocalsDD.style.width=C.width+"px"}this.currentLocalsDD.style.display="block"},close:function(){if(this.currentLocalsDD){this.currentLocalsDD.style.display="none"}},setCloseTime:function(A,B){this.closetimer=window.setTimeout(this.closeDelegate,this.timeout)},cancelCloseTime:function(A,B){if(this.closetimer){window.clearTimeout(this.closetimer);this.closetimer=null}}};SiteSearch.LocalPageDD.Instance=function(){if(this.localPageDD==null){this.localPageDD=$create(SiteSearch.LocalPageDD,{},null,null)}return this.localPageDD};SiteSearch.LocalPageDD.registerClass("SiteSearch.LocalPageDD",Sys.Component);function DOMSearchByClass(C,A){var E=MySpace.UI.getElementsByClassName(C);var D=E.length;for(var B=0;B<D;B++){if(E[B]){A(E[B])}}}function DOMSearchById(C,A){var B=$get(C);if(B){A(B)}}function DOMSearchByIdInParent(E,D,A){var C=$get(D);if(C){var B=$get(E,C);if(B){A(B)}}}Type.registerNamespace("MySpace.SiteSearch");MySpace.SiteSearch.SearchDropDown=function(){MySpace.SiteSearch.SearchDropDown.initializeBase(this)};MySpace.SiteSearch.SearchDropDown.prototype={timeout:500,closetimer:0,currentDropDown:null,closeDelegate:null,initialize:function(){MySpace.SiteSearch.SearchDropDown.callBaseMethod(this,"initialize");this.closeDelegate=Function.createDelegate(this,this.close);$addHandler(document,"click",this.closeDelegate)},openClick:function(A,B){var D=B.prefix;var C=A.rawEvent;this.cancelCloseTime();var E=$get(D+"Bottom");if(E!=this.currentDropDown){this.close()}this.currentDropDown=E;if(this.currentDropDown.style.display=="block"){this.close()}else{this.open(C,D)}},open:function(F,G){(F||window.event).cancelBubble=true;var H=0;var A=$get(G+"HeaderUL");do{H+=A.offsetLeft}while(A=A.offsetParent);var C;var B=$get(G+"Header");if(B!=null){var E=Sys.UI.DomElement.getBounds(B);C=E.width}this.currentDropDown.style.display="block";var D=Sys.UI.DomElement.getBounds(this.currentDropDown).width;if(C){if(D>C){H=H-(D-C)}else{this.currentDropDown.style.width=C+"px"}}this.currentDropDown.style.left=H+"px"},close:function(){if(this.currentDropDown){this.currentDropDown.style.display="none"}},setCloseTime:function(A,B){this.closetimer=window.setTimeout(this.closeDelegate,this.timeout)},cancelCloseTime:function(A,B){if(this.closetimer){window.clearTimeout(this.closetimer);this.closetimer=null}},onSelect:function(B,F){var E=F.element.getAttribute("displayId");var H=F.prefix;var A=!!F.shouldStoreSeleted;var D=$get(H+"HeaderLI",$get(H+"Header"));var G=$get(H+"BottomLI_"+E,$get(H+"Bottom"));if(D&&G){D.innerHTML=G.innerHTML+" &#9660;"}if(A){var C=$get(H+"Selected");if(C){C.value=E}}},dispose:function(){if(this.closeDelegate){$removeHandler(document,"click",this.closeDelegate)}}};MySpace.SiteSearch.SearchDropDown.Instance=function(){if(this._instance==null){this._instance=$create(MySpace.SiteSearch.SearchDropDown,{},{},null)}return this._instance};MySpace.SiteSearch.SearchDropDown.registerClass("MySpace.SiteSearch.SearchDropDown",Sys.Component);var AdTooltip={continuePlayback:false,addStyles:function(B){var C=null;if(document.createStyleSheet){C=document.createStyleSheet()}else{var A=document.getElementsByTagName("head")[0];C=document.createElement("style");A.appendChild(C)}if(Sys.Browser.agent===Sys.Browser.InternetExplorer){C.cssText=B}else{if(Sys.Browser.agent===Sys.Browser.Safari){C.innerText=B}else{C.innerHTML=B}}},close:function(){if(typeof(window.tip)!="undefined"){window.tip.hide()}},reposition:function(){var D=286;var F=300;var B;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){B=document.getElementById("shell")}else{if(Sys.Browser.agent===Sys.Browser.Safari){B=document.getElementById("shell")}else{B=document.getElementById("shell").getElementsByTagName("object")[0]}}var A=MySpaceMusic.getElementPosition(B);var C=0;if(B.offsetWidth>F){C=(B.offsetWidth-F)/2}var E=(MusicPlayerControl.Width=="450")?44:99;window.tip._tipDiv.style.left=(A.x+C)+"px";window.tip._tipDiv.style.top=(A.y+E)+"px"},open:function(A){if(typeof(A)!="undefined"){AdTooltip.continuePlayback=A}AdTooltip.close();var F=286;var H=300;var C;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){C=document.getElementById("shell")}else{if(Sys.Browser.agent===Sys.Browser.Safari){C=document.getElementById("shell")}else{C=document.getElementById("shell").getElementsByTagName("object")[0]}}var B=MySpaceMusic.getElementPosition(C);var E=0;if(C.offsetWidth>H){E=(C.offsetWidth-H)/2}var G=(MusicPlayerControl.Width=="450")?44:99;var D=".tooltipdiv .helper{background:none;border:none;}.tooltipdiv .helperarrow{display:none;}.tooltipleft{margin-left:10px;}";AdTooltip.addStyles(D);content="<iframe scrolling='no' style='position:absolute;' id='musicFlashPlayerContent' height='"+F+"' width='"+H+"' frameborder='0' src='"+MusicPlayerControl.TooltipUrl+"'></iframe>";window.tip=$create(MySpace.UI.Tooltip,{content:content,autoPos:false,hover:false,tipPos:"bottom",margin:0},null,null,$get(MusicPlayerControl.SwfObjectDiv));window.tip._tipDiv.childNodes[1].style.display="none";window.tip._tipDiv.childNodes[2].childNodes[0].style.display="none";window.tip._tipDiv.childNodes[2].childNodes[2].style.display="none";window.tip._tipDiv.childNodes[3].style.display="none";window.tip._tipDiv.childNodes[2].style.background="transparent";window.tip.show();window.tip._tipDiv.style.left=(B.x+E)+"px";window.tip._tipDiv.style.top=(B.y+G)+"px";$addHandler(window,"resize",AdTooltip.reposition)},onClickContinueListen:function(){if(typeof(window.parent)!="undefined"&&typeof(window.parent.tip)!="undefined"){window.parent.tip.hide();if(AdTooltip.continuePlayback){window.parent.MySpaceMusic.getPlayerFlashObject().playCurrentTrack()}}}};var FlashUpgrade={checkIfBelow104:function(){if((Sys.Browser.agent===Sys.Browser.Safari)&&(Sys.Browser.version<200)){return true}if(Sys.Browser.agent===Sys.Browser.Firefox){var A=navigator.oscpu;return(A.indexOf("10.3")!=-1)||(A.indexOf("10.2")!=-1)}return false},Init:function(){var E=null;try{E=new SWFObject(MusicPlayerControl.EmbedHandlerURL,"shell",MusicPlayerControl.Width,MusicPlayerControl.Height,MusicPlayerControl.PlayerVersion,MusicPlayerControl.BgColor)}catch(H){}var C=MusicPlayerControl.PlayerVersion.split(".");var D=false;var G=false;var F=false;var B=false;var A=false;if(E&&E.installedVer!=undefined){D=E.installedVer.major>C[0];G=E.installedVer.major==C[0];F=E.installedVer.minor>C[1];B=E.installedVer.minor==C[1];A=E.installedVer.rev>=C[2]}if(D||(G&&F)||(G&&B&&A)){if(E){E.addParam("allowScriptAccess","always");E.addParam("wmode","transparent");E.write(MusicPlayerControl.SwfObjectDiv)}}else{MusicPlayerControl.NeedUpgrade=true;document.getElementById(MusicPlayerControl.SwfObjectDiv).style.backgroundColor="#FFFFFF";if(MusicPlayerControl.FlashUpgradeEnabled){if(!MusicPlayerControl.IsPixelPlayer){document.getElementById(MusicPlayerControl.SwfObjectDiv).innerHTML=MusicPlayerControl.FlashUpgradeMarkup.replace("{0}",FlashUpgrade.GetFlashUpgradeURL(true));if(MySpace.ClientContext.FunctionalContext=="MusicSinglePlaylist"||MySpace.ClientContext.FunctionalContext=="ArtistAlbums"){$get("PlaylistsSinglePlayer").style.height="172px";$get("flashUpgradeBig").style.margin="0px 0px 0px 67px"}}else{}}else{document.getElementById(MusicPlayerControl.SwfObjectDiv).innerHTML='<span style="color:#000000;"><blockquote>'+MusicPlayerControl.ResourcesGetFlash+"</blockquote></span>"}}},GetFlashUpgradeURL:function(A){var J=MusicPlayerControl.AllOtherFlashUpgradeURL;if(A){var D=navigator.userAgent.toLowerCase();var C=navigator.platform.toLowerCase();var H=false;var I=false;var B=false;var E=false;var F=false;var K=false;var G=false;H=(D.indexOf("win 9x 4.90")!=-1&&D.indexOf("win")!=-1);I=(D.indexOf("win98")!=-1)||(D.indexOf("windows 98")!=-1);B=(D.indexOf("inux")!=-1);E=(D.indexOf("mac os x")!=-1);F=(E&&FlashUpgrade.checkIfBelow104());K=(E&&((D.indexOf("ppc")!=-1)||(D.indexOf("powerpc")!=-1)));G=(E&&((C.indexOf("intel")!=-1)));if(I||H){if(Sys.Browser.agent===Sys.Browser.InternetExplorer){J=MusicPlayerControl.WinME98_IE_FlashUpgradeURL}if(Sys.Browser.agent===Sys.Browser.Firefox){J=MusicPlayerControl.WinME98_Netscape_FlashUpgradeURL}}else{if(B){J=MusicPlayerControl.Linux_FlashUpgradeURL}else{if(F){if(K){J=MusicPlayerControl.MacOSX_Less10dot4_PowerPC_FlashUpgradeURL}if(G){J=MusicPlayerControl.MacOSX_Less10dot4_Intel_FlashUpgradeURL}}}}}return J}};var LoginObj={ajaxActionHandler:"/Modules/MusicV2/Services/MusicUtil.ashx?action=EnforceLogin",req:null,_loginWin:null,Sleep:function(A){setTimeout("LoginObj.EnforceLoginOpenComplete()",A)},LoginRedirect:function(){if(LoginObj.req.readyState==4){var json=eval("("+LoginObj.req.responseText+")");if(json.ServerResponse.IsRequestSuccessful){window.location.href=json.ServerResponse.DisplayText}}},EnforceLoginPOMP:function(A){LoginObj._loginWin=window.open(decodeURI(A),"newWin","","");LoginObj.Sleep(1000)},EnforceLoginOpenComplete:function(){if(LoginObj._loginWin==null){LoginObj.Sleep(1000)}else{if(LoginObj._loginWin.document==null){LoginObj.Sleep(1000)}else{var A=LoginObj._loginWin.document.getElementById(MusicPlayerControl.SwfObjectDiv);if(A==null){LoginObj.Sleep(1000)}else{LoginObj._loginWin.LoginObj.EnforceLogin()}}}}};var Purchase={Popup:null,AlbumOnlySong:false,BuyOptionObjects:null,ClickedWhileSongPlaying:null,ButtonMouseOver:function(D,B){if(D!=null&&B!=""){if(D.className==""){D.className=B}else{var E="";var A=D.className.split(" ");for(var C=0;C<A.length;C++){if(A[C]==B){return}}D.className+=" "+B}}},ButtonMouseOut:function(D,C){if(D!=null&&C!=""){var E="";var A=D.className.split(" ");for(var B=0;B<A.length;B++){if(A[B]!=C){E+=(E?" ":"")+A[B]}}D.className=E}},ButtonClicked:function(){if(Purchase.ClickTrackingEnabled()){Purchase.ButtonClickTracking()}MySpace.UI.hideElements=function(B,A){for(name in B){if(B[name]=="object"){B[name]=""}}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"):"")}}};Purchase.OpenPopup(Purchase.CreatePopupContent())},RingtonesButtonClicked:function(A){if(Purchase.ClickTrackingEnabled()){Purchase.MakeBeaconRequest("","ringtones","jamster",MySpace.Application.keyDisabled("MusicJV_BuyButtonMultipleProviders"))}if(MySpace.ClientContext.FunctionalContext!="PopUpPlayer"){Purchase.Popup._hide()}Ringtones.openBeta(A)},CreatePopupContent:function(){var j=0;var buyOptions=new Array();var ringtoneArtist="";var iTunesButton="<div id='poiTunesLogo'></div> 							<div id='poiTunesPrice' style='padding:13px 21px 0px 0px;'>"+MySpaceRes.Purchase.For+"</div>";var amazonButton="<div id='poAmazonLogo'></div> 							<div id='poAmazonPrice'>"+MySpaceRes.Purchase.For+"</div>";var jamsterButton="<div id='poRingtoneButtons'> 								<H5 class='poHfive'><span id='poBoldText' class='poBoldText'>"+MySpaceRes.Purchase.ChooseMp3s+"</span></H5> 								<div id='poRingtoneButton' class='poMusicButton' onclick=\"javascript:Purchase.RingtonesButtonClicked('{0}');\" > 									<div id='poJamsterLogo'></div> 									<div id='poJamsterPrice'>"+MySpaceRes.Purchase.Ringtones+"</div> 								</div> 							 </div>";var popupContent="<div id='po'> 								<div id='poGreeting'> 									<H2 class='poHtwo'>"+MySpaceRes.Purchase.GreatChoice+"</H2> 								</div>									<div id='poInformation'> 									<H5 class='poHfive'>"+MySpaceRes.Purchase.DownloadInformation+"</H5> 								</div> 								<div id ='poAlbumOnly'> 									<H5 class='poHfive'><span id='poBoldText' class='poBoldText' style='color:red !important;font-weight:bold !important;font-size:10px !important;'>"+MySpaceRes.Purchase.AlbumOnly+"</span></h5> 								</div> 								<div id='poMusicButtons'> 									<H5 class='poHfive'><span id='poBoldText' class='poBoldText'>"+MySpaceRes.Purchase.DownloadMp3s+"</span></H5>";var sortFunction=function(a,b){var c=a.providerName;var d=b.providerName;if(c>d){return -1}if(c<d){return 1}return 0};buyOptions=Purchase.BuyOptionObjects.split("|");for(j=0;j<buyOptions.length;j++){buyOptions[j]=eval("("+buyOptions[j]+")")}buyOptions.sort(sortFunction);for(j=0;j<buyOptions.length;j++){switch(buyOptions[j].purchaseType.toLowerCase()){case"song":popupContent=MySpaceMusic.textFormat(popupContent,buyOptions[j].mediaName,buyOptions[j].artistName);switch(buyOptions[j].providerName.toLowerCase()){case"amazon":popupContent+="<div id='poMusicButton' class='poMusicButton' onclick=\"javaScript:Purchase.SongClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(amazonButton,buyOptions[j].price);break;case"itunes":popupContent+="<div id='poMusicButton' class='poMusicButtonNoBackground' onclick=\"javaScript:Purchase.SongClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(iTunesButton,buyOptions[j].price);break;default:}popupContent+="</div>";break;case"albumonly":popupContent=MySpaceMusic.textFormat(popupContent,buyOptions[j].mediaName,buyOptions[j].artistName);switch(buyOptions[j].providerName.toLowerCase()){case"amazon":popupContent+="<div id='poMusicButton' class='poMusicButton' onclick=\"javaScript:Purchase.SongClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(amazonButton,buyOptions[j].price);break;case"itunes":popupContent+="<div id='poMusicButton' class='poMusicButtonNoBackground' onclick=\"javaScript:Purchase.SongClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(iTunesButton,buyOptions[j].price);break;default:}popupContent+="</div>";Purchase.AlbumOnlySong=true;break;case"album":popupContent=MySpaceMusic.textFormat(popupContent,buyOptions[j].mediaName,buyOptions[j].artistName);switch(buyOptions[j].providerName.toLowerCase()){case"amazon":popupContent+="<div id='poMusicButton' class='poMusicButton' onclick=\"javaScript:Purchase.AlbumClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(amazonButton,buyOptions[j].price);break;case"itunes":popupContent+="<div id='poMusicButton' class='poMusicButtonNoBackground' onclick=\"javaScript:Purchase.AlbumClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(iTunesButton,buyOptions[j].price);break;default:}popupContent+="</div>";break;case"playlist":popupContent="<div id='po'> 										<div id='poGreeting'> 											<H2 class='poHtwo'>"+MySpaceRes.Purchase.GreatChoice+"</H2> 										</div>											<div id='poInformation'> 											<H5 class='poHfive'>"+MySpaceRes.Purchase.DownloadInformationPlaylist+"</H5> 										</div> 										<div id ='poAlbumOnly'> 										</div> 										<div id='poMusicButtons'> 											<H5 class='poHfive'><span id='poBoldText' class='poBoldText'>"+MySpaceRes.Purchase.DownloadMp3s+"</span></H5>";popupContent=MySpaceMusic.textFormat(popupContent,buyOptions[j].artistName,buyOptions[j].mediaName);popupContent+="<div id='poMusicButton' class='poMusicButton' onclick=\"javaScript:Purchase.PlaylistClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(amazonButton,buyOptions[j].price);popupContent+="</div>";break;case"ringtone":ringtoneArtist=buyOptions[j].artistName;break;default:}}popupContent+="</div>";if(ringtoneArtist!=""){popupContent+=MySpaceMusic.textFormat(jamsterButton,ringtoneArtist)}popupContent+="</div>";return popupContent},OpenPopup:function(A){Purchase.Popup=MySpace.UI.Popup.create(A,"",Purchase.ClosePopupCallback);var B=MySpace.UI.getElementsByClassName("popup_wrapper").length-1;Purchase.Popup.set_top(50);Purchase.Popup.set_width(300);MySpace.UI.getElementsByClassName("popup_x")[B].style.background="transparent url(http://x.myspacecdn.com/modules/musicv2/static/img/poCloseButton.png) no-repeat 0";MySpace.UI.getElementsByClassName("popup_x")[B].style.width="43px";MySpace.UI.getElementsByClassName("popup_title")[B].style.padding="0px";MySpace.UI.getElementsByClassName("popup_title")[B].style.height="0px";MySpace.UI.getElementsByClassName("popup_title")[B].style.display="none";MySpace.UI.getElementsByClassName("popup_content")[B].style.padding="0px";MySpace.UI.getElementsByClassName("popup_content")[B].style.margin="0px";MySpace.UI.getElementsByClassName("popup_content")[B].style.border="2px black solid";MySpace.UI.getElementsByClassName("popup_box")[B].style.padding="0px";MySpace.UI.getElementsByClassName("popup_box")[B].style.border="0px";MySpace.UI.getElementsByClassName("popup_buttons")[B].style.padding="0px";MySpace.UI.getElementsByClassName("popup_buttons")[B].style.margin="0px";MySpace.UI.getElementsByClassName("popup_x")[B].style.top="10px";if(Purchase.AlbumOnlySong){$get("poAlbumOnly").style.visibility="visible"}else{$get("poAlbumOnly").style.visibility="hidden"}Purchase.AlbumOnlySong=false;Purchase.Popup.show()},ClosePopupCallback:function(){if(Purchase.ClickedWhileSongPlaying==null&&document.getElementById("shell")){if((Sys.Browser.agent===Sys.Browser.Firefox)&&(MySpace.ClientContext.FunctionalContext==="UserViewProfile")){document.getElementById("shell").getElementsByTagName("object")[0].resumeAfterRingtonesClose()}else{document.getElementById("shell").resumeAfterRingtonesClose()}}else{if(Purchase.ClickedWhileSongPlaying&&document.getElementById("shell")){if((Sys.Browser.agent===Sys.Browser.Firefox)&&(MySpace.ClientContext.FunctionalContext==="UserViewProfile")){document.getElementById("shell").getElementsByTagName("object")[0].playCurrentTrack();ButtonControls._oldElem.src=MyPlaylistsControl.pauseIcon;ButtonControls._oldElem.title=MyPlaylistsControl.PauseSong}else{document.getElementById("shell").playCurrentTrack();ButtonControls._oldElem.src=MyPlaylistsControl.pauseIcon;ButtonControls._oldElem.title=MyPlaylistsControl.PauseSong}Purchase.ClickedWhileSongPlaying=null}}},AlbumClicked:function(provider,productId,albumId,artistName,albumName){if(Purchase.ClickTrackingEnabled()){Purchase.MakeBeaconRequest(albumId,"album",provider,MySpace.Application.keyDisabled("MusicJV_BuyButtonMultipleProviders"))}switch(provider.toLowerCase()){case"amazon":if(MusicPlayerControl.AllowAmazonInPlace&&productId!=undefined&&productId!=null&&productId!=""){Purchase.AmazonInPlace(productId)}else{Purchase.AmazonAffiliate(productId,"album")}break;case"itunes":if(productId!=undefined&&productId!=null&&productId!=""){var providers=eval("("+MusicPlayerControl.Providers+")");var urlCulture=MySpace.Cookies.MSCulture.get_values().IPCulture.toLowerCase();if(urlCulture=="en-au"||urlCulture=="en-nz"||urlCulture=="en-gb"){encodedProductId=encodeURIComponent(productId);iTunesURL=MySpaceMusic.textFormat(providers.iTunes.Address,"%3F"+encodedProductId)}else{if(urlCulture=="en-us"||urlCulture=="es-us"){doubleEncodedProductId=encodeURIComponent(encodeURIComponent(productId));iTunesURL=MySpaceMusic.textFormat(providers.iTunes.Address,"%253F"+doubleEncodedProductId)}else{iTunesURL=MySpaceMusic.textFormat(providers.iTunes.Address,"?"+productId)}}var newWindow=window.open(iTunesURL,"iTunesSA","status=yes, scrollbars=yes, resizable=yes, toolbar=yes, location=yes, directories=no, menubar=yes, width=950, height=700");MySpaceMusic.checkForPopUpBlocker(newWindow)}break;default:}},SongClicked:function(provider,productId,songId,artistName,songName){if(Purchase.ClickTrackingEnabled()){Purchase.MakeBeaconRequest(songId,"song",provider,MySpace.Application.keyDisabled("MusicJV_BuyButtonMultipleProviders"))}switch(provider.toLowerCase()){case"amazon":if(MusicPlayerControl.AllowAmazonInPlace&&productId!=undefined&&productId!=null&&productId!=""){Purchase.AmazonInPlace(productId)}else{Purchase.AmazonAffiliate(productId,"song")}break;case"itunes":if(productId!=undefined&&productId!=null&&productId!=""){var providers=eval("("+MusicPlayerControl.Providers+")");var urlCulture=MySpace.Cookies.MSCulture.get_values().IPCulture.toLowerCase();if(urlCulture=="en-au"||urlCulture=="en-nz"||urlCulture=="en-gb"){encodedProductId=encodeURIComponent(productId);iTunesURL=MySpaceMusic.textFormat(providers.iTunes.Address,"%3F"+encodedProductId)}else{if(urlCulture=="en-us"||urlCulture=="es-us"){doubleEncodedProductId=encodeURIComponent(encodeURIComponent(productId));iTunesURL=MySpaceMusic.textFormat(providers.iTunes.Address,"%253F"+doubleEncodedProductId)}else{iTunesURL=MySpaceMusic.textFormat(providers.iTunes.Address,"?"+productId)}}var newWindow=window.open(iTunesURL,"iTunesSA","status=yes, scrollbars=yes, resizable=yes, toolbar=yes, location=yes, directories=no, menubar=yes, width=950, height=700");MySpaceMusic.checkForPopUpBlocker(newWindow)}break;default:}},PlaylistClicked:function(C,A,B){if(Purchase.ClickTrackingEnabled()){Purchase.MakeBeaconRequest(B,"playlist",C,MySpace.Application.keyDisabled("MusicJV_BuyButtonMultipleProviders"))}switch(C.toLowerCase()){case"amazon":switch(MySpace.ClientContext.FunctionalContext){case"MusicSinglePlaylist":buyPlaylistUrl=MySpaceMusic.textFormat("http://www.amazon.com/gp/browse.html?node={0}&tag={1}&ASINs={2}","1266319011","playlistpurchase-20",A);break;case"CelebrityPromo":buyPlaylistUrl=MySpaceMusic.textFormat("http://www.amazon.com/gp/browse.html?node={0}&tag={1}&ASINs={2}","1266319011","featuredplaylistpurchase-20",A);break;default:}window.open(buyPlaylistUrl,"AmazonSA","status=yes, scrollbars=yes, resizable=yes, toolbar=yes, location=yes, directories=no, menubar=yes, width=950, height=700");break;default:}},AmazonInPlace:function(A){var E=MusicPlayerControl.AmazonPrice+"&asin="+A+"&mode=";var C=626;var D=426;if(navigator.userAgent.toLowerCase().indexOf("firefox/")>=0){C=611;D=366}E+="windowed";var B=window.open(E,"Amazon","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=610, height=400");MySpaceMusic.checkForPopUpBlocker(B)},AmazonAffiliate:function(B,A){standardAffUrl="http://www.amazon.com/dp/"+B;if(A=="album"){switch(MySpace.ClientContext.FunctionalContext){case"ArtistAlbums":standardAffUrl+="?tag=albumalbumpurchase-20";break;case"MusicSinglePlaylist":standardAffUrl+="?tag=playlistalbumpurchase-20";break;case"UserViewProfile":if(MySpace.ProfileClientContext!=null&&MySpace.ProfileClientContext.ProfileType==7){standardAffUrl+="?tag=artistalbumpurchase-20"}else{if(MySpace.ProfileClientContext!=null&&MySpace.ProfileClientContext.ProfileType==8){standardAffUrl+="?tag=brandalbumpurchase-20"}else{standardAffUrl+="?tag=useralbumpurchase-20"}}break;case"CelebrityPromo":standardAffUrl+="?tag=featuredalbumpurchase-20";break;case"PopUpPlayer":standardAffUrl+="?tag=pompalbumpurchase-20";break;case"SiteSearch":standardAffUrl+="?tag=searchalbumpurchase-20";break;case"MusicTopCharts":standardAffUrl+="?tag=chartsalbumpurchase-20";break;default:standardAffUrl+="?tag=mys0d05-20"}}if(A=="song"){switch(MySpace.ClientContext.FunctionalContext){case"ArtistAlbums":standardAffUrl=standardAffUrl+"?tag=albumsongpurchase-20";break;case"MusicSinglePlaylist":standardAffUrl+="?tag=playlistsongpurchase-20";break;case"UserViewProfile":if(MySpace.ProfileClientContext!=null&&MySpace.ProfileClientContext.ProfileType==7){standardAffUrl+="?tag=artistsongpurchase-20"}else{if(MySpace.ProfileClientContext!=null&&MySpace.ProfileClientContext.ProfileType==8){standardAffUrl+="?tag=brandsongpurchase-20"}else{standardAffUrl+="?tag=usersongpurchase-20"}}break;case"CelebrityPromo":standardAffUrl+="?tag=featuredsongpurchase-20";break;case"PopUpPlayer":standardAffUrl+="?tag=pompsongpurchase-20";break;case"Music":standardAffUrl+="?tag=msmhomesongpurchase-20";break;case"SiteSearch":standardAffUrl+="?tag=searchsongpurchase-20";break;case"MusicTopCharts":standardAffUrl+="?tag=chartssongpurchase-20";break;default:standardAffUrl=standardAffUrl+"?tag=mys0d05-20"}}var C=window.open(standardAffUrl,"AmazonSA","status=yes, scrollbars=yes, resizable=yes, toolbar=yes, location=yes, directories=no, menubar=yes, width=950, height=700");MySpaceMusic.checkForPopUpBlocker(C)},ButtonClickTracking:function(){try{if(Purchase.BuyOptionObjects){var buyOptions=Purchase.BuyOptionObjects.split("|");if(buyOptions.length>0){var providers="";for(var j=0;j<buyOptions.length;j++){buyOptions[j]=eval("("+buyOptions[j]+")");providers+=buyOptions[j].providerName.toLowerCase()+","}providers=providers.substring(0,providers.length-1);var srcType=buyOptions[0].purchaseType=="albumonly"?"song":buyOptions[0].purchaseType;Purchase.MakeBeaconRequest(buyOptions[0].mediaId,srcType,providers,true)}}}catch(e){}},AddMusicSearchClickTracking:function(C){var B=Purchase.ClickedBuyButton;if(C.srcType==="song"){if(ButtonControls&&ButtonControls.findTopLevelElement){var A=ButtonControls.findTopLevelElement(B);if(A!=null){C.albumid=A.getAttribute("msm_albumid");C.searchid=A.getAttribute("msm_searchid");C.pagenum=A.getAttribute("msm_pn");C.rank=A.getAttribute("msm_rank")}}}else{if(C.srcType==="album"){if(B.parentNode.id==="AlbumBuy"||B.parentNode.id==="AlbumBuyNew"){A=B.parentNode;C.artistid=A.getAttribute("msm_artistid");C.searchid=A.getAttribute("msm_searchid");C.pagenum=A.getAttribute("msm_pn");C.rank=A.getAttribute("msm_rank")}}}return C},MakeBeaconRequest:function(E,B,C,A){var D;if(A){D={type:"musicbuybtn",srcType:B};if(E&&E!==""){if(B==="song"){D.songid=E}else{if(B==="album"){D.albumid=E}else{if(B==="playlist"){D.playlistid=E}}}}if(!MySpace.Application.keyDisabled("DWBeaconMusicBuyButton")){D.prov=C;if(MySpace.Application.keyDisabled("MusicJV_BuyButtonMultipleProviders")){D.lb="0"}else{D.lb="1"}}if(MySpace.ClientContext.FunctionalContext==="SiteSearch"&&!MySpace.Application.keyDisabled("DWBeaconMusicSearch")&&Purchase.ClickedBuyButton){D=Purchase.AddMusicSearchClickTracking(D)}}else{if(!MySpace.Application.keyDisabled("DWBeaconMusicBuyButton")){D={type:"musicbuylb",ptype:B,prov:C}}}if(D){MySpace.Beacon.Request(D)}},ClickTrackingEnabled:function(){return MySpace.BeaconData&&MySpace.Beacon&&(!MySpace.Application.keyDisabled("DWBeaconMusicBuyButton")||MySpace.ClientContext.FunctionalContext==="SiteSearch"&&!MySpace.Application.keyDisabled("DWBeaconMusicSearch"))}};var Ringtones={Popup:null,open:function(B){var D="";var C=[];MySpace.UI.hideElements=function(H,G){for(name in H){if(H[name]=="object"){H[name]=""}}for(var I=0;I<H.length;I++){var K=document.getElementsByTagName(H[I]);for(var J=0;J<K.length;J++){if(G){K[J].setAttribute("origvis",K[J].style.visibility)}K[J].style.visibility=G?"hidden":(K[J].getAttribute("origvis")?K[J].getAttribute("origvis"):"")}}};if(B!=""){B=B.replace(/[^A-Za-z0-9\s:-]/g,"").replace(/[\s]/g,"+");C=B.split(":");D=MusicPlayerControl.JambaUrl+C[0];switch(MySpace.Cookies.MSCulture.get_values().IPCulture.toLowerCase()){case"en-gb":var E=window.open(D,"JambaRingtones","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=757, height=721");MySpaceMusic.checkForPopUpBlocker(E);break;case"en-au":D="http://ad.jamster.com.au/landingpages/campaigns/int_o_flash/myspacemusic/?adv_partner=0017&partner_var=Music&artist="+C[0];var E=window.open(D,"JambaRingtones","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=757, height=721");MySpaceMusic.checkForPopUpBlocker(E);break;case"en-nz":D="http://ad.jamster.co.nz/landingpages/campaigns/int_o_flash/myspacemusic/?adv_partner=0017&partner_var=Music&artist="+C[0];var E=window.open(D,"JambaRingtones","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=757, height=721");MySpaceMusic.checkForPopUpBlocker(E);break;default:if(MySpace.ClientContext.FunctionalContext=="PopUpPlayer"){var E=window.open(D,"JambaRingtones","status=no, scrollbars=yes, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=780, height=820");MySpaceMusic.checkForPopUpBlocker(E)}else{content="<iframe id='ringtonesIframe' width='763' height='820' scrolling='no' style='border:0;' src='"+D+"'></iframe>";var F=MySpace.UI.Popup.create(content,"",Ringtones.close);$get("ringtonesIframe").style.display="block";F.set_top(10);F.set_width(773);for(var A=0;A<MySpace.UI.getElementsByClassName("popup_wrapper").length;A++){MySpace.UI.getElementsByClassName("popup_content")[A].style.padding="0px";MySpace.UI.getElementsByClassName("popup_content")[A].style.width="763px"}F.show()}}}},openBeta:function(A){var B="";MySpace.UI.hideElements=function(F,E){for(name in F){if(F[name]=="object"){F[name]=""}}for(var G=0;G<F.length;G++){var I=document.getElementsByTagName(F[G]);for(var H=0;H<I.length;H++){if(E){I[H].setAttribute("origvis",I[H].style.visibility)}I[H].style.visibility=E?"hidden":(I[H].getAttribute("origvis")?I[H].getAttribute("origvis"):"")}}};if(A!=""){B=MusicPlayerControl.JambaUrl+A;switch(MySpace.Cookies.MSCulture.get_values().IPCulture.toLowerCase()){case"en-gb":var D=window.open(B,"JambaRingtones","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=757, height=721");MySpaceMusic.checkForPopUpBlocker(D);break;case"en-au":B="http://ad.jamster.com.au/landingpages/campaigns/int_o_flash/myspacemusic/?adv_partner=0017&partner_var=Music&artist="+A;var D=window.open(B,"JambaRingtones","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=757, height=721");MySpaceMusic.checkForPopUpBlocker(D);break;case"en-nz":B="http://ad.jamster.co.nz/landingpages/campaigns/int_o_flash/myspacemusic/?adv_partner=0017&partner_var=Music&artist="+A;var D=window.open(B,"JambaRingtones","status=no, scrollbars=no, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=757, height=721");MySpaceMusic.checkForPopUpBlocker(D);break;default:if(MySpace.ClientContext.FunctionalContext=="PopUpPlayer"){var D=window.open(B,"JambaRingtones","status=no, scrollbars=yes, resizable=no, toolbar=no, location=no, directories=no, menubar=no, width=780, height=820");MySpaceMusic.checkForPopUpBlocker(D)}else{content="<iframe id='ringtonesIframe' width='763' height='820' scrolling='no' style='border:0;' src='"+B+"'></iframe>";Ringtones.Popup=MySpace.UI.Popup.create(content,"",Ringtones.ClosePopupCallback);var C=MySpace.UI.getElementsByClassName("popup_wrapper").length-1;$get("ringtonesIframe").style.display="block";Ringtones.Popup.set_top(10);Ringtones.Popup.set_width(768);MySpace.UI.getElementsByClassName("popup_x")[C].style.background="transparent url(http://x.myspacecdn.com/modules/musicv2/static/img/poCloseButton.png) no-repeat 0";MySpace.UI.getElementsByClassName("popup_x")[C].style.width="43px";MySpace.UI.getElementsByClassName("popup_title")[C].style.padding="0px";MySpace.UI.getElementsByClassName("popup_title")[C].style.height="0px";MySpace.UI.getElementsByClassName("popup_title")[C].style.display="none";MySpace.UI.getElementsByClassName("popup_content")[C].style.padding="0px";MySpace.UI.getElementsByClassName("popup_content")[C].style.margin="0px";MySpace.UI.getElementsByClassName("popup_content")[C].style.border="2px black solid";MySpace.UI.getElementsByClassName("popup_box")[C].style.padding="0px";MySpace.UI.getElementsByClassName("popup_box")[C].style.border="0px";MySpace.UI.getElementsByClassName("popup_buttons")[C].style.padding="0px";MySpace.UI.getElementsByClassName("popup_buttons")[C].style.margin="0px";MySpace.UI.getElementsByClassName("popup_x")[C].style.top="10px";Ringtones.Popup.show()}}}},close:function(){var A=MySpaceMusic.getPlayerFlashObject();if(A!=null){A.resumeAfterRingtonesClose()}},ClosePopupCallback:function(){Ringtones.Popup._hide();Purchase.ButtonClicked()}};var MySpaceMusic={focusStatus:true,playerLoaded:false,prevSongID:null,prevArtistIDArray:null,createPopUp:function(G,B,J,E,C){var I="";var K=G;var D=document.createElement("div");var F=50;var A=100;var H;if(C=="optin"){H=MySpace.UI.Popup.create(K,"");H.set_width(B+18);if(MySpace.ClientContext.FunctionalContext=="PopUpPlayer"&&C=="optin"){H.set_top(0)}else{if(C=="optin"&&Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version==6){H.set_top(F)}}}else{D.innerHTML="<div id='divWrapper' class='popup_wrapper' style='z-index:1000201;left:0px;width: "+A+"%;display:none;visibility:hidden;text-align:center;padding:auto auto auto auto;'><div class='appspopup_box' style='width:"+B+"px; height:"+J+"px; margin-left: auto;margin-right: auto;border: 4px solid #6698CB;'>"+E+"<div></div><div class='appspopup_content' style='margin:0 auto;'></div><div class='appspopup_buttons'></div></div></div>";H=$create(MySpace.UI._Popup,{title:I,content:K,left:0,top:F},null,null,D.firstChild)}return H},textFormat:function(C){var B=arguments.length-1;for(var A=0;A<B;A++){C=C.replace(new RegExp("\\{"+A+"\\}","gi"),arguments[A+1])}return C},getElementPosition:function(A){var C=0;var B=0;if(A){while(A.offsetParent){C+=A.offsetLeft;B+=A.offsetTop;A=A.offsetParent}C+=A.offsetLeft;B+=A.offsetTop}return{x:C,y:B}},showPopupBlockerMessage:function(){var C=false;var A=document.createElement("iframe");A.setAttribute("src","/modules/musicv2/pages/NoAmazonPopupMessaging.aspx");A.setAttribute("id","amazonNoPopUp");A.style.position="absolute";A.setAttribute("allowTransparency","true");A.setAttribute("frameBorder","0");A.style.backgroundColor="transparent";var G=300;var F=300;var E=document.getElementById(MusicPlayerControl.SwfObjectDiv);var D=MySpaceMusic.getElementPosition(E);if(E.offsetHeight>G){A.style.top=D.y+"px"}else{var B=D.y-(G-E.offsetHeight)/2;A.style.top=B+"px"}if((parseInt(MusicPlayerControl.Height)==1)&&(parseInt(MusicPlayerControl.Width)==1)){A.style.position="fixed";A.style.left="44%";A.style.top="44%"}else{A.style.left=D.x+"px";A.style.width=F+"px"}A.style.height=G+"px";A.style.borderStyle="none";document.body.appendChild(A)},getPlayerFlashObject:function(){var A=document.getElementsByTagName("object");for(i in A){if(typeof(A[i].playSong)!="undefined"){return A[i]}}return null},Focus:function(){MySpaceMusic.focusStatus=true},Blur:function(){MySpaceMusic.focusStatus=false},IsWindowFocused:function(){return MySpaceMusic.focusStatus},onBuyClickedFromHTML:function(A,B){if(document.getElementById("shell")){if((Sys.Browser.agent===Sys.Browser.Firefox)&&(MySpace.ClientContext.FunctionalContext==="UserViewProfile")){Purchase.ClickedWhileSongPlaying=document.getElementById("shell").getElementsByTagName("object")[0].getPlayingState();if(Purchase.ClickedWhileSongPlaying){document.getElementById("shell").getElementsByTagName("object")[0].pauseCurrentTrack()}}else{Purchase.ClickedWhileSongPlaying=document.getElementById("shell").getPlayingState();if(Purchase.ClickedWhileSongPlaying){document.getElementById("shell").pauseCurrentTrack()}}}Purchase.ClickedBuyButton=A;MySpaceMusic.onBuyClicked(B)},onBuyClicked:function(A){Purchase.BuyOptionObjects=A;Purchase.ButtonClicked()},onFindRingtoneClicked:function(B,A){if(MusicPlayerControl.AllowJamba){Ringtones.open(A)}},onPlayingTrack:function(C,D,B,A){if(MySpace.Ads&&MySpace.Ads.BandType){MySpace.Ads.BandType.Genre1=B[0];MySpace.Ads.BandType.Genre2=B[1];MySpace.Ads.BandType.Genre3=B[2]}if(C!=MySpaceMusic.prevSongID&&D!=MySpaceMusic.prevArtistIDArray){if(document.getElementById("feedResult")!=null){if(D[0]>0){if(document.getElementById("ArtistFeeds")!=null){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.GetMultipleArtistsUpdateFromArtistUpdatesApi(D,MySpaceMusic.WebSvrManager.ArtistUpdateSuccess,MySpaceMusic.WebSvrManager.OnFailure)}else{MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.GetMultipleArtistsUpdate(D,MySpaceMusic.WebSvrManager.ArtistUpdateSuccess,MySpaceMusic.WebSvrManager.OnFailure)}}else{document.getElementById("feedResult").innerHTML='<br/><div class="activityFeedNoUpdate">'+MySpaceRes.PopUpPlayer.NoUpdatesForThisArtist+"</div>"}}MySpaceMusic.prevSongID=C;MySpaceMusic.prevArtistIDArray=D}},onBuyAlbumClicked:function(B,C,A,D){Purchase.AlbumClicked("Amazon",B,C,A,D)},onBuySongClicked:function(B,D,A,C){Purchase.SongClicked("Amazon",B,D,A,C)},onLockPlayerControls:function(){try{jQuery.each($(".chrtSongd1d0CSS"),function(B,C){$(C).html($(C).html().replace(/onmouseover/,"offmouseover").replace(/onclick/,"offclick").replace(/title/,"offtitle").replace(/search_btn_play.gif/,"search_btn_playDisabled.gif"))})}catch(A){}},onUnLockPlayerControls:function(){try{jQuery.each($(".chrtSongd1d0CSS"),function(B,C){$(C).html($(C).html().replace(/offmouseover/,"onmouseover").replace(/offclick/,"onclick").replace(/offtitle/,"title").replace(/search_btn_playDisabled.gif/,"search_btn_play.gif"))})}catch(A){}},checkForPopUpBlocker:function(A){if(A){A.focus()}else{MySpaceMusic.showPopupBlockerMessage()}},MedRecRefresh:function(A){if(MySpace.ClientContext.FunctionalContext=="UserViewProfile"){AdTooltip.open(A)}if(MySpace.ClientContext.FunctionalContext=="MusicDiscography"){AdTooltip.open()}},MedRecDismiss:function(){AdTooltip.close()},OptIn:function(B,D,F,C,E,A){popupWidth=530;popupHeight=515;popupContent="<iframe id='popupiframe' scrolling='no' style='border:0;overflow:hidden' src=\"/modules/musicv2/pages/optindialog.aspx?userid="+B+"&songid="+F+"&playlistid="+D+"&artistid="+C+"&albumid="+A+"\" width='"+popupWidth+"' height='"+popupHeight+"'></iframe>";invCloseBtn="<p class='popup_x' style='background:none; width:55px; height:25px; top:42px; margin:-28px 20px 0 0; padding:0 20px 0 0; cursor:pointer; float:right; position:relative;'></p>";popup=MySpaceMusic.createPopUp(popupContent,popupWidth,popupHeight,"","optin");popup.show()},EnforceLogin:function(){try{if(window.XMLHttpRequest){LoginObj.req=new XMLHttpRequest();LoginObj.req.onreadystatechange=LoginObj.LoginRedirect;LoginObj.req.open("GET",LoginObj.ajaxActionHandler,true);LoginObj.req.send(null)}else{if(window.ActiveXObject){LoginObj.req=new ActiveXObject("Microsoft.XMLHTTP");if(LoginObj.req){LoginObj.req.onreadystatechange=LoginObj.LoginRedirect;LoginObj.req.open("GET",LoginObj.ajaxActionHandler,true);LoginObj.req.send()}}}}catch(A){}},popupAllowed:function(){var A=window.open("","","width=1,height=1,left=0,top=0,scrollbars=no");if(A){var B=true;A.close()}else{MySpaceMusic.showPopupBlockerMessage()}return B},onStop:function(B,A){ButtonControls._oldElem.src=ButtonControls._oldSrc;ButtonControls._oldElem.title=ButtonControls._oldTitle;Sys.UI.DomElement.removeCssClass(ButtonControls.oldParentElem,"isPlaying")},onPausingCurrentTrack:function(){if(typeof SongList.SongItem.onPlayerPause=="function"){SongList.SongItem.onPlayerPause()}},onPlayingCurrentTrack:function(){if(typeof SongList.SongItem.onPlayerPlay=="function"){SongList.SongItem.onPlayerPlay()}},PlaySongInPOMP:function(D,B,A,E){try{document.getElementById("shell").playSong(D,B,A,E)}catch(C){}},onPlayerLoaded:function(){MySpaceMusic.playerLoaded=true;if((typeof SongList.SongListView.onPlayerLoaded)!="undefined"){SongList.SongListView.onPlayerLoaded()}}};if(typeof($addHandler)!=="undefined"){if(Sys.Browser.agent===Sys.Browser.InternetExplorer){$addHandler(document,"focusout",MySpaceMusic.Blur);$addHandler(document,"focusin",MySpaceMusic.Focus)}else{if(Sys.Browser.agent===Sys.Browser.Safari){$addHandler(window,"blur",MySpaceMusic.Blur);$addHandler(window,"focus",MySpaceMusic.Focus)}else{$addHandler(window,"blur",MySpaceMusic.Blur);$addHandler(window,"focus",MySpaceMusic.Focus)}}}var popup;function ClosePopUp(){popup._hide();popupId=document.getElementById("divWrapper");document.body.removeChild(popupId)}killPopupBlockerMessaging=function(){popupFrame=document.getElementById("amazonNoPopUp");document.body.removeChild(popupFrame)};Type.registerNamespace("MySpace.Web.Modules.MusicV2.Services");MySpace.Web.Modules.MusicV2.Services.PopUpPlayer=function(){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.prototype={GetMultipleArtistsUpdate:function(C,B,A,D){return this._invoke(MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_path(),"GetMultipleArtistsUpdate",false,{ArtistIds:C},B,A,D)},GetArtistUpdate:function(B,C,A,D){return this._invoke(MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_path(),"GetArtistUpdate",false,{ArtistId:B},C,A,D)},GetMultipleArtistsUpdateFromArtistUpdatesApi:function(C,B,A,D){return this._invoke(MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_path(),"GetMultipleArtistsUpdateFromArtistUpdatesApi",false,{ArtistIds:C},B,A,D)}};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.registerClass("MySpace.Web.Modules.MusicV2.Services.PopUpPlayer",Sys.Net.WebServiceProxy);MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance=new MySpace.Web.Modules.MusicV2.Services.PopUpPlayer();MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.set_path=function(A){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._path=A};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_path=function(){return MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._path};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.set_timeout=function(A){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._timeout=A};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_timeout=function(){return MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._timeout};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.set_defaultUserContext=function(A){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._userContext=A};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_defaultUserContext=function(){return MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._userContext};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.set_defaultSucceededCallback=function(A){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._succeeded=A};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_defaultSucceededCallback=function(){return MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._succeeded};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.set_defaultFailedCallback=function(A){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._failed=A};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.get_defaultFailedCallback=function(){return MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance._failed};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.set_path("/Modules/MusicV2/Services/PopUpPlayer.asmx");MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.GetMultipleArtistsUpdate=function(B,C,A,D){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance.GetMultipleArtistsUpdate(B,C,A,D)};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.GetArtistUpdate=function(B,C,A,D){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance.GetArtistUpdate(B,C,A,D)};MySpace.Web.Modules.MusicV2.Services.PopUpPlayer.GetMultipleArtistsUpdateFromArtistUpdatesApi=function(B,C,A,D){MySpace.Web.Modules.MusicV2.Services.PopUpPlayer._staticInstance.GetMultipleArtistsUpdateFromArtistUpdatesApi(B,C,A,D)};MySpaceMusic.WebSvrManager={ArtistUpdateSuccess:function(A,B){if(A!=null){var C=document.getElementById("feedResult");if(C!=null){C.innerHTML=A}}},OnFailure:function(A){}};