function  wwsiteSwitch_Object()
{
  var  Agent = "";
  var  MajorVersion = 0;


  // Determine browser
  //
  this.mBrowser = 0;  // Shorthand for Unknown

  Agent = navigator.userAgent.toLowerCase();
  if ((Agent.indexOf("mozilla") != -1) &&
      (Agent.indexOf("spoofer") == -1) &&
      (Agent.indexOf("compatible") == -1))
  {
    MajorVersion = parseInt(navigator.appVersion)
    if (MajorVersion >= 4)
    {
      this.mBrowser = 1;  // Shorthand for Netscape
    }
  }
  else if (Agent.indexOf("msie") != -1)
  {
    MajorVersion = parseInt(navigator.appVersion)
    if (MajorVersion >= 4)
    {
      this.mBrowser = 2;  // Shorthand for IE
    }
  }
  else if (Agent.indexOf("icab") != -1)
  {
    this.mBrowser = 3;  // Shorthand for iCab
  }

  // Determine platform
  //
  this.mPlatform = 0;  // Shorthand for Unknown

  if ((Agent.indexOf("win") != -1) ||
      (Agent.indexOf("16bit") != -1))
  {
    this.mPlatform = 1;  // Shorthand for Windows
  }
  else if (Agent.indexOf("mac") != -1)
  {
    this.mPlatform = 2;  // Shorthand for Macintosh
  }

  this.mbJavaEnabled = false;

  this.fForceJavaScript  = wwsiteSwitch_ForceJavaScript;
  this.fCheckJavaEnabled = wwsiteSwitch_CheckJavaEnabled;
  this.fGetFrameSet      = wwsiteSwitch_GetFrameSet;
  this.fSwitchFrameSet   = wwsiteSwitch_SwitchFrameSet;
}

function  wwsiteSwitch_CheckJavaEnabled()
{
  if (navigator != null)
  {
    this.mbJavaEnabled = navigator.javaEnabled();
  }
  else
  {
    this.mbJavaEnabled = false;
  }
}

function  wwsiteSwitch_GetFrameSet()
{
  var  WhichFrameSet = "wwsite/js/html/frames.htm";

  // Detect current environment and use appropriate frameset
  // if JavaScript isn't forced on.
  //
  if (this.fForceJavaScript() == false)
  {
    // Check to see if Java is enabled
    //
    if (this.mbJavaEnabled)
    {
      // We'll try to run the Java version unless
      // a particular platform doesn't support it.
      //
      if (this.mBrowser == 1)  // Shorthand for Netscape
      {
        if (this.mPlatform == 1)  // Shorthand for Windows
        {
          WhichFrameSet = "wwsite/js/html/frames.htm"; 

// WhichFrameSet = "wwsite/java/html/wwhnsfs.htm";  
// Java works on NS for Windows, but here we set it to use the JavaScript version because we don't want to use the Java version

        }
        else if (this.mPlatform == 2)  // Shorthand for Macintosh
        {
          WhichFrameSet = "wwsite/js/html/frames.htm";  // Java doesn't work on NS for Macintosh
        }
        else
        {
          WhichFrameSet = "wwsite/js/html/frames.htm"; 

// WhichFrameSet = "wwsite/java/html/wwhnsfs.htm";
// Java works on NS for UNIX, but here we set it to use the JavaScript version because we don't want to use the Java version

        }
      }
      else  // Assume IE
      {
        if (this.mPlatform == 1)  // Shorthand for Windows
        {
          WhichFrameSet = "wwsite/js/html/frames.htm"; 

// WhichFrameSet = "wwsite/java/html/wwhiefs.htm";  
// Java works on IE for Windows, but here we set it to use the JavaScript version because we don't want to use the Java version

        }
        else if (this.mPlatform == 2)  // Shorthand for Macintosh
        {
          WhichFrameSet = "wwsite/js/html/frames.htm"; 

// WhichFrameSet = "wwsite/java/html/wwhmacfs.htm";
// Java should work on IE and iCab for Macintosh (no favorites) but sometimes it doesn't with IE 5.x, so we switched it to Javascript for both browsers on Mac.

        }
        else
        {
          WhichFrameSet = "wwsite/js/html/frames.htm";  // Java doesn't work on IE for UNIX
        }
      }
    }
  }



  return WhichFrameSet;
}

function  wwsiteSwitch_SwitchFrameSet()
{
  var  NewLocation;


  NewLocation = this.fGetFrameSet();

  if (location.href.indexOf("?") != -1)
  {
    var  Parts;


    Parts = location.href.split("?");

    NewLocation += "?" + Parts[1];
  }

  location.href = NewLocation;
}
