

/************************************************************************************************************************************************************************
** 
** Filename: fscommand.js
** File Description: This file handles flash to javascript communication.
** Author: James Jackson
**
/************************************************************************************************************************************************************************



	/************************************************************************************************************************************
	**
	** Description: Adds flash and JavaScript Communcation support via the use of the fscommand
	**
	*************************************************************************************************************************************/

		  document.write('<' + 'SCRIPT LANGUAGE="VBScript">\n');
		  document.write('on error resume next \n');
		  document.write('Sub flashContainer_FSCommand(ByVal command, ByVal args)\n');
		  document.write('  call flashContainer_DoFSCommand(command, args)\n');
		  document.write('end sub\n');
		  document.write('<'+'/SCRIPT>\n');
		  
		  
	/************************************************************************************************************************************
	**
	** Function: flashContainer_DoFSCommand();
	**
	** Inputs:  __command: the name of the fscommand called
	**			__args: arguments for the command select (string delimited)
	**
	** Description: Handle fscommand messages from a Flash movie, remapping them to JavaScript Functions
	** Return: This function does not return anything.
	**
	*************************************************************************************************************************************/		  
		  
		function flashContainer_DoFSCommand(__command, __args){	
			try{
				//alert("Javascript ( " + __command + " , " + __args + " ) ");
				eval(__command)(__args);
			}catch(e){errorReporter(e, errorLocation, "JavaScript function does not exist: " + __command);}			
		}


