/*
Name: Flash_js.js - Flash Related JS Functions
*/

/*
Method: Flash_CheckVersion
Description: Pass in the version of flash you require.
	Returns true if that version or newer is installed.
Note: Code based on macromedia article on flash detection
http://www.macromedia.com/support/director/ts/documents/playerdetection.htm
Code By: SG
*/
function Flash_CheckVersion(intVersion){

    // Check browsers that support mimetypes
    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);
			var version = parseInt(versionString);

			if(version>=intVersion){
				blnReturnValue=true;
			}else{
				blnReturnValue=false;
			}
			
		}
    }else{
		// Check microsoft IE
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
		&& (navigator.userAgent.indexOf("Windows")>=0)){

			document.write('<SCRIPT  LANGUAGE=VBScript\> \n');

			document.write('on error resume next \n');
			
			document.write('Dim blnReturnValue \n');

			document.write('blnReturnValue = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + intVersion + '")))\n');

			document.write('</SCRIPT\> \n');

			if(blnReturnValue!=true){
				blnReturnValue=false;
			}

		}else{
			// Flags 0 for browsers such as netscape 4.x 
			blnReturnValue=false;
		}
    }


   return blnReturnValue;

}