
function Play(url)
{
	u = escape(url);
	size = ' width=300 height=45 ';

	document.writeln('<object id="MediaPlayer"' + size);
	document.writeln(' classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"');
	document.writeln(' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
	document.writeln(' standby="Loading Microsoft® Windows® Media Player components..."');
	document.writeln(' type="application/x-oleobject">');
	document.writeln(' <param name="Controller" value="true">');
	document.writeln(' <param name="AutoStart" value="true">');
	document.writeln(' <param name="FileName" value="' + url + '">');
	document.writeln(' <param name="AnimationAtStart" value="false">');
	document.writeln(' <param name="Loop" value="false">');
	document.writeln(' <param name="ShowDisplay" value="false">');
	document.writeln('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/"' + size);
	document.writeln(' src="' + u + '"');
	document.writeln(' autostart="true" loop="false"');
	document.writeln(' showcontrols="true"');
	document.writeln(' showdisplay="false">');
	document.writeln('</embed>');
	document.writeln('</object>');
}

function PlayRandom()
{
	var url  = new Array();
	
	url[0]  = 'sound/Dumb.mid';
	url[1]  = 'sound/Layla-Piano.mid';
	url[2]  = 'sound/StreetSpirit.mid';
	url[3]  = 'sound/HotelCal.mid';
	url[4]  = 'sound/LosingMyReligion.mid';
	url[5]  = 'sound/TheThrillIsGone.mid';

	Today = new Date();
	var i = Today.getSeconds() % url.length;
	Play(url[i]);
}
