function writeFlash(url_root, width, height, bgcolor, version, name, var_video, nome_video){
	if (version == null || version == ''){
		version = '8,0,0,0';
	}
	document.writeln("<object name='"+name+"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
	document.writeln(" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+"' ");
		document.writeln(" width='"+width+"' height='"+height+"' /> ");
		if (var_video == null) {
			document.writeln("<param name='movie' value='"+url_root+"'>");
		}else{
			document.writeln("<param name='movie' value='"+url_root+"?"+var_video+"="+nome_video+"' />");
		}
		document.writeln("<param name='quality' value='high' />");
		document.writeln("<param name='bgcolor' value='#"+bgcolor+"' />");
		document.writeln("<param name='allowFullScreen' value='true' />");
		document.writeln("<param name='allowScriptAccess' value='always' />");
		//document.writeln("<param name='FlashVars' value='"+var_video+"="+nome_video+"' />");
		if (bgcolor == null || bgcolor == 'FFFFFF'){
		document.writeln("<param name='wmode' value='transparent' />");
	}
		document.writeln("<embed src='"+url_root+"?"+var_video+"="+nome_video+"' ");
		if (bgcolor == null || bgcolor == 'FFFFFF'){
		document.writeln(" 'wmode'='transparent' ");
	}
		document.writeln(" quality='high' bgcolor='#"+bgcolor+"'  width='"+width+"' height='"+height+"' ");
		document.writeln(" type='application/x-shockwave-flash' ");
		document.writeln(" allowFullScreen='true' ");
		document.writeln(" allowScriptAccess='always' ");
		document.writeln(" pluginspage='http://www.macromedia.com/shockwav/download/index.cgi?P1_Prod_Version=ShockwaveFlash' />");
		document.writeln("</embed></object>");
}
