function findFlash (flash) {
    if (document.all) {
      if (document.all[flash]) {
        return document.all[flash];
      }
      if (window.opera) {
        var movie = eval(window.document + flash);
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if(document.layers) {
      if(document.embeds) {
        var movie = document.embeds[flash];
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if (!document.getElementById) {
      return;
    }
    var movie = document.getElementById(flash);
    if (movie.SetVariable) {
      return movie;
    }
    var movies = movie.getElementsByTagName('embed');
    if (!movies || !movies.length) {
      return;
    }
    movie = movies[0];
    if (movie.SetVariable) {
      return movie;
    }
    return;
}


function play_movie(url) {
	var movie = findFlash('video');
	if (movie_playing) {
		if (movie) movie.SetVariable('status_pause', true);
	} else {
		if (movie) movie.SetVariable('file_name', url);
		document.images['photo'].style.display='none';
		movie.height=501;
		movie_playing = true;
	}
	document.images['download'].src = (document.images['download'].src.indexOf('start')!=-1)?'_buttons/download_pause.gif':'_buttons/download_start.gif';
}

