// user defined globals to modify
//following 2 vars inside DetectFlashVer function
//reqMajorVer = 6;					// required flash version (max is 5, min is 2)
//reqMinorVer = 0;					// required minor version, if any
var useRedirect = false; 			// "true" loads flash or "false" loads non-flash
var maxVer = 25;					// define a really high number

// set next three vars if useRedirect is true...
//var flashPage = "flash.html"		// flash page
//var noFlashPage = "noflash.html"	// non-flash page
//var upgradePage = "upgrade.html"	// upgrade page is old version detected

// this is a js1.1 code block, so make note that js1.1 is supported.
jsVersion = 1.1;

// Detect Client Browser type
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

// JavaScript helper required to detect Flash Player PlugIn version information
var fl;
//function _uFlash() {
function JSGetSwfVer() {
 var f="-",n=navigator;
 if (n.plugins && n.plugins.length) {
  for (var ii=0;ii<n.plugins.length;ii++) {
   if (n.plugins[ii].name.indexOf('Shockwave Flash')!=-1) {
    f=n.plugins[ii].description.split('Shockwave Flash ')[1];
    fmajor=f.split('.')[0];
	fminor=f.split('r')[1];
	f=fmajor+"."+fminor;
	break;
   }
  }
 } else if (window.ActiveXObject) {
  for (var ii=20;ii>=2;ii--) {
   try {
    fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");
    if (fl) {
	  f=ii;
	  fv=fl.GetVariable("$version");
	  m=fv.split(',')[2];
	  f+= '.'+m;
	  break; }
   }
   catch(e) {}
  }
 }
 return f;
}

// If called with no parameters this function returns a floating point value 
// which should be the version of the Flash Player or 0.0 
// ex: Flash Player 6r65 returns 6.65
// If called with reqMajorVer, reqMinorVer this function returns true if that version or greater is installed
var hasRightVersion;
var versionNum;
function DetectFlashVer(reqMajorVer,reqMinorVer) {
//setting default min to 6.0
	reqMajorVer = (reqMajorVer)?reqMajorVer:6;
	reqMinorVer = (reqMinorVer)?reqMinorVer:0;

	reqVer = parseFloat(reqMajorVer + "." + reqMinorVer);
	versionStr = JSGetSwfVer();
	versionNum = (versionStr !== 0)?versionStr:false;

	versionNum = (versionNum)?(versionNum.split("r")[0]):0;
	hasRightVersion = (versionNum>=reqVer)? true : false;
}

//add the DetectFlashVer function call to page with flash before the page requests hasRightVersion 
/*
	DetectFlashVer(6,0);
	if(hasRightVersion) {
		oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="758" HEIGHT="4">';
		oeTags += '<PARAM NAME="movie" VALUE="http://path.interactivate.com/animation.swf">';
		oeTags += '<PARAM NAME="quality" VALUE="high">';
		oeTags += '<EMBED src="http://path.interactivate.com/animation.swf" quality="high" WIDTH="100" HEIGHT="100" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
		oeTags += '</EMBED></OBJECT>';
	} else {
		oeTags = '<img src="http://path.interactivate.com/img/placeholder.gif" alt="" width="100" height="100" border="0">' 
	}
	document.write output;
*/
