/* Dynamically generate an embedded flash movie 
	id		- ID of the <div> element that we should insert into
	width	- Width of the flash movie
	height	- Height of the flash movie
	classID	- classid for the flash movie
	movie	- Source location for the flash file eg. /flash/movie.swf
	wmode	- Window mode (transparent)
	quality	- Quality to use (high/low).
*/
function showFlash(id,width,height,classID,movie,wmode,quality){ 
	if (document.getElementById(id) != null) { //If the div specified exists
		if (wmode == "") { wmode = 'transparent'; }
		if (quality == "") { quality = 'high'; }
		//Write the start of the object
		var inner = '<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
		inner += ' width="'+width+'"';
		inner += ' height="'+height+'"';
		inner += ' classid="'+classID+'"';
		inner += ' wmode="'+wmode+'">';
		//Add the paramaters
		inner += ' <param name="movie" value="'+movie+'">';
		inner += ' <param name="quality" value="'+quality+'">';
		inner += ' <param name="wmode" value="'+wmode+'">';
		//Add the embed
		inner += '<embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"';
		inner += 'src="'+movie+'" width="'+width+'" height="'+height+'" quality="'+quality+'" wmode="'+wmode+'"></embed>';
		//Close the object
		inner += '</object>';
		//Print the object on screen in the div provided
		document.getElementById(id).innerHTML = inner;
	}
}

