/*doflash.js*/

//Requires AC_OETags.js

function Flash(id, container, src, width, height, bgcolor, staticimage, version){
	this.id = id;
	this.container = container;
	this.src = src;
	this.width = width;
	this.height = height;
	this.bgcolor = bgcolor;
	this.staticimage = staticimage; //Image
	this.version = version;
}
			
function doFlash(){
	//alert("hasReqestedVersion = " + hasReqestedVersion);
	var hasReqestedVersion = DetectFlashVer(myflash.version, 0, 0);
	if(hasReqestedVersion){
		var flash_embed = '';
		flash_embed += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+myflash.width+'" height="'+myflash.height+'" id="'+myflash.id+'" align="middle">';
		flash_embed += '	<param name="allowScriptAccess" value="sameDomain" />';
		flash_embed += '	<param name="movie" value="'+myflash.src+'" />';
		flash_embed += '	<param name="quality" value="high" />';
		flash_embed += '	<param name="bgcolor" value="'+myflash.bgcolor+'" />';
		flash_embed += '	<param name="wmode" value="transparent">';
		flash_embed += '	<embed src="'+myflash.src+'" quality="high" bgcolor="'+myflash.bgcolor+'" width="'+myflash.width+'" height="'+myflash.height+'" name="'+myflash.id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />';
		flash_embed += '</object>';						
		document.getElementById(myflash.container).innerHTML = flash_embed;
	}else{
		document.getElementById(myflash.container).innerHTML = '<img src="'+myflash.staticimage+'" />';
	}
}
