/*
 *
 * File name: detectflash.js
 * Version: 1.0 - 2007/06/13
 * Written by TEC INFORMATION SYSTEMS CORPORATION
 * 
 * require jQuery 1.1 (see: http://jquery.com/ )
 *
 */

$(function(){
	
	/* Configs ----------------------------- */
	var flash_version = 4;
	var redirect_url  = "w53t_menu_nf.htm";
	/* ------------------------------------- */
	
	
	
	//1:over equal version, 0:under version, -1:no flash
	_detect_flash = function(version){
		if (navigator.plugins && navigator.plugins.length){
			if(navigator.plugins["Shockwave Flash"].description){
				navigator.plugins["Shockwave Flash"].description.match(/(\d+)\.\d/);
				if(RegExp.$1 >= version){
					return 1;
				}else{
					return 0;
				}
			};
		}else{
			try{
				is_version = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			}catch(e){
				is_version = false;
			}
			if (is_version){
         try{
					is_version = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+version);
					return (is_version) ? 1 : 0;
				}catch(e){
					return 0;
				}
			}else{
				return -1;
			}
		};
		return -1;
	};
	
	// detect and redirect
	var ver_cmp = _detect_flash(flash_version);
	if (
			   (ver_cmp == -1)
			|| (ver_cmp == 0)
		)
	{	//no flash or under version 
		location.replace(redirect_url);
	}
	else {	//over or equal version
		;
	}

});