
function ZoomIn()
{
	var doc = top.document;
	var element;

	if (doc.body.style.zoom == 0) {
		doc.body.style.zoom = 1.2;
	}else {
		doc.body.style.zoom *= 1.2;

	}
}

function ZoomOut()
{
	var doc = top.document;
	var element;

	if (doc.body.style.zoom != 1) {
		doc.body.style.zoom /= 1.2;
	}
}

//해당레이어 출력
function printContent(target){
    var initBody = document.body.innerHTML;
    window.onbeforeprint = function()
	{
        document.body.innerHTML = document.getElementById(target).innerHTML;
    }
    window.onafterprint = function()
	{
        document.body.innerHTML = initBody;
    }
    window.print();
}



function initTabMenu(tabContainerID) {

	//recruitTabClose();

	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 == "btntab")	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);

		if (thismenu.imgEl) {
			thismenu.onmouseover = function () {
				//this.onclick();
			}
		}

		thismenu.onclick = tabMenuClick;

		if (!thismenu.container.first)	thismenu.container.first = thismenu;
	}
	tabContainer.first.onclick();
}



function tabMenuClick() {
	currentmenu = this.container.current;
	if (currentmenu != this) {
		if (currentmenu) {
			currentmenu.targetEl.style.display = "none";
			if (currentmenu.imgEl) {
				currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_r.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", "_r.gif");
		} else {
			this.className += " on";
		}

		this.container.current = this;

	}
	return false;
}

function recruitTabClose(){
	document.getElementById("notice1").style.display="none";
	document.getElementById("notice2").style.display="none";
	document.getElementById("notice3").style.display="none";
	document.getElementById("notice4").style.display="none";

	var recruitInfo = document.getElementById("recruitInfo");
	recruitInfo.className = "notice";

}

// 하단 select box 처리
function goPartner(value, mode){
	if(value=="" || value.length <= 0)
	{
		switch(mode)
		{
			case 1: alert("유관기관을 선택 해 주시기 바랍니다."); break;
			case 2: alert("재외공관을 선택 해 주시기 바랍니다."); break;
			case 3: alert("대학을 선택 해 주시기 바랍니다."); break;
		}

		return false;
	}
	var win = window.open(value);
	if(win == null)
	{
		alert("팝업이 차단되어있습니다.\n팝업을 허용 해 주시기 바랍니다.");
		return false;
	}
	return true;
}
