
winIEpass = (navigator.appName.indexOf("Microsoft") != -1) && 
  //(navigator.appVersion.indexOf("Windows") != -1)) && 
  (parseFloat(navigator.appVersion) >= 4) ? true : false;

NNpass = ((navigator.appName == "Netscape") && 
  (navigator.userAgent.indexOf("Mozilla") != -1) && 
  (parseFloat(navigator.appVersion) >= 4) && 
  (navigator.javaEnabled())) ? true : false;

  supportedBrowser = (winIEpass || NNpass) ? true : false;

// check for Flash Plug-in in Mac or Win Navigator. Get plug-in version.


minPlayer = 4;
var mySwf;

function Flash_checkForPlugIn() {
  var plugin = (navigator.mimeTypes &&
  navigator.mimeTypes["application/x-shockwave-flash"]) ?
  navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
  if (plugin) {
    var pluginversion = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) 
    if(pluginversion >= minPlayer) {return true;}
  }
  return false;
}

// vbscript check for Flash ActiveX control in windows IE
if(supportedBrowser && winIEpass) {
  document.write(
	'<script language=VBScript>' + '\n' +
	'Function Flash_checkForActiveX()' + '\n' +
	'Dim hasPlayer, playerversion' + '\n' +
	'hasPlayer = false' + '\n' +
	'playerversion = 10' + '\n' +
	'Do While playerversion >= minPlayer' + '\n' +
	'On Error Resume Next' + '\n' +
	'hasPlayer = (IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" & playerversion & \"\")))' + '\n' +
	'If hasPlayer = true Then Exit Do' + '\n' +
	'playerversion = playerversion - 1' + '\n' +
	'Loop' + '\n' +
	'Flash_checkForActiveX = hasPlayer' + '\n' +
	'End Function' + '\n' +
	'<\/script>'
  );
}



function Flash_checkForMinPlayer() {
  if(!supportedBrowser) return false;
  if(NNpass) return (Flash_checkForPlugIn());
  if(winIEpass) return (Flash_checkForActiveX());
}


function sonified_flash(myFrame){
  if(!Flash_checkForMinPlayer()) {return;}

  mySwf = window.document.sonify;
  if (mySwf.PercentLoaded()<100) return

  mySwf.GotoFrame(myFrame);
  mySwf.GotoFrame(0);
}






