/*
	Revision History
		08-23-2006, JD: Created - JavaScript Obect to display SWF Files in IE so users don't
			have to "click to activate"
*/

function swfObj() {
	this.attributes = new Array();
	
	// DIV TAG ID TO DISPLAY THE SWF
	this.attributes["div"] = null; 
	
	// OBJECT/PARAM/EMBED HTML TAG ATTRIBUTES
	this.attributes["classid"] = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";
	this.attributes["codebase"] = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=";
	this.attributes["version"] = "6,0,65,0";
	this.attributes["pluginspage"] = "http://www.macromedia.com/go/getflashplayer";
	this.attributes["flashVars"] = null;
	this.attributes["src"] = null;
	this.attributes["id"] = null;
	this.attributes["menu"] = "false";
	this.attributes["quality"] = "high";
	this.attributes["wmode"] = "opaque";
	this.attributes["bgcolor"] = "#ffffff";
	this.attributes["height"] = null;
	this.attributes["width"] = null;
	this.attributes["align"] = "middle";
	this.attributes["allowScript"] = "sameDomain";
	
	// SETS THE VALUE ANY OF THE ATTRIBUTES LISTED ABOVE
	this.setAttr = function(name, val) {
		this.attributes[name] = val;
	}
	
	// BUILDS STRING & DISPLAYS THE DHTML INSIDE THE DESIGNATED DIV TAG
	this.show = function() {
		
		HTML = '<object classid="'+this.attributes["classid"]+'" '
			+ 'codebase=" ' + this.attributes["codebase"] + this.attributes["version"] + '" '
			+ 'width="' + this.attributes["width"] + '" '
			+ 'height="' + this.attributes["height"] + '" '
			+ 'id="' + this.attributes["id"] + '" '
			+ 'align="' + this.attributes["align"] + '">\n'
			+ '<param name="FlashVars" value="' + this.attributes["flashVars"] + '" />\n'
			+ '<param name="allowScriptAccess" value="' + this.attributes["allowScript"] + '" />\n'
			+ '<param name="movie" value="' + this.attributes["src"] + '" />\n'
			+ '<param name="menu" value="' + this.attributes["menu"] + '" />\n'
			+ '<param name="quality" value="' + this.attributes["quality"] + '" />\n'
			+ '<param name="bgcolor" value="' + this.attributes["bgcolor"] + '" />\n'
			+ '<param name="wmode" value="' + this.attributes["wmode"] + '" />\n'
			+ '<embed src="' + this.attributes["src"] + '" '
			+ 'menu="' + this.attributes["menu"] + '" '
			+ 'quality="' + this.attributes["quality"] + '" '
			+ 'bgcolor="' + this.attributes["bgcolor"] + '" '
			+ 'width="' + this.attributes["width"] + '" '
			+ 'height="' + this.attributes["height"] + '" ' 
			+ 'wmode="' + this.attributes["wmode"] + '" '
			+ 'name="' + this.attributes["id"] + '" '
			+ 'align="' + this.attributes["align"] + '" '
			+ 'allowScriptAccess="' + this.attributes["allowScript"] + '" '
			+ 'FlashVars="' + this.attributes["flashVars"] + '" '
			+ 'type="application/x-shockwave-flash" '
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
			+ '</object>';

		document.getElementById(this.attributes["div"]).innerHTML = HTML;
	}
} 
