// JavaScript Document - by Aram Alvarez, Lithium.Design - 2004
var mixes = new Array();
var path="./";

function ShowMixes( mixedtag, whatcell )
{
var szFinalTable="";
var szMixName ="";
var szMixPage ="";
var szMixFileSize ="";
var szMixURL ="";
var szMixCover ="";
var szMixTag ="";
var iTemp=0;
var szMainTable="";


	// find the cell that will host the list
	var thefeatcell = document.getElementById(whatcell);
	
	// select type of listing: lineal for featured stuff, tree columns for regular listings
	if (mixedtag == "FD") 
	{ 
		szMainTable ==""
	}
	else
	{
		szMainTable = '<table width="100%" border="1" cellpadding="0" cellspacing="0" class="footerlinks">';
		iTemp=0;
	}
	
	//  navigate thru the mixes array to find the mix tagged as "FD", build a table 
	// for the mix information and put content on it.
	for (i=0;i<mixes.length;i++)
	{
		// read one item from the array and split it using the delimitation
		// character
		szTemp = mixes[i].split('|');
		
		// load splitted values into variables.
		szMixName = szTemp[0];
		szMixPage = szTemp[1];
		szMixFileSize = szTemp[2];
		szMixURL = szTemp[3];
		szMixCover = szTemp[4];
		szMixDate = szTemp[5];
		szMixTag = szTemp[6];		
	
		// show only 
		if (szMixTag == mixedtag){
				
				// use a thumbnail placeholder if no cover was specified.
				if (szMixCover =="--") {
					szMixCover = "nocover.jpg";
				}
				
				// link the mix information to the mix page only if an URL was specified.
				if (szMixPage =="--") { 
					szTemp1 = '<img vspace="0" border="0" src="' + path + 'covers/tn_' + szMixCover + '">';
					szTemp2 = '<b>' + szMixName + '</b><br>' +  '<b>Date: </b>' + szMixDate + '<br>' + '<b>File Size: </b>' + szMixFileSize + '<br>' +  '<a href="' + szMixURL + '"' + "onClick=\"javascript: pageTracker._trackPageview(\'/downloads/" + szMixName + "\'); \"" + '><img border="0" hspace="3" vspace="6" Alt="Download the mix now!" src="' + path + 'images/getitb.jpg"></a>';	
				}
				else
				{
					szTemp1 = '<a href="' + path + 'mixes/' + szMixPage + '"><img vspace="0" border="0" src="' + path + 'covers/tn_' + szMixCover + '"></a>';
					szTemp2 = '<a href="' + path + 'mixes/' + szMixPage + '"><b><font color="#A3B9C6">' + szMixName + '</font></b></a><br>' + '<b>Date: </b>' + szMixDate + '<br>' + '<b>File Size: </b>' + szMixFileSize + '<br>' + '<a href="' + path + 'mixes/' + szMixPage + '"><img border="0" Alt="Click here for track list and downloads" hspace="0" vspace="6" src="' + path + 'images/infob.jpg"></a>'; 

					if (szMixURL!="--") 
						szTemp2 = szTemp2 + '<a href="' + szMixURL + '"' + "onClick=\"_gaq.push([\'_trackPageview', \'/downloads/" + szMixName + "\']); \"" + '><img border="0" hspace="3" vspace="6" Alt="Download the mix now!" src="' + path + 'images/getitb.jpg"></a>';	

				}
				
				// compose table
				iTemp++;
				
				// write the content into the table cell
				if ((iTemp<2) && (mixedtag!="FD"))
				{
					szFinalTable = '<table width="220" align="left" height="140" border="0" cellpadding="1" cellspacing="4" class="footerlinks"><tr><td width="96" align="right" valign="top" class="cdcovercell">' +

					//add thumbnail
					szTemp1 +
					'</td><td align="left" valign="top">' +
					
					// add info
					szTemp2 +
					'</td></tr><tr height="6" nowrap><td><image height="6" src="' + path + 'images/spacer.gif"></td></tr></table>'
					
				}
				else
				{
					iTemp=0;
					szFinalTable = '<table width="220" height="140" border="0" cellpadding="1" cellspacing="4" class="footerlinks"><tr><td width="96" align="right" valign="top" class="cdcovercell">' +
					
					//add thumbnail
					szTemp1 +
					'</td><td align="left" valign="top">' +
					
					// add info
					szTemp2 +
					'</td></tr><tr height="6" nowrap><td><image height="6" src="' + path + 'images/spacer.gif"></td></tr></table>'
				}
				
				thefeatcell.innerHTML = thefeatcell.innerHTML  + szFinalTable;
		}
	}
}

function ShowMixInfo( mixname, whatcell )
{
var szFinalTable="";
var szMixName ="";
var szMixPage ="";
var szMixFileSize ="";
var szMixURL ="";
var szMixCover ="";
var szMixTag ="";
var iTemp=0;
var szMainTable="";
var foundMix=0;

	// find the cell that will host the list
	var thefeatcell = document.getElementById(whatcell);
	
	// select type of listing: lineal for featured stuff, tree columns for regular listings

		szMainTable = '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="footerlinks">';
		iTemp=0;
	
	//  navigate thru the mixes array to find the mix tagged as "FD", build a table 
	// for the mix information and put content on it.
	for (i=0;i<mixes.length;i++)
	{
		// read one item from the array and split it using the delimitation
		// character
		szTemp = mixes[i].split('|');
		
		// load splitted values into variables.
		szMixName = szTemp[0];
		szMixPage = szTemp[1];
		szMixFileSize = szTemp[2];
		szMixURL = szTemp[3];
		szMixCover = szTemp[4];
		szMixDate = szTemp[5];
		szMixTag = szTemp[6];		
	
		// show only 
		if ((szMixName == mixname) && (foundMix == 0)){
			foundMix=1;
				// use a thumbnail placeholder if no cover was specified.
				if (szMixCover =="--") {
					szMixCover = "nocover.jpg";
				}
				
				
					szTemp1 = '<a href="' + path + 'covers/' + szMixCover + '"><img vspace="0" border="0" src="' + path + 'covers/tn_' + szMixCover + '"></a>';
					szTemp2 = '<span class="subtitle">' + szMixName + '</span></b><br>' + '<b>Date: </b>' + szMixDate + ' :: ' + '<b>File Size: </b>' + szMixFileSize + '<br>' + '<span class="footerlinks"><b><<</b> Click cover thumbnail to download volume cover</span>'+ '<br>';
				
				// link the mix information to the mix page only if an URL was specified.
				if (szMixURL!="--"){ 
						szTemp2 = szTemp2 + '<table><tr><td>' + '<a href="' + szMixURL + '"' + "onClick=\"_gaq.push([\'_trackPageview', \'/downloads/" + szMixName + "\']); \"" + '><img border="0" hspace="3" vspace="6" Alt="Download the mix now!" src="' + path + 'images/getitb.jpg"></a></td>' + '<td><span class="footerlinks"><b><<</b> Right Click and Choose "Save Target As"</span>' + '<br>' + '</td></tr></table>';	}

				// compose table
				
				// write the content into the table cell
					szFinalTable = '<table width="100%" align="left" height="70" border="0" cellpadding="1" cellspacing="4" class="footerlinks"><tr><td width="96" align="right" valign="top" class="cdcovercell">' + 

					//add thumbnail
					szTemp1 +
					'</td><td align="left" valign="top">' +
					
					// add info
					szTemp2 +
					'</td></tr><tr height="6" nowrap><td><image height="6" src="' + path + 'images/spacer.gif"></td></tr></table>';

				
				thefeatcell.innerHTML = thefeatcell.innerHTML  + szFinalTable;
		}
	}
}



function ShowMixesList( mixedtag, whatcell )
{
var szFinalTable="";
var szMixName ="";
var szMixPage ="";
var szMixFileSize ="";
var szMixURL ="";
var szMixCover ="";
var szMixTag ="";
var iTemp=0;
var szMainTable="";

	// find the cell that will host the list
	var thefeatcell = document.getElementById(whatcell);
	thefeatcell.innerHTML = thefeatcell.innerHTML  + '<span class="bodytext"><table align="center" class="bodytext"><tr><td align="center"><b>--- Assorted Trance Radio ---<br></b><br><a href="http://72.26.204.28:8888/listen.pls" onClick=\"_gaq.push([\'_trackPageview\',\'/radio/trance\']); \"><img src="../images/tune_in_trance_small.jpg" alt="Click Here To Tune In To Trance Channel" width="132" height="21" border="0"></a><br><a href="http://72.26.204.28:8890/listen.pls" onClick=\"_gaq.push([\'_trackPageview\', \'/radio/hardtrance\']); \"><img src="../images/tune_in_hardtrance_small.jpg" alt="Click Here To Tune In To Hard Trance Channel" width="132" height="21" border="0"></a><br>         -----------------------------------</td></tr></table></span><br>';
	
	// select type of listing: lineal for featured stuff, tree columns for regular listings
	if (mixedtag == "FD") 
	{ 
		szMainTable ==""
	}
	else
	{
		szMainTable = '<table width="225" border="1" cellpadding="0" cellspacing="0" class="footerlinks">';
		iTemp=0;
	}
	
	//  navigate thru the mixes array to find the mix tagged as "FD", build a table 
	// for the mix information and put content on it.
	for (i=0;i<mixes.length;i++)
	{
		// read one item from the array and split it using the delimitation
		// character
		szTemp = mixes[i].split('|');
		
		// load splitted values into variables.
		szMixName = szTemp[0];
		szMixPage = szTemp[1];
		szMixFileSize = szTemp[2];
		szMixURL = szTemp[3];
		szMixCover = szTemp[4];
		szMixDate = szTemp[5];
		szMixTag = szTemp[6];		
	
		// show only 
		if (szMixTag == mixedtag){
					
				// link the mix information to the mix page only if an URL was specified.
				if (szMixPage =="--") { 
					szTemp1 = '<img src="' + path + 'images/arrow1.jpg">&nbsp;<b>' + szMixName + '</b>' +  '<BR><div align="right"><a href="' + szMixURL + '"' + " onClick=\"_gaq.push([\'_trackPageview', '/downloads/" + szMixName + "\']); \"" + '><img border="0" hspace="3" vspace="6" Alt="Download the mix now!" src="' + path + 'images/getitb.jpg"></a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Date: </b>' + szMixDate+'</div><br>';	
				}
				else
				{
					szTemp1 = '';
					if (szMixURL!="--"){
						szTemp1 = '<a href="' + szMixURL + '"' + "onClick=\"_gaq.push([\'_trackPageview', \'/downloads/" + szMixName + "\']); \"" + '><img align="absmiddle" border="0" hspace="0" vspace="0" Alt="Download the mix now!" src="' + path + 'images/downloadicon.jpg"></a>';}
					
					szTemp1 = szTemp1 + '&nbsp;&nbsp;<a href="' + path + 'mixes/' + szMixPage + '">' + szMixName +'</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Date: </b>' + szMixDate+'<BR>';	
				}
								
				thefeatcell.innerHTML = thefeatcell.innerHTML  + szTemp1 + '<BR>';
		}
	}
	
}

function ShowDJIrish()
{
	var irishcell = document.getElementById("djirish");
	var nymancell = document.getElementById("djnyman");
	irishcell.style.display = "";
	nymancell.style.display = "none";
}


function ShowDJNyman()
{
	var irishcell = document.getElementById("djirish");
	var nymancell = document.getElementById("djnyman");
	irishcell.style.display = "none";
	nymancell.style.display = "";
}


function CloseSection()
{
	var irishcell = document.getElementById("djirish");
	var nymancell = document.getElementById("djnyman");
	irishcell.style.display = "none";
	nymancell.style.display = "none";
}
