var flash_ad = {

	_width:300,
	_height:250,
	_redirect:"",
	_clicktag:"clickTag",
	_landing:"",
	_target:"_blank",
	_flash:"",

	setWidth: function(_width) { this._width=_width; },
	setHeight: function(_height) { this._height=_height; },
	setRedirect: function(_redirect) { this._redirect=_redirect; },
	setClicktag: function(_clicktag) { this._clicktag=_clicktag; },
	setLanding: function(_landing) { this._landing=_landing; },
	setTarget: function(_target) { this._target=_target; },
	setFlash: function(_flash) { this._flash=_flash; },

	getFlashBanner: function() {
		var flaVar = this._clicktag+'='+encodeURIComponent(this._redirect+this._landing);
		var html = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
		html += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"';
		html += ' WIDTH='+this._width+' HEIGHT='+this._height+'>';
		html += '<PARAM NAME=movie VAL'+'UE="'+ this._flash +'"><PARAM NAME=flashvars VALUE="'+ flaVar +'">';
		html += '<PARAM NAME=wmode VALUE=transparent>';
		html += '<PARAM NAME=loop VALUE=true>';
		html += '<PARAM NAME=quality VALUE=high><PARAM NAME=allowScriptAccess VALUE=always>'; 
		html += ' <EMBED sr'+'c="'+ this._flash +'" loop=true flashvars="'+flaVar+'" wmode=transparent quality=high';
		html += ' allowScriptAccess=always swLiveConnect=FALSE WIDTH='+this._width+' HEIGHT='+this._height+'';
		html += ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
		html += ' </EMBED></OBJECT>';
		return html;
	},
	
	render: function(id) {
		document.getElementById(id).innerHTML = '<div>' + this.getFlashBanner() + '</div>';
	}

};
