function get_tooltiptxt(fileName)
{
	if (fileName.indexOf("list:") == 0)
	{
		fileName = document.getElementById(fileName.substring(5,fileName.length)).options[document.getElementById(fileName.substring(5,fileName.length)).selectedIndex].value;
	}
	fileName = fileName.replace(/ /g, "%20");

	return 'Click <a href=javascript:listen("' + fileName + '")><img oncontextmenu="return false" border="0" src="notes3.gif"></a> to play in the Chorus Player.<br><br><br>' +
	       'Click <a href="' + fileName + '" onclick="writetxt(0)"><img oncontextmenu="return true" border="0" src="notes3.gif"></a> to play in your default Player.<br>To DOWNLOAD this file RIGHT CLICK this note.<br>Then click "<u>Save Target As</u>", "<u>Save Link As</u>",<br>or "<u>Download Linked File As</u>" from the list.';
}

function get_location(fileName)
{
    if (fileName.indexOf("list:") == 0)
    {
        fileName = document.getElementById(fileName.substring(5,fileName.length)).options[document.getElementById(fileName.substring(5,fileName.length)).selectedIndex].value;
    }
    fileName = fileName.replace(/ /g, "%20");

    return fileName;
}


var x;
function watchWMV(fileName)
{
	if (fileName.indexOf("list:") == 0)
	{
		fileName = document.getElementById(fileName.substring(5,fileName.length)).options[document.getElementById(fileName.substring(5,fileName.length)).selectedIndex].value;
	}
	fileName = fileName.replace(/ /g, "%20");
	
	if (x == null || x.closed)
	{
		x=window.open('', 'test', "width=800,height=600,status=0,toolbar=0,resizable=0,menubar=0,location=0,directories=0,scrollbars=0");
	}
	else
	{
		x.focus();
	}

	x.document.write('<html>');
	x.document.write('<head>');
	x.document.write('</head>');
	x.document.write('<body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	 
	x.document.write('<object id="mediaPlayer" width="720" height="540"'); 
	x.document.write(' classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"'); 
	x.document.write(' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
	x.document.write(' standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
	x.document.write(' <param name="fileName" value="'+ fileName + '">');
	x.document.write(' <param name="animationatStart" value="true">');
	x.document.write(' <param name="transparentatStart" value="true">');
	x.document.write(' <param name="autoStart" value="false">');
	x.document.write(' <param name="showControls" value="true">');
	x.document.write(' <param name="loop" value="false">');
	x.document.write(' <embed type="application/x-mplayer2"');
	x.document.write('	 pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"');
	x.document.write('	 id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="-1"'); 
	x.document.write('	 bgcolor="darkblue" showcontrols="true" showtracker="-1"'); 
	x.document.write('	 showdisplay="0" showstatusbar="-1" videoborder3d="-1" width="720" height="540"');
	x.document.write('	 src="'+ fileName + '" autostart="false" designtimesp="5311" loop="false">');
	x.document.write('	</embed>');
	
	x.document.write('</object>');
	x.document.write('</body></html>');

  x.document.close();
}

var x;
function listen(fileName)
{
	if (fileName.indexOf("list:") == 0)
	{
		fileName = document.getElementById(fileName.substring(5,fileName.length)).options[document.getElementById(fileName.substring(5,fileName.length)).selectedIndex].value;
	}
	fileName = fileName.replace(/ /g, "%20");

  if (x == null || x.closed)
  {
    x=window.open('', 'test', "width=250,height=200,status=0,toolbar=0,resizable=0,menubar=0,location=0,directories=0,scrollbars=0");
  }
  else
  {
    x.focus();
  }

  x.document.write('<html>');
  x.document.write('<head>');
  x.document.write('</head>');
  x.document.write('<body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');

  x.document.write('<object width="250" height="200"');
  x.document.write('  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
  x.document.write('  codebase="http://fpdownload.macromedia.com/pub/');
  x.document.write('  shockwave/cabs/flash/swflash.cab#version=8,0,0,0">');
  x.document.write('<param name="movie" value="mp3player.swf" />');
  x.document.write('<param name="menu" value="false" />');
  x.document.write('<param name="quality" value="low" />');
  x.document.write('<param name="bgcolor" value="#ffffff" />');
  x.document.write('<param name="flashvars"');
  x.document.write('  value="file='+ fileName + '&image=ChapterLogo4.jpg&autostart=true&volume=100" />');
  x.document.write('<embed src="mp3player.swf" width="250" height="200"');
  x.document.write('  menu="false" quality="low" bgcolor="#ffffff"');
  x.document.write('  flashvars="file='+ fileName + '&image=ChapterLogo4.jpg&autostart=true&volume=100"');
  x.document.write('  type="application/x-shockwave-flash" pluginspage=');
  x.document.write('  "http://www.macromedia.com/go/getflashplayer" />');
  x.document.write('</object>');

/*  
  x.document.write('<object type="application/x-shockwave-flash" data="mp3player.swf" height="100" width="250">');
  x.document.write('<param name="movie" value="mp3player.swf" />');
  x.document.write('<param name="allownetworking" value="internal" />');
  x.document.write('<param name="allowScriptAccess" value="never" />');
  x.document.write('<param name="enableJSURL" value="false" />');
  x.document.write('<param name="enableHREF" value="false" />');
  x.document.write('<param name="saveEmbedTags" value="true" />');
  x.document.write('<param name="bgcolor" value="&#035;FFFFFF" />');
  x.document.write('<param name="flashvars" value="file=' + fileName + '&autostart=true&repeat=false&volume=75&lightcolor=0xCC0066&backcolor=0x000000&frontcolor=0xFFFFFF&height=100&width=250" />');
  x.document.write('<param name="scale" value="showall" />');
  x.document.write('</object>');
*/

/*
  x.document.write('<script type="text/javascript" src="ufo.js"></script>');
  x.document.write('<div id="flashbanner">');
  x.document.write('  Flash is not installed.');
  x.document.write('</div>');
  x.document.write('<script type="text/javascript">');
  x.document.write('var FO = {');
  x.document.write('  movie:"mp3player.swf",');
  x.document.write('  width:"250",height:"100",majorversion:"7",build:"0",');
  x.document.write('  flashvars:"config=config.xml&file='+ fileName + '&autostart=true"');
  x.document.write('};');
  x.document.write('UFO.create(FO, "flashbanner");');
  x.document.write('</script>');
*/
  x.document.write('</body></html>');
  
  x.document.close();
}
