// MicroSE Load Flash Object code.
// ©MicroSE®, All rights reserved. You may edit this code, you may not redistribute it.
// Please leave the copyright notice.
// Version 1.0.0 initial version

function EmbedFlash(URL, width, height, menu, quality, flash){
	//Is version nuber entered.
	if(flash == null){
		flash = "6,0,0,0";	//Replace with default version number. Default = 6,0,0,0.
	}
	
	//Checks if the menu constance is entered (correctly)
	if(menu != true && menu != false && menu != "true" && menu != "false"){
		menu = true; //Replace with default. Default = true.
	}
	
	//Checks if the quality constance is entered (correctly)
	if(quality != "high" && quality != "normal" && quality != "low"){
		quality = "high";	//Replace with default. Defautl = high.
	}
	
	//See if we can continue.	
	if(URL == null || width == null || height == null){
		//Nope, we can't.
		document.writeln("No URL, width or height entered");
	}else{
		//Add the code to the document.
		document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="' + flash + '" width="' +  width + '" height="' + height + '">');
		document.writeln('<param name="movie" value="' + URL + '" />');
		document.writeln('<param name="quality" value="' + quality + '" />');
		document.writeln('<param name="wmode" value="transparent" />');
		document.writeln('<param name="menu" value="' + menu + '" />');
		document.writeln('<embed src="' + URL + '" quality="' + quality + '" menu="' + menu + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' +  width + '" height="' + height + '"></embed></object>');
	}
}

