/*
 * @required Include json2.js before using this
 * @author http://kb2.adobe.com/cps/156/tn_15683.html#exampleas3
 * @thanks Invocation help - http://devlicio.us/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx
 */
 
function getFlashMovie(movieName)
{
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
};

function sendMessage(movieName, method, params)
{
	getFlashMovie(movieName).receiveMessageFromJavascript(method, JSON.stringify(params));
};
  
function receiveMessage(method, params)
{
	//eval(method + "(" + JSON.parse(params) + ");");
	eval(method)(JSON.parse(params));
}

