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(mymovie)
{
	var flashMovie=getFlashMovieObject(mymovie);
	flashMovie.StopPlay();
}

function PlayFlashMovie(mymovie)
{
	var flashMovie=getFlashMovieObject(mymovie);
	flashMovie.Play();
	//embed.nativeProperty.anotherNativeMethod();
}

function RewindFlashMovie(mymovie)
{
	var flashMovie=getFlashMovieObject(mymovie);
	flashMovie.Rewind();
}

function NextFrameFlashMovie(mymovie)
{
	var flashMovie=getFlashMovieObject(mymovie);
	
	// 4 is the index of the property for _currentFrame
	var currentFrame=flashMovie.TGetProperty("/", 4);
	var nextFrame=parseInt(currentFrame);
    	if (nextFrame >= 3) {
      	  nextFrame = 0;
	}
	flashMovie.GotoFrame(nextFrame);		
}


function ZoominFlashMovie(mymovie)
{
	var flashMovie=getFlashMovieObject(mymovie);
	flashMovie.Zoom(90);
}

function ZoomoutFlashMovie(mymovie)
{
	var flashMovie=getFlashMovieObject(mymovie);
	flashMovie.Zoom(110);
}


function SendDataToFlashMovie(mymovie,Fvariable,Fmessage)
{
	var flashMovie=getFlashMovieObject(mymovie);
	flashMovie.SetVariable(Fvariable, Fmessage);

}

function ReceiveDataFromFlashMovie(mymovie,Fvariable)
{
	var flashMovie=getFlashMovieObject(mymovie);
	var message=flashMovie.GetVariable(Fvariable);
	return message;
}

function JumptoFrame(framenum,mymovie) {
	var flashMovie=getFlashMovieObject(mymovie);	
	var nextFrame=parseInt(framenum);
	nextFrame--;
	flashMovie.GotoFrame(nextFrame);
}
