//-----------------------------------
// Detect Version
// Detects the version # of browser
// and returns the number
//-----------------------------------

function detectVersion() {
  version = parseInt(navigator.appVersion);
  return version;
}

//-----------------------------------
// Detect OS
// Detects the operating system and
// returns text 'macintosh' or 'windows'
//-----------------------------------
function detectOS() {
  if(navigator.userAgent.indexOf('Win') == -1) {
    OS = 'Macintosh';
  } else {
    OS = 'Windows';
  }
  return OS;
}

//-----------------------------------
// Detect Browser
// Detects browser name and returns
// 'IE' or 'Netscape'
//-----------------------------------
function detectBrowser() {
  if(navigator.appName.indexOf('Netscape') == -1) {
    browser = 'IE';
  } else {
    browser = 'Netscape';
  }
  return browser;
}

