﻿// Copyright (C) 2000 IBRAIN. All Rights Reserved. 
// 各ページの記載記事、写真の無断転載を禁じます。 

// 変数宣言
var BrowserId = '';
var OsId = '';
var BrowserVer = '';

// 環境設定
OsId = GetOsId();
BrowserId = GetBrowserId();
BrowserVer = GetBrowserVer(BrowserId);

/* プラウザーＩＤ取得 */
function GetBrowserId()
{
	// IE
	if(document.all)
	{
		outId = 'ie';	
	}
	// NN6～
	else if(document.getElementById)
	{
		outId = 'nn';
	}
	// NN4.X
	else if(document.layers)
	{
		outId = 'nn4';
	}
	else
	{
		outId = 'other';
	}

	return outId;
}
/*-----------------------------------------------------------------------*/

/* ブラウザバージョン取得 */
function GetBrowserVer(inBrowserId)
{
	var s = 0;
	var e = 0;
	var theAppVer;
	var theVer = 0;

	if (inBrowserId == "nn" || inBrowserId == "nn4")
	{
		theAppVer  = navigator.appVersion;
		s = theAppVer.indexOf(" ",0);
		theVer = eval(theAppVer.substring(0,s));
		if(theVer >= 5){theVer++;}
	}
	if (inBrowserId == "ie")
	{
		theAppVer  = navigator.userAgent;
		s = theAppVer.indexOf("MSIE ",0) + 5;
		e = theAppVer.indexOf(";",s);
		theVer = eval(theAppVer.substring(s,e));
	}

	return theVer;
}
/*-----------------------------------------------------------------------*/

/* ＯＳＩＤの取得 */
function GetOsId()
{
	// Windows
	if(navigator.userAgent.indexOf('Win') >= 0)
	{
		outOsId = 'win';
	}
	// Mac
	else if(navigator.userAgent.indexOf('Mac') >= 0)
	{
		outOsId = 'mac';
	}
	else
	{
		outOsId = 'other';
	}

	return outOsId;
}
/*-----------------------------------------------------------------------*/
