/*Flash control*/
function flashMovie(movieName) {
	this.movie = getFlashMovieObject(movieName);
	return this;
}

flashMovie.prototype.stop = function() {
	this.movie.StopPlay();
}

flashMovie.prototype.play = function() {
	this.movie.Play();
	//embed.nativeProperty.anotherNativeMethod();
}

flashMovie.prototype.rewind = function() {
	this.movie.Rewind();
}

flashMovie.prototype.gotoFrame = function(frame) {
	this.movie.GotoFrame(frame);		
}

flashMovie.prototype.nextFrame = function() {
	// 4 is the index of the property for _currentFrame
	var currentFrame = flashMovie.TGetProperty("/", 4);
	var nextFrame = parseInt(currentFrame);
	this.movie.GotoFrame(nextFrame);		
}

flashMovie.prototype.zoom = function(value) {
	this.movie.Zoom(value);
}

flashMovie.prototype.set = function(paramName, paramValue){
	this.movie.SetVariable(paramName, paramValue);
}

flashMovie.prototype.get = function(paramName){
	return this.movie.GetVariable(paramName);
}

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);
	}
}