	/*******************************************************
	 FLASH EMBEDDER 1.0
	 All code by Nuno Albuquerque, unless otherwise noted.
	 (c) 2004 Nuno Albuquerque
	 http://www.nainteractive.com
	 *******************************************************
	 *
	 * This script allows easy embedding of flash objects
	 *
	 *	@ url	: string 	- path to SWF file
	 *	@ id	: string	- id given to the object 
	 *	@ w		: number	- width of flash file
	 *	@ h		: number	- height of flash file
	 *	@ flVars: string	- (OPTIONAL) query string to send variables
	 *						  into _root of flash document
	 *	@ mVer	: number	- (OPTIONAL) Major release version of flash player to use
	 *	@ rVer	: number	- (OPTIONAL) Revision number of flash player to use
	 *******************************************************/
	 
	function embedFlash(url, id, w, h, align, flVars, mVer, rVer){
			// abort if the required arguments were not passed
			if(!url | !id | !w | !h) return false;
			
			// set default values if the optional arguments were not passed
			if(!align) align = 'middle';
			if(!flVars) flVars = "";
			if(!mVer) mVer = 7;
			if(!rVer) rVer = 0;
			
			// object tag
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + mVer + ',0' + rVer + ',0" ');
	 		document.write('width="' + w + '" height="' + h + 'align="' + align + '">');
			
			// param tags
			document.write('<param name="movie" value="' + url +'" />');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="flashVars" value="' + flVars + '" />');
			
			// embed tag
			document.write('<embed 	src="' + url + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
			document.write('flashVars="' + flVars + '"');
			document.write('quality="high"');
			document.write('width="' + w + '" height="' + h + '" align=" ' + align + '" />');
			
			// close object tag 
			document.write('  </object>');
		
		}