/* **************************************************************
	Wiz Javascript - AJAX Utility Library Modal Window
	Version : 1.0
	Developer : wiz (wizys@yahoo.co.kr / http://wiz.pe.kr/)
	Last Updated : 2007.04.11 - First Version By wiz
	* 소스의 무단 사용을 금지 합니다.
************************************************************** */
/** START:BROWSER DETECTION ********************/
_nv_common=navigator.appVersion.toLowerCase(); 
ie4_common = false;
ie5_common = false;
ie55_common = false;
ie6_common = false;
ie7_common =(_nv_common.indexOf('msie 7.0')!=-1)?true:false;
if(!ie7_common){ 
ie4_common =(!document.getElementById&&document.all)?true:false;
ie5_common =(_nv_common.indexOf('msie 5.0')!=-1)?true:false;
ie55_common=(_nv_common.indexOf('msie 5.5')!=-1)?true:false;
ie6_common =(_nv_common.indexOf('msie 6.0')!=-1)?true:false;
}

isIE_common=(ie5_common || ie55_common || ie6_common || ie7_common) ?true:false;
//document.write('<script type="text/javascript" src="/statics/js/lib/https.js"></script>');
/**
*
* @param page
* @param formName form이름
*/
function gotoPage(page, formName, pagePropName) {
    try {
        var frm = $(formName);
        if (pagePropName) {
            frm[pagePropName].value = page;
        }
        else {
            frm["sc.page"].value = page;
        }
        frm.submit();
    }
    catch (e) {
        alert(e.message);
    }
}


/**
* 새창 여는 함수(status=no)
*/
function openWin(url, winName, sizeW, sizeH) {
    var nLeft  = screen.width/2 - sizeW/2 ;
    var nTop  = screen.height/2 - sizeH/2 ;
    opt = ",toolbar=no,menubar=no,location=no,scrollbars=no,status=no,resizable=no";
    window.open(url, winName, "left=" + nLeft + ",top=" +  nTop + ",width=" + sizeW + ",height=" + sizeH  + opt );
}

function openWin2(url, winName, sizeW, sizeH, opt) {
    var nLeft  = screen.width/2 - sizeW/2 ;
    var nTop  = screen.height/2 - sizeH/2 ;
    window.open(url, winName, "left=" + nLeft + ",top=" +  nTop + ",width=" + sizeW + ",height=" + sizeH  + opt );
}




/**
* 프롬프트 창 활용하기 (오류시리턴앞머리, 출력메세지, 대입값)
*/
function exePromptVal(argRetHead, argMsg, argVal) {
    var strInput = prompt(argMsg,argVal);

    if (strInput == null) {
        return null;
    }
    else{
        strInput = trim(strInput);
        if (strInput == "")     return argRetHead +"등록된 값이 없습니다.\n\n다시 입력하시기 바랍니다.";
        if (strInput == argVal) return argRetHead +"변경된 정보가 없습니다.\n\n다시 입력하시기 바랍니다.";
        return strInput;
    }
}

/**
* 리스트 No 계산(오름차순/내림차순)
* => getRecNo(정렬카운트구분(asc/desc), 총갯수, 페이지당레코드수, 현재페이지, 레코드번호)
*/
function getRecNo(sortGbn, totalCount, perRows, thisPage, thisPageRowNo){
    var result;
    if (sortGbn == null || sortGbn == "")  sortGbn = "desc";
    if (sortGbn == "desc") result =  totalCount-(thisPage-1)*perRows-(thisPageRowNo-1);
    if (sortGbn == "asc")  result =  thisPageRowNo + (perRows*(thisPage-1));
    return result;
}

/**
* 입력값 컨트롤(숫자만 입력가능)
*/

function handlerNum() {
    e = window.event;

    if((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 96 && e.keyCode <= 105) || e.keyCode == 8 || e.keyCode == 9 || e.keyCode == 16 || e.keyCode == 46 || e.keyCode == 37 || e.keyCode == 39 || e.keyCode == 229) {
        //숫자열 0 ~ 9 : 48 ~ 57, 키패드 0 ~ 9 : 96 ~ 105 ,8 : backspace, 9 : Tab , 16 : Shift, 46 : delete  입력가능, 좌 : 37, 우: 39
        return; // 입력시킨다.
    }
    else {
        //숫자가 아니면 입력불가
        e.returnValue=false; //입력시키지 않는다.
    }
}

/**
* 입력값 컨트롤(소문자로 변환 입력)
*/
function toLower(frm) {
    if ($(frm) != null && $(frm).value != undefined) {
        var userId = $(frm).value;
        $(frm).value = userId.toLowerCase();
    }
}

/**
* 입력값 컨트롤(빈칸을 없애는 함수)
*/

function trim(chStr)   {
    var vSource;
    var nStrCheck;

    vSource = chStr;
    nStrCheck = chStr.indexOf(" ");

    while( nStrCheck != -1 ) {
        chStr = chStr.replace(" ", "");
        nStrCheck = chStr.indexOf(" ");
    }
    return chStr;
}

function moveNext(post, cnt, next) {
    var _post;
    var _cnt = cnt;
    var _next
    if (post != '') {
        _post = $(post);
    }
    if($(next)) {
        _next = $(next);

        if (_cnt == 0) {
            _next.focus();
        }
        else if (_post.value.length == cnt) {
            _next.focus();
        }
    }
    return;
}

/**
* 입력값 컨트롤
*/
var inputValue = {
    trim : function (val) {
        var re = /^\s+|\s+$/g;
        return val.replace(re, '');
    },
    ltrim : function (val) {
        var re = /^\s+/g;
        return val.replace(re, '');
    },
    rtrim : function (val) {
        var re = /\s+$/g;
        return val.replace(re, '');
    },
    onlyNumber : function (key) {
        if (navigator.appName == 'Netscape') {
            keyValue = key.which;
        }
        else {
            keyValue = key.keyCode;
        }
        if ((keyValue >= 48 && keyValue <= 57)) {
            return true;
        }
        else {
            alert("숫자 입력만 가능합니다.");
            return false;
        }
    },
    reverseDat : function (str) {
        var ret = "";
        for (var i = 0; i < str.length; i++){
            ret = str.substr(i, 1) + ret;
        }
        return ret;
    },
    removeComma : function (obj) {
        var tmp = obj.value;
        while (tmp.indexOf(",") > -1){
            tmp = tmp.replace(",", "");
        }
        obj.value = tmp;
        return;
    },
    formatMoney : function (obj) {
        var tmp = inputValue.trim(obj.value);
        var re = "";
        if (tmp.indexOf(",") > -1) return;

        for(var i = 0; i < tmp.length; i = i + 3) {
            re += tmp.substr(i, 3);
            if (i + 3 < obj.value.length)
                re += ",";
        }
        obj.value = inputValue.trim(re);
        return;
    },
	formatMoneyValue : function (val) {
        var tmp = inputValue.trim(val);
        var re = "";
        if (tmp.indexOf(",") > -1) return tmp;

        for(var i = 0; i < tmp.length; i = i + 3) {
            re += tmp.substr(i, 3);
            if (i + 3 < obj.value.length)
                re += ",";
        }
        val = inputValue.trim(re);
        return val;
    }
}

/* 사용예
<input type="text" name="y" onKeyPress="keyEventValidator.year()" maxlength="4" style="IME-MODE:disabled;TEXT-ALIGN:left" >
<input type="text" name="m" onKeyPress="keyEventValidator.month()" maxlength="2" style="IME-MODE:disabled;TEXT-ALIGN:left" >
<input type="text" name="d" onKeyPress="keyEventValidator.day(y, m)" maxlength="2" style="IME-MODE:disabled;TEXT-ALIGN:left" >
<input type="text" name="h" onKeyPress="keyEventValidator.hour()" maxlength="2" style="IME-MODE:disabled;TEXT-ALIGN:left" >
<input type="text" name="mi" onKeyPress="keyEventValidator.minute()" maxlength="2" style="IME-MODE:disabled;TEXT-ALIGN:left" >
<input type="text" name="find" onKeyPress="keyEventValidator.illegal('<|>')" maxlength="10" style="TEXT-ALIGN:left">
<input type="text" name="limit" onKeyPress="keyEventValidator.illegal('<|>')" onKeyUp="keyEventValidator.limit()" maxlength="5">
<input type="text" id="pp" name="test" label="상품명" validators="required,illegal('<|>'),limit" maxlength="5">
*/

var checkboxUtils = {
	isChecked : function(obj){
		if(obj.length == undefined) {
            if(obj.checked == true)
                return true;
            else
                return false;
        }

        for(var i = 0; i < obj.length; i++) {
            if(obj[i].checked == true)
                return true;
        }
        return false;
	}
	,
	allCheck : function(obj){
		if(obj.length == undefined) {
		   if(obj.checked)
           		obj.checked = false;
           else
           		obj.checked = true;
        }
		for(var i = 0; i < obj.length; i++) {
			if(obj[i].checked)
            	obj[i].checked = false;
            else
            	obj[i].checked = true;
        }
	}
	,
	allUnCheck : function(obj){
		if(obj.length == undefined) {
	   		obj.checked = false;
        }
		for(var i = 0; i < obj.length; i++) {
        	obj[i].checked = false;
        }
	},
    /**
    * checkbox 의 선택된 값을 가져온다
    */
    checkedVal : function (obj) {

		var rtnVal = ""; 
        if(obj.length == undefined) {

            if(obj.checked == true){
            	rtnVal = obj.value;
                return rtnVal;
            }else{
                return rtnVal;
            }
        }

        for(var i = 0; i < obj.length; i++) {
            if(obj[i].checked == true){
            	rtnVal = rtnVal+obj[i].value+",";
            }
        }
        return rtnVal;
    }		
	
}

var radioUtils = {

    /**
    * Radio Button의 선택된 값을 가져온다
    */
    checkedVal : function (obj) {

        if(obj.length == undefined) {

            if(obj.checked == true)
                return obj.value;
            else
                return null;
        }

        for(var i = 0; i < obj.length; i++) {
            if(obj[i].checked == true)
                return obj[i].value;
        }
        return null;
    },

    /**
    * Radio Button의 선택된 값을 가져온다
    */
    checkedObj : function (obj) {

        if(obj.length == undefined) {

            if(obj.checked == true)
                return obj;
            else
                return null;
        }

        for(var i = 0; i < obj.length; i++) {
            if(obj[i].checked == true)
                return obj[i];
        }
        return null;
    },

    disabledRadio : function (obj, isDisabled) {

        if(obj.length == undefined) {

            obj.disabled = isDisabled;
        }

        for(var i = 0; i < obj.length; i++) {
            obj[i].disabled = isDisabled;
        }
    }

}

var StringUtils = {

    /****************************************************************
    * 주어진 길이보다 길이가 작은 문자열을 앞에 0을 붙여 패딩한다 <BR>
    * param str 문자열
    # param len 길이
    * return 뒤에 '0'으로 패딩된 문자열을 리턴한다. 단, 주어진 길이보다 크거나 같으면 원본문자열을 그대로 리턴한다
    ****************************************************************/

    paddingTailZero : function (str, len) {
        var strLen = str.length;
        var cab = 0;
        var tmp = "";
        if (strLen >= len)
            return str;
        else
            cab = len - strLen;

        for (var ii = 0; ii < cab; ii++) {
            tmp = tmp + "0";
        }

        return str + tmp;
    },

    paddingBeforeZero : function (str, len) {
        var strLen = str.length;
        var cab = 0;
        var tmp = "";
        if (strLen >= len)
            return str;
        else
            cab = len - strLen;

        for (var ii = 0; ii < cab; ii++) {
            tmp = tmp + "0";
        }

        //return str + tmp;

        return tmp + str;
    },


    // 한/영 포함해서 Byte 단위로 자를때 한글이 깨지지 않는 범위에서 최소로 잘려진 글자를 리턴한다.
    // return : 자른 문자열
    getLimitChar : function ( value, limitBtye) {
        var strValue = "";

        for( var i=0; i<value.length; i++ ) {
            if( this.getByteLength(strValue) + this.getByteLength(value.charAt(i)) > limitBtye ) {
                break;
            }
            else {
                strValue += value.charAt(i);
            }
        }

        return strValue;
    },

    getByteLength : function (src) {
        var byteLength = 0;
        for (var inx = 0; inx < src.length; inx++) {
            var oneChar = escape(src.charAt(inx));
            if ( oneChar.length == 1 ) {
                byteLength ++;
            }
            else if (oneChar.indexOf("%u") != -1) {
                byteLength += 2;
            }
            else if (oneChar.indexOf("%") != -1) {
                byteLength += oneChar.length/3;
            }
        }
        return byteLength;

    },

    /**
    * 숫자나 문자열을 통화(Money) 형식으로 만든다.( 쉼표(,) 찍는다는 소리.. )
    * @param	amount	"1234567"
    * @return	currencyString "1,234,567"
    */
    formatCurrency : function (amount) {
        amount = new String(amount);
        var amountLength = amount.length;
        var modulus = amountLength % 3;
        var currencyString = amount.substr(0,modulus);
        for(i=modulus; i<amountLength; i=i+3) {
            if(currencyString != "")
                currencyString += ",";
            currencyString += amount.substr(i, 3);
        }
        return currencyString;
    }

}

var DateUtils = {

    getYoundal : function (year,month){      // 인자로 들어온 월이 몇일까지 있는지를 반환
        var monarr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
        if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monarr[1] = "29";

        return monarr[month-1];
    }
}



// Key Event 발생시 Validation 항목들
var keyEventValidator = {

    number : function () {

        var key = String.fromCharCode(event.keyCode);

        if(checkValidator.number(key) == false) {
            event.returnValue = false;
        }
    },

    numberRange : function (min, max) {

        var key = String.fromCharCode(event.keyCode);

        var selectVal = document.selection.createRange().text;

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(beforeValue == "0")  return;

        if(checkValidator.numberRange(beforeValue, min, max) == false){

            event.returnValue = false;
        }
    },

    year : function () {

        var key = String.fromCharCode(event.keyCode);

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue + '' + key;

        beforeValue = StringUtils.paddingTailZero(beforeValue, 4);

        if(checkValidator.year(beforeValue) == false){

            event.returnValue = false;
        }
    },


    month : function () {
        if(event.ctrlKey == true)// Ctrl 키
        {
            if(event.keyCode == 86)// v 키
            {
                return;
            }
        }

        var key = String.fromCharCode(event.keyCode);

        var selectVal = document.selection.createRange().text;

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(beforeValue == "0")  return;

        beforeValue = StringUtils.paddingBeforeZero(beforeValue, 2);

        if(checkValidator.month(beforeValue, 1, 12) == false){

            event.returnValue = false;
        }
    },

    day : function (objYear, objmonth) {

        if(event.ctrlKey == true)// Ctrl 키
        {
            if(event.keyCode == 86)// v 키
            {
                return;
            }
        }

        var valYear = objYear.value;
        var valMonth = objmonth.value;

        var key = String.fromCharCode(event.keyCode);

        var selectVal = document.selection.createRange().text;

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(beforeValue == "0")  return;

        beforeValue = StringUtils.paddingBeforeZero(beforeValue, 2);

        if(checkValidator.day(valYear, valMonth, beforeValue) == false){

            event.returnValue = false;

            return;
        }

        return;
    },

    hour : function () {
        if(event.ctrlKey == true)// Ctrl 키
        {
            if(event.keyCode == 86)// v 키
            {
                return;
            }
        }

        var key = String.fromCharCode(event.keyCode);

        var selectVal = document.selection.createRange().text;

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(beforeValue == "0")  return;

        beforeValue = StringUtils.paddingBeforeZero(beforeValue, 2);


        if(checkValidator.hour(beforeValue) == false){

            event.returnValue = false;
        }
    },

    minute : function () {
        if(event.ctrlKey == true)// Ctrl 키
        {
            if(event.keyCode == 86)// v 키
            {
                return;
            }
        }

        var key = String.fromCharCode(event.keyCode);

        var selectVal = document.selection.createRange().text;

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(beforeValue == "0")  return;

        beforeValue = StringUtils.paddingBeforeZero(beforeValue, 2);

        if(checkValidator.minute(beforeValue) == false){

            event.returnValue = false;
        }
    },

    seconds : function () {
        if(event.ctrlKey == true)// Ctrl 키
        {
            if(event.keyCode == 86)// v 키
            {
                return;
            }
        }

        var key = String.fromCharCode(event.keyCode);

        var selectVal = document.selection.createRange().text;

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(beforeValue == "0")  return;

        beforeValue = StringUtils.paddingBeforeZero(beforeValue, 2);

        if(checkValidator.seconds(beforeValue) == false){

            event.returnValue = false;
        }
    },

    illegal : function (filter) {

        var key = String.fromCharCode(event.keyCode);

        var beforeValue = event.srcElement.value;

        beforeValue = beforeValue.replace(selectVal, "");

        beforeValue = beforeValue + '' + key;

        if(checkValidator.illegal(beforeValue, filter) == false){

            event.returnValue = false;
        }
    },

    limit : function () {

        var beforeValue = event.srcElement.value;

        var limitCnt = event.srcElement.maxLength;

        if(StringUtils.getByteLength(beforeValue) > limitCnt) {
            alert("최대글자수를 초과했습니다. 초과된 글자는 자동으로 삭제됩니다.");
            event.srcElement.value = StringUtils.getLimitChar(beforeValue, limitCnt);

            return false;
        }

        return true;
    }

}

var checkValidator = {

    fromYyyy : 1000,
    toYyyy : 2200,

    zero : function (val) {
        var iVal = Number(val);

        if(isNaN(iVal)) return false;

        if(iVal != 0) return false;

        return true;
    },

    minus : function (val) {
        var iVal = Number(val);

        if(isNaN(iVal)) return false;

        if(iVal >= 0) return false;

        return true;
    },

    zeroPlus : function (val) {
        var iVal = Number(val);

        if(isNaN(iVal)) return false;

        if(iVal < 0) return false;

        return true;
    },

    plus : function (val) {
        var iVal = Number(val);

        if(isNaN(iVal)) return false;

        if(iVal <= 0) return false;

        return true;
    },

    number : function (val) {
        var iVal = Number(val);

        if(isNaN(iVal)) return false;

        return true;
    },

    numberRange : function (val, min, max) {

        if(this.zeroPlus(val) == false) return false;

        if(this.zeroPlus(min) == false) return false;

        if(this.zeroPlus(max) == false) return false;

        var iVal = Number(val);
        var iMin = Number(min);
        var iMax = Number(max);

        if(iMin <= iVal && iVal <= iMax){
            return true;
        }
        else{
            return false;
        }
    },

    year : function (val) {


        var re = new RegExp('^[1-9][0-9][0-9][0-9]$');

        if(re.test(val) == false)
            return false;
        else
            return this.numberRange(val, this.fromYyyy, this.toYyyy);
    },

    month : function (val) {

        var re = new RegExp('^[0-9]$|^[0-9][0-9]$');

        if(re.test(val) == false) {
            return false;
        }
        else {

            return this.numberRange(val, 1, 12);

        }
    },

    day : function (valYear, valMonth, varDay) {

        if(this.year(valYear) == false){

            event.returnValue = false;

            alert("올바른 년도(입력예:2007)를 입력한 후에 일자를 입력하시기 바랍니다.");

            return false;
        }

        if(this.month(valMonth) == false){

            event.returnValue = false;

            alert("올바른 월(입력예:09)를 입력한 후에 일자를 입력하시기 바랍니다.");

            return false;
        }

        var re = new RegExp('^[0-9]$|^[0-9][0-9]$');

        if(re.test(varDay) == false) return false;


        var validLastDay = DateUtils.getYoundal(valYear, valMonth);


        if(this.numberRange(varDay, 1, validLastDay) == false){

            return false;
        }

        return true;
    },

    // 년, 월 에 대한 Validation 을 체크한 후에 수행해야한다.
    day2 : function (valYear, valMonth, varDay) {

        var re = new RegExp('^[0-9]$|^[0-9][0-9]$');

        if(re.test(varDay) == false) return false;


        var validLastDay = DateUtils.getYoundal(valYear, valMonth);


        if(this.numberRange(varDay, 1, validLastDay) == false){

            return false;
        }

        return true;
    },

    hour : function (val) {

        var re = new RegExp('^[0-9][0-9]$');

        if(re.test(val) == false)
            return false;
        else
            return this.numberRange(val, 0, 23);
    },

    minute : function (val) {

        var re = new RegExp('^[0-9][0-9]$');

        if(re.test(val) == false)
            return false;
        else
            return this.numberRange(val, 0, 59);
    },

    seconds : function (val) {

        var re = new RegExp('^[0-9][0-9]$');

        if(re.test(val) == false)
            return false;
        else
            return this.numberRange(val, 0, 59);
    },

    find : function (val, filter) {

        var re = new RegExp(filter);

        if(re.test(val) == true)  return false;

            return true;
        },

    illegal : function (val, filter) {

        if(this.find(val, filter) == false) return false;

        return true;
    },

    limit : function (val, limitCnt) {

        if(StringUtils.getByteLength(val) > limitCnt) return false;

        return true;
    }
}




// Internet Explorer에서 셀렉트박스와 레이어가 겹칠시 레이어가 셀렉트 박스 뒤로 숨는 현상을 해결하는 함수
// 레이어가 셀렉트 박스를 침범하면 셀렉트 박스를 hidden 시킴
// 사용법 :
// <div id=LayerID style="display:none; position:absolute;" onpropertychange="selectbox_hidden('LayerID')">
function selectbox_hidden(layer_id)  {
    var ly = eval(layer_id);

    // 레이어 좌표
    var ly_left = ly.offsetLeft;
    var ly_top = ly.offsetTop;
    var ly_right = ly.offsetLeft + ly.offsetWidth;
    var ly_bottom = ly.offsetTop + ly.offsetHeight;

    // 셀렉트박스의 좌표
    var el;

    var arrSelect = document.getElementsByTagName("select");

    for (i=0; i<arrSelect.length; i++) {
        el = arrSelect[i];
        var el_left = el_top = 0;
        var obj = el;
        if (obj.offsetParent) {
            while (obj.offsetParent) {
                el_left += obj.offsetLeft;
                el_top += obj.offsetTop;
                obj = obj.offsetParent;
            }
        }
        el_left += el.clientLeft;
        el_top += el.clientTop;
        el_right = el_left + el.clientWidth;
        el_bottom = el_top + el.clientHeight;

        //alert(el.name);
        // 좌표를 따져 레이어가 셀렉트 박스를 침범했으면 셀렉트 박스를 hidden 시킴
        if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) || (el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||  (el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) || (el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) )
            el.style.visibility = 'hidden';
    }
}

// 감추어진 셀렉트 박스를 모두 보이게 함
function selectbox_visible() {
    var arrSelect = document.getElementsByTagName("select");

    for (i=0; i<arrSelect.length; i++) {
        el = arrSelect[i];
        if (el.style.visibility == 'hidden') el.style.visibility = 'visible';
    }
}

function SetCookie(name, value) {
    var argv = arguments;
    var argc = arguments.length;
    var expires = (2 < argc) ? argv[2] : null;
    var d = new Date();
    var expire = null;
    if(expires == "today"){
        expire = new Date( d.getYear(), d.getMonth(), d.getDate(), 23, 59, 59);
    }
    else if ("max") {
        expire = new Date(  d.getYear()+1, d.getMonth(), d.getDate(), 23, 59, 59);
    }
    var path = (3 < argc) ? argv[3] : null;
    var domain = (4 < argc) ? argv[4] : null;
    var secure = (5 < argc) ? argv[5] : false;
    //alert(name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expire.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""));
    document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : ("; expires=" + expire.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");

}

function getCookie( name ) {
    var nameOfCookie = name + "=";
    var x = 0;
    while ( x <= document.cookie.length ) {
        var y = (x+nameOfCookie.length);
        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
            endOfCookie = document.cookie.length;
            return unescape( document.cookie.substring( y, endOfCookie ) );
        }
        x = document.cookie.indexOf( " ", x ) + 1;
        if ( x == 0 )
            break;
    }
    return "";
}

function deleteCookie(name){
    var expireDate = new Date();
    expireDate.setDate( expireDate.getDate() - 1);
    document.cookie = name + '=' + null + '; path=/; expires=' + expireDate.toGMTString();
}


/***************************************************
함수 checkData()
	-폼데이터를 서브밋하기 전에 데이터 적합성 체크
	-입력 패러미터
		ObjName		:컨트롤 이름(txtTitle...)
		DataType	:문자열/숫자 구분.문자열이면 "S",숫자면 "N"(String/Number)
					 문자열이면 최대길이체크,숫자면 숫자여부체크
		IsEssential	:필수여부.필수입력사항이면 "Y",아니면 "N"
					 "Y"면서 값을 입력하지 않으면 return false
		MaxLen		:문자열일경우 최대길이(100을 지정하면 한글50자,영문100자)
					 입력값이 최대길이를 초과하면 return false
		msg			:사용자에게 보여주는 메시지에서 사용할 항목 이름
	-사용예
		<script language="javascript">
		function Form(){
			if(!checkData('form1','TextBox1','S','Y','10','제목')) return false;
			if(!checkData('form1','TextBox2','S','N','20','비고')) return false;
			if(!checkData('form1','TextBox3','N','Y','','가격')) return false;
			return true;
		}
		</script>
					
***************************************************/


function checkData(FormName,ObjName,DataType,IsEssential,MaxLen,msg){
   	var obj;
   	if(FormName){
   		obj=document.forms[FormName].elements[ObjName];
   	}else{
   		obj=eval("document.all."+ObjName);
   	}
   	//var obj=document.getElementsByName(ObjName);
   	//alert(obj.length);
   	if(!obj){
   		alert(ObjName + " 잘못된 객체입니다");
   		return false;
   	}
   	  
   	var sVal="";
   	if(obj.length==null){
   		sVal=obj.value;		
	}else{
		for(var i=0;i<obj.length;i++){

			if(obj[i].checked || obj[i].selected){
				sVal=obj[i].value;
				break;
			}
		}
	}

	if(sVal.indexOf("|")>-1){sVal=sVal.substring(0,sVal.indexOf("|"));}	
   	
   	DataType=DataType.toUpperCase();
   	IsEssential=IsEssential.toUpperCase();   	
   	
   	if(IsEssential=="Y"){
   		if(!checkEssential(sVal,msg)){
   			setFocus(obj);
   			return false;
   		}
   	}
   	
   	if(DataType=="S"){
   		if(!checkMaxLen(sVal,MaxLen,msg)){
   			setFocus(obj);
   			return false;
   		}   		
   	}
   	
   	if(DataType=="N"){
   		if(!checkNumeric(sVal,msg)){
   			setFocus(obj);
   			return false;
   		}   		
   	}
   	
   	return true;
}

//값입력여부 체크
//입력값있으면 true,없으면 false
function checkEssential(str,msg){
	if(!str){
		alert(msg+'을(를) 입력해 주세요.');
		return false;
	}else{
		return true;	
	}
}

//숫자여부 체크
//숫자이면 true,아니면 false
function checkNumeric(str,msg){
	if(isNaN(str)){
		alert(msg+'에는 숫자만 입력할 수 있습니다!');
		return false;
	}else{
		return true;	
	}
}

//최대길이 체크
//입력값이 최대길이를 초과하면 false
function checkMaxLen(str,MaxLen,msg){
	if(parseInt(getLength(str))>parseInt(MaxLen)){
		alert("["+msg+"] 한글은 "+(MaxLen/2)+"자, 영문.숫자.공백은 "+MaxLen+"자를 초과할수 없습니다.");
		return false;
	}else{
		return true;	
	}
}

//문자열길이 구하기(한글은 2자리로 계산)
function getLength(str){
	if(str==""){return 0;}
	
	var len=0;	
	
   	for(var i=0;i<str.length;i++){
     	var chr=str.charCodeAt(i);
     	
		if(chr>0 && chr<255){
			len=len+1;
		}else{
			len=len+2;
		}
   }
   
   return len;
}

//컨트롤에 포커스주기
function setFocus(obj){
	if(!obj){return;}
	if(obj.disabled==true){return;}
	if(obj.type=="hidden"){return;}

	if(obj.length!=null){
		obj[0].focus();
	}else{
		obj.focus();
	}
}



/***************************************************
	함수명 : ltrim
	기능    : 왼쪽 공백 제거 
***************************************************/	
String.prototype.ltrim = function() {
    var re = /\s*((\S+\s*)*)/;
    return this.replace(re, "$1");
 }

/***************************************************
	함수명 : rtrim
	기능    : 오른쪽  공백 제거 
***************************************************/	
String.prototype.rtrim = function() {
 var re = /((\s*\S+)*)\s*/;
 return this.replace(re, "$1");
}

/***************************************************
	함수명 : trim
	기능    : 공백 제거 
***************************************************/
String.prototype.trim = function() {
 return this.ltrim().rtrim();
}

/***************************************************
	함수명 : selectInit(obj,value)
	기능    : 콤보 박스를 해당 값으로 선택되도록 하는 기능
	파라미터 : obj - select Object
			, value  - 선택되어질 값
***************************************************/	
function selectInit(pObj, pValue){
	var obj = document.getElementById(pObj);
	var objCol = obj.options

	for (idx = 0 ; idx < objCol.length ; idx++){
		if(objCol[idx].value == pValue){
			objCol[idx].selected = true;
			return true;
		}
	}
	return false;
}

/***************************************************
	함수명 : radionInit(obj,value)
	기능    : 라디오 버튼을 해당 값으로 선택되도록 하는 기능
	파라미터 : obj - select Object
			, value  - 선택되어질 값
***************************************************/	
function radioInit(pObj, pValue){
	var objCol = document.getElementsByName(pObj);
	for (idx = 0 ; idx < objCol.length ; idx++){
		if(objCol[idx].value==pValue)
			objCol[idx].checked=true;
	}
}

/***************************************************
	함수명 : radionInit(obj,value)
	기능    : 라디오 버튼을 해당 값으로 선택되도록 하는 기능
	파라미터 : obj - select Object
			, value  - 선택되어질 값
***************************************************/	
function radioValue(pObj){
	var objCol = document.getElementsByName(pObj);
	for (idx = 0 ; idx < objCol.length ; idx++){
		if(objCol[idx].checked){
			return objCol[idx].value;
		}
	}
	return "";
}

/***************************************************
	함수명 : radionInit(obj,value)
	기능    : 라디오 버튼을 해당 값으로 선택되도록 하는 기능
	파라미터 : obj - select Object
			, value  - 선택되어질 값
***************************************************/	
function radioReset(pObj){
	var objCol = document.getElementsByName(pObj);
	for (idx = 0 ; idx < objCol.length ; idx++){
		objCol[idx].checked = false;		
	}
}

/***************************************************
	함수명 : fileUpload()
	기능    : 파일 업로드 
***************************************************/
/*
function fileUpload(module,callback,limitsize, w, h){
	//var winsize = "width=300,height=200,status=yes,scrollbars=no";
	var reqUrl = "/childFund-admin/admin-bas/fileupload.do?_method=uploadForm";
	reqUrl +="&module="+module;
	reqUrl +="&limitSize="+limitsize;
	reqUrl +="&callback="+callback;
	
	popupWindow("upload",reqUrl, w, h);
}
*/
/***************************************************
	함수명 : fileUpload()
	기능    : 파일 업로드 (이미지 업로드)
***************************************************/
function fileUpload(module,callback,limitsize){
	//var winsize = "width=300,height=200,status=yes,scrollbars=no";
	var reqUrl = "/admin-bas/fileupload.do?_method=uploadForm";
	reqUrl +="&module="+module;
	reqUrl +="&limitSize="+limitsize;
	reqUrl +="&callback="+callback;
	var w = 380;
	var h = 200;
	popupWindow("upload",reqUrl, w, h);
}



/***************************************************
	함수명 : fileUpload_Ext()
	기능    : 파일 업로드 (확장자 제한)
***************************************************/
function fileUpload_Ext(module,callback,limitsize,exts){
	//var winsize = "width=300,height=200,status=yes,scrollbars=no";
	var reqUrl = "/admin-bas/fileupload.do?_method=uploadForm";
	reqUrl +="&module="+module;
	reqUrl +="&limitSize="+limitsize;
	reqUrl +="&callback="+callback;
	reqUrl +="&exts="+exts;
	var w = 380;
	var h = 200;
	popupWindow("upload",reqUrl, w, h);
}


/***************************************************
	함수명 : fileUpload_FullExt()
	기능    : 파일 업로드 (게시판 용 : 파일 업로드 가능 파일 확장자 지정 )
***************************************************/
function fileUpload_FullExt(module,callback,limitsize){
	//var winsize = "width=300,height=200,status=yes,scrollbars=no";
	var reqUrl = "/admin-bas/fileupload.do?_method=uploadForm";
	var exts = "txt,doc,xls,ppt,docx,pptx,xlsx,hwp,gul,hpt,hst,pdf,jpg,gif,bmp,png,zip,alz";
	reqUrl +="&module="+module;
	reqUrl +="&limitSize="+limitsize;
	reqUrl +="&callback="+callback;
	reqUrl +="&exts="+exts;
	var w = 380;
	var h = 200;
	popupWindow("upload",reqUrl, w, h);
}



/***************************************************
	기능     : Div 위치 설정 및 숨김 
****************************************************/
//Div 숨김 
function closeDivShow(objID){
	document.getElementById(objID).style.display = "none";	
}

//스크롤 설정과 DIV설정 
function setDivShow(iframe_name, div_name, popup_url, ctl_pos){
	if(iframe_name != '' && popup_url != '')
		document.getElementById(iframe_name).src = popup_url;	//주소이동
			
	var topMenuTerm = 150;	//탑메뉴 높이는 빼야함 
	var setScrollPos  = 0 ;
	if(iframe_name != '')
		 setScrollPos = ctl_pos.y - parseInt(document.getElementById(iframe_name).height);
	else
		setScrollPos = ctl_pos.y
		
	if(setScrollPos < 0)
		setScrollPos = ctl_pos.y - topMenuTerm;
		
	//alert(document.body.scrollTop + ":" + setScrollPos);
	document.body.scrollTop = setScrollPos;	//스크롤위치
	document.getElementById(div_name).style.top = ctl_pos.y +"px"; //위치설정
	document.getElementById(div_name).style.left = ctl_pos.x +"px";	//위치설정
	document.getElementById(div_name).style.display = "inline"; //DIV 활성화

	if(ie6_common){		//ie 6.0 
		document.getElementById(div_name).style.zIndex = 100;
	}

}

//위치설정함수
function Point(iX, iY){
	this.x = iX;
	this.y = iY;
}

//콘트롤위치 찾기
function findCtlPos(ctl_obj){
 	var pos = null;
 	var curleft = 0;
 	var curtop = 0;
 	var ctl_height = parseInt(ctl_obj.offsetHeight);
 	
 	if(ctl_obj.offsetParent){ 
		while(ctl_obj.offsetParent){  	//부모노드가 있을때까지 돕니다(없다면 루트죠)
   		curleft += ctl_obj.offsetLeft;  //부모노드로 부터 X좌표를 구합니다.
   		curtop += ctl_obj.offsetTop;  	//부모노드로 부터 X좌표를 구합니다.
   		ctl_obj = ctl_obj.offsetParent;    	//현재노드값에 부모노드를  대입합니다.
 	 	}
 	}
 	else if(ctl_obj.x && ctl_obj.x){ 
 		curleft += ctl_obj.x;
 		curtop += ctl_obj.y;
 	}
 	
 	curtop = parseInt(curtop)+ctl_height+1
 	pos = new Point(curleft, curtop);
 	
 	return pos;
}



//콘트롤위치 찾기
function findNormalPos(w,h){
 	var pos = null; 	
 	//var BT = document.documentElement.scrollTop;
 	//var BW = 0;
 	var SH = screen.availHeight ;
 	var SW = screen.availWidth ;
 	var curLeft = 0;
 	var curTop = 0;
 	
	//if(isIE) { BW = document.body.offsetWidth; } else { BW = window.innerWidth; }
	//if(BW<document.documentElement.scrollWidth) { BW = document.documentElement.scrollWidth; }
	//SH = document.body.offsetHeight;
	//curLeft =  (SW/2 - w/2) ;
	//curTop = (SH/2  - h/2 ) + BT;	
	
	var BT = (document.documentElement.scrollTop == 0 ? document.body.scrollTop  : document.documentElement.scrollTop);
	var BL = (document.documentElement.scrollLeft == 0 ? document.body.scrollLeft : document.documentElement.scrollLeft);

	curLeft = ((document.documentElement.clientWidth - w) / 2)  +  BL;
	curTop = ((document.documentElement.clientHeight - h) / 2)   + BT;

 	pos = new Point(curLeft, curTop); 	
 	return pos;
}


/***************************************************
	함수명 : is_valid_email()
	기능    : 이메일 유효성 체크 
***************************************************/
function is_valid_email(email)
{
	var pattern = /^[_a-zA-Z0-9-\.]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/;
	return (pattern.test(email)) ? true : false;
}

/***************************************************
	함수명 : setMessage
	기능    : alert 메세지 표시 
***************************************************/
function setMessage(objID,title,message){
	var titleObj = document.getElementById(objID+"_title");
	var contentObj = document.getElementById(objID+"_content"); 
	titleObj.innerHTML = title;	
	contentObj.innerHTML = message;
}

/***************************************************
	함수명 : setMessage
	기능    : alert 메세지 표시 
***************************************************/
function setMessageTitle(objID,title){
	var titleObj = document.getElementById(objID+"_title");
	titleObj.innerHTML = title;		
}

/***************************************************
	함수명 : setMessage
	기능    : alert 메세지 표시 
***************************************************/
/*
function setMessage(objID,title){
	var titleObj = document.getElementById(objID+"_title");
	titleObj.innerHTML = title;	
}
*/

/***************************************************
	함수명 : alertMessage
	기능    : div alert 호출 
***************************************************/
/*
function alertMessage(objID,title,message,width){
	var obj = document.getElementById(objID);
	setMessage(objID,title,message,width);
	WizModalOpen(obj, true, width);
}
*/
/***************************************************
	함수명 : alertMessage
	기능    : div alert 호출 
***************************************************/
function alertMessage(objID,title,message,width,height){
	var obj = document.getElementById(objID);
	setMessage(objID,title,message);
	WizModalOpen(obj, true, width,height);
}


/***************************************************
	함수명 : popupWindow
	기능    : 팝업 
***************************************************/
function popupWindow(winname, reqUrl, w, h){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2; 
	var winsize = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable'; 
	
	var newWin = window.open(reqUrl,winname,winsize);
	newWin.focus();
}

/***************************************************
	함수명 : popupWindowS
	기능    : 팝업 (스크롤 포함) 
***************************************************/
function popupWindowS(winname, reqUrl, w, h, s){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2; 
	var winsize = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+s+',resizable'; 
	
	var newWin = window.open(reqUrl,winname,winsize);
	newWin.focus();
}



/***************************************************
	함수명 : delCookie
	기능    : 쿠키 
***************************************************/
function delCookie(name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
	((expires) ? "; expires=" + expires : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
}

/***************************************************
	함수명 : setCookie
	기능    : 쿠키 설정
***************************************************/
function setCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
	((expires) ? "; expires=" + expires.toGMTString() : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
}

/***************************************************
	함수명 : getCookieVal
	기능    : 쿠키 값 순서에 의해 가져오기
***************************************************/
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
	endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

/***************************************************
	함수명 : getCookieName
	기능    : 쿠키 값 이름으로 가져오기
***************************************************/
function getCookieName (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return null;
}

/***************************************************
	함수명 : inputNumber()
	기능    : input box에 숫자만 입력할 수 있도록 하는 기능
***************************************************/
function inputNumber(){
	if((event.keyCode<48) || (event.keyCode>57)) 
		event.returnValue=false;
}


/***************************************************
	함수명 : gotoFileLink()
	기능    : Upload 파일 링크 (한글 파일명일 경우 필수 사용)
***************************************************/
function gotoFileLink(pObj, pLink){
	var v_filePath= pLink;
	var v_idx = 0 ;
	var v_fileName = null;
	if(pLink != null && pLink !=""){
		v_idx = v_filePath.lastIndexOf("/");
		v_fileName = pLink.substring(v_idx+1);	//파일명 
		v_filePath = pLink.substring(0,v_idx+1); //파일경로 
	}
	pObj.target = "_blank";
	pObj.href = v_filePath + encodeURIComponent(v_fileName);
}


/***************************************************
	함수명 : showForm
	기능    : form 띄우기 
***************************************************/
function showForm(objID){
	var obj = document.getElementById(objID);
	var w = 380;
	var h = 200;
	var pos = findNormalPos(w,h);
	setDivShow('', objID, '', pos);	
}

    
/***************************************************
	함수명 : checkByteInput
	기능    : 입력 내용 바이트 수 체크 
	param : objID - input object 아이디
			displayID - byte 표기 할 object ID
			maxByte	- 최대 바이트 수 
***************************************************/
function checkByte(objID,displayID, maxByte){
	var inputObj = document.getElementsByName(objID)[0];
	var byteObj = document.getElementsByName(displayID)[0];	
	var v_byte = maxByte;
	if(inputObj !=null){
		v_byte = StringUtils.getByteLength(inputObj.value);
		if(v_byte > maxByte){			
			alert(maxByte+"byte를 초과하였습니다.");
			inputObj.value = StringUtils.getLimitChar(inputObj.value, maxByte);
			v_byte = StringUtils.getByteLength(inputObj.value);
		}		
		byteObj.innerHTML = v_byte;		
	}	
}    

/***************************************************
	함수명 : selectAllSelectBox
	기능    : 셀렉트박스 전체선택 (multiple 셀렉트박스)
***************************************************/
function selectAllSelectBox(sourceObj)
{	
	var source_index = sourceObj.length;

	for( var i = 0 ; i < source_index ; i++ )
	{
		sourceObj[i].selected = true;
	}
}	

/***************************************************
	함수명 : swf
	기능    : 플래시 실행 함수
	param : fw - 플래시 넓이
			fh - 플래시 높이
			_src - 플래시 경로
			_id - 플래시 경로
			vars - 플래시 값
***************************************************/
function swf(fw,fh,_src,_id,vars) {
	var html = ''
	+ '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="'+_id+'" width="'+fw+'" height="'+fh+'" align="middle" />\n'
	+ '<param name="allowScriptAccess" value="always" />\n'
	+ '<param name="movie" value="'+_src+'" />\n'
	+ '<param name="quality" value="high" />\n'
	+ '<param name="scale" value="exactfit" />\n'
	+ '<param name="wmode" value="transparent" />\n'
	+ '<param name="flashvars" value="'+vars+'" />\n'
	+ '<embed src="'+_src+'" wmode="transparent" flashvars="'+vars+'" scale="exactfit" quality="high" width="'+fw+'" height="'+fh+'" id="'+_id+'" name="'+_id+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
	+ '</object>\n';
	document.write(html);
}

/***************************************************
	함수명 : downloadFiles
	기능    : 다운로드 파일 
	param : file_path - 파일경로
			file_name - 저장할 파일명(원본파일명)
***************************************************/
function downloadFiles(file_path, file_name){

	var frm=document.forms["frmFileDownload"];
	
   	frm.action = "/common/fileDownload.do?_method=download";
   	frm.method = "post";
   	frm.target = "iFrameDownload";
   	
   	frm.file_path.value = file_path;
   	frm.file_name.value = file_name;
   	
   	frm.submit();
}	

function containsCharsOnly(input,chars)
{
  for(var i=0; i< input.length; i++) {
    if(chars.indexOf(input.charAt(i)) == -1)
    return false;
  }
  return  true;
}

function isNumeric(input)
{
  var chars = "0123456789";
  return containsCharsOnly(input,chars);
}

// 주민번호 입력할 때 자동으로 다음 input 으로 이동한다.
var next_go = true;
var cur_val = null;
function moveNext(id_from,id_to,maxSize) {

	var cur = document.getElementById(id_from).value;
	curSize = cur.length;
	numFlag = isNumeric(cur);

	if ( !numFlag && curSize >= 1 && cur != '00' &&  cur != '000') {
		alert('숫자를 넣어주세요');
		document.getElementById(id_from).value='';
		document.getElementById(id_from).focus();
		return false;
	}
	if (curSize == maxSize) {
		if(next_go || cur_val != cur)
		{
			cur_val = cur;
			next_go = false;
			document.getElementById(id_to).focus();
		}
		return true;
	}
	next_go = true;
}

function imageResize(obj){
	
	var newImg = new Image(); 

	newImg.src = obj.src; 
	imgw = newImg.width; 

	if(imgw > 640 ){
		obj.width = "640";
	}
}

 function winOpenAtCenter(sURL, sWindowName, w, h, sScroll) {

	  var x = (screen.width - w) / 2;
	  var y = (screen.height - h) / 2;

	  if (sScroll==null) sScroll = "no";

	  var sOption = "";
	  sOption = sOption + "toolbar=no, channelmode=no, location=no, directories=no, resizable=no, menubar=no";
	  sOption = sOption + ", scrollbars=" + sScroll + ", left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;

	  var win = window.open(sURL, sWindowName, sOption);
	  return win;
}


/********** odious additional **********/
 
 
/*
 * 링크 이동 (새창,현재창)
 */
function gfn_goLink(url,flag) {
	if (flag == "_self") {
		document.location.href = url;
	} else {
		window.open(url);
	}
}

/*
 * 통합 검색
*/
function gfn_openTotalSearchPopup() {
	var search_action = "http://search.moca.go.kr:8080/itrinity/search/search.jsp";
	
	winOpenAtCenter(search_action, "search_popup", "920", "600","yes");
}

/*
 * 출력
*/
function gfn_print() {
	window.print();
}

/*
 * 어린이 미술관 준비중 팝업
*/
function gfn_goChild() {
	var url = "/child_construct.jsp";
	
	winOpenAtCenter(url, "child_construct_popup", "600", "295","no");
}
