/*********************************
* Class OS                       *
*                                *
* Properties: name               *
*               Input: -         *
*               Output: (String) *
*             platform           *
*               Input: -         *
*               Output: (String) *
*             version            *
*               Input: -         *
*               Output: (String) *
*********************************/

function OS()
{
  var info;

  this.name = 'Unknown';
  this.platform = navigator.platform;
  this.version = '';
  info = navigator.userAgent.toLowerCase();
  if (info.indexOf('win') != -1)
  {
    this.name = 'Windows';
    if ((info.indexOf('win95') != -1) || (info.indexOf('windows 95') != -1))
      this.version = 'Windows 95';
    if ((info.indexOf('win98') != -1) || (info.indexOf('windows 98') != -1))
      this.version = 'Windows 98';
    if (info.indexOf('win 9x 4.90') != -1)
      this.version = 'Windows Me';
    if ((info.indexOf('winnt') != -1) || (info.indexOf('windows nt') != -1))
      this.version = 'Windows NT';
    if (info.indexOf('windows nt 5.0') != -1)
      this.version = 'Windows 2000';
    if (info.indexOf('windows nt 5.1') != -1)
      this.version = 'Windows XP';
    if (info.indexOf('windows nt 5.2') != -1)
      this.version = 'Windows Server 2003';
    if (info.indexOf('windows nt 6.0') != -1)
      this.version = 'Windows Vista';
    if (info.indexOf('windows nt 6.1') != -1)
      this.version = 'Windows 7';
  }
  else if (info.indexOf('linux') != -1)
    this.name = 'Linux';
  else if (info.indexOf('mac') != -1)
    this.name = 'Macinthosh';
  else if (info.indexOf('x11') != -1)
    this.name = 'Unix';
}

