function playmusic(){

var list = new Array;
list[0] = "aan-tribal-war_1&The Aan Tribal War";
list[1] = "aan-tribal-war_2&The Aan Tribal War";
list[2] = "ambergris_1&Ambergris";
list[3] = "ambergris_2&Ambergris";
list[4] = "ambergris_3&Ambergris";
list[5] = "dream-of-edward_1&Dream Of Edward";
list[6] = "dream-of-edward_2&Dream Of Edward";
list[7] = "dream-of-edward_3&Dream Of Edward";
list[8] = "duncan-and-mary_1&Duncan And Mary";
list[9] = "duncan-and-mary_2&Duncan And Mary";
list[10] = "even-the-flies-have-eyes_1&Even The Flies Have Eyes";
list[11] = "gray-caps_1&The Gray Caps";
list[12] = "gray-caps_2&The Gray Caps";
list[13] = "gray-caps_3&The Gray Caps";
list[14] = "gray-caps_4&The Gray Caps";
list[15] = "incident-on-bannerville_1&Incident On Bannerville";
list[16] = "incident-on-bannerville_2&Incident On Bannerville";
list[17] = "incident-on-bannerville_3&Incident On Bannerville";
list[18] = "my-love-last-night_1&My Love, Last Night";
list[19] = "my-love-last-night_2&My Love, Last Night";
list[20] = "shriek-reversal_1&Shriek - Reversal";
list[21] = "shriek-theme_1&Shriek Theme";
list[22] = "tale-for-you_1&A Tale For You";
list[23] = "tragi-comic-family-story_1&A Tragi-Comic Family Story";
list[24] = "tragi-comic-family-story_2&A Tragi-Comic Family Story";
list[25] = "tragi-comic-family-story_3&A Tragi-Comic Family Story";
list[26] = "tragi-comic-family-story_4&A Tragi-Comic Family Story";
list[27] = "truffidian-church_1&Truffidian Church";
list[28] = "war-of-the-houses_1&War Of The Houses";
list[29] = "war-of-the-houses_2&War Of The Houses";
list[30] = "we-are-lost_1&We Are Lost";
list[31] = "we-are-lost_2&We Are Lost";
list[32] = "we-dwell-in-fragile_1&We Dwell In Fragile Temporary";

var choice = Math.floor(Math.random() * list.length);

var file_name = list[choice].substring(0,list[choice].indexOf('&'));

var link_name = file_name.substring(0,file_name.indexOf('_'));

var song_title = list[choice].substring(list[choice].indexOf('&') + 1, list[choice].length);


// Detect for QuickTime
var haveqt = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf
("QuickTime") >= 0)
{ haveqt = true; }
}
}
 
if ((navigator.appVersion.indexOf("Mac") > 0)
&& (navigator.appName.substring(0,9) == "Microsoft")
&& (parseInt(navigator.appVersion) < 5) )
{ haveqt = true; }


// Get Operating System 
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
if (isWin) { // Use MIME type application/x-mplayer2
   visitorOS="Windows";
} else { // Use MIME type audio/mpeg, audio/x-wav, etc.
   visitorOS="Other";
}

var objTypeTag = "application/x-mplayer2"; // The MIME type to load the WMP plugin in non-IE browsers on Windows
var playerHeight = 45;
if (visitorOS != "Windows") { 
	objTypeTag = "audio/mpeg"; // The MIME type for Macs and Linux
	var playerHeight = 18;
}; 

document.write('<div>');
document.write('<p>');
document.write('<object width="280" height="'+playerHeight+'">'); // Width is the WMP minimum. Height = 45 (WMP controls) + 24? (WMP status bar) 
document.write('<param name="type" value="' + objTypeTag + '">');
document.write('<param name="src" value="audio/clips/' + file_name + '.mp3">');
document.write('<param name="AutoStart" value="1">');
document.write('<param name="PlayCount" value="999">');
document.write('<param name="loop" value="true">');
document.write('<param name="Volume" value="20">');
document.write('<param name="ShowAudioControls" VALUE="False">');
document.write('<param name="ShowDisplay" VALUE="False">');
document.write('<param name="ShowPositionControls" VALUE="False">');
document.write('<param name="ShowStatusBar" value="False">');
document.write('<embed src="audio/clips/' + file_name + '.mp3" type="'+ objTypeTag +'" autostart="true" autoplay="true" playcount="999" loop="true" volume="20%" width="280" height="'+playerHeight+'" controller="1" ShowAudioControls="1" showstatusbar="0" bgcolor="#000000"></embed>'); // Firefox and Opera Win require both autostart and autoplay
document.write('</object>&nbsp;');
document.write('</p>');
document.write('</div>');
document.close();


document.write('<p>You are listening to a sample from <a href="songfinder/'+link_name+'.html">'+song_title+'</a>.</p><p>Reload page to hear another sample.</p>');


}
