<!--//	Created by SONY DADC - Gerfried Ranner May 2001
	var lastmode, temp;
	var isNS4, isIE4, isIE5, isNS6

	isNS4 = (document.layers) ? true : false;
	isIE4 = (document.all && !document.getElementById) ? true : false;
	isIE5 = (document.all && document.getElementById) ? true : false;
	isIE45 = (document.all) ? true : false;
	isNS6 = (!document.all && document.getElementById) ? true : false;

	
	
	lastmode="";
	function SelectTrack(trackid, img)
	{
		// Set variables
		var trackelement;
		var tracklist;
		var imgelement;
		var speaker_red, speaker;
		var disk_red, disk;
		imgelement = "trackicon"+img
		
		speaker_red = new Image();
				speaker_red.src = "images/speaker_red.gif";
		speaker = new Image();
				speaker.src = "images/speaker.gif";
		
		disk_red = new Image();
				disk_red.src = "images/disk_red.gif";
		disk = new Image();
				disk.src = "images/disk.gif";

		textelement="text_"+trackid;
		tracklist=document.frmDownload.tracklist.value;
		
		// Set mode, reset buttons when changing mode (stream/download)
		if (document.frmDownload.mode.value!="" && lastmode=="")
		{location.reload();}

		if (Math.round(img/2)-(img/2)==0)
		{
			document.frmDownload.mode.value="download";
		}
		else
		{
			document.frmDownload.mode.value="stream";
		}
		
		if (document.frmDownload.mode.value!=lastmode && lastmode!="")
		{location.reload();}
		
		lastmode=document.frmDownload.mode.value;					
							
		// Add or Remove trackID from hidden form field
		// Alter image of selection
		if (tracklist.search(trackid+";")!=-1) 	//remove
		{
			if (isIE45)
			{document.all[textelement].style.color="35556E";}
			
			if (isNS6)
			{document.getElementById(textelement).style.color="35556E";}

			if (document.frmDownload.mode.value=="stream")
			{document.images[imgelement].src=speaker.src;}
			else
			{document.images[imgelement].src=disk.src;}
			
			document.frmDownload.tracklist.value = tracklist.replace(trackid+";","");
		}
		else									//add
		{
			if (isIE45)
			{document.all[textelement].style.color="red";}
			
			if (isNS6)
			{document.getElementById(textelement).style.color="red";}
			
			if (document.frmDownload.mode.value=="stream")
			{document.images[imgelement].src=speaker_red.src;}
			else
			{document.images[imgelement].src=disk_red.src;}
			
			document.frmDownload.tracklist.value=tracklist + trackid + ";"
		}
			
			
		// Show or hide the play/download button
		if (document.frmDownload.tracklist.value!="")
		{
			if (isIE45)
			{
				if (lastmode=="stream")
				{document.all.playIE.innerHTML="<INPUT type='image' src='images/play.gif'>";}
				else
				{document.all.playIE.innerHTML="<INPUT type='image' src='images/download.gif'>";}
				
				document.all.playIE.style.top=0;
				document.all.playIE.style.left=0;
				document.all.playIE.style.visibility="visible";
			}
			
			if (isNS4)
				{
				document.playNN.document.write("<A href='JavaScript:document.forms.frmDownload.submit();'>");
				if (lastmode=="stream")
				{document.playNN.document.write("<IMG src='images/play.gif' border='0'></a>");}
				else
				{document.playNN.document.write("<IMG src='images/download.gif' border='0'></a>");}
				
				document.playNN.document.close();
				document.playNN.top=document.playNNAnker.y;
				document.playNN.left=document.playNNAnker.x;
				document.playNN.visibility="visible";
				}
				
			if (isNS6)
				{
				if (lastmode=="stream")
				{document.getElementById("playIE").innerHTML="<INPUT type='image' src='images/play.gif'>";}
				else
				{document.getElementById("playIE").innerHTML="<INPUT type='image' src='images/download.gif'>";}
				document.getElementById("playIE").style.top=0;
				document.getElementById("playIE").style.left=0;
				document.getElementById("playIE").style.visibility="visible";
				}
		}
		else
		{
			if (isIE45)
			{
				document.all.playIE.innerHTML="<IMG src='images/blank.gif' width='1' height='1'>";
				document.all.playIE.style.top=0;
				document.all.playIE.style.left=0;
				document.all.playIE.style.visibility="hidden";
			}
			
			if (isNS4)
			{
				document.playNN.document.writeln("<IMG src='images/blank.gif' width='1' height='1'>");	
				document.playNN.document.close();
				document.playNN.visibility="hide";
			}
			
			if (isNS6)
			{
				document.getElementById("playIE").innerHTML="<IMG src='images/blank.gif' width='1' height='1'>";	
				document.getElementById("playIE").style.visibility="hidden";
			}
		}
	}
//-->

