function GetBrowser()
{
if (/Firefox[\/\s](\d+\.\d+)/.
{
var ffversion=new Number(RegExp.$1)
if (ffversion>=3)
alert("FF 3.x or above")
else if (ffversion>=2)
alert("FF 2.x")
else if (ffversion>=1)
alert("FF 1.x")
}
else if(/Chrome[\/\s](\d+\.\d+)/.
{
alert("Chrome.");
}
else if(/Opera[\/\s](\d+\.\d+)/.
{
alert("Opera");
}
else
{
alert(navigator.appName);
}
return false;
}
window.onload = GetBrowser;
Enjoy..............