function Flash(path, config){
	this.width = config.width ? config.width : "320";
	this.height = config.height ? config.height : "240";
	this.path = path;
	this.name_id = config.name_id ? config.name_id : this.path.split("/").pop().split(".").unshift();
	this.wmode = config.wmode ? config.wmode : "opaque";
	this.HTML =	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+
		'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '+
		'width="'+this.width+'" height="'+this.height+'" id="'+this.name_id+'" align="middle">'+
		'<param name="allowScriptAccess" value="sameDomain" />'+
		'<param name="movie" value="'+this.path+'" />'+
		'<param name="play" value="false" />'+
		'<param name="loop" value="false" />'+
		'<param name="menu" value="false" />'+
		'<param name="quality" value="high" />'+
		'<param name="scale" value="noscale" />'+
		'<param name="bgcolor" value="#000000" />'+
		'<param name="wmode" value="'+this.wmode+'" />'+
		'<embed src="'+this.path+'" '+
		'play="false" loop="false" '+
		'menu="false" quality="high" '+
		'wmode="'+this.wmode+'" '+
		'scale="noscale" bgcolor="#000000" '+
		'width="'+this.width+'" height="'+this.height+'" '+
		'name="'+this.name_id+'" align="middle" '+
		'allowScriptAccess="sameDomain" '+
		'type="application/x-shockwave-flash" '+
		'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
		'</object>';
			
	this.embed = function(obj_or_id){
		var l = (document.getElementById && document.getElementById(obj_or_id)) ? document.getElementById(obj_or_id) : (document.all&&document.all[obj_or_id]) ? document.all[obj_or_id] : obj_or_id;
		if(l&&typeof(l.innerHTML)!="undefined"){
			l.innerHTML = this.HTML;
			return true;
		}
		if(l&&typeof(l.write)!="undefined"){
			l.write(this.HTML);
			return true;
		}
		return false;
	}
}
