﻿function CBrowser()
{
  this.bInternetExplorer = false;
  this.bNetscape = false;
  this.bKonqueror = false;
  this.bSafari = false;
  this.bSafari4 = false;
  this.bMozilla = false;
  this.bOpera = false;  
  this.bOther = false;

  this.setBrowserType = function()
  {
    if(document.all && window.offscreenBuffering)
    {
      this.bInternetExplorer = true;
    }
     else if(document.captureEvents && !document.getElementById)
     {
       this.bNetscape = true;
     }
      else if(window.navigator.vendor && !document.designMode)
      {
        this.bKonqueror = true;
      }
       else if(window.atob && document.defaultCharset)
       {
         this.bSafari = true;        
                  
         if(navigator.userAgent.match(/Version\/4.0/))
         {
           this.bSafari4 = true;           
         }                  
       }       
        else if(document.getElementById && !document.all && document.documentElement)
        {
          this.bMozilla = true;
        }
         else if((navigator.userAgent.indexOf('Opera') != -1) || (document.getElementById && document.all && !window.offscreenBuffering))
         {
           this.bOpera = true;
         }
          else
          {
            this.bOther = true;
          }
  }

  this.setBrowserType();
}
