//sample by Rich Shupe, FMA. http://www.fmaonline.com
//  based, in part, on code created by Macromedia. 
//  Originally appeared in DevX article: January, 2006.

//primary call to communicate with Flash movie. findSWF function required.
//Flash function is jsCall, written especially for this purpose.
//  This allows existing search functions to operate unencumbered, but still
//  display the definition directly from a hyper link (instead of a search result)
function callFlash(str) {
	findSWF("menu_etapas").jsCall(str);
}

function callFlashTop(str) {
	findSWF("menu_superior").jsCall(str);
}

//cross-platform, cross-browser utility function to detect movie. Said, by Adobe, 
//  to be more reliable than getDocumentById() (for example), across more browsers.
function findSWF(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}

//start function to handle communication FROM Flash. If two-way communication is not
//  required, Your files need only include communication in the desired direction.
function showFlashMessage(str) {
	document.fromFlash.flashMessage.value = str;
}