﻿// Softplanner Co.,Ltd. OFFENSE.NET WebAnalyzer.js //
// CodeWriter:Koike//

function GetStatus() {	



	//ブラウザ判別//
	var ua = navigator.userAgent;
	var BrowserName = "";
	var OperationSystemName = "";
	
	if (ua.match(/Opera[\/\s](\d\.\d+)/)) {
		//Opera//
		BrowserName = "Opera " + (RegExp.$1); }
	
	else if (ua.match(/MSIE (\d\.\d+)/)) {
		//Internet Explorer//
		BrowserName = "InternetExplorer " + (RegExp.$1); }
	
	else if (ua.match(/Mozilla\/(4\.[5678]\d?)/)) {
		//NetscapeCommunicator//
		BrowserName = "NetscapeCommunicator " + RegExp.$1; }
	
	else if (ua.match(/Netscape6?\/([\.\d]+)/)) {
		//Netscape//
		BrowserName = "Netscape " + RegExp.$1; }
	
	else if (ua.match(/Safari\/([\.\d]+)/)) {
		//Safari//
		BrowserName = "Safari " + RegExp.$1; }
		
	else if (ua.match(/Gecko/)) {
		//Mozilla//
		if (ua.match(/(Firebird|Firefox)\/([\.\d]+)/)) {
			BrowserName = "Mozilla " + RegExp.$1 + " " + RegExp.$2; }
		
		else if (ua.match(/Thunderbird\/([\.\d]+)/)) { BrowserName = "MozillaThunderbird " + RegExp.$1; }
		
		else if (ua.match(/rv:([\.\d]+)/)) { BrowserName = "Mozilla " + RegExp.$1;	}
		
		else {	BrowserName = "Mozilla"; }
		
	} else { BrowserName = "Unknown"; }


	//OS判別//
	if (ua.match(/Win(dows )?NT 6\.0/)) {
		// Windows Vista の処理
		OperationSystemName = "WindowsVista";}
	else if (ua.match(/Win(dows )?NT 5\.2/)) {
		// Windows Server 2003 の処理
		OperationSystemName = "WindowsServer2003";}
	else if (ua.match(/Win(dows )?(NT 5\.1|XP)/)) {
		// Windows XP の処理
		OperationSystemName = "WindowsXP";}
	else if (ua.match(/Win(dows)? (9x 4\.90|ME)/)) {
		// Windows ME の処理
		OperationSystemName = "WindowsME";}
	else if (ua.match(/Win(dows )?(NT 5\.0|2000)/)) {
		// Windows 2000 の処理
		OperationSystemName = "Windows2000";}
	else if (ua.match(/Win(dows )?98/)) {
		// Windows 98 の処理
		OperationSystemName = "Windows98";}
	else if (ua.match(/Win(dows )?NT( 4\.0)?/)) {
		// Windows NT の処理
		OperationSystemName = "WindowsNT";}
	else if (ua.match(/Win(dows )?95/)) {
		// Windows 95 の処理
		OperationSystemName = "Windows95";}
	else if (ua.match(/Mac|PPC/)) {
		// Macintosh の処理
		OperationSystemName = "MacOS";}
	else if (ua.match(/Linux/)) {
		// Linux の処理
		OperationSystemName = "Linux";}
	else if (ua.match(/(Free|Net|Open)BSD/)) {
		// BSD 系の処理
		OperationSystemName = RegExp.$1 + "BSD";}
	else if (ua.match(/SunOS/)) {
		// Solaris の処理
		OperationSystemName = "Solaris";}
	else {
		// 上記以外 OS の処理
		OperationSystemName = "Unknown";}

	strwork = "<img src='http://61.205.233.201/fcars/OffenseNet/WebAnalyzer/AccessGetter.aspx";
	//strwork = "<img src='http://localhost/OffenseNet/WebAnalyzer/AccessGetter.aspx";
	strwork = strwork + "?HOST=" + location.hostname + "&PATH=" + location.pathname + "&BROWSER=" + BrowserName ;
	strwork = strwork + "&OS=" + OperationSystemName + "&REFERER=" + document.referrer + "' Border='0'/>";
	return strwork;
}
