function getbrowser()
{
	var isexplorer=4,ismac=0;
	var ua = window.navigator.userAgent;
  var uaos = navigator.userAgent;
	var an = window.navigator.appName;
	var bMSIE = false;

 // Is it IE?
	bMSIE=(ua.indexOf("MSIE")>=1);
  if (bMSIE)
  {
  // IE4
	  if ((ua.indexOf("MSIE 4.0")>=1)) isexplorer=4;
    else // IE5
    if ((ua.indexOf("MSIE 5.0")>=1)) isexplorer=5;
    else
    // IE5.5
    if ((ua.indexOf("MSIE 5.5")>=1)) isexplorer=5.5;
    //IE6
//    if ((ua.indexOf("MSIE 6.0")>=1)) isexplorer=6;
    else isexplorer=6;
  }
  else
  if (an == "Netscape")
  {
    appVer = parseInt(navigator.appVersion);
    if (appVer >= 4) isexplorer=-4;
    else
    if (appVer >= 3)isexplorer=-3;
    else isexplorer=-2;
  }

  if (isexplorer>0)		//is explorer
  {
      //IE supported OS's
		if ((uaos.indexOf("Windows 95")>=1) ||
    		(uaos.indexOf("Windows 98")>=1)	||
				(uaos.indexOf("Windows NT")>=1)	||
				(uaos.indexOf("Windows NT 5.1")>=1)||
				(uaos.indexOf("Windows 3.1")>=1)||
				(uaos.indexOf("Windows Me")>=1)) ismac=0;
		else
		if ((uaos.indexOf("Mac")>=1) ||
				(uaos.indexOf("Mac_68000")>=1) ||
    		(uaos.indexOf("Mac_PowerPC")>=1) ||
    		(uaos.indexOf("SunOS")>=1)) ismac=1;
 	}
	else		//is navigator
	{
	       // NSCP supporte OS's
		if ((uaos.indexOf("Win95")>=1) ||
	  		(uaos.indexOf("Win98")>=1) ||
	  		(uaos.indexOf("WinNT")>=1) ||
	  		(uaos.indexOf("Win16")>=1) ||
	  		(uaos.indexOf("WinMe")>=1)) ismac=0;
	  else
  	if ((uaos.indexOf("Mac")>=1))
	  {
		  if ((uaos.indexOf("68K")>=1) || (uaos.indexOf("PPC")>=1))
		  	ismac=1;
	  }
	     // BUGBUG: this doesn't find any of Netscape's Unix versions
	}
	return(isexplorer);
}
