<!-- 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_link,html_link){
	
	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()) {
	if (isFlashVer5()) {
		window.open(swf_link,'demo','top=0,left=0,width=800,height=500,scrollbars=1');
	} else {
		window.open(html_link,'demo','top=0,left=0,width=800,height=500,scrollbars=1');
	}

}