<!--
// 쿠키값 가져오는 메소드
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
    if (dc.length > 0) {
    begin = dc.indexOf(cname);
        if (begin != -1) {
        begin += cname.length;
        end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
            return unescape(dc.substring(begin, end));
        } 
    }
return null;
}

function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) + "; path=/" +((expires == null) ? "" : "; expires=" + expires.toGMTString());
}

function delCookie(name) {
document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}

function getValue(element) {
var value = getCookie(element.name);
    if (value != null) element.value = value;
}

function setValue(element) {
setCookie(element.name, element.value, exp);
}

var exp = new Date();
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 31));

// ?? ???? ??
function logout(url) {
        var nns = navigator.appName == "Netscape";

        if (nns)
                winobject=window.open("","", "width=400,height=250");

        else
                winobject=window.open("","", "width=400,height=250");

        winobject.moveTo(0,0);
        winobject.location=url;
} //

// ???? ???? ??? ??? ????.
// url = URL, wid = Width, hei = HEIGHT, x = X Position, y = Y Position
function slimxy(url,wid,hei,x,y){
   slimopen = window.open("", "", 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=NO,resizable=no,width='+wid+',height='+hei);
   slimopen.moveTo(x,y);
   slimopen.location=url;
} //

// ???? ???? ???.
function slim(url,wid,hei){
   window.open(url, "", 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=NO,resizable=no,width='+wid+',height='+hei);
} //

// ???? ???? ?? ??? ???.
function slimcenter(title, url, wid, hei){
        if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)
                isie=true;
        else
                isie=false;

        var windowW = wid;
        var windowH = hei;
        var windowX = Math.ceil( (window.screen.width  - windowW) / 2 );
        var windowY = Math.ceil( (window.screen.height - windowH) / 2 );

        var splashWin = window.open("", title, 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=yes,resizable=yes,width='+wid+',height='+hei);

        splashWin.resizeTo( Math.ceil( wid )       , Math.ceil( hei ) );
        splashWin.moveTo  ( Math.ceil( windowX ) , Math.ceil( windowY ) );
        splashWin.location = url;
} //

function popup_win(name,url,wid,hei){
        if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)
                isie=true;
        else
                isie=false;

        var windowW = wid;
        var windowH = hei;
        var windowX = Math.ceil( (window.screen.width  - windowW) / 2 );
        var windowY = Math.ceil( (window.screen.height - windowH) / 2 );

        name = open("", "", 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=NO,resizable=no,width='+wid+',height='+hei);

        name.resizeTo( Math.ceil( wid )       , Math.ceil( hei ) );
        name.moveTo  ( Math.ceil( windowX ) , Math.ceil( windowY ) );
        name.location = url;

} //

function popup_zipcode(name,url,wid,hei){
        if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)
                isie=true;
        else
                isie=false;

        var windowW = wid;
        var windowH = hei;
        var windowX = Math.ceil( (window.screen.width  - windowW) / 2 );
        var windowY = Math.ceil( (window.screen.height - windowH) / 2 );

        name = open("", "", 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=yes,resizable=yes,width='+wid+',height='+hei);

        name.resizeTo( Math.ceil( wid )       , Math.ceil( hei ) );
        name.moveTo  ( 0, 0 );
        name.location = url;

} //

// ??????? ???? ???? ??? ??? ??? ???.
function center(url,wid,hei){
        if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)
                isie=true;
        else
                isie=false;

        var windowW = wid;
        var windowH = hei;
        var windowX = Math.ceil( (window.screen.width  - windowW) / 2 );
        var windowY = Math.ceil( (window.screen.height - windowH) / 2 );

        var splashWin = window.open("", "", 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=yes,resizable=yes,width='+wid+',height='+hei);

        splashWin.resizeTo( Math.ceil( wid )       , Math.ceil( hei ) );
        splashWin.moveTo  ( Math.ceil( windowX ) , Math.ceil( windowY ) );
        splashWin.location = url;

} //

// ?????? ???????? ?????? ???? ????
function fullpopup(url){
        if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)
                isie=true;
        else
                isie=false;

        var windowX = window.screen.width;
        var windowY = window.screen.height;

        var splashWin = window.open("", "", 'toolbar=0,location=0,directories=0, status=no,menubar=0,scrollbars=yes,resizable=yes,width='+wid+',height='+hei);

        splashWin.resizeTo( windowX, windowY );
        splashWin.moveTo  ( 0, 0);
        splashWin.location = url;

} //


/* ?????? ?????????? ???? ?????????? ???? 0:????????, 1:???????? */
function isNumber(strings) {
    var c;
    var i;
    var i_point = 0;
    if(strings.length<=0) return(0);
    for(i=0;i<strings.length;i++) {
        c = strings.charAt(i);
        if((c < '0' || c > '9') && c != '.'){
           return(1);
        }
        if(c < '.'){
           i_point =  i_point + 1;
        }
    }
    if(i_point > 1) return(1);
    return(0);
}

/* ?????? ?????????? ???? ?????? ?????? ???? 0:????????, 1:???????? */
function isAlpha(strings) {
    var c;
    var i;
    if(strings.length<=0) return(0);
    for(i=0;i<strings.length;i++) {
        c = strings.charAt(i);
        if((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') || c == '_'){
           return(1);
        }
    }
}


/* ?????? ???????????? ?????? ?????? ???? ???? ???????? ???????? */
function Trim(strings)
{
    var retString = "";
    var c;
    var i;
    for(i=0;i<strings.length;i++) {
        c = strings.charAt(i);
        if(c != ' '){
           retString += c;
        }
    }
    return(retString);
}

function cell_rollover(cell, classname) {
  if (document.all || document.getElementById) {
    cell.classBackup = cell.className;
    cell.className   = classname;
  }
}

function cell_rollout(cell)
{
  if (document.all || document.getElementById) {
    cell.className   = cell.classBackup;
  }
}

function fillZero(n, digits) {
  var space = '';
  n = n.toString();

  if (n.length < digits) {
    for (var i = 0; i < digits - n.length; i++)
      space += '0';
  }
  return space + n;
}

//-->

