<!--
//**********************************************************************
// SUGAMO：判別
//
// 2007.1.15
//**********************************************************************
// 変数：
// 関数：
//**********************************************************************
//--------------------------------------------------
// セッション判別
//--------------------------------------------------
var cNameFlag = "Flag";

var gCookie  = document.cookie+";";
var StrStart = gCookie.indexOf(cNameFlag);

//--------------------------------------------------
// Flash判別
//--------------------------------------------------
var theData = "";
var theName = "Flash";
var theDay  = 365;
var setDay  = new Date();

var theCookie = document.cookie+";";

var start = theCookie.indexOf(theName);
var end   = theCookie.indexOf(";",start);

theData = theCookie.substring(start+theName.length,end);

//--------------------------------------------------
// メイン処理
//--------------------------------------------------
if (StrStart != -1) {
	if (theData == '=H') {
		location.href = "./index_h.html";
	}
} else {
	document.cookie = cNameFlag + "=T;";

	if (start != -1) {

		if (theData == '=F') {
			location.href = "./index.html";
		}
		if (theData == '=H') {
			location.href = "./index_h.html";
		}

	} else {

		if( gFlNav != 0 ){
			if( gFlPlg == 1 ) {
				setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
				expDay = setDay.toGMTString();
				document.cookie = theName + "=F;expires="+expDay;
				location.href = "./index.html";
			} else if( gFlPlg == 0 ) {
				setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
				expDay = setDay.toGMTString();
				document.cookie = theName + "=H;expires="+expDay;
				location.href = "./index_h.html";
			}
		}

	}
}

//=============================================
// setHtmlCookie
//=============================================
function setHtmlCookie() {
	var theName = "Flash";
	var theDay  = 365;
	var setDay  = new Date();

	setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
	expDay = setDay.toGMTString();
	document.cookie = theName + "=H;expires="+expDay;
	location.href = "./index_h.html";
}

//**********************************************************************
-->