// borrowed from moock.org
// url: http://www.moock.org/webdesign/flash/fscommand/index.html

var movieName = "flashplayer";

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    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.
    return theMovie.PercentLoaded() == 100;
  } else {
    // If the movie isn't defined, it's not loaded.
  }
}

function setTrack(top,bot,file) {
	if (movieIsLoaded(thisMovie(movieName))) {
		thisMovie(movieName).GotoFrame(0);
		thisMovie(movieName).setVariable("text1",top);
		alert('went');
		thisMovie(movieName).setVariable("text2",bot);
		thisMovie(movieName).setVariable("filename",file);
		thisMovie(movieName).GotoFrame(1);
	}
}