/*
disable object embed activation click in ie by rl
use:
	flash.show(path,width,height,id,title,alter,params);

params ex: 
	wmode="transparent", quality="high", bgcolor="#ffcc33", allowScriptAccess="sameDomain", style="" 

*/
var flash = {   
		show: function(path,width,height,id,title,alter,params){
		
			document.write(flash.build(path,width,height,id,title,alter,params));
		},
		param: function(params) {
			var tab = new Array();
			var obj = new Object();
			obj.list = new Array();
			if(params !='') {
				params = params.split(' ').join('');
				tab = params.split(',');
				for(var i=0; i<tab.length;i++) {
					obj[tab[i].split('="')[0]] = tab[i].split('="')[1].split('"')[0];
					obj.list.push(tab[i].split('=')[0]);
				}
			} else obj = '';
			return obj;
		},
		build: function(path,width,height,id,title,alter,params) {
			var txt;
			txt = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
			txt += ' title="'+title+'"';
			txt += ' alt="'+alter+'"';
			txt += ' width="'+width+'" height="'+height+'"';
			txt += ' id="'+id+'"';
			txt += ' style="'+flash.param(params)['style']+'">';
			txt +='<param name="movie" value="'+path+'" /><PARAM name="WMODE" value="opaque">';
			for(var i=0; i<flash.param(params)['list'].length;i++) {
				if(flash.param(params)['list'][i] != 'style') {
					txt +='<param name="'+flash.param(params)['list'][i]+'" value="'+flash.param(params)[flash.param(params)['list'][i]]+'"/>';
				}
			}
			
			txt += '<embed src="'+path+'"';
			txt += ' width="'+width+'" height="'+height+'"';
			txt += ' title="'+title+'"';
			txt += ' alt="'+alter+'" wmode="transparent"';
			for(var i=0; i<flash.param(params)['list'].length;i++) {
				if(flash.param(params)['list'][i] != 'style') {
					txt +=' '+flash.param(params)['list'][i]+'="'+flash.param(params)[flash.param(params)['list'][i]]+'"';
				}
			}
			
			txt +=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
			txt +='</object>';
			return txt;
		}
	}

