var Flash4=false;
var DetectFlash=true;
function DetectPluginIE(plugin) {
if ((navigator.appName == "Microsoft Internet Explorer" &&
    navigator.appVersion.indexOf("Mac") == -1 &&
    navigator.appVersion.indexOf("3.1") == -1) ||
    (plugin &&
parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >=4)){
return false;
}
else {
	return true;
}

}
function DetectFlash4IE() {
 var temp=false;
 if (DetectPluginIE("ShockwaveFlash.ShockwaveFlash"))
  if (DetectPluginIE("ShockwaveFlash.ShockwaveFlash.4"))
   temp=true;  
 return temp;
}
function DetectFlash4NS() {
 var temp=false;
 for (var i=0;(i<navigator.plugins.length)&&(!temp);i++) {
  temp=(navigator.plugins[i].description.indexOf("Shockwave Flash 4")>=0);
 } return temp;
}

// ==================================================================
// 
// This is major function that is used to swith between flash and
// non-flash versions.
// If isFlash4() returns false, non-flash version plays
// otherwize the flash version plays.
//
//===================================================================

function isFlash4() {



// return true;   /* remove the comment before this line to test non-flash version */





 if ((navigator.appName=="Microsoft Internet Explorer")&&
 				(navigator.appVersion.substring(0,1)>3)&&
				((navigator.userAgent.indexOf("Windows")>=0))) {
	  Flash4=DetectFlash4IE();
  }
 else if (navigator.mimeTypes&&navigator.userAgent.indexOf("Opera 4.0 Beta")>=0)
  Flash4=true;
 else if (navigator.mimeTypes&&navigator.userAgent.indexOf("Opera")>=0)
  Flash4=DetectFlash4NS();
 else if (navigator.mimeTypes&&(navigator.appName.indexOf("Netscape")>=0))
  Flash4=DetectFlash4NS();
  
  return Flash4;
}


