/*V7.1*/

function ValidateBrowser()
{
  // Basic object detection. If all of them does'nt exist, it means that we can't do DHTML
  // with this browser.
  //if(!document.layers && !document.all && !document.getElementById())
    //return false;

  // Make sure it is a browser that we support
  var m = navigator.userAgent.match(/\).*/g).toString();
  if(m != ')')
    {
      m = m.replace(/\)\s*/,'');
      var word = m.match(/\w*/).toString();
      if(word != 'Gecko')
        return false;
    }

  // Then, make sure that the version is higher or equel to 4
  if(parseInt(navigator.appVersion.substring(0,1)) < 4)
    {
      //alert('The current version of your browser is no longer supported, please upgrade to a newer version.');
      document.location.href = "Error.aspx?ErrorID=10";
      return false;
    }

  // Check if user has set his properties correctly:
  // Check for frames
  if(!window.frames)
    {
      document.location.href = "Error.aspx?ErrorID=9";
      return false;
    }

  // detect if java is enabled
  /*
  if(!navigator.javaEnabled())
    {
      //alert('This application requires Java to be enabled in order to work properly.');
      document.location.href = "Error.aspx?ErrorID=8";
      return false;
    }
   */

  // Cookies are used for the session variables so they have to be enabled
//  if(!document.cookie)
//    { 
//      document.location.href = "Error.aspx?ErrorID=5";
//      return false;
//    }

  return true;
};

ValidateBrowser();

//if(!ValidateBrowser())
//  alert('Your current browser is not supported by this application. Some pages will not display properly.');
