function browser_check()
{
  // Browser
  var ie4=document.all
  var ie5=document.getElementById&&document.all
  var ie6=document.getElementById&&document.all&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)
  var ie7=document.getElementById&&document.all&&(navigator.appVersion.indexOf("MSIE 7.")!=-1)
  var ie8=document.getElementById&&document.all&&(navigator.appVersion.indexOf("MSIE 8.")!=-1)

  var ns4=document.layers
  var ns6=document.getElementById&&!document.all

  // OS
  if ( (navigator.appVersion.indexOf("Mac")!=-1) )
  {
    user_os = "Macintosh";
  }
  if ( (navigator.appVersion.indexOf("Windows")!=-1) )
  {
    user_os = "Windows";
  }
  if ( (navigator.appVersion.indexOf("Unix")!=-1) )
  {
    user_os = "Unix";
  }

  // Browser
  if (ns4)
  {
    document.write("Netscape 4");
  }
  if (ns6)
  {
    document.write("Netscape 6");
  }
  if (ie4 && !ie5 && !ie6)
  {
    document.write("Internet Explorer 4");
  }
  if (ie5 && ie4 && !ie6)
  {
    document.write("Internet Explorer 5");
  }
  if (ie6)
  {
    document.write("Internet Explorer 6");
  }   
  if (!ie4 && !ie5 && !ie6 && !ns4 && !ns6)
  {
    document.write("Randgruppenbrowser :)");
  }

  return browser_version;
}


function getInternetExplorerVersion() 
{
    var rv = -1; // Return value assumes failure.
    if (navigator.appName == 'Microsoft Internet Explorer') 
    {
        var ua = navigator.userAgent;
        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
        if (re.exec(ua) != null)
            rv = parseFloat(RegExp.$1);
    }
    return rv;
}

function checkVersion() 
{
    var ver = getInternetExplorerVersion();
    if (ver > -1) 
    {
        if (ver >= 8.0)
            msg = "You're using a recent copy of Windows Internet Explorer."
        else
            msg = "You should upgrade your copy of Windows Internet Explorer.";
    }
  return browser_version;
}

function getBrowserDetails()
{
  var theBrowser = new Array();

  theBrowser.aName      = navigator.appName;
  theBrowser.codeName   = navigator.appCodeName;
  theBrowser.Name       = navigator.userAgent;
  theBrowser.version    = parseFloat(navigator.appVersion.substring(0,3));
  theBrowser.plattform  = navigator.plattform;

  return theBrowser;
}