
/* flash re write */
function IE_HtmlRewrite(objParent) {
	if (window.ActiveXObject && objParent) {
		objParent.innerHTML = objParent.innerHTML;
	}
}

/* layer */
function layerShow(layerId) {
	document.getElementById(layerId).style.display = "block";
}
function layerHide(layerId) {
	document.getElementById(layerId).style.display = "none";
}

/* image rollover */
function imgOver(imgEl) {
	imgEl.src = imgEl.src.replace("_off.gif", "_on.gif");
}
function imgOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", "_off.gif");
}

/* initTab */
function initTab(menuContainerID) {
	
	var tabAnchor = document.getElementById(menuContainerID).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.menuContainer = document.getElementById(menuContainerID);
		thismenu.targetEl = document.getElementById(thismenu.href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		if (thismenu.getElementsByTagName("img").item(0)) {
			thismenu.getElementsByTagName("img").item(0).onmouseover = function () {
				this.src = this.src.replace("_off.gif", "_on.gif");
			}
			thismenu.getElementsByTagName("img").item(0).onmouseout = function () {
				this.src = this.src.replace("_on.gif", "_off.gif");
			}
		}

		thismenu.onclick = tabMenuClick;
		
		if (!thismenu.menuContainer.first) {
			thismenu.menuContainer.first = thismenu;
		}
	}
	document.getElementById(menuContainerID).first.onclick();
}
function tabMenuClick() {
	currentmenu = this.menuContainer.current;

	if (currentmenu != this) {
		if (currentmenu) {
			currentmenu.targetEl.style.display = "none";
			if (currentmenu.getElementsByTagName("img").item(0)) {
				currentmenu.getElementsByTagName("img").item(0).onmouseover = function () {
					this.src = this.src.replace("_off.gif", "_on.gif");
				}
				currentmenu.getElementsByTagName("img").item(0).onmouseout = function () {
					this.src = this.src.replace("_on.gif", "_off.gif");
				}
				currentmenu.getElementsByTagName("img").item(0).onmouseout();
			}
			currentmenu.className = currentmenu.className.replace(" on", "");
		}

		this.targetEl.style.display = "block";
		if (this.getElementsByTagName("img").item(0)) {
			this.getElementsByTagName("img").item(0).onmouseout();
			this.getElementsByTagName("img").item(0).onmouseover();
			this.getElementsByTagName("img").item(0).onmouseover = null;
			this.getElementsByTagName("img").item(0).onmouseout = null;
		}
		if (this) {
			this.className += " on";
		}
		this.menuContainer.current = this;
	}
	return false;
}

/* 토스온라인 캐릭터 */
function toss(val) {
	var size = 6;
	for(i = 1; i <= size; i++) {
		document.getElementById("toss-character0"+i).style.display = "none";
	}
	document.getElementById("toss-character0"+val).style.display = "block";
}

/* 팝업 e-brochure */
function popup_ebrochure() {
	//window.open('/popup/popup_ebrochure.asp','popup_ebrochure','width=750,height=470');
	window.open('/images/brochure_kr.pdf');
}

/* sound */
function soundWrite(surl,w,h) {
	document.write('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" name="sound" width="'+w+'" height="'+h+'">');
	document.write('	<param name="AutoStart" value="0">');
	document.write('	<param name="AudioStream" value="-1" />');
	document.write('	<param name="Filename" value="'+surl+'" />');
	document.write('</object>');
}
/* movie */
function movieWrite(murl) {
	document.write('<object width="272" height="259" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" align="middle">');
	document.write('	<param name="allowfullscreen" value="true" />');
	document.write('	<param name="quality" value="high" />');
	document.write('	<param name="movie" value="'+murl+'" />');
	document.write('</object>');
	document.write('<!--[if !IE]> <-->');
	document.write('<object type="application/x-shockwave-flash" data="'+murl+'" width="272" height="259">');
	document.write('	<p>동영상플래시</p>');
	document.write('</object>');
	document.write('<!--> <![endif]-->');
}
/* 조직도 */
function popup_Org(mUrl,popName,size) {
	window.open(mUrl,popName,size);
	
}

