
document.domain = "paran.com";

document.write('<script type="text/javascript" src="/js/common/scriptaculous.js?load=effects,dragdrop"><\/script>');

/*#########################################################
# ÀÌ¹ÌÁö ·Ñ¿À¹ö 1
#########################################################*/
/*
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];}
}
*/

/*#########################################################
# ÀÌ¹ÌÁö ·Ñ¿À¹ö 2
#########################################################*/
var IMG = {
    setHomeNumber : function( hNumber ){
        if( hNumber >= 0 ){
            IMG.hNumber = hNumber;
        }
    }
    ,setImageObject : function(){
        IMG.obImgs = IMG.setImageObject.arguments;
        IMG.otImgs = new Array();
        for(var i=0; i<IMG.obImgs.length; i++){
            IMG.otImgs[i] = IMG.obImgs[i].src;
            IMG.obImgs[i].num = i;
            Event.observe(IMG.obImgs[i].id,"mouseout",IMG.changeOutImage);
        }
    }
    ,setMouseOverImage : function(){
        IMG.ovImgs = IMG.setMouseOverImage.arguments;
        for(var i=0; i<IMG.ovImgs.length; i++){
            Event.observe(IMG.obImgs[i].id,"mouseover",IMG.changeOverImage);
        }
        IMG.callHomeImage("over");
    }
    ,changeOutImage : function(event){
        var oImg = Event.element(event);
        oImg.src = IMG.otImgs[oImg.num];
        IMG.callHomeImage("over");
    }
    ,changeOverImage : function(event){
        IMG.callHomeImage("out");
        var oImg = Event.element(event);
        oImg.src = IMG.ovImgs[oImg.num];
    }
    ,callHomeImage : function( status ){
        if( IMG.hNumber >= 0 ){
            if( status == "out" ){
                IMG.obImgs[IMG.hNumber].src = IMG.otImgs[IMG.hNumber];
            }else if( status == "over" ){
                IMG.obImgs[IMG.hNumber].src = IMG.ovImgs[IMG.hNumber];                
            }
        }
    }
}

/*#########################################################
# ÀÌ¸ÞÀÏ Å¬·¡½º
#########################################################*/
var EmailClass = Class.create({
    initialize : function( objEmailSelectBox, objEmailDirectBox ){
        if( !Object.isElement(objEmailSelectBox) || !Object.isElement(objEmailDirectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objEmailSelectBox = objEmailSelectBox;
        this.objEmailDirectBox = objEmailDirectBox;

        this.op = new Array(
             "paran.com","hitel.net","hanmir.com","hanmail.net","naver.com"
            ,"dreamwiz.com","lycos.co.kr","yahoo.co.kr","chollian.net","korea.com"
            ,"freechal.com","hotmail.com","unitel.co.kr","nate.com","empal.com"
            ,"nownuri.net","hanafos.com","kornet.net"
        );
    }
    ,setEmailAddress : function(event){
        if( !this.objEmailSelectBox || !this.objEmailDirectBox ){ return; }
        this.objEmailSelectBox.options.add(new Option("¼±ÅÃ",""));
        for( var i=0; i<this.op.length; i++ ){
          this.objEmailSelectBox.options.add(new Option(this.op[i],this.op[i]));
        }
        this.objEmailSelectBox.options.add(new Option("Á÷Á¢ÀÔ·Â","direct"));          
    }
    ,changeEmailAddress : function(event){
        if( !this.objEmailSelectBox || !this.objEmailDirectBox ){ return; }
        if( this.objEmailSelectBox.value == "direct" ){
            this.objEmailDirectBox.style.display = "inline";
            this.objEmailDirectBox.value = "";
            this.objEmailDirectBox.focus();
        }else{
            this.objEmailDirectBox.style.display = "none";
            this.objEmailDirectBox.value = this.objEmailSelectBox.value;
        }
    }
    ,setEmailDefaultAddress : function( defaultEmail ){
        if( !this.objEmailSelectBox || !this.objEmailDirectBox ){ return; }

        var cnt = 0;
        for( var i=0; i<this.objEmailSelectBox.options.length; i++ ){
            if( this.objEmailSelectBox.options[i].text == defaultEmail ){
                this.objEmailSelectBox.options[i].selected = true;
                cnt++;
            }
        }
        if( cnt == 0 && this.objEmailDirectBox.value != "" ){
            this.objEmailDirectBox.style.display = "inline";
            this.objEmailSelectBox.options[i-1].selected = true;
        }
    }
});






/*#########################################################
# ´Þ·Â Å¬·¡½º
#########################################################*/
var CustomCalendar = Class.create({
    initialize : function( objDivCalendar, objInputCalendarBox ){
        if( !Object.isElement(objDivCalendar) || !Object.isElement(objInputCalendarBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objDivCalendar = objDivCalendar;
        this.objInputCalendarBox = objInputCalendarBox;
    }
    ,showCalendar : function(){
        if( !this.objDivCalendar || !this.objInputCalendarBox ){ return; }
        var	popWidth	= 184;
        var	popHeight	= 212;

        this.objDivCalendar.style.display = "inline";
  
        var cFrame = "<iframe id='viewCalendarFrame' src='/common/calendar/calendar.htm' width='"+popWidth+"' height="+popHeight+"' style='border:5px solid #e1e1e1;background-color:#ffffff;'></iframe>";
        this.objDivCalendar.innerHTML = cFrame;
    }
    ,setTodayCalendarValue : function(){
          if( !this.objDivCalendar || !this.objInputCalendarBox ){ return; }
        	var	today	= new Date();
          var	year	= ""+today.getFullYear();
          var	month	= this.addZero( ""+(today.getMonth() + 1) );
          var	date	= this.addZero( ""+(today.getDate()) );
          this.setCalendarValue(year+month+date);
    }
    ,setCalendarValue : function( val ){
          if( !this.objDivCalendar || !this.objInputCalendarBox ){ return; }
          this.objInputCalendarBox.value = val;
          this.closeCalendar();
    }
    ,clearCalendarValue : function(){
          if( !this.objDivCalendar || !this.objInputCalendarBox ){ return; }
          this.setCalendarValue("");
    }
    ,closeCalendar : function(){
          if( !this.objDivCalendar || !this.objInputCalendarBox ){ return; }
          this.objDivCalendar.style.display = "none";
    }
    ,addZero : function( str ){
        str = ""+str;
        if( str.length == 1 ){
          str = "0"+str;
        }
        return str;
    }
});



/*#########################################################
# ¹«ÅëÀå ÀÔ±Ý °èÁÂ Å¬·¡½º
#########################################################*/
var DYBankClass = Class.create({
    initialize : function( objBankSelectBox ){
        if( !Object.isElement(objBankSelectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objBankSelectBox = objBankSelectBox;

        this.op = [
              //[ "ÀÏ·Ã¹øÈ£","ÀºÇàÄÚµå","ÀºÇà¸í","°èÁÂ¹øÈ£","¿¹±ÝÁÖ","»ç¿ë¿©ºÎY,N" ]
              [ "1", "04", "±¹¹ÎÀºÇà", "856701-04-089209", "(ÁÖ)µð¿ÍÀÌºô", "Y" ]
            , [ "2", "20", "¿ì¸®ÀºÇà", "1005-201-179972" , "(ÁÖ)µð¿ÍÀÌºô", "Y" ]
            , [ "3", "53", "¾¾Æ¼ÀºÇà", "155-00104-242-01", "(ÁÖ)µð¿ÍÀÌºô", "Y" ]
            , [ "4", "81", "ÇÏ³ªÀºÇà", "239-910010-48804", "(ÁÖ)µð¿ÍÀÌºô", "Y" ]
            , [ "5", "88", "½ÅÇÑÀºÇà", "140-007-706953"  , "(ÁÖ)µð¿ÍÀÌºô", "Y" ]       
        ];
    }
    ,setBankAccount : function(event){  
        if( !this.objBankSelectBox ){ return; }
        for( var i=0; i<this.op.length; i++ ){
            if( this.op[i][5] != "N" ){
                this.objBankSelectBox.options.add(
                    new Option( this.op[i][2]+" "+this.op[i][3]+" "+this.op[i][4], this.op[i][0])
                );
            }
        }
    }
});



/*#########################################################
# ÀºÇàÄÚµå ¹× ÀºÇà¸í Å¬·¡½º
#########################################################*/
var BankCodeClass = Class.create({
    initialize : function( objBankCodeSelectBox ){
        this.objBankCodeSelectBox = objBankCodeSelectBox;
        this.op = [
              //[ "ÀºÇàÄÚµå","ÀºÇà¸í" ] - inicis Á¦°øÄÚµå»ç¿ë
              [ "02", "ÇÑ±¹»ê¾÷ÀºÇà"       ]
            , [ "03", "±â¾÷ÀºÇà"           ]
            , [ "04", "±¹¹ÎÀºÇà"           ]
            , [ "05", "¿ÜÈ¯ÀºÇà"           ]
            , [ "06", "±¹¹ÎÀºÇà ±¸)ÁÖÅÃ"   ]
            , [ "07", "¼öÇùÁß¾ÓÈ¸"         ]
            , [ "11", "³óÇùÁß¾ÓÈ¸"         ]
            , [ "12", "´ÜÀ§³óÇù"           ]
            , [ "16", "ÃàÇùÁß¾ÓÈ¸"         ]
            , [ "20", "¿ì¸®ÀºÇà"           ]
            , [ "21", "±¸)Á¶ÈïÀºÇà"        ]
            , [ "22", "»ó¾÷ÀºÇà"           ]
            , [ "23", "Á¦ÀÏÀºÇà"           ]
            , [ "24", "ÇÑÀÏÀºÇà"           ]
            , [ "25", "¼­¿ïÀºÇà"           ]
            , [ "26", "±¸)½ÅÇÑÀºÇà"        ]
            , [ "27", "ÇÑ¹ÌÀºÇà"           ]
            , [ "31", "´ë±¸ÀºÇà"           ]
            , [ "32", "ºÎ»êÀºÇà"           ]
            , [ "34", "±¤ÁÖÀºÇà"           ]
            , [ "35", "Á¦ÁÖÀºÇà"           ]
            , [ "37", "ÀüºÏÀºÇà"           ]
            , [ "38", "°­¿øÀºÇà"           ]
            , [ "39", "°æ³²ÀºÇà"           ]
            , [ "41", "ºñ¾¾Ä«µå"           ]
            , [ "45", "»õ¸¶À»±Ý°í"         ]
            , [ "48", "½Å¿ëÇùµ¿Á¶ÇÕÁß¾ÓÈ¸" ]
            , [ "50", "»óÈ£ÀúÃàÀºÇà"       ]
            , [ "53", "¾¾Æ¼ÀºÇà"           ]
            , [ "54", "È«Äá»óÇÏÀÌÀºÇà"     ]
            , [ "55", "µµÀÌÄ¡ÀºÇà"         ]
            , [ "56", "ABN¾Ï·Î"            ]
            , [ "70", "½Å¾È»óÈ£ÀúÃàÀºÇà"   ]
            , [ "71", "¿ìÃ¼±¹"             ]
            , [ "81", "ÇÏ³ªÀºÇà"           ]
            , [ "83", "ÆòÈ­ÀºÇà"           ]
            , [ "87", "½Å¼¼°è"             ]
            , [ "88", "½ÅÇÑ(ÅëÇÕ)ÀºÇà"     ]
        ];
        this.setBankCode();
    }
    ,setBankCodeSelectBox : function( objBankCodeSelectBox ){
        if( !Object.isElement(objBankCodeSelectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objBankCodeSelectBox = objBankCodeSelectBox;
        this.setBankCode();
    }
    ,setFirstOption : function( opName, opValue ){
        if( !this.objBankCodeSelectBox ){ return; }
        this.clearBankCode();
        this.objBankCodeSelectBox.options.add( new Option( opName, opValue ) );
        for( var i=0; i<this.op.length; i++ ){
            this.objBankCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setBankCode : function(){  
        if( !this.objBankCodeSelectBox ){ return; }
        for( var i=0; i<this.op.length; i++ ){
            this.objBankCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSelectOption : function( opValue ){
        opValue = ""+opValue;
        for( var i=0; i<this.objBankCodeSelectBox.options.length; i++ ){
            if( this.objBankCodeSelectBox.options[i].value == opValue ){
                this.objBankCodeSelectBox.options[i].selected = true;
            }
        }
    }
    ,getBankName : function( codeNum ){
        codeNum = ""+codeNum;
        for( var i=0; i<this.op.length; i++ ){
            if( this.op[i][0] == codeNum ){
                return this.op[i][1];
            }
        }
    }
    ,clearBankCode : function(){
        this.objBankCodeSelectBox.length = 0;
    }
});


//#########################################################
//# Àü´Þ±¸ºÐ Å¬·¡½º
//#########################################################
var PartCodeClass = Class.create({
    initialize : function( objPartCodeSelectBox ){
        this.objPartCodeSelectBox = objPartCodeSelectBox;
        this.op = [
              [ "01", "°áÈ¥"            ]
            , [ "02", "Á¶¹®"            ]
            , [ "03", "µ¹,¹éÀÏ,»ýÀÏ"    ]
            , [ "04", "¼ö¿¬"            ]
            , [ "05", "°³¾÷"            ]
            , [ "06", "Çà»ç"            ]
            , [ "07", "½ÂÁø,ÃëÀÓ"       ]
            , [ "08", "ÀÔÁÖ,ÀÌÀü"       ]
            , [ "09", "ÀÔÇÐ,Á¹¾÷"       ]
            , [ "10", "ÃàÇÏ"            ]
            , [ "30", "°¨»ç"            ]
            , [ "11", "Ãâ»ê"            ]
            , [ "12", "ÇÕ°Ý"            ]
            , [ "13", "¼ö»ó"            ]
            , [ "14", "Àü½ÃÈ¸,¹ßÇ¥È¸"   ]
            , [ "15", "±ºº¹¹«"          ]
            , [ "16", "´ç¼±"            ]
            , [ "17", "ÅðÀÓ"            ]
            , [ "18", "ÃëÁ÷"            ]
            , [ "19", "°áÈ¥±â³äÀÏ"      ]
            , [ "20", "Ã¢¸³"            ]
            , [ "21", "¾î¸°ÀÌ³¯"        ]
            , [ "22", "¾î¹öÀÌ³¯"        ]
            , [ "23", "½º½ÂÀÇ³¯"        ]
            , [ "24", "¼ºÅº,¼®°¡Åº½ÅÀÏ" ]
            , [ "25", "¼º³âÀÇ³¯"        ]
            , [ "26", "¹®º´"            ]
            , [ "27", "ÈÄ¿ø"            ]
            , [ "28", "¸íÀý"            ]
            , [ "29", "±âÅ¸"            ]
        ];
        this.setPartCode();
    }
    ,setPartCodeSelectBox : function( objPartCodeSelectBox ){
        if( !Object.isElement(objPartCodeSelectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objPartCodeSelectBox = objPartCodeSelectBox;
        this.setPartCode();
    }
    ,setFirstOption : function( opName, opValue ){
        if( !this.objPartCodeSelectBox ){ return; }
        this.clearPartCode();
        this.objPartCodeSelectBox.options.add( new Option( opName, opValue ) );
        for( var i=0; i<this.op.length; i++ ){
            this.objPartCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setPartCode : function(){  
        if( !this.objPartCodeSelectBox ){ return; }
        for( var i=0; i<this.op.length; i++ ){
            this.objPartCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,getPartName : function( codeNum ){
        codeNum = ""+codeNum;
        for( var i=0; i<this.op.length; i++ ){
            if( this.op[i][0] == codeNum ){
                return this.op[i][1];
            }
        }
    }
    ,clearPartCode : function(){
        this.objPartCodeSelectBox.length = 0;
    }
});




//#########################################################
//# ÈÄ¿ø±¸ºÐ Å¬·¡½º
//#########################################################
var SupportCodeClass = Class.create({
    initialize : function( objSupportCodeSelectBox ){
        this.objSupportCodeSelectBox = objSupportCodeSelectBox;
        this.op = [
              [ "01", "Á¤Ä¡ÈÄ¿ø±Ý"     ]
            , [ "02", "½Ã¼³ÈÄ¿ø±Ý"     ]
            , [ "03", "´ÜÃ¼ÈÄ¿ø±Ý"     ]
            , [ "04", "ÀÌ¿ôµ½±âÈÄ¿ø±Ý" ]
            , [ "05", "ÀÏ¹ÝÈÄ¿ø±Ý"     ]
        ];
        this.setSupportCode();
    }
    ,setSupportCodeSelectBox : function( objSupportCodeSelectBox ){
        if( !Object.isElement(objSupportCodeSelectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objSupportCodeSelectBox = objSupportCodeSelectBox;
        this.setSupportCode();
    }
    ,setFirstOption : function( opName, opValue ){
        if( !this.objSupportCodeSelectBox ){ return; }
        this.clearSupportCode();
        this.objSupportCodeSelectBox.options.add( new Option( opName, opValue ) );
        for( var i=0; i<this.op.length; i++ ){
            this.objSupportCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSupportCode : function(){  
        if( !this.objSupportCodeSelectBox ){ return; }
        for( var i=0; i<this.op.length; i++ ){
            this.objSupportCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSupportDefaultCode : function( defaultCode ){
        if( !this.objSupportCodeSelectBox ){ return; }
        for( var i=0; i<this.objSupportCodeSelectBox.options.length; i++ ){
            if( this.objSupportCodeSelectBox.options[i].value == defaultCode ){
                this.objSupportCodeSelectBox.options[i].selected = true;
            }
        }
    }
    ,getPartName : function( codeNum ){
        codeNum = ""+codeNum;
        for( var i=0; i<this.op.length; i++ ){
            if( this.op[i][0] == codeNum ){
                return this.op[i][1];
            }
        }
    }
    ,clearSupportCode : function(){
        this.objSupportCodeSelectBox.length = 0;
    }
});


//#########################################################
//# ÈÄ¿ø ½ÅÃ»ÀÎ °ü°è Å¬·¡½º
//#########################################################
var SupportRelationCodeClass = Class.create({
    initialize : function( objSupportRelationCodeSelectBox ){
        this.objSupportRelationCodeSelectBox = objSupportRelationCodeSelectBox;
        this.op = [
              [ "01", "º»ÀÎ"       ]
            , [ "02", "ºñ¼­°ü"     ]
            , [ "03", "½Ã¼³´ÜÃ¼Àå" ]
            , [ "04", "Á÷¿ø"       ]
            , [ "05", "±âÅ¸"       ]
        ];
        this.setSupportRelationCode();
    }
    ,setSupportRelationCodeSelectBox : function( objSupportRelationCodeSelectBox ){
        if( !Object.isElement(objSupportRelationCodeSelectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objSupportRelationCodeSelectBox = objSupportRelationCodeSelectBox;
        this.setSupportRelationCode();
    }
    ,setFirstOption : function( opName, opValue ){
        if( !this.objSupportRelationCodeSelectBox ){ return; }
        this.clearSupportRelationCode();
        this.objSupportRelationCodeSelectBox.options.add( new Option( opName, opValue ) );
        for( var i=0; i<this.op.length; i++ ){
            this.objSupportRelationCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSupportRelationCode : function(){  
        if( !this.objSupportRelationCodeSelectBox ){ return; }
        for( var i=0; i<this.op.length; i++ ){
            this.objSupportRelationCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSupportDefaultCode : function( defaultCode ){
        if( !this.objSupportRelationCodeSelectBox ){ return; }
        for( var i=0; i<this.objSupportRelationCodeSelectBox.options.length; i++ ){
            if( this.objSupportRelationCodeSelectBox.options[i].value == defaultCode ){
                this.objSupportRelationCodeSelectBox.options[i].selected = true;
            }
        }
    }
    ,getRelationName : function( codeNum ){
        codeNum = ""+codeNum;
        for( var i=0; i<this.op.length; i++ ){
            if( this.op[i][0] == codeNum ){
                return this.op[i][1];
            }
        }
    }
    ,clearSupportRelationCode : function(){
        this.objSupportRelationCodeSelectBox.length = 0;
    }
});



//#########################################################
//# ÈÄ¿ø Á÷¾÷ Å¬·¡½º
//#########################################################
var SupportJobCodeClass = Class.create({
    initialize : function( objSupportJobCodeSelectBox ){
        this.objSupportJobCodeSelectBox = objSupportJobCodeSelectBox;
        this.op = [
              [ "01", "°ø¹«¿ø"    ]
            , [ "02", "È¸»ç¿ø"    ]
            , [ "03", "ÁÖºÎ"      ]
            , [ "04", "ÇÐ»ý"      ]
            , [ "05", "±âÅ¸"      ]
        ];
        this.setSupportJobCode();
    }
    ,setSupportJobCodeSelectBox : function( objSupportJobCodeSelectBox ){
        if( !Object.isElement(objSupportJobCodeSelectBox) ){
            alert("ÃÊ±â ÆÄ¶ó¹ÌÅÍ °¡ objectÇüÀÌ ¾Æ´Ï°Å³ª ¼³Á¤ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
            return;
        }
        this.objSupportJobCodeSelectBox = objSupportJobCodeSelectBox;
        this.setSupportJobCode();
    }
    ,setFirstOption : function( opName, opValue ){
        if( !this.objSupportJobCodeSelectBox ){ return; }
        this.clearSupportJobCode();
        this.objSupportJobCodeSelectBox.options.add( new Option( opName, opValue ) );
        for( var i=0; i<this.op.length; i++ ){
            this.objSupportJobCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSupportJobCode : function(){  
        if( !this.objSupportJobCodeSelectBox ){ return; }
        for( var i=0; i<this.op.length; i++ ){
            this.objSupportJobCodeSelectBox.options.add( new Option(this.op[i][1], this.op[i][0]) );
        }
    }
    ,setSupportDefaultCode : function( defaultCode ){
        if( !this.objSupportJobCodeSelectBox ){ return; }
        for( var i=0; i<this.objSupportJobCodeSelectBox.options.length; i++ ){
            if( this.objSupportJobCodeSelectBox.options[i].value == defaultCode ){
                this.objSupportJobCodeSelectBox.options[i].selected = true;
            }
        }
    }
    ,getPartName : function( codeNum ){
        codeNum = ""+codeNum;
        for( var i=0; i<this.op.length; i++ ){
            if( this.op[i][0] == codeNum ){
                return this.op[i][1];
            }
        }
    }
    ,clearSupportJobCode : function(){
        this.objSupportJobCodeSelectBox.length = 0;
    }
});


/*#########################################################
# interval Å¬·¡½º
#########################################################*/
var INTERVAL = Class.create({
    initialize : function(id,sec,func){
        this.interval = {};
        if( id && sec && func ){
            this.add(id,sec,func);
        }
    }
    ,add : function(id,sec,func){
        var obj = null;
        if( Object.isElement(id) ){ 
            obj = id; 
            id = obj.id;
        }
        if( !id || !sec || !func ){ return; }
        if( Object.isString(sec) ){ sec = Number(sec); }

        Event.observe(id,"focus",this.setInterval.bind(this,id,sec,func));
        Event.observe(id,"blur",this.clearInterval.bind(this,id,sec,func));

    }
    ,setInterval : function(id,sec,func){
        this.interval[id] = setInterval(func.bind($(id)),sec);
    }
    ,clearInterval : function(id,sec,func){
        clearInterval(this.interval[id]);
        func.bind($(id)).delay(0.01);
    }

});

/*#########################################################
# °øÅë »ç¿ëÇÔ¼ö
#########################################################*/
var JIT = {
    checkNumberKey : function(event){
        var key = Prototype.Browser.IE ? event.keyCode:event.which;
        if ( !(key >= 48 && key <= 57 || key==8) ) {
            Event.stop(event);
        }
    }
    ,checkNumberAndPointKey : function(event){
        var key = Prototype.Browser.IE ? event.keyCode:event.which;
        if ( !(key >= 48 && key <= 57 || key==8 || key==46) ) {
            Event.stop(event);
        }
    }
    ,checkNumberValue : function(event){
        var srcObj = Event.element(event);
        var objRegExp = new RegExp("[0-9]","i");
        return objRegExp.test(srcObj.value.strip());
    }
    ,checkExistValue : function( element ){
        return $(element).value.strip() != "";        
    }
    ,checkEnterKeyPress : function(event){
        var key = Prototype.Browser.IE ? event.keyCode:event.which;
        if( key == 13 ){
            return true;
        }
        return false;
    }
}
var MSG = {
    defaultMsg : function( msg ){
        alert( msg );
    }
    ,checkNotValueMsg : function( str ){
        alert( str + "À»(¸¦) ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À!" );
    }
    ,historyBackMsg : function( msg ){
        alert( msg );
        history.back();
    }
    ,confirmMsg : function( str ){
        return confirm( str );
    }
}
var POP = {
    defaultPop : function( linkURL, w, h, n){
        w = w ? w : 400;
        h = h ? h : 300;
        n = n ? n : "defaultPop";
        window.open( 
             linkURL
           , n
           , "width="+w+",height="+h+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0"
         );        
    }
    ,objectPop : function( linkURL, w, h, n, t, l){
        w = w ? w : 400;
        h = h ? h : 300;
        n = n ? n : "objPop";
        t = t ? t : (screen.height)?((screen.height - h)/2) : 100;
        l = l ? l : (screen.width)?((screen.width - w)/2) : 100;
        var op = window.open( 
                     linkURL
                   , n
                   , "width="+w+",height="+h+",top="+t+",left="+l+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0"
                 );
        return op;
    }
    ,open : function( sUrl, w, h, x, y, popName, btnX ){
        var pop = null;
        if( !w ){ w = 200; }
        if( !h ){ h = 150; }
        if( !y ){ h = 400; }
        if( !x ){ x = 400; }

        if( popName ){
            pop = $(popName);
        }else if( $("popupDiv") ){
            pop = $("popupDiv");
            popName = "popupDiv";
        }else{
            return;
        }

        if( btnX ){
            Event.observe(btnX,"click",this.close.bind(this,popName));
        }else if( $("buttonX") ){
            Event.observe("buttonX","click",this.close.bind(this,popName));
        }

        var ifrm = pop.down("iframe");
        ifrm.src = sUrl;

        pop.classNames().each(function(className){
            pop.removeClassName(className);
        });

        var oBody = UTIL.getBody();
        var mX = oBody.clientWidth;
        var mY = oBody.clientHeight;
        if( x == "center" ){x = Math.floor(oBody.clientWidth/2) - Math.floor(w/2);}
        if( y == "center" ){y = (oBody.scrollTop + Math.floor(oBody.clientHeight/2)) - Math.floor(h/1.5);}

        pop.setStyle({
              "position" : "absolute"
            , "width"    : w+"px"
            , "height"   : h+"px"
            , "left"     : x+"px"
            , "top"      : y+"px"
            , "zIndex"   : "1000"
            , "display"  : "block"
        });
        new Draggable(pop,{
            starteffect : function(){}
            ,endeffect : function(){}
            ,snap : function(x, y, dObj){
                return [
                      x <= mX ? x : mX
                    , y <= mY ? y : mY
                ]
            }
        });
    }
    ,close : function( popName ){
        if( popName ){
            pop = $(popName);
        }else if( $("popupDiv") ){
            pop = $("popupDiv");
            popName = "popupDiv";
        }else{
            return;
        }
        pop.classNames().each(function(className){
            pop.removeClassName(className);
        });
        pop.setStyle({"display":"none"});
    }
}
var LOGIN = {
    logout : function(){
        var bdy = document.body;
        var frm = document.createElement("form");
        var inp = document.createElement("input");
        frm.appendChild( inp );
        bdy.appendChild( frm );

        inp.name = "cmd";
        inp.value = "logout";
        
        frm.method = "post";
        frm.action = "/login_process.jsp";
        frm.submit();
    }
}

var UTIL = {
    setComma : function(num,pos){
        if( pos == "" || pos == null ){ pos = 3; }
        var number = num.toString(); 
        var lenNum = number.length; 
        var newNum = ''; 
        for (var i=0; i < lenNum; i++ ) { 
            newNum += number.substring(i,i+1);         
            if(((lenNum-i-1)%pos) == 0 && (lenNum-i-1) > 0 ) newNum += ','; 
            //if(((lenNum-i)%pos) == 0 && (lenNum-i) > 0 ) newNum += ','; //½Ç½Ã°£
        }
        return newNum;
    }
     //ÀÌ¸ÞÀÏÃ¼Å©
    ,checkEmail : function( str ){
        var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
        if ( filter.test(str) ){ 
            return true; 
        } else { 
            return false; 
        }
    }
    ,getLastDate : function( year, month ){
        var oDate = new Date();
        oDate.setYear( year );
        oDate.setMonth( month-1 );
        oDate.setDate(1);

        while( oDate.getMonth() == month-1 ){
            oDate.setDate(oDate.getDate()+1);            
        }
        oDate.setDate(oDate.getDate()-1);
        return oDate.getDate();
    }
    , getNumber : function(str){
        return str.gsub(/[^0-9]/,"");
    }
    , getAlphabet : function(str){
        return str.gsub(/[^0-9a-zA-Z]/,"");
    }
    ,insertFlash : function( filepath, uW, uH ){
        if( !filepath ){ return; }
        var h = 701;
        var w = 413;
        if( uW > 0 ){ w = uW; }
        if( uH > 0 ){ h = uH; }

        var flashObj  = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"" + w + "\" height=\"" + h + "\">\n";
            flashObj += "<param name=\"movie\" value=\"" + filepath + "\" />\n";
            flashObj += "<param name=\"quality\" value=\"high\" />";
            flashObj += "<param name=\"wmode\" value=\"transparent\" />\n"
            flashObj += "<embed src=\"" + filepath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" wmode=\"transparent\"></embed>\n";
            flashObj += "</object>"
            document.write(flashObj);
    }
    ,clearSpace : function( str ){
        var re = new RegExp( " ", "gi");
        return str.replace( re , "" ); 
    }
    ,replaceAll : function( str, fStr, rStr ){
        var re = new RegExp( fStr, "gi");
        return str.replace( re , rStr ); 
    }
    , blind : function( status ) {
        status = status.toLowerCase();
        var oBody = this.getBody();
        if( !$("blind") ){
            var oBl = new Element("div");
            oBl.id = "blind";
            document.body.appendChild(oBl);
        }
        var blind = $("blind");
        if( status == "set" ){
            blind.addClassName("blind");
            blind.style.height = oBody.scrollHeight+"px";
        }else if( status == "clear" ){
            blind.removeClassName("blind");
            blind.style.height = "0px";
        }
    }
    ,getBody : function(){
        //alert((document.compatMode && document.compatMode!="BackCompat") ? "ELEMNT" : "BODY");
        return (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body;
    }
    ,setFrameBlind : function( status, sUrl, className, posY, posX, iframeName ){
        status = status.toLowerCase();
        var ifrm = null;
        if( iframeName ){
            ifrm = $(iframeName);
        }else if( $("popupIframe") ){
            ifrm = $("popupIframe");
            iframeName = "popupIframe";
        }else{
            return;
        }
        ifrm.classNames().each(function(className){
            ifrm.removeClassName(className);
        });

        var pUrl = "";
        if( sUrl && sUrl.indexOf("?") == -1 ){
            pUrl = sUrl + "?ifrmId=" + iframeName;
        }else{
            pUrl = sUrl + "&ifrmId=" + iframeName;
        }

        if( status == "set" ){
            ifrm.src = pUrl;
            ifrm.addClassName(className);
            ifrm.addClassName("show");
            var oBody = this.getBody();
            ifrm.style.top = (oBody.scrollTop + (screen.height/2 - ifrm.getHeight() ) + posY) + "px";
            if( !posX ){
                ifrm.style.left = (oBody.clientWidth/2 - ifrm.getWidth()/2) + "px";
            }else{
                ifrm.style.left = posX + "px";
            }
        }else if( status == "clear" ){
            ifrm.addClassName("hidden");        
            ifrm.width = "0px";
            ifrm.height = "0px";
        }
        this.blind(status);    
    }
}

var COOKIE = {

      set : function( name, value, expiredays ){ 
        var todayDate = new Date(); 
        todayDate.setDate( todayDate.getDate() + expiredays ); 
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";";
      }
    , get : function( name ){
          var Found = false 
          var start, end 
          var i = 0 
       
          while(i <= document.cookie.length) { 
              start = i 
              end = start + name.length 
           
              if(document.cookie.substring(start, end) == name) { 
                  Found = true 
                  break 
              } 
              i++ 
          }      
          if(Found == true) { 
              start = end + 1 
              end = document.cookie.indexOf(";", start) 
              if(end < start) 
              end = document.cookie.length 
              return document.cookie.substring(start, end) 
          } 
          return ""     
      }

}

var SMS = {

    length : function( msg ) {
	      var nbytes = 0;
        for (i=0; i<msg.length; i++) {
            var ch = msg.charAt(i);
            if (escape(ch).length > 4) {
                nbytes += 2;
            } else if (ch != '\r') {
                nbytes++;
            }
        }
        return nbytes;
    }

    , limit : function( msg, max ) {
	      var inc = 0;
        var nbytes = 0;
        var rmsg = "";
        var msglen = msg.length;

        for (i=0; i<msglen; i++) {
            var ch = msg.charAt(i);
            if (escape(ch).length > 4) {
                inc = 2;
            } else if (ch != '\r') {
                inc = 1;
            }
            if ((nbytes + inc) > max) {
                break;
            }
            nbytes += inc;
            rmsg += ch;
        }
        return rmsg;
    }

}

window.onload = function (){

    /*****************************************************************
    *  °¢ÆäÀÌÁö ÃÊ±âÈ­ ÇÔ¼ö
    *****************************************************************/
    windowLoad();

    /*****************************************************************
    *  ¸ÞÀÎ¸Þ´º
    *****************************************************************/
    
    if( $("topMenu01") ){
        IMG.setImageObject($("topMenu01"),$("topMenu02"),$("topMenu03"),$("topMenu04"),$("topMenu05"),$("topMenu06"));         
        IMG.setMouseOverImage( '/images/menu1_ov.gif' ,'/images/menu2_ov.gif'
                              ,'/images/menu3_ov.gif' ,'/images/menu4_ov.gif'
                              ,'/images/menu5_ov.gif' ,'/images/menuov_06.gif'
        );
    }
    /*
    if( $("topMenu01") ){
        IMG.setImageObject($("topMenu01"),$("topMenu02"),$("topMenu03"),$("topMenu04"),$("topMenu05"));         
        IMG.setMouseOverImage( '/images/menu1_ov.gif' ,'/images/menu2_ov.gif'
                              ,'/images/menu3_ov.gif' ,'/images/menu4_ov.gif'
                              ,'/images/menu5_ov.gif' 
        );
    }*/

    /*****************************************************************
    *  ¼Ò½ºº¼¼ö¾øµµ·ÏÂ÷´Ü
    ****************************************************************
    if( document.body ){
        document.body.oncontextmenu = function(){ return false };
        document.body.ondragstart = function(){ return false };
        document.body.onselectstart = function(){ return false };
    }*/
}

