// $Header: /home/cvs/baylis.intranet.html/scripts/browser.js,v 1.4 2007/04/23 10:39:42 matthew Exp $

function detect()
{

  ag = navigator.userAgent;

  if ( !ag )
    return '';

  var moz_ok = false;
  var ie_ok = false;
  var ff_ver = version('Firefox');
  var ie_ver = version('MSIE');



  
  
  if ( (ag.indexOf('Firefox')) != -1 && (ff_ver >= 1.7) )
    moz_ok = true;

  if ( (ag.indexOf('MSIE') != -1) &&  (ie_ver >= 6))
    ie_ok = true;

  if ( ie_ok == false && moz_ok == false )
  {
    return '<h1 style="color: #FF3300;">Please Note</h1><p>You may not be using the most up-to-date version of this browser. We would recommend that you update it to use this site. Any updates should provide new features and enhanced security.</p>';
  }

  return '';
}

function version(str_app){
    var index = navigator.userAgent.indexOf(str_app);
    if (index == -1) return;
    return parseFloat(navigator.userAgent.substring(index+str_app.length+1));
}


