function ObjectRewrite(URL, width, height, version, bgcolor, wmode, id) {
	this.defaultImage="";
	this.defaultImageAltText="";
	this.testForPlugin = false;
	this.hasPlugin = false;
	this.URL = URL;
	this.height = height;
	this.width = width;
	this.version = 7;
	this.objectHTML = "";
	if(version) {
		this.version = version;
	}
	this.bgcolor = "FFFFFF";
	if(bgcolor) { 
		this.bgcolor = bgcolor;
	}
	this.wmode = "window";
	if(wmode) {
		this.wmode = wmode;
	}
	this.id = "newObject__";
	if(id) {
		this.id = id;
	}
}
ObjectRewrite.prototype = {
	"prepForFlash": function() {
		this.objectHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + this.version + ',0,0,0" width="' + this.width + '" height="' + this.height + '" id="' + this.id + '">';
		this.objectHTML += '<param name="allowScriptAccess" value="sameDomain" />';
		this.objectHTML += '<param name="movie" value="' + this.URL + '" />';
		this.objectHTML += '<param name="menu" value="false" />';
		this.objectHTML += '<param name="quality" value="best" />';
		this.objectHTML += '<param name="wmode" value="' + this.wmode + '" />';
		this.objectHTML += '<param name="bgcolor" value="#' + this.bgcolor + '" />';
		this.objectHTML += '<embed src="' + this.URL + '" wmode="' + this.wmode + '" quality="high" bgcolor="' + this.bgcolor + '" width="' + this.width + '" height="' + this.height + '" name="' + this.id + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		this.objectHTML += '</object>';
		if(this.testForPlugin) {
			this.testIfPlugin();
			if(!this.hasPlugin) {
				this.objectHTML = "<img src=\"" + this.defaultImage + "\" alt=\"" + this.defaultImageAltText + "\" />";
			}
		}
	},
	"write": function() {
		document.open();
		document.write(this.objectHTML);
		document.close();
	},
	"grabHTML": function() {
		//alert( this.objectHTML );
		return this.objectHTML;
	}
}