/* Flash */
function IE_HtmlRewrite(objParent) {
	if (window.ActiveXObject && objParent) {
		objParent.innerHTML = objParent.innerHTML;
	}
}

function imageOver(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuOn(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
function menuOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function initTabMenu(tabContainerID, atype) {
	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";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace("on", "");
				}
			}

			this.targetEl.style.display = "block";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};
		
		if ( atype == 2 ) {
				thismenu.container.first = thismenu;
		} else {
			if (!thismenu.container.first)
				thismenu.container.first = thismenu;
		}
	}
//	if ( atype == 2 )
//		http://localhost:8080/front/board.nias#ani_left_02" ) 
//	alert (tabContainer.first);
	
	if (tabContainer.first)
		tabContainer.first.onclick();
}

function frmResizeH(obj,target,sheight){
	var p_target = null;
	var totalHeight=document.body.scrollHeight;
	if (target=="")	{// target이 없을 경우
		p_target = eval("document.getElementById('"+obj+"')");
	}else{
		p_target = eval(target+".document.getElementById('"+obj+"')");
	}

	p_target.style.height=totalHeight+sheight;

}
