var JsImgDirectory = JsDirectory + "img/";


//___________________________________________________________■■ [ Distinction ]
JsFlag = "other";
var AN  = navigator.appName.toUpperCase();
var JsVersion = navigator.appVersion;
if( AN.indexOf( "NETSCAPE" ) >= 0 ){
	JsVersion = eval( JsVersion.substring( 0 , JsVersion.indexOf( " " , 0 ) ) );
	if( JsVersion >= 5 ) JsVersion++;
	if( ( JsVersion >= 4 ) && ( JsVersion < 5 ) ){
		JsFlag = "nn4";
	}
	else{
		JsFlag = "nn6";
	}
}
if( AN.indexOf( "MICROSOFT" ) >= 0 ){
	JsFlag = "ie";
}


//___________________________________________________________■■ [ Array ]
//______________________________■■ [ ForLayerClear ]
DivStyle = [
	"HideLayer1",
	"HideLayer2",
	"HideLayer3",
	"HideLayer4",
	"Layer1x2",
	"Layer1x3",
	"Layer1x4",
	"Layer2x2",
	"Layer2x3",
	"Layer2x4",
	"Layer3x2",
	"Layer3x3",
	"Layer3x4",
	"ChildLayer1",
	"ChildLayer2",
	"ChildLayer3"
]
//______________________________■■ [ Layer ]
LayerData = [
	[],
	[
	"",
	"<a href='" + JsDirectory + "business/index.html'><img src='"  +  JsImgDirectory  +  "menu_02_02.gif' width='137' height='30' alt='ビジネススタイル' border='0'></a>",
	"<a href='" + JsDirectory + "business/index.html'><img src='"  +  JsImgDirectory  +  "menu_02_03.gif' width='137' height='30' alt='ビジネススタイル' border='0'></a>",
	"<a href='" + JsDirectory + "business/index.html' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "menu_02_04.gif' width='137' height='30' alt='ビジネススタイル' border='0'></a>"
	],
	[
	"",
	"<a href='" + JsDirectory + "product/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_02.gif' width='137' height='30' alt='プロダクト紹介' border='0'></a>",
	"<a href='" + JsDirectory + "product/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_03.gif' width='137' height='30' alt='プロダクト紹介' border='0'></a>",
	"<a href='" + JsDirectory + "product/index.html' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "menu_03_04.gif' width='137' height='30' alt='プロダクト紹介' border='0'></a>"
	],
	[
	"",
	"<a href='" + JsDirectory + "quants/index.html'><img src='"  +  JsImgDirectory  +  "menu_04_02.gif' width='137' height='30' alt='クォンツリサーチとは' border='0'></a>",
	"<a href='" + JsDirectory + "quants/index.html'><img src='"  +  JsImgDirectory  +  "menu_04_03.gif' width='137' height='30' alt='クォンツリサーチとは' border='0'></a>",
	"<a href='" + JsDirectory + "quants/index.html' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "menu_04_04.gif' width='137' height='30' alt='クォンツリサーチとは' border='0'></a>"
	]
]
//______________________________■■ [ ChildLayer ]
ChildLayerData = [
	[],
	[
	"",
	"<a href='" + JsDirectory + "business/index.html'><img src='"  +  JsImgDirectory  +  "menu_02_s01.gif' width='45' height='11' alt='ポリシー' border='0'></a>",
	"<a href='" + JsDirectory + "business/field.html'><img src='"  +  JsImgDirectory  +  "menu_02_s02.gif' width='52' height='11' alt='フィールド' border='0'></a>",
	"<a href='" + JsDirectory + "business/solution.html''><img src='"  +  JsImgDirectory  +  "menu_02_s03.gif' width='73' height='11' alt='ソリューション' border='0'></a>",
	"<a href='" + JsDirectory + "business/core.html'><img src='"  +  JsImgDirectory  +  "menu_02_s04.gif' width='91' height='11' alt='コア・コンピタンス' border='0'></a>"
	],
	[
	"",
	"<a href='" + JsDirectory + "product/stock/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s01.gif' width='11' height='11' alt='株' border='0'></a>",
	"<a href='" + JsDirectory + "product/invest/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s02.gif' width='45' height='11' alt='投資信託' border='0'></a>",
	"<a href='" + JsDirectory + "product/iss/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s03.gif' width='23' height='11' alt='保険' border='0'></a>",
	"<a href='" + JsDirectory + "product/re/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s04.gif' width='55' height='11' alt='不動産評価' border='0'></a>",
	"<a href='" + JsDirectory + "product/corp/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s05.gif' width='45' height='11' alt='企業評価' border='0'></a>",
	"<a href='" + JsDirectory + "product/asset/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s06.gif' width='108' height='11' alt='アセットロケーション' border='0'></a>",
	"<a href='" + JsDirectory + "product/model/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s07.gif' width='54' height='11' alt='運用モデル' border='0'></a>",
	"<a href='" + JsDirectory + "product/case/index.html'><img src='"  +  JsImgDirectory  +  "menu_03_s08.gif' width='46' height='11' alt='事例紹介' border='0'></a>"
	],
	[
	"",
	"<a href='" + JsDirectory + "quants/index.html'><img src='"  +  JsImgDirectory  +  "menu_04_s01.gif' width='47' height='11' alt='会社概要' border='0'></a>",
	"<a href='" + JsDirectory + "quants/culture.html'><img src='"  +  JsImgDirectory  +  "menu_04_s02.gif' width='54' height='11' alt='カルチャー' border='0'></a>",
	"<a href='" + JsDirectory + "quants/profile.html'><img src='"  +  JsImgDirectory  +  "menu_04_s03.gif' width='98' height='11' alt='起業者プロフィール' border='0'></a>",
	"<a href='" + JsDirectory + "quants/quants.html'><img src='"  +  JsImgDirectory  +  "menu_04_s04.gif' width='85' height='11' alt='クォンツ手法とは' border='0'></a>",
	"<a href='" + JsDirectory + "quants/news.html'><img src='"  +  JsImgDirectory  +  "menu_04_s05.gif' width='43' height='11' alt='ニュース' border='0'></a>",
	"<a href='" + JsDirectory + "quants/recruit.html'><img src='"  +  JsImgDirectory  +  "menu_04_s06.gif' width='46' height='11' alt='採用情報' border='0'></a>"
	]
]


//___________________________________________________________■■ [ Preload ]
var LayerImg1 = new Array();
var LayerImg2 = new Array();
var LayerImg3 = new Array();
var ChildLayerImg = new Array();

for( Roop = 1; Roop < LayerData.length; Roop ++ ){
	 LayerImg1[ Roop ] = new Image();
	 LayerImg1[ Roop ].src = JsImgDirectory  +  "menu_0"  + parseInt( Roop +1 ) + "_02.gif";
	 LayerImg2[ Roop ] = new Image();
	 LayerImg2[ Roop ].src = JsImgDirectory  +  "menu_0"  + parseInt( Roop +1 ) + "_03.gif";
	 LayerImg3[ Roop ] = new Image();
	 LayerImg3[ Roop ].src = JsImgDirectory  +  "menu_0"  + parseInt( Roop +1 ) + "_04.gif";
	for( Roop0 = 1; Roop0 < ChildLayerData[ Roop ].length; Roop0 ++ ){
		 ChildLayerImg[ Roop0 ] = new Image();
		 ChildLayerImg[ Roop0 ].src = JsImgDirectory  +  "menu_0"  + parseInt( Roop +1 ) + "_s0" + Roop0 + ".gif";
	}
}


//___________________________________________________________■■ [ DocumentWrite ]
with( document ){
//______________________________■■ [ HideLayer ]
	write("<div id='HideLayer1'><a href='javascript:void(0);' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "space.gif' width='700' height='35' border='0' alt='' title=''></a></div>");
	write("<div id='HideLayer2'><a href='javascript:void(0);' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "space.gif' width='20' height='60' border='0' alt='' title=''></a></div>");
	write("<div id='HideLayer3'><a href='javascript:void(0);' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "space.gif' width='50' height='60' border='0' alt='' title=''></a></div>");
	write("<div id='HideLayer4'><a href='javascript:void(0);' onmouseover='JsMouseOut();'><img src='"  +  JsImgDirectory  +  "space.gif' width='700' height='50' border='0' alt='' title=''></a></div>");
	for( Roop1 = 1; Roop1 < LayerData.length; Roop1 ++ ){
//______________________________■■ [ Layer ]
		write("<div id='Layer" + Roop1  +  "x2'>" +  eval( "LayerData[" + Roop1 + "][1]" ) + "</div>");
		write("<div id='Layer" + Roop1  +  "x3'>" +  eval( "LayerData[" + Roop1 + "][2]" ) + "</div>");
		write("<div id='Layer" + Roop1  +  "x4'>" +  eval( "LayerData[" + Roop1 + "][3]" ) + "</div>");
//______________________________■■ [ ChildLayer ]
		write("<div id='ChildLayer" + Roop1  +  "'>");
		write("<table cellpadding='0' cellspacing='0' border='0'>");
		write("<tr>");
		write("<td><img src='"  +  JsImgDirectory  +  "space.gif' width='1' height='9' alt=''></td>");
		write("</tr>");
		write("<tr>");
		write("<td>");
		write("<table cellpadding='0' cellspacing='0' border='0'>");
		write("<tr>");
		write("<td><img src='"  +  JsImgDirectory  +  "space.gif' width='21' height='1' alt=''></td>");
		for( Roop2 = 1; Roop2 < ChildLayerData[ Roop1 ].length; Roop2 ++ ){
			write("<td><img src='"  +  JsImgDirectory  +  "h_arrow.gif' width='21' height='11' alt=''></td>");
			write("<td>" + eval( "ChildLayerData[" + Roop1 + "][" + Roop2 + "]" ) + "</td>");
		}
		write("</tr>");
		write("</table>");
		write("</td>");
		write("</tr>");
		write("<tr>");
		write("<td><img src='"  +  JsImgDirectory  +  "space.gif' width='1' height='8' alt=''></td>");
		write("</tr>");
		write("</table>");
		write ("</div>");
	}
}


//___________________________________________________________■■ [ ChangeLayer ]
function JsLayerShow( LayerName , ZIndex){
	if( JsFlag == "other" ){
	return;
	}
	if( JsFlag == "ie" ){
		document.all[ LayerName ].style.visibility = 'visible';
		document.all[ LayerName ].zIndex = ZIndex;
	}
	else if( JsFlag == "nn4" ){
		document.layers[ LayerName ].visibility = 'show';
		document.layers[ LayerName ].zIndex = ZIndex;
	}
	else if( JsFlag == "nn6" ){
		document.getElementById( LayerName ).style.visibility = 'visible';
		document.getElementById( LayerName ).zIndex = ZIndex;
	}
	else{
		document.all[ LayerName ].style.visibility = 'visible';
		document.all[ LayerName ].zIndex = ZIndex;
	}
}


//___________________________________________________________■■ [ LayerClear ]
function JsLayerClear(){
	if( JsFlag == "other" ){
	return;
	}
	if( JsFlag == "ie" ){
		for( Roop3 = 0; Roop3 < DivStyle.length; Roop3++ ){
			document.all[ eval("DivStyle[" + Roop3 + "]" ) ].style.visibility = 'hidden';
			document.all[ eval("DivStyle[" + Roop3 + "]" ) ].zIndex = 3;
		}
	}
	else if( JsFlag == "nn4" ){
		for( Roop3 = 0; Roop3 < DivStyle.length; Roop3++ ){
			document.layers[ eval("DivStyle[" + Roop3 + "]" ) ].visibility = 'hide';
			document.layers[ eval("DivStyle[" + Roop3 + "]" ) ].zIndex = 3;
		}
	}
	else if( JsFlag == "nn6" ){
		for( Roop3 = 0; Roop3 < DivStyle.length; Roop3++ ){
			document.getElementById( eval("DivStyle[" + Roop3 + "]" ) ).style.visibility = 'hidden';
			document.getElementById( eval("DivStyle[" + Roop3 + "]" ) ).zIndex = 3;
		}
	}
	else{
		for( Roop3 = 0; Roop3 < DivStyle.length; Roop3++ ){
			document.all[ eval("DivStyle[" + Roop3 + "]" ) ].style.visibility = 'hidden';
			document.all[ eval("DivStyle[" + Roop3 + "]" ) ].zIndex = 3;
		}
	}
}


//___________________________________________________________■■ [ SetUp ]
//______________________________■■ [ Current ]
function JsCurrentLayer( LayerName ){
	var Current = "Layer" + LayerName + "x3";
	var ChildlCurrent = "ChildLayer" + LayerName;
	JsLayerShow( Current , 3 );
	JsLayerShow( ChildlCurrent , 3 );
}
//______________________________■■ [ MouseOver ]
function JsMouseOver( LayerName ){
	JsLayerClear();
	if( LayerName != "" ){
		JsLayerShow( "HideLayer1" , 4 );
		JsLayerShow( "HideLayer2" , 4 );
		JsLayerShow( "HideLayer3" , 4 );
		JsLayerShow( "HideLayer4" , 4 );
		var Change = "Layer" + LayerName + "x2";
		var ChildlChange= "ChildLayer" + LayerName;
		JsLayerShow( Change , 4 );
		JsLayerShow( ChildlChange , 4 );
	}
	if( JsCurrentFlag != "" ){
		var Current = "Layer" + JsCurrentFlag + "x4";
		JsLayerShow( Current , 3 );
	}
}
//______________________________■■ [ MouseOut ]
function JsMouseOut(){
	JsLayerClear();
	if( JsCurrentFlag != "" ){
		var Current = "Layer" + JsCurrentFlag + "x3";
		var ChildlCurrent = "ChildLayer" + JsCurrentFlag;
		JsLayerShow( Current , 3 );
		JsLayerShow( ChildlCurrent , 3 );
	}
}


//___________________________________________________________■■ [ Onload ]
if( JsCurrentFlag != "" ){
	JsCurrentLayer( JsCurrentFlag )
}


//___________________________________________________________■■ [ NN4 ]
window.focus();
if ( document.layers && !window.saveInnerWidth ){
	window.onresize = resizeIt;
	window.saveInnerWidth = window.innerWidth;
	window.saveInnerHeight = window.innerHeight;
}
function resizeIt(){
	if ( saveInnerWidth < window.innerWidth || saveInnerWidth > window.innerWidth || saveInnerHeight > window.innerHeight || saveInnerHeight < window.innerHeight ){
	parent.location.reload();
	}
}


//___________________________________________________________■■ [ RollOver ]
//______________________________■■ [ preload ]
function JsPreimg(){
var loadcomp = false;
	var preload = new Array();
	for(i = 0 ; i < preloadlist.length ; i++) {
		preload[i] = new Image();
		preload[i].src = preloadlist[i];
	}
	loadcomp = true;
}

var preloadlist = new Array
	(
	JsImgDirectory + 'menu_01.gif',
	JsImgDirectory + 'menu_01_on.gif',
	JsImgDirectory + 'menu_05.gif',
	JsImgDirectory + 'menu_05_on.gif',
	JsImgDirectory + 'menu_06.gif',
	JsImgDirectory + 'menu_06_on.gif'
	);
JsPreimg();

//______________________________■■ [ RollOver ]
function JsRollOver( RollData1 , RollData2 ){
	if( RollData2 ==  "on" ){
		document.images[ RollData1 ].src = JsImgDirectory + RollData1 + "_on.gif";
		JsMouseOver('');
	}
	else{
		document.images[ RollData1 ].src = JsImgDirectory + RollData1 + ".gif";
		JsMouseOut();
	}
}



