function setMiniBoard(){
	var tab_board_dt_a_1 = document.getElementById("tab_board_dt_a_1");
	var tab_board_dt_a_2 = document.getElementById("tab_board_dt_a_2");
	var tab_board_dt_a_3 = document.getElementById("tab_board_dt_a_3");
	var tab_board_dt_a_4 = document.getElementById("tab_board_dt_a_4");
	var parentId = "tab_board";
	if(!tab_board_dt_a_1) return false;
	if(!tab_board_dt_a_2) return false;
	if(!tab_board_dt_a_3) return false;
	if(!tab_board_dt_a_4) return false;
	tab_board_dt_a_1.onclick = function(){
		return switchElement(
				parentId
				, "tab_board_dd_1"
				, this.id);
	}
	tab_board_dt_a_1.onfocus = function(){
		return switchElement(
				parentId
				, "tab_board_dd_1"
				, this.id);
	}
	tab_board_dt_a_2.onclick = function(){
		return switchElement(
				parentId
				, "tab_board_dd_2"
				, this.id);
	}
	tab_board_dt_a_2.onfocus = function(){
		return switchElement(
				parentId
				, "tab_board_dd_2"
				, this.id);
	}
	tab_board_dt_a_3.onclick = function(){
		return switchElement(
				parentId
				, "tab_board_dd_3"
				, this.id);
	}
	tab_board_dt_a_3.onfocus = function(){
		return switchElement(
				parentId
				, "tab_board_dd_3"
				, this.id);
	}
	tab_board_dt_a_4.onclick = function(){
		return switchElement(
				parentId
				, "tab_board_dd_4"
				, this.id);
	}
	tab_board_dt_a_4.onfocus = function(){
		return switchElement(
				parentId
				, "tab_board_dd_4"
				, this.id);
	}
	return false;
}

function switchElement(parentId, ddId, a_id){
	if(!document.getElementById) return false;
	if(!document.getElementById(parentId)) return false;
	if(!document.getElementById(ddId)) return false;
	if(!document.getElementById(a_id)) return false;
	var div = document.getElementById(parentId);
	var nodes = div.childNodes;
	for(var i = 0; i < nodes.length; i++){
		if(nodes.item(i).nodeName == "DL"){
			var dl = nodes.item(i).childNodes;
			for(var j = 0; j < dl.length; j++){
				if(dl.item(j).nodeName == "DT"){
					var aaa = dl.item(j).childNodes;
					dl.item(j).className = "";
					for ( var x = 0; x < aaa.length; x++) {
						if (aaa.item(x).nodeName == "A") {
							var __imgs = aaa.item(x).childNodes;
							for ( var n = 0; n < __imgs.length; n++) {
								if (__imgs.item(n).nodeName == "IMG") {
									__imgs.item(n).src = __imgs.item(n).src.replace("1.png", "0.png");
									break;
								}
							}
							break;
						}
					}
				}
				if(dl.item(j).nodeName == "DD"){
					dl.item(j).className = "";
				}
			}
		}
	}
	document.getElementById(ddId).className = "on_board";
	document.getElementById(a_id).parentNode.className = "on_board";
	var ____imgs = document.getElementById(a_id).childNodes;
	for ( var n2 = 0; n2 < ____imgs.length; n2++) {
		if (____imgs.item(n).nodeName == "IMG") {
			____imgs.item(n).src = ____imgs.item(n).src.replace("0.png", "1.png");
			break;
		}
	}
	return false;
}

function setMiniBoardDisplay(thisObj, otherObj, img_1, img_2, thisId, moreHref){
	var more = document.getElementById("more_button");
	if(!more) return false;
	
	for(var i = 0; i < thisObj.childNodes.length; i++){
		if(thisObj.childNodes.item(i).nodeName == "IMG"){
			thisObj.childNodes.item(i).src = img_1;
			//thisObj.childNodes.item(i).style.margin = " 0 0 -3px 0 ";
		}
	}
	for(var i = 0; i < otherObj.childNodes.length; i++){
		if(otherObj.childNodes.item(i).nodeName == "IMG"){
			otherObj.childNodes.item(i).src = img_2;
			//otherObj.childNodes.item(i).style.margin = " 0 0 -2px 0 ";
		}
	}
	var dlChilds = document.getElementById(thisId).parentNode.parentNode.childNodes;
	for ( var i = 0; i < dlChilds.length; i++) {
		if (dlChilds.item(i).nodeName == "DT") {
			dlChilds.item(i).style.visibility = "hidden";
		}
		if (dlChilds.item(i).nodeName == "DD") {
			dlChilds.item(i).className = "";
		}
	}
	document.getElementById(thisId).className = "on_board";
//	thisObj.style.cursor = "default";
//	otherObj.style.cursor = "pointer";
	more.href = moreHref;
	return false;
}

function fn_focus(id){
	if(!document.getElementById(id)) return false;
	document.getElementById(id).style.position = "absolute";
	document.getElementById(id).style.top = "-9999px";
	document.getElementById(id).style.width = "1px";
	document.getElementById(id).style.height = "1px";
	document.getElementById(id).focus();
}

addLoadEvent(setMiniBoard);
//addLoadEvent(fn_focus, "accessibility");
//addLoadEvent(setVisibility, "small_qna", "hidden");
//addLoadEvent(setPosition, "miniboard_dt_1", "absolute");
//addLoadEvent(setPosition, "miniboard_dt_2", "absolute");
//addLoadEvent(setPosition, "miniboard_dd_1", "absolute");
//addLoadEvent(setPosition, "miniboard_dd_2", "absolute");
//addLoadEvent(fn_focus, "blank_tag");
