﻿/*
###################################################################
#This javascript was made on January 31, 2003.
#It is responsible for a MEDAL Co,Ltd.
#Responsibility is not taken although use is free.
###################################################################
#Environment(browser name & varsion) check constructor &  method
###################################################################
*/

function Is_env(){
	/* os check */
	this.MAC = (navigator.userAgent.indexOf("Mac") != -1);
	//this.MAC68K = (this.MAC && (nv_usagnt.indexOf("68") != -1)); //Mac 68000, 68K
	this.PPC = (this.MAC && (navigator.userAgent.indexOf("PC") != -1)); //Mac_PowerPC, Mac PowerPC, PPC
	this.OSX = (this.PPC && (navigator.userAgent.indexOf("OS X") != -1));
	this.WIN = (navigator.userAgent.indexOf("Win") != -1);
	this.UNIX = (navigator.userAgent.indexOf("X11") != -1);

	this.GECKO = (navigator.userAgent.indexOf("Gecko") != -1);
	this.NETSCAPE = (navigator.userAgent.indexOf("Netscape") != -1);
	this.MICROSOFT = (navigator.appName.indexOf("Microsoft") != -1);

	this.LAYERS = (document.layers);
	this.DOCUMENT_ALL = (document.all);
	this.GET_ELEMENT_ID = (document.getElementById);

	/* version check */
	this.major = parseInt( navigator.appVersion );
	this.miner = parseFloat( navigator.appVersion );
	this.VENDOR = (navigator.vendorSub);

	//sniffer
	this.NN4_LOWER = (document.layers) ? true : false;
	this.NN6_UPPER = (document.getElementById && !document.all) ? true : false;
	this.IE4_LOWER = (document.all) ? true : false;
	this.IE5_UPPER = (document.getElementById && document.all) ? true : false;

	/* browser check */
	//netscape
	this.NN = (navigator.appName.charAt(0)=="N");
	this.IS_MOZILLA = (navigator.userAgent.indexOf('Mozilla')!=-1);

	this.NN3X = (this.NN && (this.major<=3) && this.IS_MOZILLA);
	this.NN4X = (this.NN && (this.major==4) && this.IS_MOZILLA);
	//this.NN401 = (this.NN4X && (this.miner==4.01));
	//this.NN403 = (this.NN4X && (this.miner==4.03));
	//this.NN404 = (this.NN4X && (this.miner==4.04));
	//this.NN405 = (this.NN4X && (this.miner==4.05));
	//this.NN406 = (this.NN4X && (this.miner==4.06));
	this.NN40X_LOW = (this.NN4X && (this.miner<=4.06));
	//this.NN45X_UP  = (this.NN4X && (this.miner>=4.5));
	//this.NN45X = (this.NN4X && (navigator.userAgent.indexOf("4.5") != -1));
	//for_english_&_UNIX_version_only
	//this.NN46X = (this.NN4X && (navigator.userAgent.indexOf("4.6") != -1));
	//this.NN47X = (this.NN4X (navigator.userAgent.indexOf("4.7") != -1));
	//this.NN470 = (this.NN4X && (this.miner==4.7));
	//this.NN473 = (this.NN4X && (this.miner==4.73));
	//this.NN475 = (this.NN4X && (this.miner==4.75));
	//this.NN478 = (this.NN4X && (this.miner==4.78));
	//not_japanese_version
	//this.NN48X = (this.NN4X && (this.miner==4.8));
	this.NN6X_UP = (this.NN && (this.major==5) && this.IS_MOZILLA && parseInt(this.VENDOR) >= 6);
	this.NN6X = (this.NN && (this.major==5) && this.IS_MOZILLA && (navigator.userAgent.indexOf("Netscape6/") != -1) && this.VENDOR);
	//this.NN60 = (this.NN6X && (navigator.userAgent.indexOf("6.0") != -1));
	//this.NN601 = (this.NN6X && (navigator.userAgent.indexOf("6.01") != -1));
	//this.NN61 = (this.NN6X && (navigator.userAgent.indexOf("6.1") != -1));
	//this.NN62 = (this.NN6X (navigator.userAgent.indexOf("6.2") != -1));
	//this.NN621 = (this.NN6X && (navigator.userAgent.indexOf("6.2.1") != -1));
	//this.NN623 = (this.NN6X && (navigator.userAgent.indexOf("6.2.3") != -1));
	this.NN7X = (this.NN && (this.major==5) && this.IS_MOZILLA && (navigator.userAgent.indexOf("Netscape/7") != -1) && this.VENDOR);
	//this.NN70X = (this.NN7X &&  (navigator.vendorSub == "7.0"));
	//this.NN701 = (this.NN7X && (navigator.vendorSub == "7.01"));
	//this.NN702 = (this.NN7X && (navigator.vendorSub == "7.02"));
	//this.NN71X = (this.NN7X && (navigator.vendorSub == "7.1"));
	//this.NN72X = (this.NN7X && (navigator.vendorSub == "7.2"));
	this.NN80B = (this.NN && (this.major>=5) && this.GECKO || (navigator.userAgent.indexOf("rv:1.7.5") != -1));
	this.NN8X = (this.NN && (this.major>=5) && this.GECKO && (navigator.userAgent.indexOf("Netscape/8") != -1) || (navigator.userAgent.indexOf("rv:1.7.5") != -1));
	this.NN801 = (this.NN8X && (navigator.userAgent.indexOf("8.0.1") != -1) || (navigator.vendorSub == "8.0.1"));
	this.NN802 = (this.NN8X && (navigator.userAgent.indexOf("8.0.2") != -1) || (navigator.vendorSub == "8.0.2"));
	this.NN8033 = (this.NN8X && (navigator.userAgent.indexOf("8.0.3.3") != -1) || (navigator.vendorSub == "8.0.3.3"));
	this.NN804 = (this.NN8X && (navigator.userAgent.indexOf("8.0.4") != -1) || (navigator.vendorSub == "8.0.4"));
	this.NN81 = (this.NN8X && (navigator.userAgent.indexOf("8.1") != -1) || (navigator.vendorSub == "8.1"));
	this.NN813 = (this.NN8X && (navigator.userAgent.indexOf("8.13") != -1));
	this.NN9X = (this.NN && (this.major>=5) && this.GECKO && (navigator.userAgent.indexOf("Netscape/9") != -1) || (navigator.userAgent.indexOf("rv:1.8.1") != -1));
	this.NN9BX = (this.NN9X && (navigator.userAgent.indexOf("9.0b3") != -1) || (navigator.userAgent.indexOf("rv:1.8.1.7") != -1));


	//ie
	this.EXPLORER = (navigator.appName.charAt(0)=="M");
	this.COMPATI  = (navigator.userAgent.indexOf("compatible") != -1);
	this.IS_MSIE  = (navigator.userAgent.indexOf('MSIE')!=-1);
	this.IE = (this.EXPLORER && this.COMPATI);

	//Is WinIE6 self-styled severity Mode
	this.CSS1COMP = (document.compatMode == "CSS1Compat");
	//Downward compatibility mode
	this.BACKCOMP = (document.compatMode == "BackCompat");

	this.IE3X = (this.IE && (this.major<4));
	this.IE4X = (this.IE && (this.major==4) && (navigator.userAgent.indexOf("MSIE 4") != -1));
	this.IE45 = (this.IE4X && this.MAC && (navigator.userAgent.indexOf("4.5") != -1));
	this.IE5X = (this.IE && (this.major==4) && (navigator.userAgent.indexOf("MSIE 5") != -1));
	this.IE5X_UP = (this.IE && parseInt(this.getBrowserVersion()) >= 5 );
	this.IE501 = (this.WIN && this.IE5X && (navigator.userAgent.indexOf("5.01") != -1));
	this.IE51X = (this.IE5X && this.MAC && this.PPC && (navigator.userAgent.indexOf("5.1") != -1));
	//this.IE516 = (this.IE5X && this.PPC && (navigator.userAgent.indexOf("5.16") != -1));
	//this.IE517 = (this.IE5X && this.PPC && (navigator.userAgent.indexOf("5.17") != -1));
	this.IE52X = (this.IE5X && this.MAC && this.PPC && (navigator.userAgent.indexOf("5.2") != -1));
	//this.IE522 = (this.IE5X && this.PPC && (navigator.userAgent.indexOf("5.22") != -1));
	//this.IE523 = (this.IE5X && this.PPC && (navigator.userAgent.indexOf("5.23") != -1));
	this.IE55 = (this.IE5X && (navigator.userAgent.indexOf("5.5") != -1));
	this.IE6X = (this.IE && (this.major==4) && (navigator.userAgent.indexOf("MSIE 6") != -1));
	this.IE7X = (this.IE && (this.major==4) && (navigator.userAgent.indexOf("MSIE 7") != -1));

	//mozilla
	this.MOZILLA = (this.GECKO && !this.NETSCAPE);
	//this.MOZI_11X = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.1") != -1));
	//this.MOZI_12X = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.2") != -1));
	//this.MOZI_14X = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.4") != -1));
	//this.MOZI_15X = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.5") != -1));
	//this.MOZI_16X = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.6") != -1));
	//this.MOZI_171 = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.7.1") != -1));
	//this.MOZI_175 = (this.MOZILLA && (navigator.userAgent.indexOf("rv:1.7.5") != -1));

	//opera
	this.OPERA = ((window.opera)||(this.COMPATI && (navigator.userAgent.indexOf("Opera") != -1)) && !this.VENDOR);
	this.OPERA5XLOW =(this.OPERA && !(document.plugins) && !(document.getElementById));
	this.OPERA6X =(this.OPERA && !(document.plugins) && (document.getElementById));
	this.OPERA7X =(this.OPERA && (document.plugins) && (document.getElementById) && !(document.createCDATASection));
	this.OPERA8X =(this.OPERA && (document.plugins) && (document.getElementById) && (document.createCDATASection));
	//this.OPERA801X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("8.01") != -1));
	//this.OPERA85X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("8.5") != -1));
	//this.OPERA852X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("8.52") != -1));
	//this.OPERA854X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("8.54") != -1));
	//this.OPERA90X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.00") != -1));
	//this.OPERA902X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.02") != -1));
	//this.OPERA910X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.10") != -1));
	//this.OPERA920X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.20") != -1));
	//this.OPERA921X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.21") != -1));
	//this.OPERA922X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.22") != -1));
	//this.OPERA923X =(this.OPERA && (document.plugins) && (navigator.userAgent.indexOf("9.23") != -1));

	//firefox
	//this.FIREBIRD = (this.GECKO && (navigator.userAgent.indexOf("Firebird/") != -1));
	this.FIREFOX = (this.MOZILLA && (navigator.userAgent.indexOf("Firefox/") != -1) && this.VENDOR);
	//this.FIREFOX08X = this.FIREFOX && (navigator.vendorSub == "0.8") && (navigator.userAgent.indexOf("rv:1.6") != -1);
	//this.FIREFOX08X = this.FIREFOX && (navigator.vendorSub == "0.9");
	//this.FIREFOX09X = this.FIREFOX && (navigator.vendorSub == "0.9.2") && (navigator.userAgent.indexOf("rv:1.7") != -1);
	//this.FIREFOX09X = this.FIREFOX && (navigator.vendorSub == "0.9.3");
	//this.FIREFOX10X = this.FIREFOX && (navigator.vendorSub == "1.0") && (navigator.userAgent.indexOf("rv:1.7.5") != -1);
	//this.FIREFOX106X = this.FIREFOX && (navigator.vendorSub == "1.0.6") && (navigator.userAgent.indexOf("rv:1.7.10") != -1);
	//this.FIREFOX154X = this.FIREFOX && (navigator.userAgent.indexOf("1.5.0.4") != -1) && (navigator.userAgent.indexOf("rv:1.8.0.4") != -1);
	//this.FIREFOX155X = this.FIREFOX && (navigator.userAgent.indexOf("1.5.0.5") != -1) && (navigator.userAgent.indexOf("rv:1.8.0.5") != -1);
	//this.FIREFOX156X = this.FIREFOX && (navigator.userAgent.indexOf("1.5.0.6") != -1) && (navigator.userAgent.indexOf("rv:1.8.0.6") != -1);
	//this.FIREFOX157X = this.FIREFOX && (navigator.userAgent.indexOf("1.5.0.7") != -1) && (navigator.userAgent.indexOf("rv:1.8.0.7") != -1);
	//this.FIREFOX157X = this.FIREFOX && (navigator.userAgent.indexOf("1.5.0.8") != -1) && (navigator.userAgent.indexOf("rv:1.8.0.8") != -1);
	//this.FIREFOX20BX = this.FIREFOX && (navigator.userAgent.indexOf("2.0b1") != -1) && (navigator.userAgent.indexOf("rv:1.8.1b1") != -1);
	//this.FIREFOX20X = this.FIREFOX && (navigator.userAgent.indexOf("2.0") != -1) && (navigator.userAgent.indexOf("rv:1.8.1") != -1);
	//this.FIREFOX2003X = this.FIREFOX && (navigator.userAgent.indexOf("2.0.0.3") != -1) && (navigator.userAgent.indexOf("rv:1.8.1.3") != -1);
	//this.FIREFOX2007X = this.FIREFOX && (navigator.userAgent.indexOf("2.0.0.7") != -1) && (navigator.userAgent.indexOf("rv:1.8.1.7") != -1);

	//iCab
	this.ICAB_NAME = (navigator.appName.indexOf("iCab") != -1);
	this.ICAB_J = (navigator.userAgent.indexOf("iCab J") != -1);
	this.ICAB_MOZ45 = (navigator.userAgent.indexOf("iCab") != -1);
	this.ICAB_MOZ40 = (this.IS_MSIE && (this.major==5) && (this.miner==5));
	this.ICAB_MOZ476 =(!this.GECKO && !this.NETSCAPE && (navigator.userAgent.indexOf("Mozilla/4.76") != -1));
	this.ICAB = (this.COMPATI && this.ICAB_NAME || this.ICAB_MOZ45 || this.ICAB_MOZ40 || this.ICAB_J || this.ICAB_MOZ476);

	//other
	this.SAFARI = (this.GECKO && (navigator.userAgent.indexOf("KHTML") != -1) && (navigator.userAgent.indexOf("Safari/") != -1));
	//this.SAFARI_856 = this.SAFARI && (navigator.userAgent.indexOf("85.6") != -1);
	//this.SAFARI_857 = this.SAFARI && (navigator.userAgent.indexOf("85.7") != -1);
	//this.SAFARI_8581 = this.SAFARI && (navigator.userAgent.indexOf("85.8.1") != -1);
	//this.SAFARI_1001 = this.SAFARI && (navigator.userAgent.indexOf("100.1") != -1);
	//this.SAFARI_124 = this.SAFARI && (navigator.userAgent.indexOf("125.12") != -1);
	//this.SAFARI_1251 = this.SAFARI && (navigator.userAgent.indexOf("125.1") != -1);
	//this.SAFARI_1258 = this.SAFARI && (navigator.userAgent.indexOf("125.8") != -1);
	//this.SAFARI_1259 = this.SAFARI && (navigator.userAgent.indexOf("125.9") != -1);
	//this.SAFARI_13 = this.SAFARI && (navigator.userAgent.indexOf("312") != -1);
	//this.SAFARI_2X = this.SAFARI && (navigator.userAgent.indexOf("412.2") != -1);
	//this.SAFARI_3X = this.SAFARI && (navigator.userAgent.indexOf("522.15.5") != -1);
	
	this.CAMINO = (this.OSX && this.GECKO && ((navigator.userAgent.indexOf("Chimera") != -1)));

	this.LUNASCAPE = this.COMPATI && (navigator.userAgent.indexOf("FunWebProducts") != -1);
	this.LUNASCAPE_MOZ = this.GECKO && (navigator.userAgent.indexOf("rv:1.7.2") != -1);

	//this.OMNIWEB = (this.COMPATI && navigator.userAgent.indexOf("OmniWeb") != -1);
	//this.HOTJAVA = (navigator.userAgent.indexOf("HotJava") != -1);
	//this.WEBTV = (this.COMPATI && (avigator.userAgent.indexOf("WebTV") != -1));
}

Is_env.prototype.getBrowserName = function(){
	var userBrowser = "";

	if( this.FIREFOX ) userBrowser = "Firefox";
	else if( this.MOZILLA ) userBrowser = "Mozilla";
	else if( this.OPERA ) userBrowser = "Opera";
	else if( this.NN4_LOWER || this.NN6_UPPER ) userBrowser = "Netscape";
	else if( this.MICROSOFT ) userBrowser = "Explorer";
	else if( this.ICAB ) userBrowser = "iCab";

	return userBrowser;
}

Is_env.prototype.getBrowserVersion = function(){
	var version    = "";
	var start      = 0;
	var end        = 0;
	var usrBrowser = this.getBrowserName();
	var usrAgent   = navigator.userAgent.toUpperCase();
	var appVersion = navigator.appVersion;
	
	if( usrBrowser.charAt(0) == "M" ){ //Mozilla
		start	= usrAgent.indexOf("RV:") +3;
		end 	= usrAgent.indexOf(")", start);
		version = usrAgent.substring(start, end);
	}else if( usrBrowser.charAt(0) == "F" ){
		start	= usrAgent.indexOf("FIREFOX/",0) +8;
		end 	= usrAgent.length;
		version = usrAgent.substring(start, end);
	}else if( this.NN4_LOWER ){
		start	= appVersion.indexOf(" ",0);
		version = appVersion.substring(0, start);
	}else if( this.NN6_UPPER ){
		version = this.VENDOR;
	}else if( this.OPERA ){
		start	= usrAgent.indexOf("OPERA ",0) +6;
		end 	= usrAgent.indexOf(" ",start);
		version = usrAgent.substring(start, end);
	}else if( usrBrowser.charAt(0) == "E" ){
		start	= appVersion.indexOf("MSIE ",0) +5;
		end 	= appVersion.indexOf(";",start);
		version = appVersion.substring(start, end);
	}else if( usrBrowser.charAt(0) == "i" ){
		start	= usrAgent.indexOf("iCab ",0) +8;
		end 	= usrAgent.indexOf("(",start);
		version = usrAgent.substring(start, end);
	}else if( this.SAFARI ){
		var ver = navigator.userAgent.split("/")[3];
		var n = eval(ver);
		if(n > 500) version = "3.0";
		if(n > 400) version = "2.0";
		if(n > 300) version = "1.3";
		if(n > 120) version = "1.2";
		if(n > 100) version = "1.1";
		if(n > 86)  version = "1.0";
	}else{
		return false;
	}

	return version;
}


Is_env.prototype.checkenv = function(){
	/* browser branch */
	if( this.MAC ){
		if( this.SAFARI ) return "mac_safari";
		else if( this.OPERA ) return "mac_opera";
		else if( this.MOZILLA ) return "mac_mozilla";
		else if( this.OSX && this.FIREFOX ) return "mac_firefox";
		else if( this.ICAB ) return "mac_icab";
		else if( this.IE3X ) return "mac_ie3_lower";
		else if( this.IE45 ) return "mac_ie45";
		else if( this.IE5X ) return "mac_ie5";
		else if( this.NN3X ) return "mac_ns3_lower";
		else if( this.NN4X ) return "mac_ns4";
		else if( this.NN6X ) return "mac_ns6";
		else if( this.NN7X ) return "mac_ns7";
		else if( this.NN8X ) return "mac_ns8";
	}else if( this.WIN ){
		if( this.OPERA ) return "win_opera";
		else if( this.MOZILLA ) return "win_mozilla";
		else if( this.FIREFOX ) return "win_firefox";
		else if( this.IE3X ) return "win_ie3_lower";
		else if( this.IE4X ) return "win_ie4";
		else if( this.IE5X ) return "mac_ie5";
		else if( this.IE6X ) return "mac_ie6";
		else if( this.NN3X ) return "win_ns3_lower";
		else if( this.NN4X ) return "win_ns4";
		else if( this.NN6X ) return "win_ns6";
		else if( this.NN7X ) return "win_ns7";
		else if( this.NN8X ) return "win_ns8";
	}else if( this.UNIX ){
		if( this.OPERA ) return "unix_opera";
		else if( this.MOZILLA ) return "unix_mozilla";
		else if( this.FIREFOX ) return "unix_firefox";
		else if( this.NN4X ) return "unix_ns4";
		else if( this.NN6X ) return "unix_ns6";
		else if( this.NN7X ) return "unix_ns7";
		else if( this.NN8X ) return "unix_ns8";
	}else{
		return "other_brws";
	}
}


Is_env.prototype.checkNN6UP = function(){
	var varsion = navigator.vendorSub;
	if( this.NN6X_UP || this.FIREFOX ){
		if((varsion != undefined)||(varsion != null)){
			return true;
		}
	}else{
		return false;
	}
}


/*
##########################################################################
#platform check constructor & method
#windows ME and XP have an inaccurate return value from NN4X or NN6.0.
########################################################################## 
*/
function Is_os(){
	var nv_usagnt = navigator.userAgent.toLowerCase();
	this.NN = (navigator.appName.charAt(0)=="N");
	this.IE = (navigator.appName.charAt(0)=="M");

	//Mac (68K, PPC, OSX)
	this.MAC = (nv_usagnt.indexOf("mac") != -1);
	this.MAC68K = (this.MAC && (nv_usagnt.indexOf("68") != -1)); //Mac 68000, 68K
	this.PPC = (this.MAC && (nv_usagnt.indexOf("pc") != -1)); //Mac_PowerPC, Mac PowerPC, PPC
	this.OSX = (this.MAC && (nv_usagnt.indexOf("os x") != -1));

	//Windows 9x (95, 98)
	this.WIN = ((nv_usagnt.indexOf("win") != -1) || (nv_usagnt.indexOf("windows ") != -1));
	this.WIN95 = (this.WIN && (nv_usagnt.indexOf("95") != -1));
	this.WIN98 = (this.WIN && (nv_usagnt.indexOf("98") != -1));

	//Windows CE
	this.COMPATI = (nv_usagnt.indexOf("compatible") != -1);
	this.WINCE = (this.WIN && this.COMPATI && (nv_usagnt.indexOf("ce") != -1));

	//Windows Me
	this.ME = (this.WIN98 && (nv_usagnt.indexOf("9x 4.90") != -1)); //for ie only
	this.ME_N6 = (this.WIN && (nv_usagnt.indexOf("9x 4.90") != -1)); //for nn6Up or mozilla only
	this.ME_OP = (this.WIN && (nv_usagnt.indexOf("me") != -1)); //for Opera only
	this.WINME = (this.ME || this.ME_N6 || this.ME_OP);

	//Windows NT4
	this.NT = (this.WIN && (nv_usagnt.indexOf("nt") != -1)); //for opera, ie
	this.NT4 = (this.NT && (nv_usagnt.indexOf("nt 4.0") != -1)); //ie 5.5
	this.WINNT = (this.WIN && (nv_usagnt.indexOf("winnt") != -1)); //for nn4.7Up only
	this.NT4X = (this.NT || this.NT4 || this.WINNT);

	//Windows 2000 (NT5)
	this.NT5 = (this.NT && (nv_usagnt.indexOf("nt 5.0") != -1)); //for ie or nn6.1Up only
	this.WIN2K_OP = (this.WIN && (nv_usagnt.indexOf("2000") != -1)); //for Opera only
	this.WIN2K = (this.NT5 || this.WIN2K_OP);
	
	//Windows XP (NT5.1)
	this.NT51 = (this.NT && (nv_usagnt.indexOf("nt 5.1") != -1)); //for ie or nn6.1Up only
	this.OP_XP = (this.WIN && (nv_usagnt.indexOf("xp") != -1)); //for Opera only
	this.WINXP = (this.NT51 || this.OP_XP);

	//Windows XP SP1
	this.WINXP_SP1 = this.IE && this.NT51 && (navigator.appMinorVersion.indexOf("SP1") != -1);

	//Windows XP SP2
	this.WINXPSP2 = this.IE && (navigator.appMinorVersion.indexOf("SP2") != -1);
	this.WINXP_SP2 = (this.NT51 && (navigator.userAgent.indexOf("SV1") != -1) || this.WINXPSP2);

	//Windows XP x64 Edition && Windows Server 2003
	this.NTX64 = (this.IE && this.NT && (nv_usagnt.indexOf("nt 5.2") != -1));
	
	//Windows Vista
	this.WINVISTA = (this.IE && this.NT && (nv_usagnt.indexOf("nt 6.0") != -1));

	//UNIX for NN or mozilla or Opera
	this.UNIX = (nv_usagnt.indexOf("x11") != -1);
	this.LINUX = (this.UNIX && (nv_usagnt.indexOf("linux") != -1));
	this.SUNOS = (this.UNIX && (nv_usagnt.indexOf("sunos") != -1));
	this.HP_UX = (this.UNIX && (nv_usagnt.indexOf("hp-ux") != -1));
	this.OSF1 = (this.UNIX && (nv_usagnt.indexOf("osf1") != -1));
	this.FREEBSD = (this.UNIX && (nv_usagnt.indexOf("freebsd") != -1));
	this.NETBSD = (this.UNIX && (nv_usagnt.indexOf("netbsd") != -1));
	this.IRIX = (this.UNIX && (nv_usagnt.indexOf("irix") != -1));

}


Is_os.prototype.checkPlatform = function(){

	myPlatform = new Array(
		new Array("Mac68K","MacPPC","MacOSX"), //mac
		new Array("WinCE","Win95","Win98","WinMe","WinNT4","Win2000","WinXP","WinX64","WinVista"), //win
		new Array("Linux","SunOS","HP-UX","OSF1","FreeBSD","NetBSD","IRIX"), //unix
		new Array("otherOS") //other
	);

	if(this.MAC68K) return myPlatform[0][0];
	else if(this.OSX) return myPlatform[0][2];
	else if(this.PPC) return myPlatform[0][1];

	else if(this.WINCE) return myPlatform[1][0];
	else if(this.WIN95) return myPlatform[1][1];
	else if(this.WINME) return myPlatform[1][3];
	else if(this.WIN98) return myPlatform[1][2];
	else if(this.WIN2K) return myPlatform[1][5];
	else if(this.WINXP) return myPlatform[1][6];
	else if(this.NTX64) return myPlatform[1][7];
	else if(this.WINVISTA) return myPlatform[1][8];
	else if(this.NT4X) return myPlatform[1][4];

	else if(this.LINUX) return myPlatform[2][0];
	else if(this.SUNOS) return myPlatform[2][1];
	else if(this.HP_UX) return myPlatform[2][2];
	else if(this.OSF1) return myPlatform[2][3];
	else if(this.FREEBSD) return myPlatform[2][4];
	else if(this.NETBSD) return myPlatform[2][5];
	else if(this.IRIX) return myPlatform[2][6];

	else return myPlatform[3][0];
}

/*
##################################################
#The script for branching Windows IE..
#In this case, the file of VBScript.
##################################################
*/

function check_vbscript( path ){
	var is = new Is_env();
	document.open("text/html");

	if(is.WIN && document.all && !is.OPERA){
		document.write('<script language="VBScript" type="text/VBScript" src="'+path+'lib/flashCheck.vbs"></scr'+'ipt>');
	}

	document.close();
}