//---Flash

var isFlash=false;
var flashV=7;

var ie = (navigator.userAgent && (navigator.userAgent.indexOf("MSIE") >= 0) && (navigator.appVersion.indexOf("Win") != -1)) ? 1 : 0;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin){
	var pluginVersion = parseInt(plugin.description.split('Shockwave Flash ')[1]);
	var isFlash = (pluginVersion >= flashV);
} else if (ie){
	document.write('<sc'+'ript type="text/vbscript"> \n');
	document.write('on error resume next \n');
	document.write('isFlash = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashV+'")) \n');
	document.write('</sc'+'ript> \n');
}

function viewFlash(fName, Width, Height, Params, imgName, href){
	if (!(fName || Width || Height || imgName)) return;
	if (!isFlash){
		var out='<img src="/xb/' + imgName + '.jpg" width="' + Width + '" height="' + Height + '" alt="" border="0" /><BR>';
		if(href) {out='<a href='+href+'>'+out+'</a>';}
		document.write(out);
		return;
	}

	var Objstr = "";

	Objstr += '\n<object style="display:block" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+Width+'" height="'+Height+'">';
	Objstr += '\n<param name="allowScriptAccess" value="sameDomain"/>';
	Objstr += '\n<param name="movie" value="'+fName+'"/>';
	Objstr += '\n<param name="quality" value="high"/>';

	if (Params){
		for (param in Params) Objstr += '\n<param name="'+param+'" value="'+Params[param]+'"/>';
	}

	Objstr += '\n<embed src="'+fName+'" quality="high" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"';
	Objstr += ' type="application/x-shockwave-flash" width="'+Width+'" height="'+Height+'"';

	if (Params){
		for (param in Params) Objstr += ' '+param+'="'+Params[param]+'"';
	}

	Objstr += '></embed>';
	Objstr += '\n</object>';

	document.write(Objstr);
}