/*	VERSION:	1.2
	1.2		Use function-hoisting instead of:  var funcName =
	1.1		Added optional parameter "evtEmitter"
	
USAGE:
	#include "functions/sendEvent.as"
	sendEvent( "click" );
	sendEvent( "click", {target:my_btn}, my_btn );

*/
function sendEvent( evt_str, evt, evtEmitter ){
	var evtEmitter = evtEmitter || _this || this;
	var evtIsObject = (evt instanceof Object);
	if(evtIsObject === false){
		evt = {data: evt};
	}
	evt.type = evt_str;
	
	if(evtEmitter.dispatchEvent){
		evt.type = evt_str;
		evtEmitter.dispatchEvent( evt );
	}else if(evtEmitter.broadcastMessage){
		evtEmitter.broadcastMessage(evt_str, evt);
	}
}// sendEvent()