var agent = navigator.userAgent;
var appver = navigator.appVersion;

var nav = navigator.appName;
var plf = null;
var ver = null;
var IsW3CDOM = null;

if(agent.indexOf('Mac') != -1){
	plf = "Mac";
}else if(agent.indexOf('Win') != -1){
	plf = "Win";
}else{
	plf = "other";
}

if(agent.indexOf('MSIE') == -1){
	ver = appver.substring(0,4);
	if(nav == "Netscape"){
		nav = "NN";
	}
}else{
	ver = agent.substring((agent.indexOf('MSIE') + 5), (agent.indexOf('MSIE') + 9));
	nav = "MSIE";
}

if(ver.indexOf(';') != -1 || ver.indexOf(' ') != -1){
	ver = ver.substring(0,3);
}

if(document.getElementById){
	IsW3CDOM = true;
}
else{
	IsW3CDOM = false;
}

/*
plf ------> Platform                             ("win","mac","other") string
nav ------> Browser                              ("NN","MSIE","~")     string
IsW3CDOM -> Whether it's based on W3C-DOM or not (true,false) boorean
ver ------> Version                              The numerical value to the third place of a decimal

   It is effective at NN3 and IE4 and the higher version. In order to distinguish the lower 
version, you'd better check whether the variable of a return value is set up or not. when you want
to know whether it's Moz5 or not, you'd better check "nav" and "IsW3CDOM". It's sorry but you cannot
distinguish whether it is NN2 or IE3.

Browser checking script Ver.2.0.1
2002.12.11.
*/