/*written by xp in 8z at Mar 4,2010.QQ: 251089096*/
var sUserAgent = navigator.userAgent;
var isIE=isIE6=isIE7=isIE8=isFirefox=false;
if(sUserAgent.indexOf("MSIE") > -1){
isIE = true;
var version = sUserAgent.substr(sUserAgent.indexOf("MSIE") 5,3);
if(version == "6.0"){isIE6=true;}
if (version == "7.0"){isIE7=true;}
if(version == "8.0"){isIE8=true;}
}
if(sUserAgent.indexOf("Firefox") > ; -1){isFirefox=true;}
Usage guidelines:
if(isIE)
{
Statement body
}
if(isIE6)
{
Statement body
}
if(isIE7)
{
Statement body
}
if(isIE8)
{
Statement body
}
if(isFirefox)
{
Statement body
}