// class FlashObj
// designed by Jason Chase
// 12-15-2006

// History:
// 
// 2006-01-03 - added method for calling SSL use_ssl() (which in some cases happens)

	function FlashObj(filepath, width, height, fla_id) {

		this.filepath = filepath;
		this.version_no = '7';
		this.width = width;
		this.height = height;
		this.wmode = 'transparent';
		this.bgcolor = 'ffffff';
		this.fla_id = fla_id;
		this.quality = 'high';
		this.align = 'middle';
		this.protocol = 'http';

		this.use_ssl = function() {
			this.protocol = 'https';
		}

		this.generate_flash = function() {
			
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + this.protocol + '://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + this.version_no + ',0,0,0" width="' + this.width + '" height="' + height + '" id="' + this.fla_id + '" align="' + this.align + '">\n');
			document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
			document.write('<param name="movie" value="' + this.filepath + '" />\n');
			document.write('<param name="quality" value="' + this.quality + '" />\n');
			document.write('<param name="wmode" value="' + this.wmode + '" />\n');
			document.write('<param name="bgcolor" value="#' + this.bgcolor + '" />\n');
			document.write('<embed src="' + this.filepath + '" quality="' + this.quality + '" wmode="' + this.wmode + '" bgcolor="#' + this.bgcolor + '" width="' + this.width + '" height="' + this.height + '" name="' + this.fla_id + '" align="' + this.align + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="' + this.protocol + '://www.macromedia.com/go/getflashplayer" />\n');
			document.write('</object>\n');
		}
		
	}
