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,ButtonClicked:function(){Purchase.OpenPopup(Purchase.CreatePopupContent())},RingtonesButtonClicked:function(A){Purchase.Popup._hide();Ringtones.openBeta(A)},CreatePopupContent:function(){var buyOptions=new Array();var ringtoneArtist="";var iTunesButton="<div id='poiTunesLogo'></div> 							<div id='poiTunesPrice'>"+PurchaseExperience.For+"</div>";var amazonButton="<div id='poAmazonLogo'></div> 							<div id='poAmazonPrice'>"+PurchaseExperience.For+"</div>";var jamsterButton="<div id='poRingtoneButtons'> 								<H5 class='poHfive'><span id='poBoldText'>"+PurchaseExperience.RingtonesCategory+"</span></H5> 								<div id='poRingtoneButton' class='poMusicButton' onclick=\"javascript:Purchase.RingtonesButtonClicked('{0}');\" > 									<div id='poJamsterLogo'></div> 									<div id='poJamsterPrice'>"+PurchaseExperience.Ringtones+"</div> 								</div> 							 </div>";var popupContent="<div id='po'> 								<div id='poGreeting'> 									<H2 class='poHtwo'>"+PurchaseExperience.Greeting+"</H2> 								</div>									<div id='poInformation'> 									<H5 class='poHfive'>"+PurchaseExperience.Instructions+"</H5> 								</div> 								<div class ='poAlbumOnly'> 									<H5 class='poHfive'><span id='poBoldText'>"+PurchaseExperience.AlbumOnlyWarning+"</span></h5> 								</div> 								<div id='poMusicButtons'> 									<H5 class='poHfive'><span id='poBoldText'>"+PurchaseExperience.MusicCategory+"</span></H5>";buyOptions=Purchase.BuyOptionObjects.split("|");for(var j=0;j<buyOptions.length-1;j++){buyOptions[j]=eval("("+buyOptions[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='poMusicButton' onclick=\"javaScript:Purchase.SongClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(iTunesButton,buyOptions[j].price);break;default:}popupContent+="</div>";if(buyOptions[j].albumonlysong){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='poMusicButton' onclick=\"javaScript:Purchase.AlbumClicked('"+buyOptions[j].providerName+"','"+buyOptions[j].productId+"','','','');\">";popupContent+=MySpaceMusic.textFormat(iTunesButton,buyOptions[j].price);break;default:}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_title")[B].style.padding="0px";MySpace.UI.getElementsByClassName("popup_title")[B].style.height="0px";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){MySpace.UI.getElementsByClassName("poAlbumOnly")[B].style.visibility="visible"}else{MySpace.UI.getElementsByClassName("poAlbumOnly")[B].style.visibility="hidden"}Purchase.AlbumOnlySong=false;Purchase.Popup.show()},ClosePopupCallback:function(){var A=MySpaceMusic.getPlayerFlashObject();if(A!=null){A.resumeAfterRingtonesClose()}},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:}},PlaylistClicked:function(B,A){switch(B.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;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;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={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;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;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_title")[C].style.padding="0px";MySpace.UI.getElementsByClassName("popup_title")[C].style.height="0px";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},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)},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")},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)},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){}};