var SwfText = {

	replace: function(id, swf)
	{
	//	if ( SwfText.flashdetect() )
	//	{
			var html, o, w, h, t;
			o = document.getElementById(id);
			w = o.offsetWidth;
			h = o.offsetHeight;
			t = o.innerHTML;
			html = '<object type="application/x-shockwave-flash" height="'+ h +'" width="' + w + '" data="' + swf + '">';
			html += '<param name="movie" value="' + swf + '" />';
			html += '<param name="wmode" value="transparent" />';
			html += '<param name="flashvars" value="v_inner='+ t +'&v_width='+ w +'&v_height='+ h +'" />';
			html += '</object>';
			o.style.display = 'none';
			document.write(html);
	//	}
	},
	
 	flashdetect: function()
	{
		var nRequiredVersion = 6;	
		
		if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1)
		{
			document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ' + nRequiredVersion + '))) \n</script\> \n');
			
			if(window.hasFlash != null)
			{
				return window.hasFlash;
			}
		}
		
		if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
		{
			var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
			return parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1)) >= nRequiredVersion;
		}
		
		return false;
	}
}
