/*
 * Copyright (c) dev.osiacat.ru, 2007
 */

function PublishSWF(){
}
PublishSWF.prototype = {
	src : '',
	name: '',
	width: '',
	height: '',
	bgcolor: '',
	id : '',
	Publish:  function(dstElt){
		var s = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' 
			+ 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '
			+ 'width="' + this.width + '" '
			+ 'height="' + this.height+ '" '
			+ (this.id? 'id="' + this.id + '" ' : '')
			+ 'align="middle">'
			+ '<param name="allowScriptAccess" value="sameDomain" />'
			+ '<param name="movie" value="' + this.src + '" />'
			+ '<param name="quality" value="high" />'
			+ (this.bgcolor? '<param name="bgcolor" value="' + this.bgcolor + '" />' : '')
			+ '<embed src="' + this.src + '" quality="high" '
			+ (this.bgcolor? 'bgcolor="' + this.bgcolor + '" ' : '' )
			+ 'width="' + this.width + '" '
			+ 'height="' + this.height + '" '
			+ (this.name? 'name="' + this.name + '" ' : '')
			+ 'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer" />'
			+ '</object>';
		if( dstElt ){
			dstElt.innerHTML = s;
		}
		else{
			return s;
		}
	}
}
	
