<!-- attempt to detect at least Flash 5 -->
var FlashMode = 0;

if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]
   && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
{
	if (navigator.plugins && navigator.plugins["Shockwave Flash"]
	   && (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1)
	{
		var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1, versionIndex);
		versionIndex = parseInt( versionString );
		if ( versionIndex >= 5 ) {
			FlashMode = 1;
		}
	}
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
        && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0))
{
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('</SCRIPT\> \n');
}

function isFlashVer5()
{
	if(FlashMode != 1)
		return false;
	else
		return true;
}

<!-- check IE5.5 or upper -->
function isIE55Up()
{
	var ua = window.navigator.userAgent;
	var msie = ua.indexOf ( "MSIE " )
	var ieVersion;

	if (isIE) {
		if ( msie > 0 )		// is Microsoft Internet Explorer; return version number
			ieVersion = parseFloat ( ua.substring ( msie+5, ua.indexOf ( ";", msie ) ) );
		else
			ieVersion = 0;	// is other browser

		if (ieVersion >= 5.5)
			return true;
		else
			return false;
	} else { return false; }
}

function show_swf(swf, img, hh, ww, ln, tg){
	
	var h='http' + '://' ;
	var d=new String(self.document.location.host);
	var sc=false;
	var re = /sc.hangseng.com/i;
        if (re.test(d)) 		//detect simplified chinese
			sc=true;

	if (sc) {			//replace TC gif to SC gif
		var re1 = /^\/chi\//i;
		swf = swf.replace(re1,"/hsb/schi/");	
		img = img.replace(re1,"/hsb/schi/");	
	}	
	
	var html='';	
	if (isIE55Up() && isFlashVer5()) {
		html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+ww+'" height="'+hh+'">';
		html+='<param name="movie" value="'+swf+'">';
		html+='<param name="quality" value="high">';
		html+='<param name="wmode" value="transparent">';
		html+='<embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+ww+'" height="'+hh+'" wmode="transparent">';
		html+='</embed>';
		html+='</object>';
	} else {
		html+='<a href="'+ln+'" target="'+tg+'"><img src="'+img+'" width="'+ww+'" height="'+hh+'" border=0></a><br>';
	}
	document.write(html);
}
