///////////////////////////////////////////////////////////////////////////////
//	Atomic Orange Productions
//	Flash functions
// 
//	Description:
//		This script provides all JavaScript functions related to flash files.
//
//	Author: 		Kevin De Angelis (KJD) <kevindeangelis [at] RegalBuilt.com>
// 	Born on Date: 	2007.11.17
//
//	Revisions:
//		2007.11.17 KJD: Initial script created
//
///////////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////
// DisplayFlash 	- Set up and display a pre-activated Flash movie
// Author: 			Kevin De Angelis
// Date: 			2007.11.17
// Receive: 		string, integer, integer, string
// Return: 			void
///////////////////////////////////////////////////////////////////////////////
function DisplayFlash( PlayerFrame, Flash_width, Flash_height, Flash_name )
{
	if( ( typeof Flash_name 	== "undefined" ) || ( Flash_name 	== ""	) ){ Flash_name 	= "FlashMovie"; }
	if( ( typeof returnString 	== "undefined" ) || ( returnString 	== ""	) ){ returnString 	= 0; 			}

	// 2007.11.17 KJD: The Flash string for loading and displaying
	var FlashString = "<DIV STYLE=\"background-color:none;border:none;width:" + parseInt( Flash_width ) 		+ ";height:" + parseInt( Flash_height ) 	+ ";\">"
		+ "<object classid	= \"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "
		+ "	codebase	= \"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" "
		+ "	width		= \"" + parseInt( Flash_width ) 		+ "\" "
		+ "	height		= \"" + parseInt( Flash_height ) 	+ "\" "
		+ "	id			= \"" + Flash_name + "\" "
		+ "	align		= \"left\" "
		+ "	STYLE		= 'margin: 0px 0px 0px 0px;padding:0px 0px 0px 0px;border:none;text-align:left;vertical-align:top;'>"
		
		+ "<param name	= \"allowScriptAccess\" value= \"sameDomain\" />"
		+ "<param name	= \"movie\" 			value= \"" + PlayerFrame + "\" />"
		+ "<param name	= \"swliveconnect\" 	VALUE= \"true\">"
		+ "<param name	= \"quality\" 			value= \"high\" />"
		+ "<param name	= \"bgcolor\" 			value= \"#ffffff\" />"
		+ "<param name	= \"wmode\" 			value= \"transparent\" />"
		+ "<param name	= \"align\" 			value= \"left\" />"

		+ "<embed src				= \"" + PlayerFrame + "\" "
		+ "	quality				= \"high\" "
		+ "	bgcolor				= \"#ffffff\" "
		+ "	swliveconnect		= \"true\" "
		+ "	name				= \"" + Flash_name + "\" "
		+ "	align				= \"left\" "
		+ "	width				= \"" + parseInt( Flash_width ) 		+ "\" "
		+ "	height				= \"" + parseInt( Flash_height) 	+ "\" "
		+ "	allowScriptAccess	= \"sameDomain\" "
		+ "	type				= \"application/x-shockwave-flash\" "
		+ "	pluginspage			= \"http://www.macromedia.com/go/getflashplayer\" "
		+ "	wmode				= \"transparent\" "
		+ "/>"
		
		+ "</object></DIV>"
	
	document.write( FlashString );	
}