var _GET = getSearchAsArray();
//http://www.moock.org/webdesign/flash/fscommand/

var movieName = "mathflash";

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (document.all) {
    return window[movieName]
  } else {
    return document[movieName]
  }
}
// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  // First make sure the movie's defined.
  if (typeof(theMovie) != "undefined") {
    // If it is, check how much of it is loaded.
    try{
        var percent = theMovie.PercentLoaded();
    }
    catch(err){
        return false;
    }
    return percent == 100;

  } else {
    // If the movie isn't defined, it's not loaded.
    return false;
  }
}
function loadMathematician(){
    if (_GET["show"]){
        if (movieIsLoaded(thisMovie(movieName))) {
            thisMovie(movieName).GotoFrame(parseInt(_GET["show"]));
            thisMovie(movieName).Play();
        }
        else{
            window.setTimeout(loadMathematician,1000);
        }
    }

    
}

