function FlashObject(p) {
	this.v=true;
	if(typeof p=='undefined') {return this}
	if(p['verbose']==false) {this.v=false}
	this.eS='';
	this.oS='';
	this.id=p['id']||'myMovie';
	this.f=p['file'];
	this.w=p['width']||'9';
	this.h=p['height']||'9';
	this.bg=p['bgcolor']||'#FFFFFF';
	this.ieV=p['ieVersion']||'7,0,0,0';
	this.fV=p['flashVars'];
	this.wm=p['wmode'];
	this.bs=p['base'];
	this.sa=p['salign'];
	this.sc=p['scale'];
	return this;
}
FlashObject.prototype.write=function(){
	if(typeof this.f=='undefined'){if(this.v){alert("FlashObject error: no file name!")} return false;}
	if(this.fV&&this.fV!=''){
		this.eS+='FlashVars="'+this.fV+'" ';
		this.oS+='<param name="FlashVars" value="'+this.fV+'" />';
	}
	if(this.wm && this.wm != "") {
		this.eS+='wmode="'+this.wm+'" ';
		this.oS+='<param name="wmode" value="'+this.wm+'" />';
	}
	if(this.bs&&this.bs!="") {
		this.eS+='base="'+this.bs+'" ';
		this.oS+='<param name="base" value="'+ this.bs+'" />';
	}
	if(this.sc&&this.sc!="") {
		this.eS+='scale="'+this.sc+'" ';
		this.oS+='<param name="scale" value="'+ this.sc+'" />';
	}
	if(this.sa&&this.sa!="") {
		this.eS+='salign="'+this.sa+'" ';
		this.oS+='<param name="salign" value="'+ this.sa+'" />';
	}
	this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.ieV+'" width="'+this.w+'" height="'+this.h+'" id="'+this.id+'">';
	this.html+='<param name=movie value="'+this.f+'">';
	this.html+='<param name=quality value="high">';
	this.html+='<param name=bgcolor value="'+this.bg+'">';
	this.html+=this.oS;
	this.html+='<embed src="'+this.f+'" '+this.eS+'quality="high" bgcolor="'+this.bg+'" width="'+this.w+'" height="'+this.h+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true" id="'+this.id+'" name="'+this.id+'">';
	this.html+='</embed></object>';
	document.write(this.html);
}
