function addFlash( src, width, height, opt, noscript_id ) {
	if(!noscript_id) noscript_id='noscript_menu';
	// default options
	o = {
		classid : 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
		codebase: 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab',
		version: '9,0,124,0',
		id : 'flashObject',
		align : 'middle',
		allowScriptAccess : 'sameDomain',
		allowFullScreen : 'false',
		wmode : 'window',
		menu : 'false',
		quality : 'high',
		bgcolor : '#ffffff',
		FlashVars : '',
		type : 'application/x-shockwave-flash',
		pluginspage : 'http://www.macromedia.com/go/getflashplayer'
	};
	function toAttribute( name, value ) {return ' ' + name + '="' + value + '"';}
	function toParameter( name, value ) {return '<param name="' + name + '" value="' + value + '" />';}
	var oEl = '';
	var pEl = '';
	var eEl = '';
	// input option initalize
	for( var p in opt )
	{
		switch( p.toLowerCase() )
		{
			case 'allowscriptaccess':
				o.allowScriptAccess = opt[p];
				break;
			case 'allowfullscreen':
				o.allowFullScreen = opt[p];
				break;
			case 'flashvars':
				o.FlashVars = opt[p];
				break;
			case 'classid':
			case 'codebase':
			case 'version':
			case 'id':
			case 'align':
			case 'menu':
			case 'quality':
			case 'wmode':
			case 'bgcolor':
			case 'pluginspage':
				o[p] = opt[p];
				break;
		}
	}
	// write object html
	
	if (window.ActiveXObject) { 
		// IE ActiveX Code 
		html = '';
		html += '<object';
		html += toAttribute( 'classid', o.classid );
		html += toAttribute( 'codebase', o.codebase + '#version=' + o.version );
		html += toAttribute( 'width', width );
		html += toAttribute( 'height', height );
		html += toAttribute( 'align', o.align );
		html += '>';
		html += toParameter( 'movie', src );
	} else { 
		// Mozilla based Plugin Code 
		html = '';
		html += '<object';
		html += toAttribute( 'type', o.type );
		html += toAttribute( 'data', src );
		html += toAttribute( 'width', width );
		html += toAttribute( 'height', height );
		html += toAttribute( 'align', o.align );
		html += '>';
	}
	html += toParameter( 'allowScriptAccess', o.allowScriptAccess );
	html += toParameter( 'allowFullScreen', o.allowFullScreen );
	html += toParameter( 'menu', o.menu );
	html += toParameter( 'quality', o.quality );
	html += toParameter( 'wmode', o.wmode );
	html += toParameter( 'bgcolor', o.bgcolor );
	html += toParameter( 'FlashVars', o.FlashVars );

	// for no plugin alternative content
	var noPluginId='fl__' + Math.round( Math.random() * 10000000 );
	html += '<div class="getflash" id="' + noPluginId + '">';
	html += '</div>';
	html += '</object>';
	
	// for no plugin alternative content initalize
	var showAltContent=function(){
		var altEl = document.getElementById( noscript_id );
        var targetEl = document.getElementById( noPluginId );
		if( altEl && targetEl ) targetEl.innerHTML = altEl.innerHTML;
	};
	if( window.addEventListener ){
		window.addEventListener( 'load', showAltContent, false );
	}
	else if( window.attachEvent ){
		window.attachEvent( 'onload', showAltContent );
	}

	document.write( html );
}