﻿/****************************************************************************************************/
//  작 성 자 : (주)익스코어 
//  작 성 일 :  2009.03.12
//  수 정 일 :  2009.03.12
//  버     전 :  0.0.1
//  설     명 :  관리자모드 공통 JS파일
//  위     치 :  /js/common.js
/****************************************************************************************************/
/* 원본 이미지 보기 */
var farwindow = null;

function img_view(img) {
	farwindow = window.open("", "image", "width=10, height=10, top=0, left=0, scrollbars=0, resizable=yes");
	if (farwindow != null) {
		if (farwindow.opener == null) {
			farwindow.opener = self;
		}
		farwindow.location.href = "/resource/image.asp?img=" + img;
	}
}

/* 하위메뉴 설정 */
function linkOnEffect(id, menu)
{
	document.getElementById(id).src = "/_youtha/images/common/" + menu + "_on.jpg";
}

function linkOffEffect(id, menu)
{
	document.getElementById(id).src = "/_youtha/images/common/" + menu + "_off.jpg";
}

/* 메인 하위 메뉴 설정 */
function mainSubMenuOnEffect(menu, id, src)
{
	document.getElementById(id).src = "/images/common/header/" + menu + "/" + src;
}

function mainSubMenuOffEffect(menu, locator, id, src)
{
	if (locator == id)
	{
		document.getElementById(id).src = "/images/common/header/" + menu + "/" + src;
	}
	else
    {
	    document.getElementById(id).src = "/images/common/header/" + menu + "/" + src;
    }
}

/*유관기관링크*/
function goSubLink(obj) {
	var frm = document.frmSubLink;
	var value = frm.familylink.options[frm.familylink.selectedIndex].value;
	if(value)
		location = value;
	else
		alert('유관기관을 선택해 주십시오.');
}

function goZipcode() {
	var str = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=1, resizable=no, copyhistory=no, width=440, height=300, top=100, left=100";
	window.open("/resource/zipcode.asp", "zipcode", str);
}
