var exhibitionist_vi_flashVideoObject = function(){
	this.init = function(mainClass,aligner,itemArray,arrayPos){
		this.mainClass = mainClass;
		this.aligner = aligner;
		this.itemArray = itemArray;
		this.arrayPos = arrayPos;
	}
	this.getImageCopy = function(){
		var size = {width:this.aligner.biggestDimention.width,height:this.aligner.biggestDimention.height};
		var skin = "SkinOverPlaySeekMute.swf";
		var flashFileName = "vidPlayer";
		var flashArrayPos = this.mainClass.flashObjectArray.length;
		var flashObjectName = "flash_"+this.mainClass.object.name+"_"+flashArrayPos;
		var flashVarsString = 	"&videoURL="+this.itemArray['url']+
								"&playerSkin="+this.mainClass.fullPluginPath+"include/swf/"+skin+
								"&callbackObject="+"document.getElementById('"+this.mainClass.object.name+"').rootElement.flashObjectArray["+flashArrayPos+"]"+
								"&";
		var copy = {
			image:document.createElement("div"),
			imageWidth:0,
			imageHeight:0,
			alignedWidth:0,
			alignedHeight:0,
			flashObjectName:flashObjectName
		};
		copy.image.innerHTML = AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width',size.width,
			'height',size.height,
			'src', flashObjectName,
			'quality', 'high',
			'pluginspage', 'http://www.adobe.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'gpu',
			'devicefont', 'false',
			'id', flashObjectName,
			'bgcolor', '#ffffff',
			'name', flashObjectName,
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', this.mainClass.fullPluginPath+"include/swf/"+flashFileName,
			'salign', '',
			'swliveconnect','true',
			'FlashVars',flashVarsString
		);
		copy.stop = function(){
			var flashObject = document.getElementById(this.flashObjectName);
			if (typeof(flashObject.fStop) == 'function'){
				flashObject.fStop();
			}
			if (typeof(this.image.childNodes[0].fStop) == 'function'){
				this.image.childNodes[0].fStop();
			}
		}
		copy.videoLoaded = false;
		copy.loopCount = 0;
		copy.play = function(){
			var flashObject = document.getElementById(this.flashObjectName);
			//alert(flashObject)
			if (typeof(flashObject.fPlay) != 'function'){
				setTimeout(function(copy){
					return function(){
						copy.loopCount++;
						copy.play();
					}
				}(this),1000);
			}else{
				flashObject.fPlay();
			}
		}
		//wait for video to be loaded before aligning it with the other images or videos
		copy.aligner = this.aligner;
		this.mainClass.flashObjectArray[flashArrayPos] = copy;
		copy.flashSize = function(width,height){
			this.videoLoaded = true;
			var flashObject = this.image.childNodes[0];//this.image.firstNode;//getElementById(this.flashObjectName);
			flashObject.width = width;
			flashObject.height = height;
			this.imageWidth = width;
			this.imageHeight = height;
			this.image.style.width = width+"px";
			this.image.style.height = height+"px";
			this.aligner.setAlignment(this);
		}
		copy.flashClicked = function(){
		}
		return copy;
	}
}