

// @flashMovie stores a reference to the embeddes spicynodes movie.
var flashMovie;

function getFlashMovie(movieName) {
  var isIE = navigator.appName.indexOf("Microsoft") != -1;
  return (isIE) ? window[movieName] : document[movieName];
}

// initializeMessages() - is invoked with 'onLoad' event in the HTML file <BODY> tag.
function initializeMessages(movieName) {
	flashMovie=getFlashMovie(movieName);	
}


/*
SpicyNodes Commands
--------------------------
- Home node
command = 'home'

- Next node (in history or just next ID if history reaches end)
command = 'next'

- Previous node
command = 'previous'

- Zoom IN the layout
command = 'zoomin'

- Zoom OUT the layout
command = 'zoomout'

   //TODO - avoid "," - comma splitting of the XML source
- Load a new XML nodemap where @xml is a string containing the XML source (eg. command = 'loadxml,<root><node label="1" /><node label="2"><node label="3" /></node></root>')
command = 'loadxml',xml

- Go to a specific node where @id is a string containing the  value of the node's ID (eg. command = 'nodeid,107')
command = 'nodeid,'+id

*/

function callSN(command)
{
	var str;	
	for(var i in command){	str+=i+":"+command[i]+" | "; }

	flashMovie.sn_call(command);
}
function callBackFromSN(message)
{
	/*
	var str;	
	for(var i in message){	str+=i+":"+message[i]+" | "; }
	alert("message: "+str);
	*/
}
