



function headerwrite(current,laydisp,pulldown){

listArray = new Array(
	"0__Message from the president__/en/info/president/",
	"0__Brief History__/en/info/history/__19",
	"last__Statistical Information__/en/info/data/__19",
	"#",
	"1__Faculty of Science Division I__/en/fac/sci1_index.html__19",
	"1__Faculty of Engineering Division I__/en/fac/engi_index.html__19",
	"1__Faculty of Pharmaceutical Sciences__/en/fac/pha_index.html__19",
	"1__Faculty of Science and Technology__/en/fac/si_index.html__19",
	"1__Faculty of Industrial Science and Technology__/en/fac/ind_index.html__19",
	"1__School of Management__/en/fac/sch_index.html__19",
	"1__Faculty of Science Division II__/en/fac/sci2_index.html__19",
	"1__Faculty of Engineering Division II__/en/fac/eng2_index.html__19",
	"last__Liberal Arts__/en/fac/lib_index.html__19",
	"#",
	"2__dummy__dummy__19",
	"last__dummy__dummy__19",
	"#",
	"3__Research Institute for Science and Technology__/en/labo/research_synthesis.html__19",
	"3__Research Institute for Biological Science__/en/labo/research_life.html__19",
	"last__Research-Education Organization for Information Science and Technology__/en/labo/research_info.html__19",
	"#",
	"4__Kagurazaka Campus__/en/camp/kagurazaka.html__19",
	"4__Noda Campus__/en/camp/noda.html__19",
	"4__Kuki Campus__/en/camp/kuki.html__19",
	"last__Oshamambe Campus__/en/camp/oshamanbe.html__19",
	"#"
);

theLink = new Array(
	'/en/info/',
	'/en/fac/',
	'/en/grad/',
	'/en/labo/',
	'/en/camp/'
);
theTarget = new Array(
	'target="_top"',
	'target="_top"',
	'target="_top"',
	'target="_top"'
);
theAlt = new Array(
	'University Outline',
	'Undergraduate School',
	'Graduate School',
	'Research Institutes',
	'Campuses'
);

var nnfoot = "";
var nnhead1 = "";
var nnhead2 = "";

if(document.layers){
	nnfoot = "</layer>";
}

var tempbottom ="</td><td width=6><img src=/common/images/sp.gif width=6 height=2 border=0 alt=></td></tr></table><table border=0 cellspacing=0 cellpadding=0 width=144 bgcolor=#000000><tr><td><img src=/common/images/sp.gif width=2 height=6 border=0 alt=></td></tr></table>" +nnfoot+ "</div>";

var temp ="";

menuArray = new Array();
var num = "";


for (n in listArray){
	splitlist = new Array();
	splitlist = listArray[n].split('__');


	if (splitlist[0] != "#"){


		if (temp == ""){
			num = splitlist[0];

			if(document.layers){	//NN
				nnhead1 = "<layer onmouseout=btnTimer() onmouseover=headnavi1('menu" +num+ "'," +num+ ");showLayer('ID" +num+ "')>";
				nnhead2 = "<layer onmouseout=headnavi2('menu" +num+ "'," +num+ ");btnTimer() onmouseover=headnavi1('menu" +num+ "'," +num+ ");showLayer('ID" +num+ "')>";
			}

			if (current == num){
				temp = "<div id=ID" +num+ ">" +nnhead1+ "<table border=0 cellspacing=0 cellpadding=0 width=143 bgcolor=#000000><tr><td width=6><img src=/common/images/sp.gif width=6 height=2 border=0 alt=></td><td width=118><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td height=6></td></tr></table>";
			}else{
				temp = "<div id=ID" +num+ ">" +nnhead2+ "<table border=0 cellspacing=0 cellpadding=0 width=143 bgcolor=#000000><tr><td width=6><img src=/common/images/sp.gif width=6 height=2 border=0 alt=></td><td width=118><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td height=6></td></tr></table>";
			}
			
		}
		if (splitlist[0] == "last"){
			if (current == num){
				var rooptemp = "<table border=0 cellspacing=0 cellpadding=0 width=132><tr><td onclick= location='"+splitlist[2]+"' onmouseout= btnTimer();this.bgColor='#000000' onmouseover= headnavi1('menu" +num+ "'," +num+ ");showLayer('ID" +num+ "');this.bgColor='#de590e';className='n'><table border=0 cellspacing=0 cellpadding=3 width=100%><tr><td class=text10 height=" +splitlist[3]+ "><a class=header href="+splitlist[2]+">" +splitlist[1]+ "</a></td></tr></table></td></tr></table>";
			}else{
				var rooptemp = "<table border=0 cellspacing=0 cellpadding=0 width=132><tr><td onclick= location='"+splitlist[2]+"' onmouseout= headnavi2('menu" +num+ "'," +num+ ");btnTimer();this.bgColor='#000000' onmouseover= headnavi1('menu" +num+ "'," +num+ ");showLayer('ID" +num+ "');this.bgColor='#de590e';className='n'><table border=0 cellspacing=0 cellpadding=3 width=100%><tr><td class=text10 height=" +splitlist[3]+ "><a class=header href="+splitlist[2]+">" +splitlist[1]+ "</a></td></tr></table></td></tr></table>";
			}

		}else{
			if (current == num){
				var rooptemp = "<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td onclick= location='"+splitlist[2]+"' onmouseout= btnTimer();this.bgColor='#000000' onmouseover= headnavi1('menu" +num+ "'," +num+ ");showLayer('ID" +num+ "');this.bgColor='#de590e';className='n'><table border=0 cellspacing=0 cellpadding=3 width=100%><tr><td class=text10 height=" +splitlist[3]+ "><a class=header href="+splitlist[2]+">" +splitlist[1]+ "</a></td></tr></table><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img src=/en/common/images/laymenuline.gif width=132 height=1 border=0 alt=></td></tr></table></td></tr></table>";
			}else{
				var rooptemp = "<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td onclick= location='"+splitlist[2]+"' onmouseout= headnavi2('menu" +num+ "'," +num+ ");btnTimer();this.bgColor='#000000' onmouseover= headnavi1('menu" +num+ "'," +num+ ");showLayer('ID" +num+ "');this.bgColor='#de590e';className='n'><table border=0 cellspacing=0 cellpadding=3 width=100%><tr><td class=text10 height=" +splitlist[3]+ "><a class=header href="+splitlist[2]+">" +splitlist[1]+ "</a></td></tr></table><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img src=/en/common/images/laymenuline.gif width=132 height=1 border=0 alt=></td></tr></table></td></tr></table>";

			}
		}

	temp += rooptemp;

	}else{
		temp += tempbottom;
		var m = menuArray.length;
		menuArray[m] = temp;
		temp = "";
	}

}

temp = "<div id=ID5></div>";
var m = menuArray.length;
menuArray[m] = temp;


var layerMenu = "";
for (i in menuArray){
	layerMenu += menuArray[i]
}


defaultLyr='ID5';
onLayer=defaultLyr;

splitdata = new Array();
splitdata =  laydisp.split('__');

var GlobalMenu = '';

for(m=0;m<=4;m++){
	if (splitdata[m] == 'on'){
		if (current==m){
			GlobalMenu += '<a href="' +theLink[m]+ '" ' +theTarget[m]+'  onmouseover="showLayer(\'ID' +m+ '\')"><img src="/en/common/images/menu' +m+ '_r.gif" height="41" border="0" name="menu' +m+ '" alt="' +theAlt[m]+ '"></a>';
		}else{
			GlobalMenu += '<a href="' +theLink[m]+ '" onmouseover="headnavi1(\'menu' +m+ '\',' +m+ ');showLayer(\'ID' +m+ '\')"  onmouseout="headnavi2(\'menu' +m+ '\',' +m+ ');btnTimer()" ' +theTarget[m]+' ><img src="/en/common/images/menu' +m+ '.gif" height="41" border="0" name="menu' +m+ '" alt="' +theAlt[m]+ '"></a>';
		}
	}else{
		if (current==m){
			GlobalMenu += '<a href="' +theLink[m]+ '" ' +theTarget[m]+' ><img src="/en/common/images/menu' +m+ '_r.gif" height="41" border="0" name="menu' +m+ '" alt="' +theAlt[m]+ '"></a>';
		}else{
			GlobalMenu += '<a href="' +theLink[m]+ '" onmouseover="headnavi1(\'menu' +m+ '\',' +m+ ')"  onmouseout="headnavi2(\'menu' +m+ '\',' +m+ ')" ' +theTarget[m]+' ><img src="/en/common/images/menu' +m+ '.gif" height="41" border="0" name="menu' +m+ '" alt="' +theAlt[m]+ '"></a>';
		}
	}

}



var template = '<a name="top"></a><table border="0" cellspacing="0" cellpadding="0" width="670" bgcolor="#ffffff"><tr><td height="12"></td></tr></table><table border="0" cellspacing="1" cellpadding="0" width="100%"><tr valign="bottom"><td width="0%"><a href="/en/" target="_top"><img src="/en/common/images/tus_logo.gif" width="265" height="32" border="0" alt="Tokyo University of Science"></a></td><td><table border="0" cellspcing="0" cellpadding="0"><tr><td><a href="/en/" target="_top"><img src="/common/images/to_top.gif" width="40" height="11" border="0" alt="TOP"></a></td><tr><img src="/common/images/sp.gif" width="40" height="4" border="0"></td></tr><tr><td><a href="/" target="_top"><img src="/en/common/images/to_japanese.gif" alt="JAPANESE" width="81" height="11" border="0"></a></td></tr></table><td width="100%" align="right"><table border="0" cellspacing="0" cellpadding="0"><tr><td><form style="margin-bottom: 2px;" id="searchbox_014865889877293365565:rwcc0ynusug" action="http://www.google.com/cse"><input type="hidden" name="cx" value="014865889877293365565:rwcc0ynusug"><input name="q" type="text" size="20"><input type="hidden" name="cof" value="FORID:0"></td><td valign="top"><input type="image" src="common/images/site_search.gif" width="83" height="21" border="none" value="search" class="submit"></form><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014865889877293365565%3Arwcc0ynusug"></script></td></tr></form></table></td><td width="0%"><img src="/common/images/sp.gif" width="5" height="2" border="0" alt=""></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td height="7"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td nowrap background="/common/images/header_bg.gif">' + GlobalMenu + '</td></tr></table>' + layerMenu + ''

	document.write(template);
}






var OverImg = new Array();
var OutImg = new Array();

for(i=0;i<=6;i++){
OutImg[i] = new Image;
OutImg[i].src = '/en/common/images/menu' + i + '.gif';
}

for(i=0;i<=6;i++){
OverImg[i] = new Image;
OverImg[i].src = '/en/common/images/menu' + i + '_r.gif';
}

function headnavi1(nam,num){
document.images[nam].src = OverImg[num].src;
}
function headnavi2(nam,num){
document.images[nam].src = OutImg[num].src;
}


 var img = new Array();

 img[0] = new Image();img[0].src = "/common/images/left_navi_r.gif";
 img[1] = new Image();img[1].src = "/common/images/left_navi.gif";

function _in(nam,num) {

 document.images[nam].src = img[num].src;

 return false;

}


function seek1SetCols(v) {
	for (i=0;i<document.seek1.elements.length;i++) {
		if (document.seek1.elements[i].name=='col') {
			document.seek1.elements[i].checked=v
		}
	}
}




