var flash2Installed = false;		
var flash3Installed = false;		
var flash4Installed = false;		
var flash5Installed = false;	
var flash6Installed = false;  	

var isFlash = 1;

function detectFlashVersion(requiredVersion) 
{  
  var maxVersion = 6;					
  var actualVersion = 0;				
  var hasRightVersion = false;		
  var jsVersion = 1.0;     
  var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;		
  var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; 
  jsVersion = 1.1;

  if(isIE && isWin){ 
	  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	  document.write('on error resume next \n');
	  document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	  document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	  document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	  document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');	
	  document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
	  document.write('</SCR' + 'IPT\> \n'); 
  }	

  if (navigator.plugins) {

    if (navigator.plugins["Shockwave Flash 2.0"]
        || navigator.plugins["Shockwave Flash"]) {

      var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;

      var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));

      flash2Installed = flashVersion == 2; 
      flash3Installed = flashVersion == 3;
      flash4Installed = flashVersion == 4;
      flash5Installed = flashVersion == 5;
      flash6Installed = flashVersion >= 6;
    }
  }
  for (var i = 2; i <= maxVersion; i++) {	
   if (eval("flash" + i + "Installed") == true) actualVersion = i; 	
  }	
  if (actualVersion >= requiredVersion) { 	
   hasRightVersion = true;					
  }

  return hasRightVersion;
}


function detectFlash(requiredVersion)
{
 if(detectFlashVersion(requiredVersion) == true)
 {
   return 1;
 }
 else
 {
   return 0;
 }
}

function lib_bwcheck() 
{

  this.ver = navigator.appVersion; 
  this.agent = navigator.userAgent; 
  this.dom = document.getElementById?1:0; 
  this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
  this.ie6 = (this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; 
  this.ie4 = (document.all && !this.dom)?1:0; 
  this.ie = this.ie4||this.ie5||this.ie6; 
  this.mac = this.agent.indexOf("Mac")>-1; 
  this.opera = this.agent.indexOf("Opera")>-1; 
  this.ns6 = (navigator.userAgent.indexOf("Netscape6")>-1)?1:0;
  this.ns7 = (navigator.userAgent.indexOf("Netscape/7")>-1)?1:0;
  this.ns4 = (document.layers && !this.dom)?1:0; 
  this.bw = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom) 
  this.ns =  (navigator.userAgent.indexOf("Netscape")>-1)?1:0;
 
  this.flash6 = detectFlash(6);  

return this; 
}

var bw = new lib_bwcheck();
var movieName = "home_l";

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]				
//window.document[movieName]       (on Mozilla browsers such as Netscape)
//window[movieName]                (on Internet Explorer as of ver 5)
//document.embeds[movieName]       Mozilla Netscape, Firefox or Opera				
  }
}

function playmovie() 
{
thisMovie(movieName).TGotoLabel("_level0/","end");
}
