function updateBreadcrumbNewMessages(b){if(parseInt(b)>0){var a=new String(b);document.all.new_message_count.innerHTML="&nbsp;("+a+")";newWidth=214+a.length*6;document.getElementById("CommonMenu").style.width=newWidth}else{document.all.new_message_count.innerHTML="";document.getElementById("CommonMenu").style.width=203}}window.attachEvent("onload",function(){var a=document.getElementById("breadcrumbTD");if(a){a.parentElement.parentElement.onselectstart=function(){if(event.srcElement.id!="keyword"){event.returnValue=false;return false}};document.onselectionchange=function(){var c=document.selection.createRange();var d=c.htmlText.replace(new RegExp('"',"img"),"");if(d.indexOf("class=breadcrumbBG")!=-1){document.selection.empty()}}}try{if(location.href.toLowerCase().indexOf("/searchpane")==-1&&location.href.toLowerCase().indexOf("artist.html")==-1&&location.href.toLowerCase().indexOf("/dj/")==-1){iMesh6Discovery.CloseFilesView();if(document.location.toString().indexOf("/people/")==-1||(iMesh6Discovery.GetVersion()*1)<2){iMesh6Discovery.ClosePeopleView()}}}catch(b){}if(document.location.toString().indexOf("/discovery/")!=-1&&document.location.toString().toLowerCase().indexOf("/searchpane")==-1){try{iMesh6Discovery.SelectNavigationItem(1)}catch(b){}}else{if((document.location.toString().indexOf("/community/")!=-1||document.location.toString().indexOf("/people/")!=-1)&&document.location.toString().indexOf("/people/searchResults")==-1){try{iMesh6Discovery.SelectNavigationItem(2)}catch(b){}}else{if(document.location.toString().indexOf("/portables/")!=-1){try{iMesh6Discovery.SelectNavigationItem(3)}catch(b){}}}}});handleAuthCookies();if(readCookie("genreName")==null){saveCookie("genreName",false)}if(readCookie("genreId")==null){saveCookie("genreId",false)}var genreName=readCookie("genreName");var genreId=readCookie("genreId");try{var countryCode=iMesh6Discovery.GetUserCountry()}catch(e){var countryCode="US"}if(isMN(countryCode)){var genreCountryCode=countryCode}else{var genreCountryCode="US"}function getGenreName(b){var c=false;for(var a=0;a<genreArr.length;a++){if(genreArr[a].id==b){c=genreArr[a].title}}return c}var resizeStart=false;window.onresize=function(){if(!resizeStart){if(document.all.breadcrumbTD){resizeStart=true;window.setTimeout(checkResize,100)}}return true};function checkResize(){resizeStart=false;window.setTimeout(handleResize,100);return true}function handleResize(){if(resizeStart){return}else{if(document.all.breadcrumbTD.style.display==""){try{fixBreadcrumb();fixCommunityScroll()}catch(a){}}}return true}function fixCommunityScroll(){}var widths=new Array();var separators=0;function fixBreadcrumb(){var d=document.all.bcTable.offsetWidth;var c=parseInt((parseInt(separators*17,10))+19,10);var b=document.all.bcBody.all.bcItem;if(widths.length==0){if(b&&!b.length){widths[widths.length]=parseInt(b.offsetWidth,10)}else{for(var f=0;f<b.length;f++){widths[widths.length]=parseInt(b[f].offsetWidth,10)}}}var a=0;if(b&&!b.length){a+=widths[0];b.style.width=widths[0];b.parentElement.style.width=widths[0]}else{for(var f=0;f<b.length;f++){a+=widths[f];b[f].style.width=widths[f];b[f].parentElement.style.width=widths[f]}}if(a<d-c){if(!document.all.bcBody.all.filler){var j=document.createElement("td");j.id="filler";j.style.width="100%";j.innerText=" ";document.all.bcBody.children[0].appendChild(j);j=null}}else{if(document.all.bcBody.all.filler){document.all.bcBody.all.filler.removeNode(true)}var h=a-(d-c);var g=new Array();for(var f=0;f<widths.length;f++){g[f]=h*(widths[f]/a);if(widths[f]-g[f]<20){g[f]=widths[f]-20}}for(var f=0;f<b.length;f++){b[f].style.width=widths[f]-g[f];b[f].parentElement.style.width=b[f].offsetWidth}}b=new Array()}function compareNumber(d,c){if(d[sortBy]>c[sortBy]){return 1}else{return -1}}function compareNumberDesc(d,c){if(d[sortBy]<c[sortBy]){return 1}else{return -1}}function compareString(d,c){if(d[sortBy]>c[sortBy]){return 1}else{return -1}}function getGenreCode(a){switch(a){case"12":return"rock";case"8":return"jazz";case"2":return"blues";case"18":return"children";case"3":return"classic";case"4":return"country";case"5":return"dance";case"17":return"latin";case"10":return"pop";case"11":return"rap";case"16":return"reggae";case"13":return"soul";case"15":return"world";case"1":return"indie";case"19":return"comedy";case"6":return"folk";case"25":return"vocalsDiscovery";case"14":return"soundtracksDiscovery";case"21":return"seasonalDiscovery";case"9":return"newAgeDiscovery";case"7":return"gospelDiscovery";case"20":return"cabaretDiscovery";default:return""}}function drawGenreImages(b){for(var a=0;a<document.images.length;a++){if(document.images[a].type=="genre"){if(b==""||b.indexOf("Discovery")!=-1){document.images[a].src="../images/"+document.images[a].src.substring(document.images[a].src.lastIndexOf("/")+1)}else{document.images[a].src="../images/"+b+"/"+document.images[a].src.substring(document.images[a].src.lastIndexOf("/")+1)}}}}function formatLink(a,b){var c=a.replace(new RegExp("{(.)([^}]*)}","g"),function(f,d,g){if(d=="$"){if(g.indexOf("|")!=-1){g=g.split("|");return'<a class="'+b+'" href="#" onclick="gotoArtist(\''+encodeURIComponent(g[1])+"', 'MNId', false);\">"+g[0]+"</a>"}else{return g}}else{return g}}).replace(new RegExp("\n","g"),"<br>");return c}function playlistImgError(){this.src="../images/playlistSmallFrame.gif";this.myReadyState="error";this.border=0;this.width=77;this.height=77}function imgError(){this.src="../images/smallFrame.gif";this.myReadyState="error";this.border=0;this.width=77;this.height=77}function drawSingleAlbum(a,c,n,d){var m=15;var h=82;var o=5;var l="000000";var b=document.createElement("DIV");b.style.position="relative";b.style.width=h;b.style.height=h;var g=document.createElement("DIV");b.appendChild(g);g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.zIndex="1";g.style.width=h;g.style.height=h;if(d){var f=document.createElement("<IMG>")}else{var f=document.createElement("<IMG name='countedImage'>")}g.appendChild(f);g=null;f.src=(a)?a:(n=="playlist")?"../images/playlistSmallFrame.gif":"../images/smallFrame.gif";f.border=(a)?"1":"0";f.width=(a)?75:77;f.height=(a)?75:77;f.onerror=(n=="playlist")?playlistImgError:imgError;f=null;var i=document.createElement("DIV");b.appendChild(i);i.style.position="absolute";i.style.top="0px";i.style.left="0px";i.style.width=h;i.style.height=h;var k=document.createElement("SPAN");i.appendChild(k);k.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity="+m+")";k.style.width=h;k.style.height=h;i=null;var p=document.createElement("SPAN");k.appendChild(p);p.style.filter="progid:DXImageTransform.Microsoft.dropShadow(Color="+l+",offX="+o+",offY="+o+",positive=true)";p.style.width=h;p.style.height=h;k=null;var j=document.createElement("IMG");p.appendChild(j);j.src="../images/smallFrameLoading.gif";p=null;j=null;if(c!=-1&&c!=""){b.id=c;b.albumId=c;b.style.cursor="hand";if(n=="playlist"){b.onclick=playlistClick}else{b.onclick=albumClick}}return b}function drawButton(text,icon,url,id,shadow){if(shadow==undefined){shadow=true}var opacity=15;var dimension=15;var shadowDimension=3;var shadowColor="#000000";var container=document.createElement("DIV");if(shadow){container.style.position="relative"}container.style.height=dimension;container.style.cursor="pointer";container.url=url;container.id=id;container.onclick=function(){try{eval(this.url)}catch(e){}};container.style.width="1px";container.style.overFlow="visible";var TABLE=document.createElement("TABLE");if(shadow){var buttonDIV=document.createElement("DIV");container.appendChild(buttonDIV);buttonDIV.style.position="absolute";buttonDIV.style.top="0px";buttonDIV.style.left="0px";buttonDIV.style.height=dimension;buttonDIV.appendChild(TABLE);buttonDIV=null}else{container.appendChild(TABLE)}TABLE.cellPadding=0;TABLE.cellSpacing=0;TABLE.border=0;var TBODY=document.createElement("TBODY");TABLE.appendChild(TBODY);TABLE=null;var TR=document.createElement("TR");TBODY.appendChild(TR);TBODY=null;var TD=document.createElement("TD");TR.appendChild(TD);TD.innerHTML='<IMG src="../images/buttonLeft.gif">';if(icon){var TD=document.createElement("TD");TR.appendChild(TD);TD.className="buttonIcon";TD.innerHTML='<IMG src="../images/'+icon+'">';var TD=document.createElement("TD");TR.appendChild(TD);TD.className="buttonCenterIcon";TD.innerHTML=text;TD.noWrap=true}else{var TD=document.createElement("TD");TR.appendChild(TD);TD.className="buttonCenter";TD.innerHTML=text;TD.noWrap=true}var TD=document.createElement("TD");TR.appendChild(TD);TD.innerHTML='<IMG src="../images/buttonRight.gif">';TR=null;TD=null;if(shadow){var shadowDIV=document.createElement("DIV");container.appendChild(shadowDIV);shadowDIV.style.position="absolute";shadowDIV.style.top="0px";shadowDIV.style.left="0px";shadowDIV.style.height=dimension;var alphaSPAN=document.createElement("SPAN");shadowDIV.appendChild(alphaSPAN);alphaSPAN.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity="+opacity+")";alphaSPAN.style.height=dimension;shadowDIV=null;var dropShadowSPAN=document.createElement("SPAN");alphaSPAN.appendChild(dropShadowSPAN);dropShadowSPAN.style.filter="progid:DXImageTransform.Microsoft.dropShadow(Color="+shadowColor+",offX="+shadowDimension+",offY="+shadowDimension+",positive=true)";dropShadowSPAN.style.height=dimension;alphaSPAN=null;var dummyTABLE=document.createElement("TABLE");dropShadowSPAN.appendChild(dummyTABLE);dummyTABLE.cellPadding=0;dummyTABLE.cellSpacing=0;dummyTABLE.border=0;dropShadowSPAN=null;var dummyTBODY=document.createElement("TBODY");dummyTABLE.appendChild(dummyTBODY);dummyTABLE=null;var dummyTR=document.createElement("TR");dummyTBODY.appendChild(dummyTR);dummyTBODY=null;var dummyTD=document.createElement("TD");dummyTR.appendChild(dummyTD);dummyTD.innerHTML='<IMG src="../images/buttonLeft.gif">';if(icon){var dummyTD=document.createElement("TD");dummyTR.appendChild(dummyTD);dummyTD.className="buttonIcon";dummyTD.innerHTML='<IMG src="../images/'+icon+'">';var dummyTD=document.createElement("TD");dummyTR.appendChild(dummyTD);dummyTD.className="buttonCenterIcon";dummyTD.innerHTML=text;dummyTD.noWrap=true}else{var dummyTD=document.createElement("TD");dummyTR.appendChild(dummyTD);dummyTD.className="buttonCenter";dummyTD.innerHTML=text;dummyTD.noWrap=true}var dummyTD=document.createElement("TD");dummyTR.appendChild(dummyTD);dummyTD.innerHTML='<IMG src="../images/buttonRight.gif">';dummyTR=null;dummyTD=null}return container}function doSearch(){try{urchinTracker("/discovery/searchMusic")}catch(b){}var a=document.all.keyword.value;try{iMesh6Discovery.Search(a,"","","")}catch(b){}}var pageLoaded=false;function startLoading(){var a=document.getElementsByName("countedImage");var d=Math.round(a.length)*1000*2;if(a.length>0){var b=0;for(var c=0;c<a.length;c++){if(a[c].readyState=="complete"||a[c].myReadyState=="error"){b++}}if(document.all.progressBar){document.all.progressBar.style.width=Math.round(100*b/a.length)+"%"}if(a.length>b){window.setTimeout(startLoading,100)}else{pageLoaded=true;showPage()}window.setTimeout(stopLoading,d)}else{showPage()}}function stopLoading(){if(!pageLoaded){showPage()}}function drawProgress(){var a=document.all.pleaseWait;var i=document.createElement("TABLE");a.appendChild(i);i.cellPadding=0;i.cellSpacing=0;i.border=0;i.width="100%";i.height="100%";i.className="pleaseWait";var b=document.createElement("TBODY");i.appendChild(b);var c=document.createElement("TR");b.appendChild(c);var k=document.createElement("TD");c.appendChild(k);k.align="center";k.vAlign="center";var g=document.createElement("TABLE");k.appendChild(g);g.cellPadding=0;g.cellSpacing=0;g.border=0;var l=document.createElement("TBODY");g.appendChild(l);var j=document.createElement("TR");l.appendChild(j);var d=document.createElement("TD");j.appendChild(d);d.align="center";d.className="progressText";d.innerHTML="Loading Data. Please Wait...";var j=document.createElement("TR");l.appendChild(j);var d=document.createElement("TD");j.appendChild(d);d.align="center";var h=document.createElement("DIV");d.appendChild(h);h.className="progressOuter";var f=document.createElement("DIV");h.appendChild(f);f.className="progressInner";f.id="progressBar";return a}function drawLoader(a){var b='<TABLE cellpadding="0" cellspacing="0" style="width:100%;height:'+(a?a+"px":"70px;")+'" border="0">	<TR>		<TD align="center" valign="middle">			<img src="../images/discovery/blockLoader.gif"/><br/>			<FONT class="topTracksLoaderText">Loading, Please wait...</FONT>		</TD>	</TR></TABLE>';return b}function doRedirect(a){top.window.location.href=a}function gotoDiscovery(){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/discovery.html"))}function gotoAlbum(c,b,a){doRedirect(getAlbumUrl(c,b,a))}function gotoVideo(f,b,d,c,a){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/video.html?videoID="+d+"&id="+f+"&idType="+b+"&page="+c+"&useGenre="+a))}function gotoArtist(d,b,a,c){if(linkableArtist(d)){doRedirect(getArtistUrl(d,b,a)+(c?"&tab="+c:""))}}function gotoPlaylist(b,a){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/playlist.html?id="+b+"&useGenre="+a))}function gotoEditors(a){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/editors.html?useGenre="+a))}function gotoGenre(a){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/genre.html?id="+a))}function gotoTrack(c,b,a){doRedirect(getTrackUrl(c,b,a))}function gotoTopAlbums(a,c,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/topAlbums.html?useGenre="+a+"&start="+c+"&genreId="+b))}function gotoTopSongs(a,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/topSongs.html?useGenre="+a+"&genreId="+b))}function gotoFreebies(a,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/freebies.html?useGenre="+a+"&start="+b+"&genreId="+genreId))}function gotoRingtone(a,c,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/ringtone.html?useGenre="+a+"&start="+c+"&genreId="+b))}function gotoNewReleases(a,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/newReleases.html?useGenre="+a+"&genreId="+b))}function gotoEditorsMood(a,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/editorsMood.html?useGenre="+a+"&start="+b))}function gotoEditorsGenre(a,b){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/editorsGenre.html?useGenre="+a+"&start="+b))}function gotoVertical(a){doRedirect(addAuthParams(PATH_CONSTANT+"/discovery/vertical.html?useGenre="+a))}function gotoCommunity(a){doRedirect(addAuthParams("people.php"))}function getAlbumUrl(c,b,a){return addAuthParams(PATH_CONSTANT+"/discovery/album.html?id="+c+"&idType="+b+"&useGenre="+a)}function getArtistUrl(c,b,a){return linkableArtist(c)?addAuthParams(PATH_CONSTANT+"/discovery/artist.html?id="+c+"&idType="+b+"&useGenre="+a):""}function getTrackUrl(c,b,a){return addAuthParams(PATH_CONSTANT+"/discovery/track.html?id="+c+"&idType="+b+"&useGenre="+a)}function handleDiscoveryXmlError(b,a,c){switch(a){case"inner":alert("Shareaza has encountered an error. You will be redirected to the main Discover page");gotoDiscovery();break;case"community":alert("Shareaza has encountered an error. You will be redirected to the main Community page");c=(c)?c:0;gotoCommunity(c);break;case"searchpane":break;case"home":alert("Shareaza has encountered an error. Please, visit this page later");break;case"communityhome":alert("Shareaza has encountered an error. Please, visit this page later");break;case"tracksdata":break;case"userdata":break;default:break}}function drawBreadcrumb(pageType,breadCrumbArray){var container=document.all.breadcrumbTD;container.parentElement.id="bcTable";var communityRoot=checkClientVersion(getClientVersion(),CLIENT_VERSION_SUPPORT_NEW_HOME)?"Home":"People";var TABLE=document.createElement("TABLE");container.appendChild(TABLE);TABLE.cellPadding=0;TABLE.cellSpacing=0;TABLE.border=0;TABLE.width="100%";TABLE.style.tableLayout="fixed";var TBODY=document.createElement("TBODY");TABLE.appendChild(TBODY);TBODY.id="bcBody";TR=TBODY.insertRow();TD=TR.insertCell();TD.width="27px";var IMG=document.createElement("IMG");TD.appendChild(IMG);if(pageType=="community"){IMG.src="../images/communityIcon3.gif"}if(pageType=="discovery"){IMG.src="../images/discoveryIcon3.gif"}if(pageType=="portables"){IMG.src="../images/portablesIcon3.gif"}IMG=null;TD=null;TD=TR.insertCell();var SPAN=document.createElement("NOBR");TD.appendChild(SPAN);SPAN.className="bcEllipsis";SPAN.id="bcItem";if(breadCrumbArray.length>0){var A=document.createElement("A");SPAN.appendChild(A);if(pageType=="community"){A.href="#";A.className="breadcrumbLinkBold";A.innerText=communityRoot;A.title=communityRoot;A.onclick=function(){gotoCommunity()}}if(pageType=="discovery"){A.href="#";A.className="breadcrumbLinkBold";A.innerText="Discover";A.title="Discover";A.onclick=function(){gotoGenre(0)}}if(pageType=="portables"){A.href="#";A.className="breadcrumbLinkBold";A.innerText="MP3 player";A.title="MP3 player";A.onclick=function(){location.href="devices.php"}}}else{var FONT=document.createElement("FONT");SPAN.appendChild(FONT);if(pageType=="community"){FONT.className="breadcrumbLinkBold";FONT.innerText=communityRoot;FONT.title=communityRoot}if(pageType=="discovery"){FONT.className="breadcrumbLinkBold";FONT.innerText="Discover";FONT.title="Discover"}if(pageType=="portables"){FONT.className="breadcrumbLinkBold";FONT.innerText="MP3 player";FONT.title="MP3 player"}}for(var i=0;i<breadCrumbArray.length;i++){TD=TR.insertCell();TD.align="center";var SPAN=document.createElement("SPAN");TD.appendChild(SPAN);SPAN.innerText=">";if(i==0){TD.style.width="17px";SPAN.style.cssText="font-family:Arial; font-size:13px; font-weight:bold; color:#cecece;"}else{TD.style.width="14px";SPAN.style.cssText="font-family:Arial; font-size:11px; font-weight:regular; color:#cecece;"}TD=TR.insertCell();var SPAN=document.createElement("NOBR");TD.appendChild(SPAN);SPAN.className="bcEllipsis";SPAN.id="bcItem";if((i+1)<breadCrumbArray.length&&breadCrumbArray[i][1]){var oLink=document.createElement("A");oLink.className="breadcrumbLink";oLink.innerText=breadCrumbArray[i][1];oLink.href="#";oLink.clickArgument=breadCrumbArray[i][0];oLink.onclick=function(){eval(this.clickArgument)}}else{var oLink=document.createElement("FONT");oLink.className="breadcrumbText";oLink.innerText=breadCrumbArray[i][0]}SPAN.appendChild(oLink)}fixBreadcrumb();return container}function emptySearchValue(){document.getElementById("keyword").value=""}function formatNewGenreReleaseDate(dateStr){var dateArr=dateStr.split("-");var day=dateArr[2];var month=dateArr[1];var year=dateArr[0];return day+" "+monthNameArr[eval(month)-1]+" ,"+year}function formatNewReleaseDate(dateStr){var day=dateStr.substring(6,8);var month=dateStr.substring(4,6);var year=dateStr.substring(0,4);return day+" "+monthNameArr[eval(month)-1]+" ,"+year}function showPage(){if(document.all.verticalTitleGap){window.setTimeout(function(){var verticalTitleWidth=document.all.verticalTitle.offsetWidth;document.all.verticalTitleGap.width=eval(verticalTitleWidth)+8},500)}document.all.pleaseWait.style.display="none";document.all.mainData.style.display="";try{showPageCallback()}catch(e){}}function getArtistData(func,postParams,callback,arrParams){var url=PATH_CONSTANT+"/discovery/discovery.php?function="+func;var postData=new Array();postParams[paramKey]=paramId;postParams.Country=countryCode;for(var i in postParams){postData.push(encodeURIComponent(i)+"="+encodeURIComponent(postParams[i]))}var xmlObj=new ActiveXObject("Microsoft.XMLHTTP");xmlObj.open("GET",addAuthParams(url+"&"+postData.join("&")),true);xmlObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObj.onreadystatechange=function(){if(xmlObj.readyState==4){if(xmlObj.responseXML.parseError.errorCode==0){if(callback!=null){if(!artistDataDrawn){artistDataDrawn=true;drawData(xmlObj.responseXML)}}if(arrParams){eval(callback+"(xmlObj.responseXML, "+arrParams.join(",")+")")}else{eval(callback+"(xmlObj.responseXML)")}}else{handleDiscoveryXmlError(xmlObj.parseError,"inner")}}};xmlObj.send()}function multilineEllipsis(g,f,c){if(g&&f&&c){var a=g.length;var d=f.style.overflow;f.style.overflow="visible";f.style.height="";f.innerText=g;for(var b=(a-1);b>=0&&f.offsetHeight>=c;b--){f.innerText=g.substr(0,b).replace(new RegExp("s+$",""),"")+"..."}f.style.height=c+"px";f.style.overflow=d}}function divUnderline(b,a){b.style.textDecoration=a?"underline":"none"}function putHover(a){if(a.href==null||currentTab!=a.href.substr(1)){a.style.textDecoration="underline"}}function gotoPeopleProfile(a){doRedirect(addAuthParams(COMMUNITY_PATH+"/people/profile.php?UserId="+a))};