//	flash_interface.js
//	28 Aug 2009
//	Flash to/from Javascript Interface Class
//	www.ignitewebsolutions.com

function FlashInterface(swfObject) {
	// -------------------------
	// --- PRIVATE FUNCTIONS ---
	function sendToFlash(msg) {
		document.getElementById(swfObject).onFlashReceive(msg);		
	}
	
	// ------------------------
	// --- PUBLIC FUNCTIONS ---
	this.sendToFlash = function(msg) {
		sendToFlash(msg);
	}
	
	// ----------------------
	// --- PRIVATE EVENTS ---
	function onJavaScriptReceive(msg) {
		eval(msg);
	}
	
	// ---------------------
	// --- PUBLIC EVENTS ---
	this.onJavaScriptReceive = function(msg) {
		return onJavaScriptReceive(msg);
	}
}
