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},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={AlbumClicked:function(F,C,B,A,D){switch(F.toLowerCase()){case"amazon":if(MusicPlayerControl.AllowAmazonInPlace&&C!=undefined&&C!=null&&C!=""){Purchase.AmazonInPlace(C)}else{Purchase.AmazonAffiliate(C,"album")}break;case"itunes":if(C!=undefined&&C!=null&&C!=""){iTunesURL=MySpaceMusic.textFormat(MusicPlayerControl.ITunesUrl,"?id="+C,"");var E=window.open(iTunesURL,"iTunesSA","status=yes, scrollbars=yes, resizable=yes, toolbar=yes, location=yes, directories=no, menubar=yes, width=950, height=700");MySpaceMusic.checkForPopUpBlocker(E)}break;default:}},SongClicked:function(E,B,G,A,F){switch(E.toLowerCase()){case"amazon":if(MusicPlayerControl.AllowAmazonInPlace&&B!=undefined&&B!=null&&B!=""){Purchase.AmazonInPlace(B)}else{Purchase.AmazonAffiliate(B,"song")}break;case"itunes":if(B!=undefined&&B!=null&&B!=""){var D=[];D=B.split(":");iTunesURL=MySpaceMusic.textFormat(MusicPlayerControl.ITunesUrl,"?id="+D[0],"&i="+D[1]);var C=window.open(iTunesURL,"iTunesSA","status=yes, scrollbars=yes, resizable=yes, toolbar=yes, location=yes, directories=no, menubar=yes, width=950, height=700");MySpaceMusic.checkForPopUpBlocker(C)}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{standardAffUrl+="?tag=useralbumpurchase-20"}break;case"CelebrityPromo":standardAffUrl+="?tag=featuredalbumpurchase-20";break;case"PopUpPlayer":standardAffUrl+="?tag=pompalbumpurchase-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{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;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)}};var Ringtones={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;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()}}}},close:function(){if(MySpaceMusic.getPlayerFlashObject()!=null){MySpaceMusic.getPlayerFlashObject().playCurrentTrack()}}};var MySpaceMusic={focusStatus:true,playerLoaded:false,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},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(document.getElementById("feedResult")!=null){if(D[0]>0){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>"}}},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)},onPurchaseAlbumClicked:function(E,C,B,A,D){Purchase.AlbumClicked(E,C,B,A,D)},onPurchaseSongClicked:function(E,D,G,C,F,B){if(!MySpace.Application.keyDisabled("DWBeaconMusicSearch")){var A=ButtonControls.findTopLevelElement(B);if(A!=null){MySpace.Beacon.Request({songid:A.getAttribute("msm_songid"),albumid:A.getAttribute("msm_albumid"),searchid:A.getAttribute("msm_searchid"),pagenum:A.getAttribute("msm_pn"),rank:A.getAttribute("msm_rank"),type:"buy"})}}Purchase.SongClicked(E,D,G,C,F)},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+"&songname="+escape(E)+"&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")},PlaySongInPOMP:function(D,B,A,E){try{document.getElementById("shell").playSong(D,B,A,E)}catch(C){}},onPlayerLoaded:function(){MySpaceMusic.playerLoaded=true}};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)}};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)};MySpaceMusic.WebSvrManager={ArtistUpdateSuccess:function(A,B){if(A!=null){var C=document.getElementById("feedResult");if(C!=null){C.innerHTML=A}}},OnFailure:function(A){}};
