


// JScript ÆÄÀÏ

// Copyright(c)2007 Csharpean.com All rights reserved.
// Title : Javascript Liberary in commons
// Version : 0.x
// Date : 2007-03-10
// Client : Kormedi.com
// Developer : ±è¿µÈ¯

function makeSrartPage(obj) {

    obj.style.behavior = "url(#default#homepage)";
    obj.setHomePage("http://www.kormedi.com");
}

function makeFavorite() {
    window.external.AddFavorite('http://www.kormedi.com', 'ÄÚ¸Þµð´åÄÄ-°Ç°­À» À§ÇÑ Á¤Á÷ÇÑ Áö½Ä');
}

function newsMovie(link) {
    window.open(link, 'popNewsPlayer', 'width=300, height=300, scrollbars=no');
}

function exposeRandom(from, to, expose) {
    var data = new Array();
    var num = 0;
    var checker = true;

    // ¼ø¼­°¡ Àß¸ø µé¾î¿ÔÀ» °æ¿ì
    if (from > to) {
        var temp = to;
        from = temp;
        to = from;
        // °°Àº °ªÀÌ µé¾î¿Â °æ¿ì
    }
    else if (from == to) {
        return data;
    }

    while (true) {
        if (data.length == expose) break;

        num = parseInt(from + Math.random() * to);
        checker = true;
        for (var i = 0; i < data.length; i++) {
            if (data[i] == num)
                checker = false;
        }

        if (checker == true)
            data[data.length] = num;
    }

    return data;
}

function fStrCut(data, len, tail) {
    data = data.replace(/&quot;/gi, "");
    data = data.replace(/&#39;/gi, "");

    return fStrLen(data, len, tail);
}

function fStrLen(str, len, tail) {

    if (!tail) tail = "";
    var l = 0, c = 0, l2 = 0, u = "", s = "";
    if (len > 0) l2 = len;

    for (var i = 0; u = str.charCodeAt(i); i++) {
        if (u > 127) l += 2;
        else l++;
        if (l2) {
            s += str.charAt(i);
            if (l >= l2) {
                if (l > l2) s = s.slice(0, -1);
                return s + tail;
            }
        }
    }
    return l2 ? s : l;
}

function setPng24(obj) {
    var av = navigator.appVersion;
    if (av.indexOf("MSIE 6.0") > -1) {
        obj.width = obj.height = 1;
        obj.className = obj.className.replace(/\bpng24\b/i, '');
        obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + obj.src + "',sizingMethod='image');"
        obj.src = '';
        return '';
    }
}
// type 0 : ÄÁÅÙÃ÷ ·¹ÀÌ¾î Ä«ÇÇ, 1 : ÄÁÅÙÃ÷ ·¹ÀÌ¾î Ä«ÇÇ(Á¦¸ñ, ÄÁÅÙÃ÷) + ¸µÅ©, 2 : ÀÚÃ¼ ÄÁÅÙÃ÷ Á¶È¸ Ãâ·Â
function ContentSendMail(mail_type, target, idx, subject, content, writer, regdate, hit, recommand) {
    window.open('/popup/ContentSendMail.aspx?mail_type=' + mail_type + '&target=' + target + '&idx=' + idx + '&subject=' + subject + '&content=' + content + '&writer=' + writer + '&regdate=' + regdate + '&hit=' + hit + '&recommand=' + recommand, 'print_win', 'top=10,left=10,toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=600,height=500');
}

// type 0 : ÄÁÅÙÃ÷ ·¹ÀÌ¾î Ä«ÇÇ, 1 : ÄÁÅÙÃ÷ ·¹ÀÌ¾î Ä«ÇÇ(Á¦¸ñ, ÄÁÅÙÃ÷) + ¸µÅ©, 2 : ÀÚÃ¼ ÄÁÅÙÃ÷ Á¶È¸ Ãâ·Â
function ContentPrint(print_type, target, idx, subject, content, writer, regdate, hit, recommand) {
    window.open('/popup/ContentPrint.aspx?print_type=' + print_type + '&target=' + target + '&idx=' + idx + '&subject=' + subject + '&content=' + content + '&writer=' + writer + '&regdate=' + regdate + '&hit=' + hit + '&recommand=' + recommand, 'print_win', 'top=10,left=10,toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=680,height=500');
}


function isIE() {
    if (navigator.userAgent.indexOf("MSIE") >= 0) {
        return true;
    } else {
        return false;
    }
}

function ResizeIFrame(iframename) {
    var height = 0;
    if (window.navigator.appName.indexOf("Explorer") > 0) {
        height = document.frames[iframename].document.body.scrollHeight;
        document.getElementById(iframename).style.height = height;

    } else {

        var doc = document.getElementById(iframename).contentDocument || document.getElementById(iframename).contentWindow.document;
        var s = doc.body.appendChild(document.createElement('DIV'))

        s.style.clear = 'both';
        height = s.offsetTop;
        s.parentNode.removeChild(s);

        document.getElementById(iframename).style.height = height + 'px';
    }
}

function setInputInit(obj, keyword) {
    if (obj.value == "") {
        obj.value = keyword;
        return;
    } else if (obj.value == keyword) {
        obj.value = "";
        return;
    }
}

/* ¸ðµç ÀÌº¥Æ® ºÙÀÌ±â */
function addEvent(obj, eventType, func) {
    if (obj.addEventListener) {
        // firefox
        obj.addEventListener(eventType, func, true);
        return true;
    } else if (obj.attachEvent) {
        obj.attachEvent("on" + eventType, func);
        return true;
    } else {
        return false;
    }
}

function imgresize(imgobj, mx) {
    if (imgobj.width == 0) {
        setTimeout(function() { imgresize(imgobj, mx); }, 100);
    }
    else if (imgobj.width > mx) {
        imgobj.width = mx;
        //alt ÅÂ±×¸¦ ºÙÀÔ´Ï´Ù.

        imgobj.alt = "Å¬¸¯ÇÏ½Ã¸é ¿øº»ÀÌ¹ÌÁö¸¦ º¸½Ç¼ö ÀÖ½À´Ï´Ù";
        imgobj.onclick = function() { imgenlarge(imgobj.src); };
        imgobj.style.cursor = "pointer";
    }
}

function imgenlarge(imgsource) {
    var hwnd_window = window.open("", "wndPhotoenlarge", "width=800,height=600,resizable=yes,status=yes,scrollbars=yes");
    var phtml = "<html><body><img src=\"" + imgsource + "\" alt='Å¬¸¯ÇÏ½Ã¸é Ã¢À» ´Ý½À´Ï´Ù' onclick='window.close();' style='cursor:hand'></body></html>";

    hwnd_window.document.write(phtml);
}


function show_img(obj) {
    var width, height;
    if (obj.width < 550) {
        width = obj.width + 10;
    } else {
        width = 550
    }

    if (obj.height < 550) {
        height = obj.height + 10;
    } else {
        height = 500;
    }
    var childTop = (screen.height - height) / 2;
    var childLeft = (screen.width - width) / 2;

    var w = window.open("", "preview", "width=" + width + ",height=" + height + ",status=0,scrollbars=1,top=" + childTop + ",left=" + childLeft);
    w.document.open();
    w.document.write("<html><style>*{margin:0px;}</style><body><img src=\"" + obj.src + "\" style=\"cursor:pointer\" alt=\"ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ¸é Ã¢ÀÌ ´ÝÈü´Ï´Ù.\" onclick=\"self.close()\"/></body></html>");
    w.document.close();
}



function HospitalPopup(hidx) {
    popupWindowInCenter("/dictionary/hospital/HospitalProfile.aspx?idx=" + hidx, "PopUp_HospitalProfile", "width=800,height=600,scrollbars=yes")
}

function myChart(nick) {
    popupWindowInCenter('/myChart/myChart.aspx?nick=' + nick, 'PopUp_myChart', 'width=850,height=600');
};

function myChartSelfTestLog(nick) {
    popupWindowInCenter('/myChart/SelfTestLog.aspx?nick=' + nick, 'PopUp_myChart', 'width=850,height=600');
};

// Remove the Object border. - flash, applet, embedded etc
function importObject(objLink) {
    document.write(objLink);
}

function NumberOnly(obj) {
    obj.value = obj.value.replace(/\D/g, '');
}


// Pop-up Window
function popupWindowInCenter(targetUrl, windowName, properties) {
    var arr = properties.replace(/=/ig, ',').split(',');
    var childWidth, childHeight;
    for (var i = 0; i < arr.length; i++) {
        if (arr[i].toLowerCase() == "width")
            childWidth = eval(arr[i + 1]);
        if (arr[i].toLowerCase() == "height")
            childHeight = eval(arr[i + 1]);
    }
    //var childTop = event.clientY + 8;
    //var childLeft = event.clientX + 8;
    var childTop = (screen.height - childHeight) / 2;
    var childLeft = (screen.width - childWidth) / 2;
    properties += ',top=' + childTop + ',left=' + childLeft;
    var popObj = window.open(targetUrl, windowName, properties);
    popObj.focus();
}



function popupWindow(targetUrl, windowName, properties) {
    window.open(targetUrl, windowName, properties);
}
// Copyright END


//¿ìÆí¹øÈ£
function zipopen(frm, zip1, zip2, addr1, addr2) {
    //popupWindowInCenter('CheckZipcode.aspx', 'PopUp', 'width=290,height=172')

    popupWindowInCenter("/popup/checkzipcode.aspx?openfrmname=" + frm + "&nZipcode1=" + zip1 + "&nZipcode2=" + zip2 + "&nAddr1=" + addr1 + "&nAddr2=" + addr2, "zipWND", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=310,height=172");

}

//textbox autofill 
function autofill(obj, mode, str) {
    if (mode == "focus") {
        if (obj.value == str) obj.value = "";
    } else if (mode == "blur") {
        if (obj.value == "") obj.value = str;
    }
}

//getobject
function getobj(objid) {

    var obj = document.getElementById(objid);

    //if(typeof(eval("document.all." + objid)) == "undefined")
    //{
    //  alert("object not found - " + objid);
    //}

    return obj;
}

//validate form (except selectbox)
function isval(obj, msg) {
    if (obj.value == "") {
        alert("[" + msg + "] Ç×¸ñÀ» ÀÔ·ÂÇØÁÖ½Ê½Ã¿ä");
        obj.focus();
        return false;
    }

    return true;
}

//validate form (only selectbox)
function isvalselect(obj, msg) {
    if (obj.value == "") {
        alert("[" + msg + "] Ç×¸ñÀ» ¼±ÅÃÇØÁÖ½Ê½Ã¿ä");
        obj.focus();
        return false;
    }
    {
        return true;
    }
}

//return all selected checkboxes values
function get_checkbox_values(cbxid) {
    var retval = "";



    var obj = eval("document.all." + cbxid);
    if (typeof (obj) == "undefined") {

    }
    else {
        if (typeof (obj.length) == "undefined") {
            if (obj.checked) {
                retval = obj.value;
            }
        }
        else {
            for (i = 0; i < obj.length; i++) {
                if (obj[i].checked) {
                    if (retval != "") retval += ",";
                    retval += obj[i].value;
                }
            }
        }
    }

    return retval;
}

//return now document page url (replaced url parameter by ^)
function getNowurl() {
    return document.location.href.replace(/&/gi, "^");
}

//select options move function
function ddlmove(obj, up_down) {

    //var obj = document.frm.lbxList2;

    var now_seq = obj.selectedIndex;

    if (now_seq == -1) {
        alert("µ¥ÀÌÅÍ¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
        return;
    }
    if (up_down == "up" && now_seq == 0) {
        return;
    }
    if (up_down == "down" && now_seq == (obj.length - 1)) {
        return;
    }

    if (up_down == "up") {
        var next_seq = now_seq - 1;
    }
    else {
        var next_seq = now_seq + 1;
    }

    var temp_value = obj.options[next_seq].value;
    var temp_text = obj.options[next_seq].text;

    obj.options[next_seq].value = obj.options[now_seq].value;
    obj.options[next_seq].text = obj.options[now_seq].text;

    obj.options[now_seq].value = temp_value;
    obj.options[now_seq].text = temp_text;

    obj.selectedIndex = next_seq;



}


function Sear_Con(typename, typecode) {
    alert("Not implemented - " + typename + " : " + typecode);
}

function getLanguage() {
    var languageinfo = navigator.language ? navigator.language : navigator.userLanguage
    return languageinfo
}


function embeded_page_load(objid) {
    //alert("loaded");

    document.getElementById(objid).style.height = document.frames[objid].document.body.scrollHeight;

    var innerBody = document.getElementById(objid).contentWindow.document.body;
    var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);


    // alert("Á§ÀÏ" + innerHeight);
    //document.getElementById('ifr').style.height = height;


}


function go_login() {
    location.href = "/login/login.aspx?url=" + document.location.href.replace(/&/gi, "^");
}



function IsHangul(str) {
    var retval = true;

    for (i = 0; i < str.length; i++) {
        if (!((str.charCodeAt(i) > 0x3130 && str.charCodeAt(i) < 0x318F) || (str.charCodeAt(i) >= 0xAC00 && str.charCodeAt(i) <= 0xD7A3))) {
            retval = false;
        }
    }

    return retval;
}



function adultlogin() {
    ans = confirm("19¼¼ ÀÌ»ó¸¸ ¿­¶÷°¡´ÉÇÑ ÄÁÅÙÃ÷ ÀÔ´Ï´Ù.\n\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?");
    if (ans) {
        go_login();
    }
}

function adultno() {
    alert("19¼¼ ÀÌ»ó¸¸ ¿­¶÷°¡´ÉÇÑ ÄÁÅÙÃ÷ ÀÔ´Ï´Ù.");
}

//ÇöÀçÀÇ URL Á¤º¸¸¦ & °¡ ^ ·Î Ä¡È¯ÇÑ »óÅÂ·Î ¹ÝÈ¯
function getNowurl() {
    return location.href.replace(/&/gi, "^");
}













var xmlhttp = false;
var resultxml = "";


//initiates the XMLHttpRequest object
//as found here: http://www.webpasties.com/xmlHttpRequest
function createXmlHttp() {

    if (window.ActiveXObject) {
        //Win e4,e5,e6¿ë
        try {
            return new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                return new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e2) {
                return null;
            }
        }
    } else if (window.XMLHttpRequest) {
        //Win Mac Linux m1,f1,o8 Mac s1 Linux k3¿ë
        return new XMLHttpRequest();
    } else {
        return null;
    }
}



function executeXmlHttp(callurl, callbackfunction) {
    xmlhttp = new createXmlHttp();

    if (xmlhttp.readyState == 4 || xmlhttp.readyState == 0) {
        var xmlurl = callurl; //"./xhttp_filelist.aspx?tblname=<%=Request["tblname"] %>&seqvalue=<%=Request["seqvalue"] %>&viewmode=<%=viewmode %>";


        //window.open(xmlurl);
        xmlhttp.open("GET", xmlurl);
        xmlhttp.onreadystatechange = function() { readerXmlHttp(callbackfunction); };
        xmlhttp.send(null);

    }
}

function readerXmlHttp(callbackfunction) {
    if (xmlhttp.readystate == 4) {
        if (xmlhttp.status == 200) {

            resultxml = xmlhttp.responseXML;
            eval(callbackfunction);
        }
        else {
            switch (xmlhttp.status) {
                case 500:
                    alert("Çü½ÄÀÌ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
                    break;
                default:
                    alert(xmlhttp.status);
                    break;
            }
        }
    }
}

function strtrim(str) {
    return str.replace(/(^\s*)|(\s*$)/gi, "");
}



function TagNameSearch(e) {
    var in_baseurl = "";
    if (typeof (const_baseurl) != "undefined") {
        in_baseurl = const_baseurl;
    }
    location.href = in_baseurl + "/dictionary/separate/Search_Tag.aspx?searchstr=" + escape(e);
}

//-- SearchKeywordCheck
//--  
function SearchKeywordCheck(val) {
    var keyword = Trim(val);
    if (keyword != "" && keyword.length < 2) {
        alert('°Ë»ö¾î´Â 2ÀÚ ÀÌ»óÀÔ´Ï´Ù.');
        return false;
    }

    for (var i = 0; i < keyword.length; i++) {
        if (keyword.charAt(i) == "%" || keyword.charAt(i) == "_" || keyword.charAt(i) == "'") {
            alert("Æ¯¼ö¹®ÀÚ´Â °Ë»ö¾î·Î ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
            return false;
        }
    }

    return true;
}


//-- Trim
//-- 
function Trim(s) {
    s = s.replace(/^\s*/, '').replace(/\s*$/, '');
    return s;
}



//onmouseover onmouseout


function MM_swapImgRestore() { //v3.0
    var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages() { //v3.0
    var d = document; if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; } 
    }
}

function MM_findObj(n, d) { //v4.01
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
    var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
        if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
}

function MM_showHideLayers() { //v9.0
    var i, p, v, obj, args = MM_showHideLayers.arguments;
    for (i = 0; i < (args.length - 2); i += 3)
        with (document) if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
        obj.visibility = v;
    }
}
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 setCookie(cookieName, cookieValue, expireDate) {
    var today = new Date();
    //today.setDate( today.getDate() + parseInt( expireDate ) );
    today.setMonth = today.getMonth();
    today.setDate = today.getDate();
    today.setHours(23);
    today.setMinutes(59);
    today.setSeconds(60);

    document.cookie = cookieName + "=" + escape(cookieValue) + "; path=/; expires=" + today.toGMTString() + ";";


}

// ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©
function CheckIDNum(ssn1, ssn2) {
    var ssn1 = getobj(ssn1);
    var ssn2 = getobj(ssn2);

    // ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÚ¸®¼ö¿¡ ¸Â°Ô ÀÔ·ÂÇß´ÂÁö Ã¼Å©
    if (ssn2.value.split(" ").join("") == "") {
        alert('ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.');
        ssn1.focus();
        return false;
    }
    if (ssn1.value.length != 6) {
        alert('ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À');
        ssn1.focus();
        return false;
    }
    if (ssn2.value.length != 7) {
        alert('ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.');
        ssn2.focus();
        return false;
    }
    if (isNaN(ssn1.value) || isNaN(ssn2.value)) {
        ssn1.value = ""
        ssn2.value = ""
        alert('ÁÖ¹Îµî·Ï¹øÈ£´Â ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.');
        return false;
    }

    var chk = 0;
    for (var i = 0; i <= 5; i++) {
        chk = chk + ((i % 8 + 2) * parseInt(ssn1.value.substring(i, i + 1)))
    }
    for (var i = 6; i <= 11; i++) {
        chk = chk + ((i % 8 + 2) * parseInt(ssn2.value.substring(i - 6, i - 5)))
    }

    chk = 11 - (chk % 11)
    chk = chk % 10

    if (chk != ssn2.value.substring(6, 7)) {
        alert('¸ÂÁö ¾Ê´Â ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.');
        ssn1.focus();
        return false;
    }

    return true;

}
// À©µµ¿ì resize°ü·Ã
topW = 0;
topH = 0;

function setWH() {
    if (document.all) {
        cW = document.body.offsetWidth
        cH = document.body.offsetHeight
        window.resizeTo(500, 500)
        barsW = 500 - document.body.offsetWidth
        barsH = 500 - document.body.offsetHeight
        wW = barsW + cW
        wH = barsH + cH
        window.resizeTo(wW, wH)
    }
    else {
        wW = window.outerWidth
        wH = window.outerHeight
    }

    topW = wW;
    topH = wH;
}

function buildWH() {
    setWH();
    topW = topW - document.body.clientWidth;
    topH = topH - document.body.clientHeight;
}

function resizeWH(width, height) {
    reW = width + topW;
    reH = height + topH;
    window.resizeTo(reW, reH);
}


// Object ÅÂ±× Ãâ·Â
function SetObjectTag(val) {
    document.write(val);
}

function SetObjectTag2(val) {
    alert("2");
    //    document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='240' height='35'><param name='movie' value='" + val + "'>");
    //    document.writeln("	   <param name='allowScriptAccess' value='always'/>");
    //    document.writeln("	   <param name='movie' value='" + val + "' />");
    //    document.writeln("	   <param name='quality' value='high' />");
    //    document.writeln("	   <param name='quality' value='high'>");
    //    document.writeln("	   <param name='wmode' value='transparent' />");
    //    document.writeln("	   <embed src='" + val + "' quality='high' type='application/x-shockwave-flash' width='240' height='35'></embed>");
    //    document.writeln("</object>");

}

//¿ÀÅä Æ÷Ä¿½º
function AutoFocus(input1, input2, fld_len) {
    var str = input1.value.length;
    if (str == fld_len)
        input2.focus();
}

function checkAlphaNum(it)//¿µ¹® ¼ýÀÚ Á¶ÇÕ
{
    var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@.';
    var numeric = '1234567890';
    var blank = ' ';
    var nonkorean = alpha + numeric;
    var i, y = 0;
    var t = it.value;
    for (i = 0; i < t.length; i++) {
        if (nonkorean.indexOf(t.substring(i, i + 1)) < 0) {
            y = y + 1;

        }
    }
    if (y > 0) {

        alert("¿µ¹®¶Ç´Â ¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä.");
        it.value = "";
        it.focus();

    }
}

function checkHangul(it)//ÇÑ±Û
{
    if (it.value == "") return;
    var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@.';
    var numeric = '1234567890';
    var blank = ' ';
    var nonkorean = alpha + numeric;
    var i, y = 0;
    var t = it.value;
    for (i = 0; i < t.length; i++) {
        if (nonkorean.indexOf(t.substring(i, i + 1)) < 0) {
            y = y + 1;

        }
    }
    if (y <= 0) {

        alert("ÇÑ±Û¸¸ ÀÔ·ÂÇÏ¼¼¿ä.");
        it.value = "";
        it.focus();

    }
}

function checkNumber() {//¼ýÀÚ¸¸ ÀÔ·Â
    var objEv = event.srcElement;
    var numPattern = /([^0-9])/;
    numPattern = objEv.value.match(numPattern);
    if (numPattern != null) {
        alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
        objEv.value = "";
        objEv.focus();
        return false;
    }
}

function checkEnter(str01, str02) {
    if (event.keyCode == 13 && str02 == "focus") {
        str01.focus();
    }
    if (event.keyCode == 13 && str02 == "send") {
        if (str01 == "jumin") ssn_chk();
        if (str01 == "search") fnBrdSearch(document.form1);
    }
}

//-->