var FlashTag = function() {

	this.src 		= '';
	this.quality	= 'high';
	this.bgcolor	= '#FFFFFF';
	this.flashvars	= '';
	this.align		= 'middle';
	this.width		= '100';
	this.height		= '100';
	this.id			= 'default';

}


FlashTag.prototype.replace = function( search, replace, string ) {
	
	return( string.split( search ).join( replace ) );
	
}



FlashTag.prototype.toString = function() {

	var ret_val = '';
	
	var template = '';
	
	template += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="{#width}" height="{#height}" id="{#id}" align="{#align}">';
	template += '<param name="movie" value="{#src}" />';
	template += '<param name="quality" value="{#quality}" />';
	template += '<param name="bgcolor" value="{#bgcolor}" />';
	template += '<param name="flashvars" value="{#flashvars}" />';
	template += '<embed flashvars="{#flashvars}" src="{#src}" quality="{#quality}" bgcolor="{#bgcolor}" width="{#width}" height="{#height}" name="{#id}" align="{#align}" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	template += '</object>';
	
	
	ret_val = template;
	
	ret_val = this.replace( '{#src}', 		this.src, ret_val );
	ret_val = this.replace( '{#quality}', 	this.quality, ret_val );
	ret_val = this.replace( '{#bgcolor}', 	this.bgcolor, ret_val );
	ret_val = this.replace( '{#flashvars}', this.flashvars, ret_val );
	ret_val = this.replace( '{#align}', 	this.align, ret_val );
	ret_val = this.replace( '{#width}', 	this.width, ret_val );
	ret_val = this.replace( '{#height}', 	this.height, ret_val );
	ret_val = this.replace( '{#id}', 		this.id, ret_val );
	
	return( ret_val );

}