//	
//	tinyplayerMp3Function.js	2007-10-29
//
//	jscript to run the tinyplayer
//
//
function ChangeThis(mp3FilePrefix)	{

    var audioURL	=	''
	+	'/voicefiles/analysis_model_samples/'   // file location
	+	mp3FilePrefix				// file prefix
	+	'.mp3'					// file suffix
	;
    var width 		=	'59'								;
    var height		=	'32'								;
    var skin		=	'/java/tinyplayer/skins/Digitized'				;
    var autoplay	=	'yes'								;
    var archive		=	'/java/tinyplayer/tinyplayer.jar, /java/tinyplayer/jl020.jar'	;
    var	type		=	'application/x-java-applet;version=1.3'				;
    var	code		=	'javazoom.jlGui.TinyPlayer'					;
    var	bgcolor		=	'638182'							;
    var scriptable	=	'false'								;

    var newPlayerObject = ''
	+ "<object classid		= 'clsid:8AD9C840-044E-11D1-B3E9-00805F499D93'					"

	+ "	width		= "
	+ "'"		// single quote
	+	width
	+ "'"		// single quote

	+ "	height		= "
	+ "'"		// single quote
	+	height
	+ "'"		// single quote

	+ "	codebase	= 'http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0'>	"

	+ "<param name		= 'code'		value = "
	+ "'"		// single quote
	+	code
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'archive'		value = "
	+ "'"		// single quote
	+	archive
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'type'		value = "
	+ "'"		// single quote
	+	type
	+ "'"		// single quote
	+ ">"		// close tag
	
	+ "<param name		= 'scriptable'		value = "
	+ "'"		// single quote
	+	scriptable
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'skin'		value = "
	+ "'"		// single quote
	+	skin
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'autoplay'		value = "
	+ "'"		// single quote
	+	autoplay
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'bgcolor'		value = "
	+ "'"		// single quote
	+	bgcolor
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'audioURL'		value = "
	+ "'"		// single quote
	+	audioURL
	+ "'"		// single quote
	+ ">"		// close tag


	+ "<comment>											"

	+ "<embed "

	+ "	type		= "
	+ "'"	// single quote
	+	type
	+ "'"	// single quote
	
	+ "	code		= "
	+ "'"	// single quote
	+	code
	+ "'"	// single quote

	+ "	archive		= "
	+ "'"	// single quote
	+	archive
	+ "'"	// single quote

	+ "	width		= "
	+ "'"	// single quote
	+	width
	+ "'"	// single quote

	+ "	height		= "
	+ "'"	// single quote
	+	height
	+ "'"	// single quote

	+ "	skin		= "
	+ "'"	// single quote
	+	skin
	+ "'"	// single quote

	+ "	autoplay	= "
	+ "'"	// single quote
	+	autoplay
	+ "'"	// single quote

	+ "	bgcolor		= "
	+ "'"	// single quote
	+	bgcolor
	+ "'"	// single quote

	+ "	audioURL	= "
	+ "'"	// single quote
	+		audioURL
	+ "'"	// single quote

	+ "	scriptable	= "
	+ "'"	// single quote
	+	scriptable
	+ "'"	// single quote

	+ "	pluginspage	= 'http://java.sun.com/products/plugin/1.3/plugin-install.html'		"
	+ ">"		// close tag
	//+ "<noembed>											"
	//+ "</noembed>											"
	+ "</embed>											"
	+ "</comment>											"
	+ "</object>											"
	;

    	var newPlayerApplet	=	''
	+ "<applet "

	+ "	code		= "
	+ "'"	// single quote
	+	code
	+ "'"	// single quote

	+ "	archive		= "
	+ "'"	// single quote
	+	archive
	+ "'"	// single quote

	+ "	width		= "
	+ "'"		// single quote
	+	width
	+ "'"		// single quote

	+ "	height		= "
	+ "'"		// single quote
	+	height
	+ "'"		// single quote

	+ ">"		// close tag


	+ "<param name		= 'skin'		value = "
	+ "'"		// single quote
	+	skin
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'bgcolor'		value = "
	+ "'"		// single quote
	+	bgcolor
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'autoplay'		value = "
	+ "'"		// single quote
	+	autoplay
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'audioURL'		value = "
	+ "'"		// single quote
	+	audioURL
	+ "'"		// single quote
	+ ">"		// close tag

	+ "<param name		= 'scriptable'		value = "
	+ "'"		// single quote
	+	scriptable
	+ "'"		// single quote
	+ ">"		// close tag

	+ "</applet>"

	if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion >= "4.0")
	{
							// alert ( newPlayerObject );
	    document.getElementById('thisPlayer').innerHTML = newPlayerObject;
	    						// document.myForm.myText.value = newPlayerObject;
	} else {
		//alert ( newPlayerApplet );
	    document.getElementById('thisPlayer').innerHTML = newPlayerApplet;
	};

};
