function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function StopFlashMovie()
{
	var flashMovie=getFlashMovieObject("FlashMovie");
	flashMovie.StopPlay();
}

function PlayFlashMovie(x)
{
	var flashMovie=getFlashMovieObject("FlashMovie");
	flashMovie.SetVariable("/:scene", x);
	flashMovie.Play();
}

function SendDataToFlashMovie(x)
{
	var flashMovie=getFlashMovieObject("FlashMovie");
	flashMovie.SetVariable("/:scene", x);
}

function ReceiveDataFromFlashMovie()
{
	var flashMovie=getFlashMovieObject("FlashMovie");
	var message=flashMovie.GetVariable("/:message");
	document.controller.Data.value=message;
}

function returnto(){	
		var redbox = document.getElementById('mainswf');
		redbox.style.height=(500)+"px";	
	}

function FlashMovie_DoFSCommand(command, args) {
	if (command == "openwindow") {
		var flashmovie = document.getElementById('largeflash');
		var bottommenu = document.getElementById('bottommenu');
		flashmovie.style.clip.bottom="0px";
		flashmovie.style.height="400px";
		bottommenu.style.top="580px";
	}
	if (command == "closewindow") {
		var flashmovie = document.getElementById('largeflash');
		var bottommenu = document.getElementById('bottommenu');
		flashmovie.style.clip.bottom="130px";
		flashmovie.style.height="270px";
		bottommenu.style.top="450px";
	}
}