//　一行分（16px）var menus = new Array();menus[0] = new Menu(125, 190);menus[0].add('img/bs_011.jpg', 'img/bs_012.jpg', '20', 'menu011.html');menus[0].add('img/bs_021.jpg', 'img/bs_022.jpg', '20', 'menu012.html');menus[1] = new Menu(570, 170);menus[1].add('img/bs_031.jpg', 'img/bs_032.jpg', '20', 'menu041.html');menus[1].add('img/bs_041.jpg', 'img/bs_042.jpg', '20', 'menu042.html');menus[1].add('img/bs_051.jpg', 'img/bs_052.jpg', '20', 'menu043.html');var container = null;var active = null;var timer = null;function Menu(left, top) {	this.id = menus.length;	this.left = left;	this.top = top;//	this.menu_timer = null;	this.div = new Array();	this.name = new Array();	this.off = new Array();	this.on = new Array();	this.height = new Array();	this.href = new Array();	this.target = new Array();	this.timer = new Array;	this.add = add;	return this;}function add(off, on, height, href, target) {	var n = this.div.length;	this.div[n] = 'menu' + this.id + 'div' + this.div.length;	this.name[n] = this.div[n] + 'img';	this.off[n] = new Image(); this.off[n].src = off;	this.on[n] = new Image(); this.on[n].src = on;	this.height[n] = height;	this.href[n] = href;	this.target[n] = target || '_self';	this.timer[n] = null;}function init() {	if (document.layers) {		var timer = setTimeout('init()', 100);		container = new Layer(100);		clearTimeout(timer);		container.visibility = 'visible';	} else if (document.all || document.getElementById) {		document.write('<span id="container"></span>');		container = document.all ? document.all('container') : document.getElementById('container');	}	if (!container) return false;	var contents = '';	for (var i=0; i<menus.length; i++) {		var top = 0;		var left = 0		if (!document.layers) { top = menus[i].top; left = menus[i].left }		for (var j=0; j<menus[i].div.length; j++) {			if (j) top +=Number(menus[i].height[j-1]);			contents += '<div id="' + menus[i].div[j] + '" style="position:absolute;left:' + left + ';top:' + top + ';visibility:hidden;"><a href="' + menus[i].href[j] + '" target="' + menus[i].target[j] + '" onMouseOver="over(' + i + ',' + j + ')" onMouseOut="out(' + i + ',' + j + ')"><img src="' + menus[i].off[j].src +  '" border="0" name="' + menus[i].name[j] + '"></a></div>';		}	}//	alert(contents);	if (document.all || document.layers) {		container.document.open('text/html');		container.document.write(contents);		container.document.close();	} else if (document.getElementById) {		container.innerHTML = contents;	}	return true;}function over(menu, img) {	if (timer) clearTimeout(timer);	if (document.all || document.getElementById) { document.images[menus[menu].name[img]].src = menus[menu].on[img].src }	else if (document.layers) { container.document.layers[menus[menu].div[img]].document.images[menus[menu].name[img]].src = menus[menu].on[img].src }}function out(menu, img) {	hide(menu);	if (document.all || document.getElementById) { document.images[menus[menu].name[img]].src = menus[menu].off[img].src }	else if (document.layers) { container.document.layers[menus[menu].div[img]].document.images[menus[menu].name[img]].src = menus[menu].off[img].src }}function show(menu) {	if (document.layers) container.moveTo(menus[menu].left, menus[menu].top);	hide_all();	for (var i=0; i<menus[menu].div.length; i++) {		if (menus[menu].timer[i]) clearTimeout(menus[menu].timer[i]);		menus[menu].timer[i] = setTimeout('_show("' + menus[menu].div[i] + '")', 80 * i);	}	active = menu;}function _show(id) {	if (document.all) { if (document.all(id)) document.all(id).style.visibility = 'visible' }	else if (document.layers) { if (container.document.layers[id]) container.document.layers[id].visibility = 'visible' }	else if (document.getElementById) { if (document.getElementById(id)) document.getElementById(id).style.visibility = 'visible' }}function hide(menu) {	if (timer) clearTimeout(timer);	timer = setTimeout('_hide("' + menu + '")', 500);}function _hide(menu) {	if (menu == null) return false;	for (var i=0; i<menus[menu].div.length; i++) {		var n = menus[menu].div.length - i - 1;		if (menus[menu].timer[n]) clearTimeout(menus[menu].timer[n]);		menus[menu].timer[n] = setTimeout('__hide("' + menus[menu].div[n] + '")', 80 * i);	}	if (timer) clearTimeout(timer);	active = null;}function __hide(id) {	if (document.all) { if (document.all(id)) document.all(id).style.visibility = 'hidden' }	else if (document.layers) { if (container.document.layers[id]) container.document.layers[id].visibility = 'hidden' }	else if (document.getElementById) { if (document.getElementById(id)) document.getElementById(id).style.visibility = 'hidden' }}function hide_all() {	if (timer) clearTimeout(timer);	for (var i=0; i<menus.length; i++) {		for (var j=0; j<menus[i].div.length; j++) {			if (menus[i].timer[j]) clearTimeout(menus[i].timer[j]);			if (document.all) document.all(menus[i].div[j]).style.visibility = 'hidden';			else if (document.layers) container.document.layers[menus[i].div[j]].visibility = 'hidden';			else if (document.getElementById) document.getElementById(menus[i].div[j]).style.visibility = 'hidden';		}	}}