<!--
// F. Permadi May 2000
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("myFlashMovie");
	flashMovie.StopPlay();
}
function StopMusicMovie()
{
	var flashMovie=getFlashMovieObject("mymusic");
	flashMovie.StopPlay();
}
function PlayMusicMovie()
{
	var flashMovie=getFlashMovieObject("mymusic");
	flashMovie.Play();
	//embed.nativeProperty.anotherNativeMethod();
}


function PlayFlashMovie(_movie, _seccion)
{
	movieName = "myFlashMovie";
	try{
		var flashMovie=getFlashMovieObject(movieName);
		flashMovie.Play();
	}catch(e){
			alert('El video aśn no ha sido descargado. Por favor aguarde unos instantes.');
			window.location.href = 'index.php?contenido='+ _seccion +'&video='+_movie;
	}
	//embed.nativeProperty.anotherNativeMethod();
}

function RewindFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.Rewind();
}

function NextFrameFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	// 4 is the index of the property for _currentFrame
	var currentFrame=flashMovie.TGetProperty("/", 4);
	var nextFrame=parseInt(currentFrame);
	if (nextFrame>=10)
		nextFrame=0;
	flashMovie.GotoFrame(nextFrame);		
}
