//1-カテゴリースイッチとリンクの配列
var ctgli=new Array();

var cbtn=new Array();
cbtn[0]=new Image();cbtn[0].src="../../image/e/ctg01.gif";
cbtn[1]=new Image();cbtn[1].src="../../image/e/ctg01-on.gif";
cbtn[2]=new Image();cbtn[2].src="../../image/e/ctg02.gif";
cbtn[3]=new Image();cbtn[3].src="../../image/e/ctg02-on.gif";
cbtn[4]=new Image();cbtn[4].src="../../image/e/ctg03.gif";
cbtn[5]=new Image();cbtn[5].src="../../image/e/ctg03-on.gif";
cbtn[6]=new Image();cbtn[6].src="../../image/e/ctg04.gif";
cbtn[7]=new Image();cbtn[7].src="../../image/e/ctg04-on.gif";
cbtn[8]=new Image();cbtn[8].src="../../image/e/ctg05.gif";
cbtn[9]=new Image();cbtn[9].src="../../image/e/ctg05-on.gif";


//2-選択マークの配列と画像ソース
var icon=new Array();
icon[0]=new Image();icon[0].src="../../image/off.gif";
icon[1]=new Image();icon[1].src="../../image/yell.gif";

//3-カテゴリー別の項目の配列
var msg0=new Array();
var msg1=new Array();
var msg2=new Array();
var msg3=new Array();
var msg4=new Array();

var li0=new Array();
var li1=new Array();
var li2=new Array();
var li3=new Array();
var li4=new Array();


//5-カテゴリボタンのリンク
ctgli[0]="../../topics/index.html";
ctgli[1]="../../profile/index.html";
ctgli[2]="../../prof/culture/index.html";
ctgli[3]="../../tech/index.html";
ctgli[4]="../../ir/index.html";


//6-カテゴリボタンの数
var sw=5;

/******************************************
	項目名とリンクのデータ入力
******************************************/
//---------------------------------------------------------------
//-topics

msg0[0]="Kajima's Comment";li0[0]="../../topics/index.html";
msg0[1]="KAJIMA News & Notes";li0[1]="../../topics/news_notes/index.html";

//---------------------------------------------------------------
//-Corporate Profile

msg1[0]="KAJIMA CORPORATION Corporate Profile";li1[0]="../../profile/overview/index.html";
msg1[1]="Corporate Data";li1[1]="../../profile/data/index.htm";
msg1[2]="Contracting Worldwide";li1[2]="../../profile/contract_worldwide/index.htm";
msg1[3]="Global Network";li1[3]="../../profile/network/index.htm";
msg1[4]="Principal Domestic Subsidiaries and Affiliates";li1[4]="../../profile/data/psa.htm";
msg1[5]="Annual Report";li1[5]="../../ir/annual/index.html";
msg1[6]="KAJIMA Environmental and Social Report";li1[6]="../../prof/environment/index.html";
msg1[7]="Employment Opportunities";li1[7]="../../profile/index.html";

//---------------------------------------------------------------
//-Culture&Sports

msg2[0]="Atsumi International Scholarship Foundation";li2[0]="http://www.aisf.or.jp/index.html";
msg2[1]="The KAJIMA Sculpture Contest";li2[1]="../../prof/culture/sculpture/index.html";
msg2[2]="KAMEYAMA HONTOKUJI TEMPLE";li2[2]="../../prof/culture/hontoku/index.html";
msg2[3]="FREUD AS COLLECTOR";li2[3]="../../prof/culture/freud/index.html";
msg2[4]="Anita Graffman";li2[4]="../../prof/culture/anita/index.html";
msg2[5]="2001:An Urban Odyssey";li2[5]="../../gallery/chronopolis/en/index-e.html";

//---------------------------------------------------------------
//-Technologies

msg3[0]="KAJIMA DESIGN NEWSLETTER";li3[0]="../../news/newsletter/index.html";
msg3[1]="KAJIMA TECHNICAL RESEARCH INSTITUTE";li3[1]="../../tech/katri/index.html";
msg3[2]="Great Hanshin Earthquake Review";li3[2]="../../tech/hanshin_earthquake/index.html";
msg3[3]="CG GALLERY";li3[3]="../../tech/cg_gallery/index.html";

//---------------------------------------------------------------
//-IR

msg4[0]="Medium-term Business Plan";li4[0]="../../ir/newplan/index.html";
msg4[1]="IR Calendar";li4[1]="../../ir/calendar/index.html";
msg4[2]="Financial Results";li4[2]="../../ir/finance/index.html";
msg4[3]="Supplements to Financial Results";li4[3]="../../ir/fact/index.html";
msg4[4]="Quarterly Business Performance Report";li4[4]="../../ir/quarterly/index.html";
msg4[5]="Announcements";li4[5]="../../ir/info/index.html";
msg4[6]="Annual Report";li4[6]="../../ir/annual/index.html";

/******************************************
	項目名とリンクのデータ入力ここまで
******************************************/


function tover(n)
{

	if(document.getElementById)
	{
		document.getElementById('menu'+n).style.visibility="visible";
		setctg(n);
	}	

	if(document.all)
	{
		document.all['menu'+n].style.visibility="visible";
		setctg(n);
	}
	
	if(document.layers)
	{
		document.layers['btn'+n].visibility="show";
		document.layers['menu'+n].visibility="show";
		document.layers['area'+n].visibility="show";
		document.layers['bck'+n].visibility="show";
	}

}

function tout(n)
{

	if(document.getElementById)
	{
		document.getElementById('menu'+n).style.visibility="hidden";
		hidectg(n);
	}
	if(document.all)
	{
		document.all['menu'+n].style.visibility="hidden";
		hidectg(n);
	}
	if(document.layers)
	{
		document.layers['btn'+n].visibility="hide";
		document.layers['menu'+n].visibility="hide";
		document.layers['area'+n].visibility="hide";
		document.layers['bck'+n].visibility="hide";
	}

}


function hideall()
{	
		if(navigator.appVersion.charAt(0)>3)
		{
			for(s=0;s<sw;s++)
					{
						document.layers['menu'+s] .visibility = "hide";
						document.layers['area'+s] .visibility = "hide";
						document.layers['btn'+s] .visibility = "hide";
						document.layers['bck'+s] .visibility = "hide";
					}
		}

}

function setctg(n)
{
	num=n*2;
	document['sw'+n].src=cbtn[num+1].src;
}

function hidectg(n)
{
	num=n*2;
	document['sw'+n].src=cbtn[num].src;
}



//11-選択マーク表示
function seticon(lay,btn)
{
	document[btn+'on'+lay].src=icon[1].src;
}

//12-選択マークなし
function hideicon(lay,btn)
{
	document[btn+'on'+lay].src=icon[0].src;
}


//---------------------------------------------------------------
//ie用レイヤー

function Layie(t)
{

	mlen=eval("msg"+t+".length"); //項目数のカウント

	Laytag = '<DIV ID="menu'+t+'"';
	Laytag += 'onmouseover="tover('+t+')" onmouseout="tout('+t+')">';
	Laytag +='<TABLE border = "0" cellpadding = "0" cellspacing = "0" width="330">';

	for(i=0;i<mlen;i++)
	{
		msg=eval("msg"+t+"[i]");
		li=eval("li"+t+"[i]");
		Laytag +='<TR Valign="middle" Halign="left">';
		Laytag +='<TD height="22" bgcolor ="#CCCCCC" class="lbox">';
		Laytag +='<A HREF ='+li+' onMouseOver = "seticon('+t+','+i+')"';
		Laytag +='onMouseOut = "hideicon('+t+','+i+')" class=fs12px>';
		Laytag +='<img src="../../image/off.gif" name="'+i+'on'+t+'" hspace="5" border="0">';
		Laytag +=''+msg+'</A></TD>';
		Laytag +='</TR>';
	}
	
	Laytag += '</TABLE>';
	
	Laytag += "</DIV>";
	document.write(Laytag);

}


var ctg=new Array();
ctg[0]=new Image();ctg[0].src=cbtn[1].src;
ctg[1]=new Image();ctg[1].src=cbtn[3].src;
ctg[2]=new Image();ctg[2].src=cbtn[5].src;
ctg[3]=new Image();ctg[3].src=cbtn[7].src;
ctg[4]=new Image();ctg[4].src=cbtn[9].src;

//---------------------------------------------------------------
//nc用レイヤー


function Laynn(t)
{
	mlen=eval("msg"+t+".length"); //項目数のカウント


//---------------------------------------------------------------
//13-1-カテゴリーボタン反転
	Laytag = '<DIV ID="btn'+t+'">';
	Laytag +='<A HREF = '+ctgli[t]+' onMouseOver = "tover('+t+')">';
	ctgimg=ctg[t].src;
	Laytag +='<img src='+ctgimg+' border="0"></A><BR>';
	Laytag += "</DIV>";


//---------------------------------------------------------------
//13-2-メニューのテキスト

	Laytag += '<DIV ID="menu'+t+'">';
	Laytag +='<TABLE border = "0" cellpadding = "0" cellspacing = "0" width="330">';

	for(i=0;i<mlen;i++)
	{
		msg=eval("msg"+t+"[i]");
		Laytag +='<TR Valign="middle" Halign="left">';
		Laytag +='<TD  height="22" bgcolor ="#CCCCCC" width="20" align="center">';
		Laytag +='<img src="../../image/off.gif" name="'+i+'on'+t+'"></TD>';
		Laytag +='<TD  height="22" bgcolor ="#CCCCC" width="310">';
		Laytag +='<A HREF = "#" class=fs12pxnn>'+msg+'</A></TD>';
		Laytag +='</TR>';
	}
	
	Laytag += '</TABLE>';
	Laytag += "</DIV>";

//---------------------------------------------------------------
//13-3-項目ごとのリンク領域

	Laytag += '<DIV ID="area'+t+'">';
	
	for(i=0;i<mlen;i++)
	{
		li=eval("li"+t+"[i]");
		Laytag +='<A HREF ='+li+' onMouseOver = "seticon('+t+','+i+')"';
		Laytag +='onMouseOut = "hideicon('+t+','+i+')">';
		Laytag +='<img src="../../image/area.gif" border="0">';
		Laytag +='</A><BR>';
	}

	Laytag += "</DIV>";

//---------------------------------------------------------------
//13-4-項目ごとのリンク領域2

	Laytag += '<DIV ID="bck'+t+'">';
	mlenn=mlen+2; //項目数のカウント+2
	areah=mlenn*22
	
	Laytag +='<A HREF ="#" onMouseOver = "hideall()">';
	Laytag +='<img src="../../image/area2.gif" height='+areah+' Width="600" border="0">';
	Laytag +='</A><BR>';
	
	Laytag += "</DIV>";

	document.write(Laytag);
}

//15-初期化
function init()
{

	
	if(document.getElementById || document.all)
	{		
			for(m=0;m<sw;m++)
			{
			Layie(m);
			}
	}
	
	
	
	if(document.layers)
	{
		for(m=0;m<sw;m++)
			{
			Laynn(m);
			}
	}
	
	
}

init();
 
