//.........................................................................................
//  File: RjBrowser.js                                               Date:  Jun 20, 2008
//                            Application: Javascript Tools
//  Author: R. Berry
//
//  Functions:
//              getBrowserType()
//
//  Copyright 2008 (c) Rawdon Berry
//
//  Modified: Sep  8 2008 for Chrome
// 
//.........................................................................................

//
// Returns a string
//      "firefox"
//      "ie"
//      "safari"
//      "chrome"
//      "opera"
//      "netscape"
//
function getBrowserType()
{
  zzz = navigator.userAgent.toUpperCase();
  if (zzz.match(/\bMSIE\b/))
    return("ie");
  if (zzz.match(/\bSAFARI\b/))
  {
    if (zzz.match(/\bCHROME\b/))
      return("chrome");
    return("safari");
  }
  if (zzz.match(/\bNETSCAPE\b/))
    return("netscape");  // 7.1 and older (8 also???)
  if (zzz.match(/\bFIREFOX\b/))
    return("firefox");
  if (zzz.match(/\bOPERA\b/))
    return("opera");
  return(null);
}

