function jfFlashPlayer () {
	this.videoLimit  = 1;
	this.mode        = "singlePlayer";
	this.swfID       = "SinglePlayer";
	this.swfLocation = null;
	this.swfWidth    = null;
	this.swfHeight   = null;
	this.videoData   = [];
	
	//set-up function
	this.setUp      = function (settings) {
		if (typeof settings.videoLimit == "number") this.videoLimit = settings.videoLimit;
		if (settings.mode) this.mode = settings.mode;
		if (settings.swfID) this.swfID = settings.swfID;
		if (settings.swfLocation) this.swfLocation = settings.swfLocation;
		if (settings.swfWidth) this.swfWidth = settings.swfWidth;
		if (settings.swfHeight) this.swfHeight = settings.swfHeight;
		
		if (settings.skinURL) this.skinURL = settings.skinURL;
		if (settings.mpInfoURL) this.mpInfoURL = settings.mpInfoURL;
		
		if (settings.videoSWF) this.videoSWF = settings.videoSWF;
		if (settings.videoInfoSWF) this.videoInfoSWF = settings.videoInfoSWF;
		if (settings.videoSelectionSWF) this.videoSelectionSWF = settings.videoSelectionSWF;
	};
	
	//write flash player to page
	//this uses SWFObject
	this.write = function (containerID) {
		if (SWFObject) {
			var player = new SWFObject(this.swfLocation, this.swfID, this.swfWidth, this.swfHeight, "9", "#000000");
			player.addParam('align','middle');
			player.addParam('allowfullscreen','true');
			player.addParam('allowscriptaccess','always');
			player.addParam('wmode', 'transparent');
			player.write(containerID);
			
			return true;
		}
		else {
			return false;
		}
	};
	
	//stores data
	this.addVideoData = function () {
		for (var i=0; i<arguments.length; i++) {
			if ((this.videoLimit != 0 && this.videoData.length != this.videoLimit) || this.videoLimit == 0) {
				this.videoData.push(arguments[i]);
			}
		}
	};
	
	//retrieves data
	this.getVideoData = function (index) {
		return this.videoData[index];
	};
	
	//sends data to flash
	this.sendDataToFlashMovie = function (index) {
		if (typeof index != "number") {
			if (this.mode == 'multiPlayer') {
				return {
					SWFWidth: this.swfWidth,
					SWFHeight: this.swfHeight,
					SkinURL: this.skinURL,
					MPInfoURL: this.mpInfoURL,
					VideoSWF: this.videoSWF,
					VideoInfoSWF: this.videoInfoSWF,
					VideoSelectionSWF: this.videoSelectionSWF
				};
			}
		}
		else {
			//get data
			this.data       = this.getVideoData(index);
			
			//get flash movie object
			this.flashMovie = window.document[this.swfID] ? window.document[this.swfID] : getFlashMovieObject(this.swfID);
		}
	};
}
