// Tab Content
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab") {
			thismenu = tabAnchor.item(i);
		} else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		// alert(tabAnchor.item(i).href.split("#")[1]);

		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", "_off.gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace("_off.gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();

	// alert(document.getElementById("content2").style.display);
}


var o_board_mouseover = null;
var o_board_mouseover_color = '';
function board_mouseover(a)
{
	var node = a;
	board_mouseout();
	for(var node=a; node; node=node.parentNode) {
		if(node.tagName == "TR") break;
	}
	o_board_mouseover = node;
	o_board_mouseover_color = node.style.backgroundColor;
	node.style.backgroundColor = "#F6F6F6";
}

function board_mouseout()
{
	if(o_board_mouseover == null) return ;
	o_board_mouseover.style.backgroundColor = o_board_mouseover_color;
	o_board_mouseover = null;
	o_board_mouseover_color = "";
}
