<!-- start scripting
// navbar.js 
// (c) 2000-2005 Live365, Inc.  All rights reserved.


var gBaseURL = "http://www.live365.com";
var gStoreURL = "https://store.live365.com";

// activate these for internal development and QA
// gBaseURL = "http://fc02.corp.nanocosm.com";
// gStoreURL = "https://devstore01.corp.nanocosm.com";

{
	var root = (self.location.protocol != 'https:') ? gBaseURL : '';

	if (typeof(GetCookieEx) != "function")
		document.write('<scr'+'ipt language="JavaScript" src="' + root + '/scripts/cookiemonster.js"></scr' + 'ipt>');	
		
	document.write('<scr'+'ipt language="JavaScript" src="' + root + '/scripts/clientdetect.js"></scr' + 'ipt>');
	
	if (typeof(DrawSponsor) != "function")
		document.write('<scr'+'ipt language="JavaScript" src="' + root + '/scripts/ads.js"></scr' + 'ipt>');
		
	if (typeof(GetGenreData) != "function")
		document.write('<scr'+'ipt language="JavaScript" src="' + root + '/scripts/genre.js"></scr' + 'ipt>');
		
	document.write('<scr'+'ipt language="JavaScript" src="' + root + '/scripts/search.js"></scr' + 'ipt>');
}

function getCookieVal(offset) 
{
	var endstr = document.cookie.indexOf (";", offset);

	if (endstr == -1)
		endstr = document.cookie.length;

	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie(name) 
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;

	while (i < clen) {
		var j = i + alen;
		
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal(j);
		
		i = document.cookie.indexOf(" ", i) + 1;

		if (i == 0) 
			break; 
	}
	return null;
}

function DeleteCookie(name, path, domain) 
{
	if (GetCookie(name)) {
		var now = new Date();
		document.cookie = name + "=" +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=" + now.toGMTString();
	}

	return true;
}


function ReadCookieVal(offset) 
{
	var endstr = document.cookie.indexOf (";", offset);

	if (endstr == -1)
		endstr = document.cookie.length;

	return unescape(document.cookie.substring(offset, endstr));
}


function ReadCookie(name) 
{
	var j;
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;

	while (i < clen) {
		j = i + alen;
		
		if (document.cookie.substring(i, j) == arg)
			return ReadCookieVal (j);

		i = document.cookie.indexOf(" ", i) + 1;
		
		if (i == 0) 
			break; 
	}

	return null;
}

var gAdString 	= "";
var gPath		= "home";
var gImageURL	= "";
// use store server to serve images if on store.
	if (self.location.protocol == 'https:')
		gImageURL = self.location.protocol + "//" + self.location.host;
	else
		gImageURL = gBaseURL;	

function GoTo(url)
{
	var CurrentDate = new Date();
	document.location = url + '?' + CurrentDate.getTime();
	return true;
}

function GoToWebX(url)
{
	var CurrentDate = new Date();
	document.location = url + '!' + CurrentDate.getTime();
	return true;
}

function MM_preloadImages() 
{
	var d = document; 

	if (d.images) { 
		if(!d.MM_p) 
			d.MM_p = new Array();

		var i, j = d.MM_p.length, a = MM_preloadImages.arguments; 
		
		for (i = 0; i < a.length; i++) {
			if (a[i].indexOf("#") != 0) { 
				d.MM_p[j] = new Image; 
				d.MM_p[j++].src = gBaseURL + a[i];
			}
		}
	}
}

function MM_swapImgRestore() 
{
	var i, x, a = document.MM_sr; 

	for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) 
		x.src = x.oSrc;
}

function MM_findObj(n, d) 
{
	var p,i,x;  

	if (!d) 
		d = document; 
	
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p+1)].document; 
		n = n.substring(0,p);
	}

	if (!(x = d[n]) && d.all) 
		x = d.all[n]; 
	
	for (i = 0; !x && i < d.forms.length; i++) 
		x = d.forms[i][n];

	for (i = 0; !x && d.layers && i < d.layers.length; i++) 
		x = MM_findObj(n, d.layers[i].document); 
	
	return x;
}

function MM_swapImage() 
{
	var i, j = 0, x, a = MM_swapImage.arguments; 
	
	document.MM_sr = new Array; 
	
	for (i = 0; i < (a.length-2); i += 3)
		if ((x = MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function rememberMe(form) {
	if (confirm("Remember Me! Would you like to be automatically logged in when return to Live365?"))
		form.rememberme.value = "Y";
	
	return true;
}
		
function DrawSubNavLogin(gBaseURL, gPath, thisPageLocation) {
	return '<table cellSpacing="0" border="0">'+
		'<FORM NAME="LoginInForm" ACTION="' + gBaseURL + '/cgi-bin/login.cgi" METHOD="post">'+
//		'<input type="hidden" name="rememberme" value="Y">'+
		'<input type="hidden" name="url" value="' + thisPageLocation + '">'+
		'<input type="hidden" name="success" value="' + gPath + '">'+
		'<tr>'+
		'<td align="right"><img src="' + gImageURL + '/images/dot.gif" width="42" height="6" border="0"><br><a href="/members/login.live?action=none"><img src="' + gImageURL + '/navigation/images/topnav-signup2.gif" border="0" alt="Sign Up / Log In Help" width="38" height="17"></a></td>'+
		'<td><img src="' + gImageURL + '/navigation/images/topnav-username.gif" border="0" width="44" height="7"><br><input class="copyright" size="6" name="membername" maxlength="32"></td>'+
		'<td><img src="' + gImageURL + '/navigation/images/topnav-password.gif" border="0" width="41" height="7"><br><input class="copyright" type="password" name="password" size="6" maxlength="32"></td>'+
		'<td><input type="image" alt="Log In" src="' + gImageURL + '/navigation/images/go-blue.gif" border="0" valign="bottom" name="sd" width="18" height="24"></td>'+
		'</tr>'+
		'</form>'+
		'</table>';
}

function DrawSubNavLogout(name, gPath, tm) {
	return '<img src="' + gImageURL + '/images/dot.gif" width="1" height="10" alt="" border="0"><br>'+
	'<font size="1" color="#666666">Member:&nbsp;' + name + '&nbsp;(<a href="' + gBaseURL + '/cgi-bin/link.cgi?topic=myaccount">Acct</a>&nbsp;|&nbsp;<a href="' + gBaseURL + '/members/login.live?action=out&path=' + gPath + '&' + tm + '">Log&nbsp;out</a>)</font>&nbsp;&nbsp;&nbsp;';
}

function DrawSubNavBar(menu, whichSide, thisPageLocation)
{						   
	var tmd = new Date();
	var tm = tmd.getTime();
	var i;
	var count;
	var left;
	var right;
	var baseURL = gBaseURL;;
	var name = ReadCookie("sessionid");
	if (name)
		name = name.slice(0, name.indexOf(':'));
	var bcast_mode = "OR";
	thisPageLocation = thisPageLocation ? thisPageLocation : ((typeof pageLocation != "undefined") ? pageLocation : document.location+"");
	
	if (menu == "broadcast" || menu == "easycast") {
		bcast_mode = ReadCookie("bcastmode");

		if (!name || name == "" || bcast_mode == "")
			menu = "broadcastintro";
	}
	
	// Start Listen Subnavigation
	if (menu == "listen" || menu == "musiclibrary"  || menu == "mylive365") {
		gPath = "list";		
		//commURL = "http://community.live365.com/cgi-bin/WebX.fcgi?14@@";
		baseURL = "";	
		left = new Array(			
			gBaseURL + "/help/how-to-search.html", "How to Search",
			gBaseURL + "/cgi-bin/personalize.cgi", "Listen Settings",
			gBaseURL + "/downloads/index.live?from=listen", "Free Software",
			gBaseURL + "/charts", "Top Tracks"
		);

		GetPMPitch(menu, left);

		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		} 
		else {
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	}
	// End Listen Subnavigation
	
	// Start About Us Subnavigation
	else if (menu == "freemusic") {
		gPath = "about";
		left = new Array(
			"/musiclibrary/index.live", "Music Library",
			"/broadcast/landing1.live", "Share Your Music"
		);

		GetPMPitch(menu, left);

		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		}
		else {
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	}
	// End About Us Subnavigation
	
	// Start About Us Subnavigation
	else if (menu == "about") {
		gPath = "about";
		left = new Array(
			"/info/index.html", "About Us",
			"/contact.html", "Contact Us",
			"/info/advertise.html", "Advertise",
			"/info/management.html", "Team",
			"/info/press/index.html", "Press",
			"/info/legal.html", "Legal", 
			"/pro/index.html", "PRO Broadcasting"
		);

		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		}
		else {
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	}
	// End About Us Subnavigation
	
	// Start Legal Subnavigation
	else if (menu == "legal") {
		baseURL = "";		
		left = new Array(
			gBaseURL + "/info/legal.html", "Legal",
			gBaseURL + "/info/user.html", "Broadcaster Agreement",
			gBaseURL + "/info/terms.html", "Terms of Use",
			gBaseURL + "/info/privacy.html", "Privacy Policy",
			"http://help.live365.com/bin/topic.py?topic=5", "Legal FAQ",
			gBaseURL + "/info/rules.html", "Rules"
		);

		gPath = "legal";

		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		}
		else {
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	}
	// End Legal Subnavigation
	
	// Start Broadcast Subnavigation
	else if (menu == "broadcast" || menu == "easycast") {
		baseURL = "";

		var session_cookie = name.split(":");

		left = new Array(
			gBaseURL + "/broadcast/broadcast.live", "Studio365",			
			gBaseURL + "/downloads/index.live", "Free Software",
			gBaseURL + "/info/rules.html", "Rules",			
			"http://forums.live365.com/viewforum.php?f=24", "Message Boards",
			"http://help.live365.com/bin/topic.py?topic=2", "FAQs",
			gBaseURL + "/charts", "Airplay Charts"
		);

		right = DrawSubNavLogout(name, gPath, tm);
	}
	// End Broadcast Subnavigation
	
	// Start Store Subnavigation
	else if (menu == "store") {
		baseURL = "";
		left = new Array(
			"http://www.cafeshops.com/cp/store.aspx?s=live365", "Shop",
			"http://www.cafeshops.com/cp/viewcart.aspx", "Shopping Cart",
 			"http://www.cafeshops.com/cp/help/custserv.aspx", "Customer Service",
			"http://www.cafeshops.com/cp/help/shipping.aspx", "Shipping"

		);
		right = '';
	}
	// End Store Subnavigation
	
	// Start Advertise Subnavigation
	else if (menu == "advertise") {
		baseURL = "";
		left = new Array(
			gBaseURL + "/info/advertise.html", "The Power of the Platform",
			gBaseURL + "/info/audience.html", "Our Audience",
 			gBaseURL + "/info/contact.html", "Contact Us"			
		);
		right = '';
	}
	// End Advertise Subnavigation
	
	// Start Community Subnavigation
	else if (menu == "community") {
		baseURL = "";
		gPath = "comm";
		
		left = new Array(			
			gBaseURL + "/community/chat.live?" + tm, "Chat",
			"http://forums.live365.com", "Message Boards",                        
			"http://help.live365.com/bin/request.py", "Support",				
			gBaseURL + "/community/guidelines.html", "Guidelines"
		);

		if (name) 
			right = DrawSubNavLogout(name, gPath, tm);
		else
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
	}
	// End Community Subnavigation
	
	// Start Error Subnavigation
	else if (menu == "error") {
		baseURL = "";
		left = new Array(			
			gBaseURL + "/help/listen/index.html", "How to Listen",
			gBaseURL + "/help/broadcast/index.html", "How to Broadcast",
			gBaseURL + "/help/quickstart.html", "QuickStart",
			gBaseURL + "/help/glossary.html", "Glossary",
			"http://forums.live365.com/viewforum.php?f=20", "Status Report",
			gBaseURL + "/members/login.live?action=support&url=" + escape("http://help.live365.com/bin/request.py?topic="), "Contact",
			"http://help.live365.com/", "FAQ"
			);
		right = '';
	}
	// End Error Subnavigation
	
	// Start Help Subnavigation
	else if (menu == "help") {
		baseURL = "";

		left = new Array(			
			gBaseURL + "/help/listen/index.html", "How to Listen",
			gBaseURL + "/help/broadcast/index.html", "How to Broadcast",
			gBaseURL + "/help/quickstart.html", "QuickStart",
			gBaseURL + "/help/glossary.html", "Glossary",
			"http://forums.live365.com/viewforum.php?f=20", "Status Report",
			"http://help.live365.com/bin/topic.py?topic=2", "FAQs",			
			gBaseURL + "/members/login.live?action=support&url=" + escape("http://help.live365.com/bin/request.py?topic="), "Contact"
		);
		right = '';
	}
	// End Help Subnavigation
	
	// Start Jump Subnavigation (obsolete)
	else if (menu == "jump") {
		left = new Array();
		right = '';
	}
	// End Jump Subnavigation
	
	// Start Registration Subnavigation
	else if (menu == "registration") {
		left = new Array();
		right = '';
	}
	// End Registration Subnavigation
	
	// Start Broadcast Intro Navigation (For new users)
	else if (menu == "broadcastintro") {
		baseURL = "";
	
		left = new Array(			
			gBaseURL + "/cgi-bin/clicks.cgi?adtrack=CB:25:LIV-bifur_subnav_pb:1166997932&url=" + escape(gStoreURL + "/orders/orderform.live"),"Personal Broadcasting",
			gBaseURL + "/pro/index.html","PRO Broadcasting",
			gBaseURL + "/downloads/index.live", "Free Software"
		);
		
		gPath = "bcast";

		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		} 
		else {			
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	} 
	// End Broadcast Intro Subnavigation
	
	// Start Home Subnavigation
	else if (menu == "home"){
		left = new Array(
			"/help/quickstart.html", "QuickStart",
			"/help/how-to-search.html", "How to Search",
			"/downloads/index.live", "Free Software"
		);

		GetPMPitch(menu, left);
		
		gPath = "home";

		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		}
		else {			
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	} 
	// End Home Subnavigation
    
	// Start PLR Subnavigation
	else if (menu == "plr"){
		left = new Array("/pro/index.html","PRO Broadcasting",
				//"/plr/basic.html","Basic",
				//"/plr/premium.html","Premium",
				"/pro/contact.html","Contact Us");
		right = '';
	}
	// End PLR Subnavigation

	
	// Start Default
    else {
		left = new Array();
		if (name) {
			right = DrawSubNavLogout(name, gPath, tm);
		}
		else {			
			right = DrawSubNavLogin(gBaseURL, gPath, thisPageLocation);
		}
	}
	// End Default

	
	if (whichSide == "left") {
		if (left && left.length > 0) {
			document.write('<table border="0" cellspacing="0" cellpadding="0"><tr><td class="subnav">&nbsp;&nbsp;');
			for (i = 0; i < left.length; i += 2) {
				if (i > 0)
				document.write('&nbsp;|&nbsp;');
				if (left[i+1].indexOf("VIP Membership") > -1) {
					document.write('</td><td><img src="/images/dot.gif" width="1" height="2" alt="" border="0"><br>');
					DrawNavbarText('All');
				} else {
					document.write('<A class="subnavlink" href="' + baseURL + left[i] + '">' + left[i+1] + '</A>');						
				}
			}
		document.write("</td></tr></table>");
		}			
		else
			document.write('&nbsp;&nbsp;<img src="' + gImageURL + '/images/dot.gif" width="1" height="1" border="0">');
	} else {
		document.write(right);
	}
}


function DrawNavButtons(subNavDomain)
{
	var now = new Date();
	var tm = now.getTime();    
    var s = '';
    
    // change URL for "Help" tab to point to Forums FAQ instead of regular Help location in tabs array below
 	if (subNavDomain == "community")
        tabs[7]['url'] = "http://forums.live365.com/faq.php";	
	
	if (subNavDomain != "orderform") {
        s = '<table border="0" cellpadding="0" cellspacing="0" width="462">';
		s += '<tr>';
        
        for(var i = 0; i < tabs.length; i++){
            s += '<td width="' + tabs[i]['width'] + '">';
            s += '<a target=_self href="' + tabs[i]['url'] + '"><img src="';
            
    		if (subNavDomain.indexOf(tabs[i]['domain']) != -1)
	            s += tabs[i]['onimgurl'];
		    else
                s += tabs[i]['offimgurl'];
                
            s += '" width="' + tabs[i]['width'] + '" height="'  + tabs[i]['height'] + '" alt="' + tabs[i]['alt'] + '" border="0"></a>';
    		s += '</td>';
                
        }
                	
		s += '</tr>';
		s += '</table>';
	} 
	else
		s += '<img src="' + gImageURL + '/images/dot.gif" width="314" height="27" border="0">';

    document.write(s);
}


function DrawLogoAd(genre, useDART, subNavDomain)
{
	if (DrawLogoAd.arguments.length < 2)
		useDART = true;
	if (DrawLogoAd.arguments.length < 3)
		subNavDomain = "";	

	if (self.location.protocol != 'https:' && subNavDomain != 'store' && self.location.href.indexOf("trakhelp") == -1) {
		if (subNavDomain.indexOf("-sky") != -1){
			if(displayPreferredAds()){
				document.write('<img src="' + gImageURL + '/images/logo-topnavbar.gif" width="77" height="33" align="absmiddle" border="0" alt="Live365.com" vspace="5"> &nbsp; <font class="motto">The World\'s Largest Internet Radio Network</font>');
			}
			else{
				document.write('<a href="http://click.atdmt.com/AVE/go/lv365aws05500015ave/direct/01/" target="_blank" class="navsponsor"><img src="http://view.atdmt.com/AVE/view/lv365aws05500015ave/direct/01/" width="75" height="40" align="absmiddle" border="0" alt="AT&T Wireless" vspace="5"></a> &nbsp; <a href="http://click.atdmt.com/AVE/go/lv365aws05500015ave/direct/01/" target="_blank" class="navsponsor">Enter to become a big-shot record exec in NYC</a>');
			}
		}
		else{
			if (displayPreferredAds())
				DrawBannerAd(genre, useDART, subNavDomain);
			else
				DrawLeaderBoardAd(genre, useDART, subNavDomain);
		}
	}
	else {
		if (subNavDomain != "orderform")
			document.write('<img src="' + gImageURL + '/images/dot.gif" width="468" height="60" border="0">');
		else 
			document.write('<img src="' + gImageURL + '/images/dot.gif" width="468" height="10" border="0">');
	}
}


function DrawHeader(subNavDomain, genre, useDART, noBannerButtons, thisPageLocation)		
{		
	if ((GetCookie("platform") == "wmp10") && (top != self)) {
		document.write("<br>");
		return;
	}

	var bgImage = gImageURL + "/navigation/images/topnav-bg-5a.gif";

	thisPageLocation = thisPageLocation ? thisPageLocation : ((typeof pageLocation != "undefined") ? pageLocation : document.location+"");
	
	if (subNavDomain == "orderform")
		bgImage = gImageURL + "/navigation/images/topnav-bg-5d.gif";
	else if (!displayPreferredAds() && self.location.protocol != 'https:' && !noBannerButtons)
		bgImage = gImageURL + "/navigation/images/topnav-bg3e.gif";
		

	var s = '<table background="' + bgImage + '" cellspacing="0" cellpadding="0" border="0" width="100%"><tr valign="top"><td><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr valign="top">';
	
	if (subNavDomain == "orderform") {
		s += '<td valign="bottom"><img src="' + gImageURL + '/images/topnav-leftedge1.gif" border="0" width="115" height="9"></td>';
		s += '<td width="5"><img src="' + gImageURL + '/images/dot.gif" width="5" height="18" border="0"></td>';
	} 
	else {
		s += '<td width="115" valign="bottom"><a href="' + gBaseURL + '/index.live"><img src="' + gImageURL + '/navigation/images/topnav-logo2.gif" width="115" height="68" alt="Live365.com" border="0"></a></td>';
		s += '<td width="5"><img src="' + gImageURL + '/images/dot.gif" width="5" height="68" border="0"></td>';
	}	
	
	s += '<td width="100%" align="right" nowrap>';

	if (subNavDomain != "orderform" && !displayPreferredAds() && self.location.protocol != 'https:' && !noBannerButtons)
		// for LEADERBOARDS
		s += '<table align="right" cellspacing="0" cellpadding="2" border="0" width="100%"><tr><td width="100%" align="right" height="104" valign="middle">';
	else
		// FOR BANNERS
		s += '<table align="right" cellspacing="0" cellpadding="2" border="0" width="100%"><tr><td width="100%" align="right">';

    document.write(s);

	if (self.location.protocol == 'https:')
		gImageURL = self.location.protocol + "//" + self.location.host;			
	else
		gImageURL = gBaseURL;

	if (!noBannerButtons)
		DrawLogoAd(genre, useDART, subNavDomain);

	s = '<img src="' + gImageURL + '/images/dot.gif" width="10" height="1" border="0" align="absmiddle"></td></tr></table></td></tr></table><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>';
    s += '<td height="30" valign="top"><img src="' + gImageURL + '/navigation/images/topnav-leftedge.gif" width="115" height="25" alt="" border="0"></td>';
	s += '<td width="300"><img src="' + gImageURL + '/images/dot.gif" width="300" height="30" border="0"></td>';
    s += '<td nowrap align="right" valign="top">';
	s += '<table border="0" align="right" cellpadding="2" cellspacing="0"><tr valign="middle">';
	s += '<td width="54"><img src="' + gImageURL + '/navigation/images/topnav-logo-small.gif" width="54" height="25" alt="Live365" border="0"></td>';
    s += '<td class="plain" nowrap><font class="motto">The World\'s Largest Internet Radio Network</font><img src="' + gImageURL + '/images/dot.gif" width="10" height="1" border="0" align="absmiddle"></td>';
	s += '</tr></table></td></tr></table>';
	s += '<table cellspacing="0" cellpadding="0" border="0" width="100%">';
	s += '<tr>';
	s += '<td class="navbuttons" width="100%" height="33" valign="bottom">';
	//s += '<td width="100%" height="33" valign="bottom">');
    document.write(s);    
	
	if (DrawHeader.arguments.length < 2)
		genre = "";

	if (DrawHeader.arguments.length < 3)
		useDART = true; // can't rely on house ads being there
		
	var i = subNavDomain.indexOf("-sky");

	if (i != -1)
		subNavDomain = subNavDomain.substr(0, i);
			
	DrawNavButtons(subNavDomain);
	
	s = '</td>';
	s += '<td valign="top" height="60" rowspan="2" background="' + gImageURL + '/navigation/images/background-username7.gif" class="subnav">';
    s += '<img src="' + gImageURL + '/images/dot.gif" width="177" height="25" alt="" border="0"><br>';
    document.write(s);
    
	if (subNavDomain && subNavDomain != "undefined" && subNavDomain != "null" && thisPageLocation.indexOf("login.live") == -1) 
		DrawSubNavBar(subNavDomain, "right", thisPageLocation);

	s = '</td>';
	s += '</tr>';
	s += '<tr valign="top"><td height="27" class="subnav">';
    s += '<img src="' + gImageURL + '/images/dot.gif" width="1" height="2" alt="" border="0"><br>';
	document.write(s);
    
	if (subNavDomain && subNavDomain != "undefined" && subNavDomain != "null") 
		DrawSubNavBar(subNavDomain, "left");
	
	s = '</td></tr>';
	s += '</table>';
	s += '</td></tr></table>'; 
    document.write(s);
}


function DrawWMPFooter()
{
    var s = '';
	s += '<p>&nbsp;</p>';
	s += '<div class="footer" align="center" style="margin: 20px 0 0 0">';
	s += '<a href="java'+'script:top.SetTab(0, \'All\')">Home</a> - ';
	s += '<a href="java'+'script:top.SetTab(1, \'Listen\')">Find&nbsp;Stations</a> - ';
	s += '<a href="java'+'script:top.SetTab(2, \'Presets\')">My&nbsp;Presets</a> - ';
	s += '<a href="java'+'script:top.SetTab(3, \'Recommendations\')">Recommendations</a> - ';
	s += '<a href="/cgi-bin/wishlist.cgi" target="_blank">Wishlist</a> - ';
	s += '<a href="/community/index.html" target="_blank">Community</a> - ';
	s += '<a href="http://www.cafepress.com/live365/" target="_blank">Shop</a> - ';
	s += '<a href="/downloads/index.live" target="_blank">Free Software</a> - ';
	s += '<a href="/info/index.html" target="_blank">About&nbsp;Us</a><br>';
	s += '<a href="/help/index.html" target="_blank">Help</a> - ';
	s += '<a href="/cgi-bin/link.cgi?topic=myaccount" target="_blank">My&nbsp;Account</a> - ';
	s += '<A HREF="/giftcertificates/landing.html">Gift Certificates</A> - ';
	s += '<a href="/cgi-bin/personalize.cgi" target="_blank">Listen&nbsp;Settings</a> - ';
	s += '<a href="/info/advertise.html" target="_blank">Advertise&nbsp;With&nbsp;Us</a> - ';
	s += '<A HREF="/info/jobs.html" target="_blank">Jobs</A> - ';
	s += '<a href="/labelservices/index.live" target="_blank">Label&nbsp;Services</a> - ';
	s += '<a href="/affiliate/index.html" target="_blank">Affiliate&nbsp;Program</a> - ';
	s += '<a href="/info/legal.html" target="_blank">Legal&nbsp;Info</a>';
	s += '</div>';
	s += '<div class="copyright" align="center" style="margin: 20px">';
	s += 'Live365.com is an officially licensed ASCAP and BMI site.<br>';
	s += '© 1999-2005 Live365, Inc. All rights reserved.<p>&nbsp;<br>';
	s += '</div>';
    document.write(s);
}

function DrawFooter(domain, drawBanner, mode)
{
	var tmd = new Date();
	var tm = tmd.getTime();
    var s = '';
	var maxFrames = 0;
	if (client.isIE && (domain == "listen"))
		maxFrames = 1;
	
	if (DrawFooter.arguments.length < 2)
		drawBanner = true;
	if ((self.location.protocol != 'https:') && (mode != "simple")) {
		DrawSearchBar();
	}
	if ((self.location.protocol != 'https:') && (mode != "simple")) {
		s += '<DIV class="footer" ALIGN="center">';
		s += '<A HREF="' + gBaseURL + '/index.live">Home</A> - ';
        s += '<A HREF="' + gBaseURL + '/mylive365/">MyLive365</A> - ';
        s += '<A HREF="' + gBaseURL + '/listen/index.live">Listen</A> - '; 
		s += '<A TARGET="_top" HREF="' + gBaseURL + '/broadcast/index.live?' + tm + '">Broadcast</A> - ';
        s += '<A TARGET="_top" HREF="' + gBaseURL + '/contest/hp/hp_downloads.live">Free Music</A> - ';
		s += '<A HREF="' + gBaseURL + '/community/index.html">Community</A> - ';
		s += '<A HREF="http://www.cafeshops.com/cp/store.aspx?s=live365">Shop</A> - ';
		s += '<A HREF="' + gBaseURL + '/downloads/index.live">Free Software</A> - ';
		s += '<A HREF="' + gBaseURL + '/info/index.html">About Us</A> - ';
		s += '<A HREF="' + gBaseURL + '/help/index.html">Help</A><BR>';
		s += '<a href="' + gBaseURL + '/cgi-bin/link.cgi?topic=myaccount">My Account</a> - ';
		s += '<A HREF="' + gBaseURL + '/giftcertificates/landing.html">Gift Certificates</A> - ';
		s += '<A HREF="' + gBaseURL + '/info/advertise.html">Advertise With Us</A> - ';
		s += '<A HREF="' + gBaseURL + '/info/jobs.html">Jobs</A> - ';
		s += '<A HREF="' + gBaseURL + '/labelservices/index.live">Label Services</A> - ';
		s += '<A HREF="' + gBaseURL + '/affiliate/index.html">Affiliate Program</A> - '; 
		s += '<A HREF="' + gBaseURL + '/info/legal.html">Legal Info</A><br><br>';
		s += '</div>';
	}
	if (domain != "store") {
		s += '<p>';
		s += '<DIV class="copyright" ALIGN="center">';
		s += '<a href="' + gBaseURL + '"><img border="0" src="' + gImageURL + '/images/flag-usa.gif" hspace="0" alt="U.S. Site" width="30" height="18"></a>&nbsp;';
		s += '<a href="' + gBaseURL + '/home/cni.live"><img border="0" src="' + gImageURL + '/images/flag-japan.gif" hspace="0" alt="Japanese Site" width="30" height="18"></a>';
		s += '<br>';
		s += 'Live365.com is an officially licensed ASCAP, BMI and SESAC site.<BR>';
		s += '&copy; 1999-2005 Live365, Inc. All rights reserved.<BR>';
		s += '<img src="' + gImageURL + '/images/dot.gif" WIDTH=1 HEIGHT=5 BORDER=0 NAME="ContentImage"><BR>';
		s += '&nbsp;';
		s += '<BR></DIV>';
	}	
    document.write(s);
}


function PopUpTenWays(thePage) 
{
	popUpWin = window.open(thePage,'popWin','resizeable=no,scrollbars=no,location=no,toolbar=no,width=420,height=440');
}


function LaunchWindow(url)
{
    open(url);
    return true;
}

function DrawGenreImage(genre)
{
	var safe = unescape(genre);
	safe = safe.replace(/\W/g, '_');
    document.write('<img src="' + gImageURL + '/genres/images/genre-' + safe + '.gif" width="277" height="42" border="0" alt="' + genre + '">');
}


function GetPMPitch(menu, arr)
{
	if (displayPreferredAds())
		return;

	var home_pitches = new Array(
		"Get Total Access!",		"PM:25:LIV-fac_subn_access:1076972492",
		"Fewer Interruptions!",		"PM:25:LIV-fac_subn_interr:1076972525",
		"No Pop-Ups!",				"PM:25:LIV-fac_subn_popups:1076972558",
		"Get CD-Quality Sound!",	"PM:25:LIV-fac_subn_hifi:1076972592",
		"Free Trial!",				"PM:25:LIV-fac_subn_freetr:1077043227"
	);

	var other_high_pitches = new Array(
		"Get Total Access!",		"PM:25:LIV-fac_ssubn_acces:1076974960",
		"Fewer Interruptions!",		"PM:25:LIV-fac_ssubn_inter:1076974874",
		"No Pop-Ups!",				"PM:25:LIV-fac_ssubn_popup:1076974837",
		"CD-Quality Sound!",		"PM:25:LIV-fac_ssubn_hifihi:1083003667",
		"Free Trial!",				"PM:25:LIV-fac_ssubn_freet:1077043468"
	);

	var other_low_pitches = new Array(
		"Get Total Access!",		"PM:25:LIV-fac_ssubn_acces:1076974960",
		"Fewer Interruptions!",		"PM:25:LIV-fac_ssubn_inter:1076974874",
		"No Pop-Ups!",				"PM:25:LIV-fac_ssubn_popup:1076974837",
		"Higher-Quality Sound!",	"PM:25:LIV-fac_ssubn_hifilo:1083003645",
		"Free Trial!",				"PM:25:LIV-fac_ssubn_freet:1077043468"
	);

	var other_pitches = (GetCookieEx('box_mc', "bitrate") < 64) ? other_low_pitches : other_high_pitches ;	
	var pitches = (menu == 'home') ? home_pitches : other_pitches;

	var index = Math.floor(Math.random() * (pitches.length/2)) * 2;

	arr[arr.length] = gBaseURL + "/cgi-bin/clicks.cgi?adtrack=" + pitches[index + 1] + "&url=%2Flisten%2Fpreferred-member.live";
	arr[arr.length] = "<font class=subnav-adfree>VIP Membership: " + pitches[index] + "</font>";
}




// NAVIGATION TABS

var tabs = new Array();

tabs[0] = new Array();
tabs[0]['domain'] = 'home';
tabs[0]['width'] = '76';
tabs[0]['height'] = '27';
tabs[0]['url'] = gBaseURL + '/index.live';
tabs[0]['onimgurl'] = gImageURL  + '/navigation/images/topnav-home-h2.gif';
tabs[0]['offimgurl'] = gImageURL  + '/navigation/images/topnav-home-b2.gif';
tabs[0]['alt'] = 'Home';

tabs[1] = new Array();
tabs[1]['domain'] = 'mylive365';
tabs[1]['width'] = '75';
tabs[1]['height'] = '27';
tabs[1]['url'] = gBaseURL + '/mylive365/';
tabs[1]['onimgurl'] = gImageURL  + '/navigation/images/topnav-mylive365-h2.gif';
tabs[1]['offimgurl'] = gImageURL  + '/navigation/images/topnav-mylive365-b2.gif';
tabs[1]['alt'] = 'My Live365';

tabs[2] = new Array();
tabs[2]['domain'] = 'listen';
tabs[2]['width'] = '73';
tabs[2]['height'] = '27';
tabs[2]['url'] = gBaseURL + '/listen/';
tabs[2]['onimgurl'] = gImageURL  + '/navigation/images/topnav-listen-h2.gif';
tabs[2]['offimgurl'] = gImageURL  + '/navigation/images/topnav-listen-b2.gif';
tabs[2]['alt'] = 'Listen';

tabs[3] = new Array();
tabs[3]['domain'] = 'cast';
tabs[3]['width'] = '74';
tabs[3]['height'] = '27';
tabs[3]['url'] = gBaseURL + '/broadcast/';
tabs[3]['onimgurl'] = gImageURL  + '/navigation/images/topnav-broadcast-h2.gif';
tabs[3]['offimgurl'] = gImageURL  + '/navigation/images/topnav-broadcast-b2.gif';
tabs[3]['alt'] = 'Broadcast';

tabs[4] = new Array();
tabs[4]['domain'] = 'freemusic';
tabs[4]['width'] = '74';
tabs[4]['height'] = '27';
tabs[4]['url'] = gBaseURL + '/contest/hp/hp_downloads.live';
tabs[4]['onimgurl'] = gImageURL  + '/navigation/images/topnav-freemusic-h2.gif';
tabs[4]['offimgurl'] = gImageURL  + '/navigation/images/topnav-freemusic-b2.gif';
tabs[4]['alt'] = 'Free Music';

tabs[5] = new Array();
tabs[5]['domain'] = 'community';
tabs[5]['width'] = '74';
tabs[5]['height'] = '27';
tabs[5]['url'] = gBaseURL + '/community/';
tabs[5]['onimgurl'] = gImageURL  + '/navigation/images/topnav-community-h2.gif';
tabs[5]['offimgurl'] = gImageURL  + '/navigation/images/topnav-community-b2.gif';
tabs[5]['alt'] = 'Community';

tabs[6] = new Array();
tabs[6]['domain'] = 'store';
tabs[6]['width'] = '45';
tabs[6]['height'] = '27';
tabs[6]['url'] = 'http://www.cafeshops.com/cp/store.aspx?s=live365';
tabs[6]['onimgurl'] = gImageURL  + '/navigation/images/topnav-shop-h2.gif';
tabs[6]['offimgurl'] = gImageURL  + '/navigation/images/topnav-shop-b2.gif';
tabs[6]['alt'] = 'Shop';

tabs[7] = new Array();
tabs[7]['domain'] = 'help';
tabs[7]['width'] = '46';
tabs[7]['height'] = '27';
tabs[7]['url'] = 'http://help.live365.com/';
tabs[7]['onimgurl'] = gImageURL  + '/navigation/images/topnav-help-h2.gif';
tabs[7]['offimgurl'] = gImageURL  + '/navigation/images/topnav-help-b2.gif';
tabs[7]['alt'] = 'Help';


// end scripting -->

