<!-- 
// (c) 2000 Live365.com.  All rights reserved.

var gAdString 	= "";
var gPath		= "home";

// Need to set differn gImageURL based on whether we're in the store or on WWW.  Need to point to https://store01.. if on store, otherwise, http://www...

 
//gBaseURL = "http://www.live365.com";  //Yo Blonde -  dont' forget to munge 

gBaseURL = "http://www.live365.com";  // used for HREF
var gStoreURL = "https://store02.live365.com";
var gImageURL = "";

// set members of Object "client"
var client 		= new Object();
client.isMac	= false;
client.isWin	= false;
client.isIE		= false;
client.isNS		= false;

// set browser
if (navigator.appName.indexOf("Netscape") != -1)
	client.isNS = true;
else if (navigator.appName.indexOf("Microsoft") != -1)
	client.isIE = true;

// set platform
if (navigator.platform.indexOf("Win32") != -1)
	client.isWin = true;
else if (navigator.platform.indexOf("Mac") != -1)
	client.isMac = true;

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];}
}

/*
MM_preloadImages(
	gImageURL + '/navigation/images/listen-over.gif',
	gImageURL + '/navigation/images/navhome-down.gif',
	gImageURL + '/navigation/images/navhome-over.gif',
	gImageURL + '/navigation/images/navhome.gif',
	gImageURL + '/navigation/images/listen-down.gif',
	gImageURL + '/navigation/images/listen-off.gif',
	gImageURL + '/navigation/images/broadcast-over.gif',
	gImageURL + '/navigation/images/broadcast-down.gif',
	gImageURL + '/navigation/images/broadcast-off.gif',
	gImageURL + '/navigation/images/community-over.gif',
	gImageURL + '/navigation/images/community-down.gif',
	gImageURL + '/navigation/images/community-off.gif',
	gImageURL + '/navigation/images/help-over.gif',
	gImageURL + '/navigation/images/help-down.gif',
	gImageURL + '/navigation/images/shop-over.gif',
	gImageURL + '/navigation/images/shop-down.gif',
	gImageURL + '/navigation/images/shop-off.gif',
	gImageURL + '/navigation/images/help-off.gif',
	gImageURL + '/navigation/images/logotop-over.gif'
);
*/

function DrawNavBarButtons(subNavDomain)

{
	var now = new Date();
	var tm = now.getTime();
	var helpLink = gBaseURL + "/help/index.html";

    document.write('<td rowspan="2" align="right" valign="bottom" width="37" bgcolor="003366"><img src="' + gImageURL + '/navigation/images/interface-left-02.gif" width="37" height="38" vspace="0" hspace="0" border="0" ></td>');
    if (subNavDomain == "listen") {
		helpLink = "http://live365.custhelp.com/cgi-bin/live365/faq?14-8";
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/cgi-bin/directory.cgi"><img src="' + gImageURL + '/navigation/images/listen-down.gif" name="listenbutton" width="90" height="38"  border="0"></a></td>');
	} else {
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/cgi-bin/directory.cgi" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'listenbutton\',\'\',\'' + gImageURL + '/navigation/images/listen-over.gif\',1)" onMouseDown="MM_swapImage(\'listenbutton\',\'\',\'' + gImageURL + '/navigation/images/listen-down.gif\',1)" onMouseUp="MM_swapImage(\'listenbutton\',\'\',\'' + gImageURL + '/navigation/images/listen-down.gif\',1)"><img src="' + gImageURL + '/navigation/images/listen-off.gif" name="listenbutton" width="90" height="38"  border="0"></a></td>');
    }
	
	if (subNavDomain == "broadcastintro" || subNavDomain == "broadcast" || subNavDomain == "easycast") {
		helpLink = "http://live365.custhelp.com/cgi-bin/live365/faq?14-7";
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/broadcast/index.live?' + tm + '"><img src="' + gImageURL + '/navigation/images/broadcast-down.gif" name="broadcastbutton" width="90" height="38"  border="0"></a></td>');
	} else {
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/broadcast/index.live?' + tm + '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'broadcastbutton\',\'\',\'' + gImageURL + '/navigation/images/broadcast-over.gif\',1)" onMouseDown="MM_swapImage(\'broadcastbutton\',\'\',\'' + gImageURL + '/navigation/images/broadcast-down.gif\',1)"onMouseUp="MM_swapImage(\'broadcastbutton\',\'\',\'' + gImageURL + '/navigation/images/broadcast-down.gif\',1)"><img src="' + gImageURL + '/navigation/images/broadcast-off.gif" name="broadcastbutton" width="90" height="38"  border="0"></a></td>');
	}
	
	if (subNavDomain == "store") {
		helpLink = "http://live365.custhelp.com/cgi-bin/live365/faq?14-2";	
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gStoreURL + '"><img src="' + gImageURL + '/navigation/images/shop-down.gif" name="shopbutton" width="90" height="38"  border="0"></a></td>');
	} else {
	   	document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gStoreURL + '" onMouseOver="MM_swapImage(\'shopbutton\',\'\',\'' + gImageURL + '/navigation/images/shop-over.gif\',1)" onMouseDown="MM_swapImage(\'shopbutton\',\'\',\'' + gImageURL + '/navigation/images/shop-down.gif\',1)" onMouseOut="MM_swapImgRestore()" onMouseUp="MM_swapImage(\'shopbutton\',\'\',\'' + gImageURL + '/navigation/images/shop-down.gif\',1)"><img src="' + gImageURL + '/navigation/images/shop-off.gif" name="shopbutton" width="90" height="38"  border="0"></a></td>');
    }
	
	if (subNavDomain == "community") {
		helpLink = "http://live365.custhelp.com/cgi-bin/live365/faq?14-12";
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/community/index.html"><img src="' + gImageURL + '/navigation/images/community-down.gif" name="communitybutton" width="90" height="38"  border="0"></a></td>');
	} else {
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/community/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'communitybutton\',\'\',\'' + gImageURL + '/navigation/images/community-over.gif\',1)" onMouseDown="MM_swapImage(\'communitybutton\',\'\',\'' + gImageURL + '/navigation/images/community-down.gif\',1)" onMouseUp="MM_swapImage(\'communitybutton\',\'\',\'' + gImageURL + '/navigation/images/community-down.gif\',1)"><img src="' + gImageURL + '/navigation/images/community-off.gif" name="communitybutton" width="90" height="38"  border="0"></a></td>');
	}
    
	if (subNavDomain == "help")
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + helpLink + '"><img src="' + gImageURL + '/navigation/images/help-down.gif" name="helpbutton" width="90" height="38"  border="0"></a></td>');
	else
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + helpLink + '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'helpbutton\',\'\',\'' + gImageURL + '/navigation/images/help-over.gif\',1)" onMouseDown="MM_swapImage(\'helpbutton\',\'\',\'' + gImageURL + '/navigation/images/help-down.gif\',1)" onMouseUp="MM_swapImage(\'helpbutton\',\'\',\'' + gImageURL + '/navigation/images/help-down.gif\',1)"><img src="' + gImageURL + '/navigation/images/help-off.gif" name="helpbutton" width="90" height="38"  border="0"></a></td>');
    
	if (subNavDomain == "home")
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/index.html"><img src="' + gImageURL + '/navigation/images/navhome-down.gif" name="homebutton" width="32" height="38"  border="0"></a></td>');
	else
		document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="003366"><a target=_top href="' + gBaseURL + '/index.html" onMouseOver="MM_swapImage(\'homebutton\',\'\',\'' + gImageURL + '/navigation/images/navhome-over.gif\',1)" onMouseDown="MM_swapImage(\'homebutton\',\'\',\'' + gImageURL + '/navigation/images/navhome-down.gif\',1)" onMouseOut="MM_swapImgRestore()" onMouseUp="MM_swapImage(\'homebutton\',\'\',\'' + gImageURL + '/navigation/images/navhome-down.gif\',1)"><img src="' + gImageURL + '/navigation/images/navhome.gif" name="homebutton" width="32" height="38"  border="0"></a></td>');
    document.write('<td rowspan="2" align="left" valign="bottom" bgcolor="0066cc"><IMG SRC="' + gImageURL + '/images/dot.gif" WIDTH=70 HEIGHT=1 BORDER=0></td>');
}


function DrawNavBar(subNavDomain)
{
	document.write('<TABLE width="701" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr bgcolor="003366">');
	document.write('<td width="112" valign="bottom" align="center" bgcolor="003366">');

	if (gImageURL == "")
		gImageURL = gBaseURL;

	var months=new Array(13);
	months[1]="Jan.";
	months[2]="Feb.";
	months[3]="Mar.";
	months[4]="Apr.";
	months[5]="May";
	months[6]="Jun.";
	months[7]="Jul.";
	months[8]="Aug.";
	months[9]="Sept.";
	months[10]="Oct.";
	months[11]="Nov.";
	months[12]="Dec.";
	var time=new Date();
	var lmonth=months[time.getMonth() + 1];
	var date=time.getDate();
	var year=time.getYear();
	if (year < 2000)    
	year = year + 1900; 

	document.write('<font id="date">');
//	document.write("<div align=center>" + lmonth + " ");
	document.write("<div align=center>" + "Mar." + " ");
//	document.write(date + ", " + year + "</div>");
	document.write("2" + ", " + "2001" + "</div>");

	document.write('</font>');
	
	document.write('</td>');
	
	DrawNavBarButtons(subNavDomain);

	document.write('</tr>');
	document.write('<tr>');
	document.write('<td valign="bottom" align="right" bgcolor="003366"><img src="' + gImageURL + '/navigation/images/interface-left.gif" width="112" height="18" vspace="0" hspace="0" border="0"></td>');
	document.write('</tr>');

	if (subNavDomain && subNavDomain != "undefined" && subNavDomain != "null" && subNavDomain != "store") {
		document.write('<tr><td colspan=10>');

		DrawSubNavBar(subNavDomain);

		document.write('</td></tr>');
	}

	document.write('</table>');
}


function DrawLogoAd(genre, useDART, subNavDomain)
{
	document.write('<TABLE width="701" border="0" cellspacing="0" cellpadding="0">')
	document.write('<TR BGCOLOR="003366" nowrap>');
	document.write('<TD><img src="' + gImageURL + '/images/dot.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD>'); 		
	document.write('<TD><img src="' + gImageURL + '/images/dot.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD>');
	document.write('<TD WIDTH="42"><img src="' + gImageURL + '/images/dot.gif" WIDTH=42 HEIGHT=1 BORDER=0></TD>');
	document.write('<TD><img src="' + gImageURL + '/images/dot.gif" HEIGHT="1" WIDTH="1" BORDER=0></TD>'); 
	document.write('</TR>');
	document.write('<TR BGCOLOR="003366" nowrap>');
	document.write('<TD COLSPAN="2"><a href="' + gBaseURL + '/home/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'logomation\',\'\',\'' + gImageURL + '/navigation/images/logotop-over.gif\',1)"><img name="logomation" border="0" src="' + gImageURL + '/navigation/images/logotop.gif" width="102" height="54" HSPACE="5" VSPACE="5" ALT="Live365.com"></a><img src="' + gImageURL + '/images/dot.gif" WIDTH=35 HEIGHT=1 BORDER=0>');
	
	if (DrawLogoAd.arguments.length < 2)
		useDART = true;
	if (DrawLogoAd.arguments.length < 3)
		subNavDomain = "";		

	if (subNavDomain != "store")
		DrawBannerAd(genre, useDART, subNavDomain);
	else
		document.write('<IMG SRC="' + gStoreURL + '/images/storebanner.gif" HEIGHT=60 WIDTH=468 BORDER=0>');
	
	document.write('<BR><img src="' + gImageURL + '/images/dot.gif" HEIGHT=5 WIDTH="1" BORDER=0></TD>');
	document.write('<TD WIDTH="42"><img src="' + gImageURL + '/images/dot.gif" WIDTH=42 HEIGHT=1 BORDER=0></TD>');
	document.write('<TD><img src="' + gImageURL + '/images/dot.gif" HEIGHT="1" WIDTH="1" BORDER=0></TD>');
	document.writeln('</TR>');
	document.writeln('</TABLE>')
}


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

	if (genre == "")
		genre = subNavDomain;

	if (useDART)
		DrawDart(genre, "468x60a", "468x60", 1, 0);
	else {
		if (gAdString == "")
			DrawDart(genre, "468x60a", "468x60", 1, 0);
		else
			document.write(gAdString);
	}
}


function DrawDart(genre, pos, sz, tile, tm)
{
	var domains = new Array(
		"home",
		"listen",
		"broadcastintro",
		"broadcast",
		"easycast",
		"store",
		"community",
		"help",
		"about",
		"editorial",
		"person",
		"plr"
	);

	var campaigns = new Array(
		"home",
		"listen",
		"broadcast",
		"broadcast",
		"broadcast",
		"store",
		"community",
		"help",
		"help",
		"home",
		"broadcast",
		"broadcast"
	);

	var id;
	var campaign = "other";
	var currentDate = new Date();
	var width = 468;
	var now = tm;
	
	if (now == 0)
		now = currentDate.getTime();

	now += '?';

	if (sz.indexOf("120") >= 0)
		width = 120;

	for (id = 0; id < domains.length; id++) {
		if (genre == domains[id]) {
			campaign = campaigns[id];
			break;
		}
	}

	if (genre != "" && campaign == "other") {
		id = GetGenreIndex(genre);

		if (id < gSpecialGenres)
			id = 0;

		campaign = gGenreAds[id];
	}

	var args = ";genre=" + genre + ";pos=" + pos + ";sz=" + sz + ";tile=" + tile + ";ord=" + now;
	var imageurl    = "http://ad.doubleclick.net/ad/live365.com/" + campaign   + ";abr=!ie" + args;
	var iframeurl   = "http://ad.doubleclick.net/adi/live365.com/" + campaign  + args;
	var scripturl   = "http://ad.doubleclick.net/adj/live365.com/" + campaign  + " ;abr=!ie" + args;
    var noscripturl = "http://ad.doubleclick.net/jump/live365.com/" + campaign + ";abr=!ie" + args;

	document.write('<IFRAME SRC="' + iframeurl + '" name="frame1" width="' + width + '" height="60" frameborder="no" border="0" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no">');
	document.write('<SCRIPT language="JavaScript1.1" SRC="' + scripturl + '">');
	document.write('</SCRIPT>');
	document.write('</IFRAME>');
}


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;
}


function DoSearch()
{
	var url = gBaseURL + "/cgi-bin/directory.cgi";
	var val;
	
	if (document.SearchForm1.searchdesc.value != "") {
		val = escape(document.SearchForm1.searchdesc.value);
		val = val.replace(/[\+]/g, "%2b");

		url += '?genre=search&searchdesc=' + val;

		val = document.SearchForm1.searchfields[document.SearchForm1.searchfields.selectedIndex].value;
		if (val != "")
			url += '&searchfields=' + val;
	}

	document.location = url;
	return false;
}


function DoGenreSearch()
{
	var url = gBaseURL + "/cgi-bin/directory.cgi";
	var value = gGenreIDs[document.forms.SearchForm1.genre.selectedIndex-1];
	
	if (value) {
		if (value == "Presets" && !ReadCookie("sessionid")) {
			alert('You must be logged in to go to your list of Presets');
			document.forms.SearchForm1.genre.selectedIndex = 0;
		   	return false;
		}

		url += '?genre=' + value;
	}

	document.location = url;
	return false;
}


function DrawSearchBar(includeGenres)
{
	var size = (navigator.appName == "Netscape") ? 6 : 8;

	document.write('<form name="SearchForm1" onsubmit="return DoSearch()">');
//		document.write('<td nowrap id="subnavtext" align="left" valign="baseline" colspan="2">');
		document.write('<td nowrap id="subnavtext" align="left" valign="middle" colspan="2" height="28">');
			if (includeGenres) {
				document.write('&nbsp;<b>Browse:</b>&nbsp;');
				DrawNamedGenreSelections("genre", 0, "DoGenreSearch", -1, 1);
				document.write('  <img src="' + gImageURL + '/navigation/images/divider.gif" width="4" height="16" hspace="3" border="0"> ');
			}

			document.write('&nbsp;<b>Search for:</b>  ');
			document.write('<input type="text" name="searchdesc" size="' + size + '" id="searchinput">');
			document.write(' <b>in</b> ');

			document.write('<SELECT NAME="searchfields" id="searchinput">');
			document.write('<OPTION VALUE="">Live365 Stations</OPTION>');
			document.write('<OPTION VALUE="TACF">Playlists</OPTION>');
			document.write('<OPTION VALUE="H">Broadcasters</OPTION>');
			document.write('<OPTION VALUE="TF">Tracks</OPTION>');
			document.write('<OPTION VALUE="AF">Artists</OPTION>');
			document.write('<OPTION VALUE="CF">Albums</OPTION>');
			document.write('<OPTION VALUE="DHGTACF">Stations & Playlists</OPTION>');
			document.write('</SELECT>');
			document.write('<input type=image src="' + gImageURL + '/navigation/images/go.gif" width="20" height="20" border="0" align="absbottom">&nbsp;');

			if (client.isWin && client.isIE)
				document.write('(e.g. <i>love</i>, <i>Beatles</i>)');

		document.write('</td>');
	document.write('</form>');
}


function DrawSubNavBar(menu)
{						   
	var tmd = new Date();
	var tm = tmd.getTime();
	var i;
	var count;
	
	var left;
	var right;
	var baseURL = gBaseURL;;
	var name = ReadCookie("sessionid");
	
	if (menu == "about") {
		left = new Array(
			"/info/management.html", "Team",
			"/info/techpartners.html", "Partners",
			"/info/press/index.html", "Press",
			"/info/jobs.html", "Jobs",
			"/plr/index.html", "Broadcast365",
			"/info/logos.html", "Logos",
			"/info/legal.html", "Legal", 
			"/contact.html", "Contact Us",
			"/info/directions.html", "Directions"
		);

		gPath = "about";

		if (name) {
			right = new Array(
				"/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else {
			right = new Array(
				"/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "legal") {
		left = new Array(
			"/info/user.html", "Broadcaster Agreement",
			"/info/terms.html", "Terms of Use",
			"/info/privacy.html", "Privacy Policy",
			"http://live365.custhelp.com/cgi-bin/live365/faq?14-20", "Legal FAQ",
			"/info/rules.html", "Rules"
		);

		gPath = "legal";
		
		if (name) {
			right = new Array(
				"/interact/acctinfo.live?" + tm, "Member Profile",
				"/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else {
			right = new Array(
				"/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "listen") {
		left = new Array(
			"/fa/index.html", "Featured Broadcast",
			"/feature/index.html", "Content Partners"
		);

		gPath = "list";		
		
		if (name) {
			right = new Array(
				"/interact/acctinfo.live?" + tm, "Member Profile",
				"/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else {			
			right = new Array(
				"/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "broadcast" || menu == "easycast") {
		baseURL = "";

		left = new Array(
			gBaseURL + "/broadcast/controls.live?" + tm, "Broadcast Controls",
			gBaseURL + "/info/rules.html", "Rules",
			"javascript:PopUpTenWays('" + gBaseURL + "/broadcast/promote-check.html')", "Promote it"
		);

		gPath = "bcast";		
		
		if (name) {
			right = new Array(
				gBaseURL + "/interact/acctinfo.live?" + tm, "Member Profile",
				gBaseURL + "/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else { // should never get here with EasyCast
			right = new Array(
				gBaseURL + "/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "community") {
		baseURL = "";
		gPath = "comm";
		
		if (name) {
			left = new Array(
				gBaseURL + "/community/index.html", "Message Boards",
				gBaseURL + "/community/chat.live?" + tm, "Chat",
				gBaseURL + "/community/guidelines.html", "Guidelines"
			);
			right = new Array(
				gBaseURL + "/interact/acctinfo.live?" + tm, "Member Profile",
				gBaseURL + "/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else {
			left = new Array(
				gBaseURL + "/registration/index.html", "Sign Up",
				gBaseURL + "/community/index.html", "Message Boards",
				gBaseURL + "/community/chat.live?" + tm, "Chat",
				gBaseURL + "/community/guidelines.html", "Guidelines"
			);

			right = new Array(
				gBaseURL + "/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "error") {
		left = new Array();

		if (name) {
			gPath = "err";
			right = new Array(
				"/interact/acctinfo.live?" + tm, "Member Profile",
				"/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else {
			gPath = "err-home";		
			right = new Array(
				"/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "help") {
		baseURL = "";

		left = new Array(
			"http://live365.custhelp.com/cgi-bin/live365", "FAQ",
			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"
		);

		if (name) {
			right = new Array(
//				"/interact/acctinfo.live?" + tm, "Member Profile",
//				"/members/login.live?action=out&path=help&" + tm, "Log Out"
			);
		}
		else {			
			right = new Array(
//				"/members/login.live?path=help&" + tm, "Log In"
			);
		}
	}
	else if (menu == "jump") {
		if (name) {
			left = new Array(
				"/registration/index.html", "Sign up"
			);
		}
		else {			
			left = new Array(
				"/cgi-bin/register.cgi", "Sign up"
			);
		}

		right = new Array();
	}
	else if (menu == "registration") {
		left = new Array();

		if (name) {
			gPath = "reg";
			right = new Array(
				"/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}
		else {			
			gPath = "reg-list";
			right = new Array(
				"/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}
	}
	else if (menu == "broadcastintro"){
			left = new Array("/plr/index.html","Broadcast365",
							 "/broadcast/broadcast.live","Personal Broadcasting");
		gPath = "bcast";
		if (name) {
			right = new Array(
				"/interact/acctinfo.live?" + tm, "Member Profile",
				"/members/login.live?action=out&path=" + gPath + "&" + tm, "Log Out"
			);
		}// End name
		else {			
			right = new Array(
				"/members/login.live?path=" + gPath + "&" + tm, "Log In"
			);
		}// end else

	} // End broadcastintro
    else if (menu == "plr"){
		left = new Array("/plr/index.html","Broadcast365 Home",
						 "/plr/basic.html","Basic",
						 "/plr/premium.html","Premium",
						 "/plr/contact.html","Contact Us");
		
		right = new Array();
						 
	
	}// End menu == plr
	document.writeln('<table width="701" border="0" cellspacing="0" bgcolor="ffffff" cellpadding="0">')

	if (menu != "home") {
		document.writeln('<tr bgcolor="#FFCC00" nowrap valign="top"> ')
		DrawSubNavItemRow(left,right,baseURL,menu);
		document.writeln('</tr>')
	}

	document.writeln('<tr nowrap bgcolor="#FFCC00" valign="bottom">') 
	
	DrawSearchBar(1);

	document.writeln('<td align="right" nowrap><img src="' + gImageURL + '/navigation/images/yellownavtip.gif" width="14" height="14" border="0"></td>')
	document.writeln('</tr>')
	document.writeln('</table>')
}


function DrawSubNavItemRow(left,right,baseURL,menu) {
	document.writeln('<td bgcolor="#FFCC00" nowrap valign="middle" id="subnavtext" height="24">')
	document.writeln('&nbsp;');

	if (left.length > 0) {
		for (i = 0; i < left.length; i += 2) {
			if (i > 0)
				document.write('&nbsp;&nbsp;|&nbsp;&nbsp');

			if (menu == 'legal')
				document.write('<A CLASS="subnavlink" HREF="' +  left[i] + '">' + left[i+1] + '</A>');
			else	
				document.write('<A CLASS="subnavlink" HREF="' + baseURL + left[i] + '">' + left[i+1] + '</A>');
		}
	}
	else
		document.write('<img src="' + gImageURL + '/images/dot.gif" WIDTH=350 HEIGHT=1 BORDER=0>');

	document.writeln('</TD>')

	document.writeln('<TD NOWRAP BGCOLOR="ffcc00" nowrap valign="middle" ID="subnavtext" ALIGN="right">')

	for (i = 0; i < right.length; i += 2) {
		if (i > 0)
			document.write('&nbsp;&nbsp;|&nbsp;&nbsp');

		document.write('<A CLASS="subnavlink" HREF="' + baseURL + right[i] + '">' + right[i+1] + '</A>');
	}

	document.write('&nbsp;&nbsp;')
	document.writeln('</TD>')
	document.writeln('<td><img src="' + gImageURL + '/images/dot.gif" WIDTH=14 HEIGHT=1 BORDER=0></td>')

	document.writeln('</tr>')
	document.writeln('<tr>')
	document.writeln('<td bgcolor="000033" colspan="3"><img src="' + gImageURL + '/navigation/images/blackline.gif" width="590" height="1" border="0"></td>')
}


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

	if (DrawHeader.arguments.length < 3)
		useDART = true; // can't rely on house ads being there

	// use store server to serve images if on store.
	gImageURL = (subNavDomain == "store") ? gStoreURL : gBaseURL;

	if (subNavDomain == "store" || parent.frames.length == 0) {
		DrawLogoAd(genre, useDART, subNavDomain)
		DrawNavBar(subNavDomain);
	}
}


function DrawFooter(domain, drawBanner)
{
	var tmd = new Date();
	var tm = tmd.getTime();
	var maxFrames = 0;

	if (client.isIE && (domain == "listen"))
		maxFrames = 1;
	
//	if (parent.frames.length > maxFrames)
//		return;

	if (DrawFooter.arguments.length < 2)
		drawBanner = true;

	document.writeln('<DIV ID="footer" ALIGN="center">');
	document.writeln('<A HREF="' + gBaseURL + '/home/index.html">home</A> - <A HREF="' + gBaseURL + '/cgi-bin/directory.cgi">listen</A> - '); 
	document.writeln('<A HREF="' + gBaseURL + '/broadcast/index.live?' + tm + '">broadcast</A> - ');
	document.writeln('<A HREF="' + gStoreURL +'">shop</A> - ');
	document.writeln('<A HREF="' + gBaseURL + '/community/index.html">community</A> - '); 
	document.writeln('<A HREF="' + gBaseURL + '/help/index.html">help</A> - ');
	document.writeln('<A HREF="' + gBaseURL + '/info/index.html">about us</A> - ');
	document.writeln('<A HREF="' + gBaseURL + '/info/legal.html">legal info</A><BR>');
	document.writeln('Live365.com is an officially licensed ASCAP site.<BR>');
	document.writeln('&copy; 1999-2001 Nanocosm, Inc. / Live365.com. All rights reserved.<BR>');  
	document.writeln('<img src="' + gImageURL + '/images/dot.gif" WIDTH=1 HEIGHT=5 BORDER=0 NAME="ContentImage"><BR>');

//	if (drawBanner)	// draw 24/7 ad
//		DrawBannerAd("", true);
//	else
		document.writeln('&nbsp;');

	document.writeln('<BR></DIV>');
}


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 FrameRestore(url)
{
	if (parent.frames.length == 0) {
		top.location = '/home.html';
		return false;
	}
	return true;
}

// -->
