/*-- ------------------------------------------------------
oxsolution JAVASCRIPT functions  http://www.oxsolution.com
------------------------------------------------------ --*/
var dirHTC = thisScriptDir();// Çö µð·ºÅÍ¸® Á¤ÀÇ.
var langOX = {};
function thisScript(){// first runtime only
    return document.all.tags('SCRIPT')(document.all.tags('SCRIPT').length -1);
}
function thisScriptDir(){// first runtime only, do not use DYNAMIC SCRIPT
    var tmpThisDir = '';
    try{
        //var tmpTagA = document.createElement('a');
        //tmpTagA.href = thisScript().src;
        //tmpThisDir = dirName(tmpTagA.pathname);
        //tmpTagA = null;
        tmpThisDir = dirName(thisScript().src);
    }catch(e){
        tmpThisDir = '_oxdir/oxjs';
    }
    return tmpThisDir;
}
function dirName(obj){
    if (typeof(obj)!='string') return false;
    return obj.substring(0,obj.lastIndexOf("/"));
}
function baseName(obj){
    if (typeof(obj)!='string') return false;
    return obj.substring(obj.lastIndexOf("/")+1);
}
function oxLangLoad(type){
    var tmpTagA;
    type = trim(type).toLowerCase();
    if (typeof(langOX[type])!='undefined') {
        //langOX.currentType = type;
        return;
    }
    tmpTagA = document.createElement('script');// id="LOADSCRIPT">');
    /* for body tag
    document.body.insertAdjacentElement("afterBegin",tmpTagA);
    tmpTagA.src = dirHTC+'/lang_'+type+'.js';
    //langOX.currentType = type;
    */
    // for head tag
    tmpTagA.setAttribute('type', 'text/javascript');
    tmpTagA.setAttribute('src', dirHTC+'/lang_'+type+'.js');
    document.getElementsByTagName('head')[0].appendChild(tmpTagA);
    return ;
}
function oxLang(){// oxLang('key','langType');
    var argv = oxLang.arguments;
    var argc = oxLang.arguments.length;
    var langType = langOX.currentType;
    var type='',msg='';
    if (argc > 1) {
        type = trim(argv[1]).toLowerCase();
        if (typeof(langOX[type])!='undefined') langType=type;
    }
    if (argc > 0) {
        if (typeof(langOX[langType][argv[0]])!='undefined') msg=langOX[langType][argv[0]];
    }
    return msg;
}
function oxLangSet(type){
    //if (typeof(langOX[type])!='undefined') {
        langOX.currentType=type;
        return true;
    //}else return false;
}
// Check Form --------------------
function checkboxToggle(obj){
    var fm = obj.form;
    var fmLen = fm.tags('input').length;
    var fmLen2 = 0,i=0;
    while (fmLen2 < fmLen){
        var fmInput = fm.tags('input')(fmLen2);
        if (fmInput.type=='checkbox' && fmInput.oxchk==obj.value ) {
            fmInput.checked = obj.checked;
        }
        fmLen2++;
    }
    // <input type=checkbox name=chk[] oxchk=1 value=10> Åä±Û¿¡ »ç¿ëµÇ´Â objÀÇ value¿Í oxchk°¡ °°Àº °æ¿ì¿¡ Åä±ÛµÈ´Ù.
}

function checkboxCheckedCount(fm,oxchk){
    var fmLen = fm.tags('input').length;
    var fmLen2=0, i=0, cnt=0;
    while (fmLen2 < fmLen){
        var fmInput = fm.tags('input')(fmLen2);
        if (fmInput.type=='checkbox' && fmInput.oxchk==oxchk && fmInput.checked ) cnt++;
        fmLen2++;
    }
    return cnt;
    // <input type=checkbox name=chk[] oxchk=1 value=10> oxchk ÀÇ °ªÀÌ ÀÏÄ¡ÇÏ´Â Ã¼Å©¹Ú½ºÁß Ã¼Å©µÈ ¼ö¸¦ ¼¾´Ù
}

function checkboxCheckedCountByObj(obj){
    var fm = obj.form;
    var oxchk = obj.value;
    return checkboxCheckedCount(fm,oxchk);
    // <input type=checkbox name=chk[] oxchk=1 value=10> Åä±Û¿¡ »ç¿ëµÇ´Â objÀÇ value¿Í oxchk°¡ °°Àº Ã¼Å©¹Ú½ºÁß Ã¼Å©µÈ ¼ö¸¦ ¼¾´Ù
}

function radioIsChecked(obj){// ¶óµð¿À¹Ú½º Ã¼Å© °Ë»ç.
    var chk = 0;
    if (typeof(obj.length)=='undefined') {
        return obj.checked ? true:false;
    }
    for (var i=0; i<obj.length; i++) {
        if(obj[i].checked) chk++;
    }
    if (chk == 0) {
        try {obj[0].focus();}
        catch (e) {}
        return false;
    }
    return true;
}
function radioCheckedValue(obj){// return checked value
    if (typeof(obj.length)=='undefined') {
        return obj.checked ? obj.value:false;
    }
    for (var i=0; i<obj.length; i++) {
        if(obj[i].checked) return obj[i].value;
    }
    return false;
}
function radioCheckedNumber(obj){// return checked value
    if (typeof(obj.length)=='undefined') {
        return obj.checked ? 0:-1;
    }
    for (var i=0; i<obj.length; i++) {
        if(obj[i].checked) return i;
    }
    return -1;
}
function radioChoice(obj,val){// find and check
    if (typeof(obj.length)=='undefined') {
        return obj.checked ? true:false;
    }
    for (var i=0; i<obj.length; i++) {
        if(obj[i].value==val) {
            obj[i].checked=true;
            return true;
        }
    }
    return false;
}
function optionChoice(obj,val){// select ¹Ú½º obj ¿¡¼­ val ¿¡ ÇØ´çÇÏ´Â °ª ¼±ÅÃ
    var n = obj.length;
    var i = 0;
    while(n>i){
        if (obj.options[i].value==val) {
            obj.selectedIndex = i;
            return true;
        }
        i++;
    }
    return false;
}
function optionSelectedValue(obj){// return selected value
    return obj.options[obj.selectedIndex].value;
}
function optionSelectedText(obj){// return selected text
    return obj.options[obj.selectedIndex].text;
}
function createOption(objSel,value,text){
    objSel.options.length++;
    objSel.options[objSel.options.length -1].value=value;
    objSel.options[objSel.options.length -1].text=text;
}
//<select name=parentSelect onchange="ox_changeOptions(this,this.form.childSelect,objDept[,''[,'select')]]"></select>
//<select name=childSelect></select>
function ox_changeOptions() {
    var argv = ox_changeOptions.arguments;
    var argc = ox_changeOptions.arguments.length;
    var fObj,tObj,kObj
    var tFirstKey='', tFirstVal=oxLang('select'),tmpObj = {};// select<='¼±ÅÃÇÏ¼¼¿ä'
    var fKey,tKey;
    if (argc<3) return false;
    fObj = argv[0];
    tObj = argv[1];
    kObj = argv[2];
    if (argc>3) tFirstKey = argv[3];
    if (argc>4) tFirstVal = argv[4];
    fKey = optionSelectedValue(fObj);
    tmpObj[tFirstKey] = tFirstVal;
    if (fKey=='') return ox_createOptions(tObj,tmpObj);
    if (typeof(kObj[fKey])=='undefined') return false;
    if (argc>3) return ox_createOptions(tObj,kObj[fKey],tFirstKey,tFirstVal);
    else return ox_createOptions(tObj,kObj[fKey]);
}
//ox_createOptions(element Select,obj Key:val[,str defValue,str defText])
function ox_createOptions(tObj,kObj) {
    var argv = ox_createOptions.arguments;
    var argc = ox_createOptions.arguments.length;
    tObj.options.length = 0;
    if (argc>3) createOption(tObj,argv[2],argv[3]);
    for (tKey in kObj) {
        createOption(tObj,tKey,kObj[tKey])
    }
    return true;
}
function autojump(obj, sizeofstr){
    // input tag¿¡ »ç¿ë onkeyup = autojump(this,6) 6ÀÚ¸®±îÁö ÀÔ·ÂÇÏ¸é ´Ù¸§ input tag·Î ÀÌµ¿ÇÑ´Ù.
    var kk;
    kk = obj.value.length;
    if (kk==sizeofstr){
        var tt,j;
        tt = obj.form.length;
        j=tt;
        for (var i=0;i<tt;i++){
            if (obj.form.elements[i].name == obj.name) {
                j=i+1;i=tt;
                if (j==tt) {j--;}
                obj.form.elements[j].focus();
            }
        }
    }
}
function maxSize(obj) {
    // ieÀü¿ëÀÌ¸ç maxlength¸¦ Á¶Á¤ÇÔ. byte´ÜÀ§·Î Á¶Àý.
    // ÇÑ°è : 2byte ¹®ÀÚÀÇ °æ¿ì maxsize+1 ±îÁö
    // 3byte ¹®ÀÚÀÇ °æ¿ì maxsize+2±îÁö ÀÔ·ÂµÉ ¼ö ÀÖ´Ù.
    // <input maxsize=10 onkeydown=maxSize(this)>
    var str = obj.value;
    var maxbytes = parseFloat(obj.maxsize);
    var len = 0,b=0,c=0;
    while (b < str.length) {
        c = str.charCodeAt(b);
        if(c >= 0xFFFFFF) len += 4;
        else if(c >= 0xFFFF) len += 3;
        else if(c >= 0xFF) len += 2;
        else len++;
        b++;
        if (len >= maxbytes) break;
    }
    if (len==maxbytes) {
        obj.maxLength = b;
    }else if (len>maxbytes) {
        obj.maxLength = b-1;
    }else { //lan<maxbutes
        obj.maxLength = b+1;
    }
    return true;
}
function maxSize2(obj) {// onkeydown
    // textareaµî¿¡¼­ »ç¿ëÇÏ¸ç, ¹üÀ§¸¦ ³ÑÀ¸¸é °­Á¦ »èÁ¦.
    var str = obj.value;
    var maxbytes = parseFloat(obj.maxsize);
    var len = 0,b=0,c=0,cutPoint=0,eK=event.keyCode;
    if (eK==8 || eK==9 || eK==46 || (32<eK && eK<41)) return true;
    while (b < str.length) {
        c = str.charCodeAt(b);
        if(c >= 0xFFFFFF) len += 4;
        else if(c >= 0xFFFF) len += 3;
        else if(c >= 0xFF) len += 2;
        else len++;
        if (len > maxbytes) {
            cutPoint = b; //ÀÚ¸¦ À§Ä¡ ÁöÁ¤.
            break;
        }
        b++;
    }
    if (len == maxbytes) {
        if (eK==229) return true;//ÇÑ±ÛÀÔ·ÂÁßÀÌ¸é ÀÏ´Ü °è¼Ó.
        else return false;
    }else if (len > maxbytes) {
        alert(ox_tpl(oxLang('maxbytes'),{'maxbytes':maxbytes}));//" ÀÔ·Â¹üÀ§´Â "+maxbytes+" ±îÁö ÀÔ´Ï´Ù ");// ÇÑ±Û Àü¿ëÀÌ±â ¶§¹®¿¡ À¯ÀÏÇÏ°Ô ÇÑ±ÛÀÇ alert Ãâ·ÂÀ» Çã¿ëÇÔ.
        obj.value = str.substr(0,cutPoint);
        return false;
    }
    xx.value = event.keyCode;
    return true;


}
function getBytes(str) {// 4byte¹®ÀÚ±îÁö¸¸ Ã³¸®°¡´É.. 2byte ÀÌ»ó ¾µÀÏ ÀÖÀ»±î?
    var len = 0,b,c;
    for (b = 0; b < str.length; b++) {
        c = str.charCodeAt(b);
        if(c >= 0xFFFFFF) len += 4;
        else if(c >= 0xFFFF) len += 3;
        else if(c >= 0xFF) len += 2;
        else len++;
    }
    return len;
}
/* special keyCode
tab : 9
arrow : 37~40
enter : 13
pageUP/DOWN/END/HOME : 33~36
backSpace:8
del: 46
esc: 27
space : 32
*/


// general script -------------------------
function change_bg(obj_name,bg_value) {// change back ground color
    obj_name.style.backgroundColor=bg_value;
}
function trim(objV) {// ÀüÈÄ °ø¹é Á¦°Å
    return objV.replace(/(^\s*)|(\s*$)/g, "");
}
function rtrim(objV) {
    return objV.replace(/(\s*$)/g, "");
}
function clearspace(objV) {// ¸ðµç °ø¹é Á¦°Å
    return objV.replace(/(\s)/g, "");
}
function hm_size(val){// »ç¶÷ÀÌ ÀÐ±â ÁÁÀº ´ÜÀ§·Î È¯»ê
    var valx=0;
    var valy;
    with(Math){
        valx = round(val);
        if (valx < 1024) {valy = valx + ' B';
        }else if (1024*1024>valx) {valy = round(valx/1024) + ' KB';
        }else if (1024*1024*1024>valx) {valy = round(valx/1024/1024) + ' MB';
        }else {valy = round(valx/1024/1024/1024) + ' GB';
        }
    }
    return valy;
}
function abspos(){// Å¬¸¯ ÀÌº¥Æ®°¡ ¹ß»ýÇÑ ¹Ù·Î ±× À§Ä¡
    try {
        this.x = event.screenX - window.screenLeft - document.body.clientLeft + document.body.scrollLeft  - event.offsetX;
        this.y = event.screenY - window.screenTop - document.body.clientTop + document.body.scrollTop  - event.offsetY;
        return this;
        this.x = event.screenX - window.screenLeft - document.body.leftMargin + document.body.scrollLeft  - event.offsetX;
        this.y = event.screenY - window.screenTop - document.body.topMargin + document.body.scrollTop  - event.offsetY;
        return this;
    }catch(e) {
        return false;
    }
}
function documentcenter(){
    this.x = document.body.scrollLeft + document.body.offsetWidth/2;
    this.y = document.body.scrollTop + document.body.offsetHeight/2;
    return this;
}


// popup window ------------------------
function popup(winname,wid,hei,popurl,popresize) {// popup
    return window.open(popurl,winname,"width="+wid+",height="+hei+",resizable="+popresize+",scrollbars=yes,dependent=yes");
}


function OpenWindow(url) {// popup
    open(url,"noticewindow","menubar=no,toolbar=yes,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=620,height=500");
}


function ox_zipcode(callBack) {
    var zipUrl = "?mt=content&cp=oxpostcode&cm=oxpostcode&callBack="+callBack;
    popup('oxpostcode',400,400,zipUrl,'auto');
}

function winResize(){
    var obj = document.body.children(0);
    var width,height, innerW,innerH, dW, dH;
    innerW = parseInt(obj.offsetWidth);
    innerH = parseInt(obj.offsetHeight);
    dW = parseInt(document.body.clientWidth);
    dH = parseInt(document.body.clientHeight);
    width = innerW-dW;
    height = innerH-dH;
    window.resizeBy(width,height);
    return false;
}
// popup module window ------------------------
function oxPopupOpen(winname,popurl,wid,hei,top,left,scroll,popresize) {// popup
    return window.open(popurl,winname,"width="+wid+",height="+hei+",top="+top+",left="+left+",resizable="+popresize+",scrollbars="+scroll+",dependent=yes");
}
// popup module window ------------------------
function oxPopupCheck(objid,winname,popurl,wid,hei,top,left,scroll,popresize) {// popup
    if(oxGetCookie('oxpopup'+objid) !="check") {
        return oxPopupOpen(winname,popurl,wid,hei,top,left,scroll,popresize);
    }
}
function oxGetCookie( 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 "";
}
// Confirm character range -------------------------
function float_confirm(obj){// ½Ç¼öÀÎ °æ¿ì (int or float)
    obj = ''+obj;
    return (isNaN(obj) || obj.match(/\s/)) ? false:true;
}
function int_confirm(obj){// Á¤¼ö¸¸ (°ø¹é ÀÖÀ¸¸é false)
    obj = ''+obj;
    return (isNaN(obj) || obj.match(/[\.\s]/)) ? false:true;
}
function integer_confirm(obj){// alias of isInt
    return isInt(obj);
}
function real_confirm(obj){// alias of isInt
    return isFloat(obj);
}
function double_confirm(obj){// alias of isInt
    return isFloat(obj);
}

function digit_confirm(a) {// ¾Æ¶óºñ¾È ¼ýÀÚ¸¸
    var allowchar="0123456789";
    for (b=0; b<a.length; b++) if (-1 == allowchar.indexOf(a.charAt(b))) return false;
    return true;
}
function alphadigit_confirm(a) {// ¾ËÆÄºª ¼ýÀÚ¸¸
    var allowchar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    for (b=0; b<a.length; b++) if (-1 == allowchar.indexOf(a.charAt(b))) return false;
    return true;
}
function hangul_confirm(a) {// ÇÑ±Û¸¸
    with(Math) {
       for (b = 0; b < a.length; b++) {
             c = a.charCodeAt(b);
             if(c >= 0xAC00 && c <= 0xD7A3) continue;
             else return false;
         }
     }
     return true;
}
function file_confirm(a) {// ½ºÆäÀÌ½º, ½½·¡½Ã, ¹é½½·¡½Ã ÀÖÀ¸¸é ¿À·ù
    if (a.match(/[\s\/\\]/)!=null) return false;
    return true;
}
function name_confirm(a) {// ÇÑ±Û, ¿µ¹®, ¼ýÀÚ, ½ºÆäÀÌ½º, ÄÞ¸¶, ¸¶Ä§Ç¥
    with(Math) {
       for (b = 0; b < a.length; b++) {
             c = a.charCodeAt(b);// ¼ýÀÚ:48~57, ¿µ¹®(65~90,97~122), ½ºÆäÀÌ½º(32)
             d = a.charAt(b);
             if((c >= 48  && c <= 57) || (c >= 97 && c <= 122) || (c >= 65 && c <= 90) || (c == 32) || (d=='.') || (d==',') || (d=='(') || (d==')') || (c >= 0xAC00 && c <= 0xD7A3)) continue;
             else return false;
         }
     }
     return true;
}
function email_confirm(a) {// ÀÌ¸ÞÀÏ ±ÔÄ¢
    var allowchar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@._-";
    b = 0;c = 0;d = 0; e=0;
    if (a.length == 0) return false;
    for (b=0; b<a.length; b++) {
            if ( -1 == allowchar.indexOf(a.charAt(b)) ) return false;
            else if ('@' == a.charAt(b)) {c++; d=b;}
            else if ('.' == a.charAt(b)) e++;
    }
    if (c!=1 || e==0 || d==0 || d==(a.length-1)) return false;
    return true;
}
function hmail_confirm(a) {// ÀÌ¸ÞÀÏ ±ÔÄ¢
    var a2;
    if (!a.match(/.+@.+/)) return false;
    a2 = a.replace(/@/g,'AA');
    return ((a.length +1)==a2.length);
}
function social_confirm(aa) {// ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©
    a = aa.replace(/\-/g,'');
    if( a.charAt(6) == 1 || a.charAt(6) == 2 || a.charAt(6) == 3 || a.charAt(6) == 4)
        if( a.charAt(12) == (( 11 - ((a.charAt(0)*2+a.charAt(1)*3+a.charAt(2)*4+a.charAt(3)*5+a.charAt(4)*6+a.charAt(5)*7+a.charAt(6)*8+a.charAt(7)*9+a.charAt(8)*2+a.charAt(9)*3+a.charAt(10)*4+a.charAt(11)*5)% 11)))%10) return true;
    return false;
}
function coponumber_confirm(a) {// »ç¾÷ÀÚµî·Ï¹øÈ£ Ã¼Å©
    var a_tmp, a_last;
    if ( a.length == 10 ) {
        a_tmp = a.charAt(8)*5 + "0";
        a_tmp = parseFloat(a_tmp.charAt(0)) + parseFloat(a_tmp.charAt(1));
        a_last = (10-(a.charAt(0)*1%10+a.charAt(1)*3%10+a.charAt(2)*7%10+a.charAt(3)*1%10+a.charAt(4)*3%10+a.charAt(5)*7%10+a.charAt(6)*1%10+a.charAt(7)*3%10+a_tmp)%10)%10;
        if (a.charAt(9) == a_last) return true;
        else return false;
    }else return false;
}


// Cookie Control -------------------------------
function setCookie(cName,cValue){// name,value,expire,path,domain,secure
    var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var expires = (argc > 2) ? new Date() : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    if (argc > 2) expires.setTime(argv[2]*1000);
    document.cookie = cName + "=" + escape (cValue) +
        ((expires == null) ? "" : ("; expires=" + expires.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 "";
}


// zooming for weak-eyes -------------------
function oxsitezoom(){
    var argv = oxsitezoom.arguments;
    var argc = oxsitezoom.arguments.length;
    var oxzoom=0;
    if (argc>0) {
        oxzoom=parseInt(argv[0]);
    }else {
        oxzoom=parseInt(getCookie('oxzoom'));
    }
    if (oxzoom==800) oxbodyzoom(oxzoom);
    else if (oxzoom==1280) oxbodyzoom(oxzoom);
    else if (oxzoom==1600) oxbodyzoom(oxzoom);
    else if (oxzoom==2048) oxbodyzoom(oxzoom);
    else if (oxzoom==3072) oxbodyzoom(oxzoom);
    else if (oxzoom==4096) oxbodyzoom(oxzoom);
    else {
        oxzoom=1024;
        oxbodyzoom(oxzoom);
    }
    setCookie('oxzoom',oxzoom);
    return oxzoom;
}
function oxbodyzoom(zooming){
    document.body.style.zoom = zooming/1024;
}
function oxsitezoomplus(){
    var oxzoom = 0;
    oxzoom=parseInt(getCookie('oxzoom'));
    if (oxzoom<1024) oxsitezoom(1024);
    else if (oxzoom<1280) oxsitezoom(1280);
    else if (oxzoom<1600) oxsitezoom(1600);
    else if (oxzoom<2048) oxsitezoom(2048);
    else if (oxzoom<3072) oxsitezoom(3072);
}
function oxsitezoomminus(){
    var oxzoom = 0;
    oxzoom=parseInt(getCookie('oxzoom'));
    if (oxzoom>3072) oxsitezoom(3072);
    else if (oxzoom>2048) oxsitezoom(2048);
    else if (oxzoom>1600) oxsitezoom(1600);
    else if (oxzoom>1280) oxsitezoom(1280);
    else if (oxzoom>1024) oxsitezoom(1024);
}
// undefined
function isUndefined(val){
    if (typeof(val)=='undefined') return true;
    else return false;
}
function isDefined(val){
    if (typeof(val)=='undefined') return false;
    else return true;
}


// history action ------------------------------
function go_url(jumpurl) {// location change
    location.href = jumpurl;
}

function go_link(){ // usage (yes http_refferer) : go_link('http://www.oxwiz.com') or go_link('http://www.oxwiz.com','_blank')
    var argv = go_link.arguments;
    var argc = go_link.arguments.length;
    var tmpTagA;

    if (argc > 0) {
        tmpTagA = document.createElement('a');
        tmpTagA.style.display="none";
        document.body.insertAdjacentElement("beforeEnd",tmpTagA);
        tmpTagA.href = argv[0];
        if (argc > 1) tmpTagA.target = argv[1];
        tmpTagA.click();
        tmpTagA.removeNode();
        tmpTagA = null;
    }
}
a_link=go_link;


// no history action ---------------------------
var oxHiddenFrame = null;
var hiddenFrameTransView = null;
var hiddenFrameBusy = false;
var testMode=0;
function hiddenFrameTransBegin(){
    var tmpHtmlBuffer = '', xy=documentcenter();
    if (hiddenFrameTransView==null) {
        tmpHtmlBuffer = "<img src='"+dirHTC+'/__magicdir__/transfering.gif'+"' style='position:absolute;top:-1000;left:-1000;border:2 outset white'>";
        document.body.insertAdjacentHTML("beforeEnd",tmpHtmlBuffer);
        hiddenFrameTransView = document.body.children(document.body.children.length-1);
    }
    hiddenFrameTransView.style.top = xy.y - (hiddenFrameTransView.offsetHeight / 2);
    hiddenFrameTransView.style.left = xy.x- (hiddenFrameTransView.offsetWidth / 2);;
}
function hiddenFrameTransFinish(){
    if (hiddenFrameTransView!=null) {
        hiddenFrameTransView.style.top = -1000;
        hiddenFrameTransView.style.left = -1000;
    }
    hiddenFrameBusy = false;
}
function hiddenFrameClear(){
    if (oxHiddenFrame!=null) {
        oxHiddenFrame.removeNode(true);
        oxHiddenFrame=null;
    }
}
function hiddenFrame(){// create hidden iframe with no history
    var tmpSeed = new Date().getTime(), tmpHtmlBuffer;
    hiddenFrameClear();
    //oxHiddenFrame = document.createElement('<IFRAME name="oxHiddenFrame'+tmpSeed+'" frameborder=1 style="border:1 solid red" bordercolor=red></IFRAME>');
    //oxHiddenFrame.style.display="none";
    //document.body.insertAdjacentElement("beforeEnd",oxHiddenFrame);

    tmpHtmlBuffer = '<IFRAME name="oxHiddenFrame'+tmpSeed+'" onload="hiddenFrameTransFinish()" style="position:absolute;left:-1000;top:-1000;display:none;width:1;height:1"></IFRAME>';
    document.body.insertAdjacentHTML("beforeEnd",tmpHtmlBuffer);
    oxHiddenFrame = document.body.children(document.body.children.length-1);
    return 'oxHiddenFrame'+tmpSeed;
}
function hiddenFrameObject(){ // usage (no http_refferer): hiddenFrameObject().src='http://www.oxwiz.com'
    return eval(hiddenFrame());
}
function hiddenFrameLink(src){ // usage (yes http_refferer) : hiddenFrameLink('http://www.oxwiz.com')
    var tmpTagA = document.createElement('a');
    tmpTagA.style.display="none";
    document.body.insertAdjacentElement("beforeEnd",tmpTagA);
    if (testMode==0) tmpTagA.target = hiddenFrame();
    else {
        window.open('','_test_open_',"width=400,height=400,resizable=yes,scrollbars=yes,dependent=yes,location=yes");
        tmpTagA.target='_test_open_';
    }
    tmpTagA.href = src;
    tmpTagA.click();
    tmpTagA.removeNode();
    tmpTagA = null;
}
function hiddenFramePostLink(srcForm){ // usage : hiddenFramePostLink(Form_name) or hiddenFramePostLink(Form_name,true) -> ÀÚµ¿ÆûÃ¼Å©
    var argv = hiddenFramePostLink.arguments;
    var argc = hiddenFramePostLink.arguments.length;
    if (hiddenFrameBusy) {
        alert (oxLang('busy'));//"¼±ÇàÀÛ¾÷ÀÌ ÁøÇàÁßÀÔ´Ï´Ù.\nÀá½Ã ÈÄ ´Ù½Ã ½ÃµµÇÏ¿© ÁÖ½Ê½Ã¿À."
        return false;
    }
    if (argc > 1 && argv[1] == true)
        if(!ox_formChecker(srcForm) ) return false;
    if (testMode==0) srcForm.target=hiddenFrame();
    else {
        if (testMode==1) {
            var debugStringCheck = /&testDebug=/;
            if (srcForm.action.match(debugStringCheck) != '&testDebug=') srcForm.action += '&testDebug=2';
        }
        window.open('','_test_open_',"width=400,height=400,resizable=yes,scrollbars=yes,dependent=yes,location=yes");
        srcForm.target='_test_open_';
    }
    srcForm.submit();
    hiddenFrameBusy = true;
    if (argc > 2 && argv[2] == true) hiddenFrameTransBegin();
    return true;
}


// movine layer ---------------------------
function movingLayerSet(src){
    if (typeof(src.moveid)=='undefined' || src.moveid<0) {
        src.moveid = src.addBehavior(dirHTC+'/ox_movinglayer.htc.php');
        return src.moveid;
    }else return false;
}
function movingLayerTargetSet(src){
    if (typeof(src.moveid)=='undefined' || src.moveid<0) {
        src.moveid = src.addBehavior(dirHTC+'/ox_movinglayertarget.htc.php');
        return src.moveid;
    }else return false;
}
function movingLayerClear(src){
    if (typeof(src.moveid)=='undefined' || src.moveid<0) return false;
    src.removeBehavior(src.moveid);
    src.moveid=-1;
    return true;
}
// help window -------------
function oxhelp(url){ oxHelp(url);} // º»·¡´Â ÀÖ¾î¼­´Â ¾ÊµÇ´Â ÇÔ¼öÀÌ³ª ÆíÀÇ»ó ³Ö¾úÀ½.
function oxHelp(url){
    //alert(typeof(window.helpAreaOpen));
    try{
        var thisWin = window;
        while (typeof(thisWin.helpAreaOpen)!='function'){
            thisWin = window.parent;
            if (thisWin==window) break;
        }
        if (typeof(thisWin.helpAreaOpen)=='function') thisWin.helpAreaOpen(url);
        else alert("Sorry!");
    }catch(Err_e){
        alert("Sorry!");
    }
}
function getFather(){
    if (typeof(window.opener)=='undefined') return window.parent;
    else return window.opener;
}
function getChildObj(obj,childnum){ // html elementÀÇ ÀÚ½Ä element¸¦ °¡Áö°í ¿Â´Ù.
    if (typeof(obj.children(childnum))!='undefined') return obj.children(childnum);
    else return false;
}
// element remove ------------
function dhtmlRemoveObj(obj){
    var temp = document.body.createControlRange();
    temp.addElement(obj);
    temp.select();
    temp.execCommand('delete');
    temp = null;
}
// element copy ------------
function dhtmlCopyObj(obj){
    var temp = document.body.createControlRange();
    temp.addElement(obj);
    temp.select();
    temp.execCommand('copy');
    temp = null;
}
function dhtmlCopyObjHtml(obj){
    window.clipboardData.setData('text',obj.outerHTML);
    return obj.outerHTML;
}
function dhtmlCopyText(str){
    return window.clipboardData.setData('text',str);
}
function colorModule(){
    var tmpHelper = document.getElementById('dlgHelper');
    if (tmpHelper==null){
        document.body.insertAdjacentElement("beforeEnd",document.createElement('<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT>'));
        tmpHelper = document.getElementById('dlgHelper');
    }
    return tmpHelper;
}
function colorChoice(initColor){
    var sColor,tmpHelper = colorModule();
    try{
        if (typeof(initColor)=='undefined') {
            sColor = tmpHelper.ChooseColorDlg();
        }else {
            sColor = GetKnownColor(initColor);
            if (sColor===true || sColor===false) sColor = initColor;
            sColor = tmpHelper.ChooseColorDlg(initColor);
        }
        sColor = sColor.toString(16);
        if (sColor.length < 6) {
            var sTempString = "000000".substring(0,6-sColor.length);
            sColor = sTempString.concat(sColor);
        }
        return '#' + sColor;
    }catch(e){
        return false;
    }
}
// color table
knownColor = new Array();
function GetKnownColor(strColor){// red => #FF0000, transparent=>True, unknown=>False
    strColor = ''+strColor;
    if (strColor.charAt(0)=='#') return strColor.toUpperCase();
    else {
        strColor = strColor.toLowerCase();
        if (typeof(knownColor[strColor])!='undefined') return knownColor[strColor];
        else if(strColor=='transparent') return true;
        else false;
    }
}
knownColor['aliceblue']='#F0F8FF';
knownColor['antiquewhite']='#FAEBD7';
knownColor['aqua']='#00FFFF';
knownColor['aquamarine']='#7FFFD4';
knownColor['azure']='#F0FFFF';
knownColor['beige']='#F5F5DC';
knownColor['bisque']='#FFE4C4';
knownColor['black']='#000000';
knownColor['blanchedalmond']='#FFEBCD';
knownColor['blue']='#0000FF';
knownColor['blueviolet']='#8A2BE2';
knownColor['brown']='#A52A2A';
knownColor['burlywood']='#DEB887';
knownColor['cadetblue']='#5F9EA0';
knownColor['chartreuse']='#7FFF00';
knownColor['chocolate']='#D2691E';
knownColor['coral']='#FF7F50';
knownColor['cornflowerblue']='#6495ED';
knownColor['cornsilk']='#FFF8DC';
knownColor['crimson']='#DC143C';
knownColor['cyan']='#00FFFF';
knownColor['darkblue']='#00008B';
knownColor['darkcyan']='#008B8B';
knownColor['darkgoldenrod']='#B8860B';
knownColor['darkgray']='#A9A9A9';
knownColor['darkgreen']='#006400';
knownColor['darkkhaki']='#BDB76B';
knownColor['darkmagenta']='#8B008B';
knownColor['darkolivegreen']='#556B2F';
knownColor['darkorange']='#FF8C00';
knownColor['darkorchid']='#9932CC';
knownColor['darkred']='#8B0000';
knownColor['darksalmon']='#E9967A';
knownColor['darkseagreen']='#8FBC8B';
knownColor['darkslateblue']='#483D8B';
knownColor['darkslategray']='#2F4F4F';
knownColor['darkturquoise']='#00CED1';
knownColor['darkviolet']='#9400D3';
knownColor['deeppink']='#FF1493';
knownColor['deepskyblue']='#00BFFF';
knownColor['dimgray']='#696969';
knownColor['dodgerblue']='#1E90FF';
knownColor['firebrick']='#B22222';
knownColor['floralwhite']='#FFFAF0';
knownColor['forestgreen']='#228B22';
knownColor['fuchsia']='#FF00FF';
knownColor['gainsboro']='#DCDCDC';
knownColor['ghostwhite']='#F8F8FF';
knownColor['gold']='#FFD700';
knownColor['goldenrod']='#DAA520';
knownColor['gray']='#808080';
knownColor['green']='#008000';
knownColor['greenyellow']='#ADFF2F';
knownColor['honeydew']='#F0FFF0';
knownColor['hotpink']='#FF69B4';
knownColor['indianred']='#CD5C5C';
knownColor['indigo']='#4B0082';
knownColor['ivory']='#FFFFF0';
knownColor['khaki']='#F0E68C';
knownColor['lavender']='#E6E6FA';
knownColor['lavenderblush']='#FFF0F5';
knownColor['lawngreen']='#7CFC00';
knownColor['lemonchiffon']='#FFFACD';
knownColor['lightblue']='#ADD8E6';
knownColor['lightcoral']='#F08080';
knownColor['lightcyan']='#E0FFFF';
knownColor['lightgoldenrodyellow']='#FAFAD2';
knownColor['lightgreen']='#90EE90';
knownColor['lightgrey']='#D3D3D3';
knownColor['lightpink']='#FFB6C1';
knownColor['lightsalmon']='#FFA07A';
knownColor['lightseagreen']='#20B2AA';
knownColor['lightskyblue']='#87CEFA';
knownColor['lightslategray']='#778899';
knownColor['lightsteelblue']='#B0C4DE';
knownColor['lightyellow']='#FFFFE0';
knownColor['lime']='#00FF00';
knownColor['limegreen']='#32CD32';
knownColor['linen']='#FAF0E6';
knownColor['magenta']='#FF00FF';
knownColor['maroon']='#800000';
knownColor['mediumaquamarine']='#66CDAA';
knownColor['mediumblue']='#0000CD';
knownColor['mediumorchid']='#BA55D3';
knownColor['mediumpurple']='#9370DB';
knownColor['mediumseagreen']='#3CB371';
knownColor['mediumslateblue']='#7B68EE';
knownColor['mediumspringgreen']='#00FA9A';
knownColor['mediumturquoise']='#48D1CC';
knownColor['mediumvioletred']='#C71585';
knownColor['midnightblue']='#191970';
knownColor['mintcream']='#F5FFFA';
knownColor['mistyrose']='#FFE4E1';
knownColor['moccasin']='#FFE4B5';
knownColor['navajowhite']='#FFDEAD';
knownColor['navy']='#000080';
knownColor['oldlace']='#FDF5E6';
knownColor['olive']='#808000';
knownColor['olivedrab']='#6B8E23';
knownColor['orange']='#FFA500';
knownColor['orangered']='#FF4500';
knownColor['orchid']='#DA70D6';
knownColor['palegoldenrod']='#EEE8AA';
knownColor['palegreen']='#98FB98';
knownColor['paleturquoise']='#AFEEEE';
knownColor['palevioletred']='#DB7093';
knownColor['papayawhip']='#FFEFD5';
knownColor['peachpuff']='#FFDAB9';
knownColor['peru']='#CD853F';
knownColor['pink']='#FFC0CB';
knownColor['plum']='#DDA0DD';
knownColor['powderblue']='#B0E0E6';
knownColor['purple']='#800080';
knownColor['red']='#FF0000';
knownColor['rosybrown']='#BC8F8F';
knownColor['royalblue']='#4169E1';
knownColor['saddlebrown']='#8B4513';
knownColor['salmon']='#FA8072';
knownColor['sandybrown']='#F4A460';
knownColor['seagreen']='#2E8B57';
knownColor['seashell']='#FFF5EE';
knownColor['sienna']='#A0522D';
knownColor['silver']='#C0C0C0';
knownColor['skyblue']='#87CEEB';
knownColor['slateblue']='#6A5ACD';
knownColor['slategray']='#708090';
knownColor['snow']='#FFFAFA';
knownColor['springgreen']='#00FF7F';
knownColor['steelblue']='#4682B4';
knownColor['tan']='#D2B48C';
knownColor['teal']='#008080';
knownColor['thistle']='#D8BFD8';
knownColor['tomato']='#FF6347';
knownColor['turquoise']='#40E0D0';
knownColor['violet']='#EE82EE';
knownColor['wheat']='#F5DEB3';
knownColor['white']='#FFFFFF';
knownColor['whitesmoke']='#F5F5F5';
knownColor['yellow']='#FFFF00';
knownColor['yellowgreen']='#9ACD32';


function dec2hex(varDec){// 0~255 return String
    var hexchars = "0123456789ABCDEF";
    return hexchars.charAt(Math.floor(varDec/16)) + hexchars.charAt(varDec % 16);
}
function hex2dec(varHex){// return Number
    return eval('0x'+varHex);
}
function rgbChange(objColor,objChange){// hex(colorname),hex
    var rgb,tmp,buf='#';
    objChange=''+objChange;
    rgb = GetKnownColor(objColor);
    if (rgb==false) rgb = '#000000'
    else if (rgb==true) rgb = '#FFFFFF';
    rgb = rgb.substr(1);
    objChange = hex2dec(objChange);
    tmp = hex2dec(rgb.substr(0,2)) - objChange;
    buf += dec2hex(Math.abs(tmp));
    tmp = hex2dec(rgb.substr(2,2)) - objChange;
    buf += dec2hex(Math.abs(tmp));
    tmp = hex2dec(rgb.substr(4,2)) - objChange;
    buf += dec2hex(Math.abs(tmp));
    return buf;
    // ex) ddd.style.backgroundColor=rgbChange(dd.currentStyle.backgroundColor,'30');
}


/**
* FORM CHECKER
* <input type='text' name='ui[ID]' oxName='Ç¥½Ã¸í' oxNeed='1' oxPreDo='trim' oxLenMin='4' oxLenMax='6' oxCheck='digit,alphadigit,hangul,name,email,social,coponum' value=''>
* text,textarea ÀÎ °æ¿ì À§ ¿¹½Ã´ë·Î »ç¿ë
* select,checkbox,radio ÀÎ °æ¿ì oxName,oxNeed ¸¸ »ç¿ë
*/
function ox_formChecker(fm){
    var inputs = fm.tags('input');
    var textareas = fm.tags('textarea');
    var selects = fm.tags('select');
    var langType = langOX.currentType;
    if (ox_formChecker.arguments.length>1) {
         langType = trim(ox_formChecker.arguments[1]).toLowerCase();
    }
    if (ox_formCheckTags(inputs,langType) && ox_formCheckTags(textareas,langType)
        && ox_formCheckTags(selects,langType)) return true;
    else return false;
}
function ox_formCheckTags(inputs){
    var len = inputs.length;
    var cnt = 0;
    var oxName,oxInput,oxNeed,oxPreDo,oxCheck,oxLenMin,oxLenMax,elmBuf,ti;
    var elmNameBuf = new Array();
    var langType = langOX.currentType;
    if (ox_formCheckTags.arguments.length > 1) {
        langType = trim(ox_formCheckTags.arguments[1]).toLowerCase();
    }
    while (cnt < len) {
        ti = inputs[cnt];
        cnt++;
        oxName = (typeof(ti.oxName)=='undefined') ? '':ti.oxName;
        oxNeed = (typeof(ti.oxNeed)=='undefined') ? '':ti.oxNeed;
        oxPreDo = (typeof(ti.oxPreDo)=='undefined') ? '':ti.oxPreDo;
        oxCheck = (typeof(ti.oxCheck)=='undefined') ? '':ti.oxCheck;
        oxLenMin = (typeof(ti.oxLenMin)=='undefined') ? '':ti.oxLenMin;
        oxLenMax = (typeof(ti.oxLenMax)=='undefined') ? '':ti.oxLenMax;
        try {
            if (ti.getAttribute('disabled') || oxNeed == '' || oxNeed == '0') continue;
            if (ti.tagName == 'SELECT') {
                if (optionSelectedValue(ti).toString() == '') {
                    alert(ox_tpl(oxLang('formNeedCheck'),{'name':oxName}));//oxName+'Àº(´Â) ÇÊ¼ö Ã¼Å© »çÇ×ÀÔ´Ï´Ù.');
                    ti.focus();return false;
                }continue;
            }
            if (ti.type.toLowerCase() == 'radio' || ti.type.toLowerCase() == 'checkbox') {
                if (!in_array(ti.name,elmNameBuf)) {
                    elmNameBuf.push(ti.name);
                    var elmBuf = document.getElementsByName(ti.name);
                    if (!radioIsChecked(elmBuf)) {
                        alert(ox_tpl(oxLang('formNeedCheck'),{'name':oxName}));//oxName+'Àº(´Â) ÇÊ¼ö Ã¼Å© »çÇ×ÀÔ´Ï´Ù.');
                        ti.focus();return false;
                    }
                }continue;
            }
            if (oxPreDo=='trim') ti.value = trim(ti.value);//trimmingÀº oxNeed¿Í °ü°è ¾øÀ» ¼ö ÀÖ´Ù.
            if (oxCheck=='digit' && !digit_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) ¼ýÀÚ¸¸ »ç¿ëÇÏ½Ê½Ã¿À.');
                alert(ox_tpl(oxLang('formCheckDigit',langType),{'name':oxName}));
                ti.focus();return false;
            }else if ((oxCheck=='int' || oxCheck=='integer') && !int_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) Á¤¼ö¸¸ »ç¿ëÇÏ½Ê½Ã¿À.');
                alert(ox_tpl(oxLang('formCheckInt',langType),{'name':oxName}));
                ti.focus();return false;
            }else if ((oxCheck=='float' || oxCheck=='real' || oxCheck=='double') && !float_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) ½Ç¼ö¸¸ »ç¿ëÇÏ½Ê½Ã¿À.');
                alert(ox_tpl(oxLang('formCheckFloat',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='alphadigit' && !alphadigit_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) ¿µ¹®°ú ¼ýÀÚ¸¸ »ç¿ëÇÏ½Ê½Ã¿À.');
                alert(ox_tpl(oxLang('formCheckAlphaDigit',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='hangul' && !hangul_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) ÇÑ±Û¸¸ »ç¿ëÇÏ½Ê½Ã¿À.');
                alert(ox_tpl(oxLang('formCheckHangul',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='file' && !file_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) ½ºÆäÀÌ½º, ½½·¡½Ã, ¹é½½·¡½Ã¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.');
                alert(ox_tpl(oxLang('formCheckFile',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='name' && !name_confirm(ti.value)) {
                //alert(oxName+'Àº(´Â) ÇÑ±Û,¿µ¹®,¼ýÀÚ,½ºÆäÀÌ½º,ÄÞ¸¶,¸¶Ä§Ç¥ ¸¸ »ç¿ëÇÏ½Ê½Ã¿À.');
                alert(ox_tpl(oxLang('formCheckName',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='email' && !email_confirm(ti.value)) {
                //alert(oxName+'ÀÌ(°¡) ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.');
                alert(ox_tpl(oxLang('formCheckEmail',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='hmail' && !hmail_confirm(ti.value)) {
                //alert(oxName+'ÀÌ(°¡) ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.');
                alert(ox_tpl(oxLang('formCheckHmail',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='social' && !social_confirm(ti.value)) {
                //alert(oxName+'ÀÌ(°¡) ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.');
                alert(ox_tpl(oxLang('formCheckSocial',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (oxCheck=='coponum' && !coponumber_confirm(ti.value)) {
                //alert(oxName+'ÀÌ(°¡) ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.');
                alert(ox_tpl(oxLang('formCheckCoponum',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (ti.value=='' && oxNeed==1) {
                //alert(oxName+'ÀÌ(°¡) ºñ¾ú½À´Ï´Ù.');
                alert(ox_tpl(oxLang('formCheckEmpty',langType),{'name':oxName}));
                ti.focus();return false;
            }else if (ti.value!='') {
                if (oxLenMin!='' && ti.value.length<oxLenMin) {
                    if (oxLenMax=='') //alert(oxName+'Àº(´Â) '+oxLenMin+'±ÛÀÚ ÀÌ»ó ÀÔ·ÂÇÏ½Ê½Ã¿À.');
                        alert(ox_tpl(oxLang('formCheckMinLen',langType),{'name':oxName,'length':oxLenMin}));
                    else if(oxLenMax==oxLenMin) //alert(oxName+'Àº(´Â) '+oxLenMax+'±ÛÀÚ·Î ÀÔ·ÂÇÏ½Ê½Ã¿À.');
                        alert(ox_tpl(oxLang('formCheckLength',langType),{'name':oxName,'length':oxLenMax}));
                    else //alert(oxName+'Àº(´Â) '+oxLenMin+'~'+oxLenMax+'±ÛÀÚ·Î ÀÔ·ÂÇÏ½Ê½Ã¿À.');
                        alert(ox_tpl(oxLang('formCheckLengthRange',langType),{'name':oxName,'oxLenMin':oxLenMin,'oxLenMax':oxLenMax}));
                    ti.focus();return false;
                }else if (oxLenMax!='' && ti.value.length>oxLenMax) {
                    if (oxLenMin=='') //alert(oxName+'Àº(´Â) '+oxLenMax+'±ÛÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ½Ê½Ã¿À.');
                        alert(ox_tpl(oxLang('formCheckMaxLen',langType),{'name':oxName,'length':oxLenMax}));
                    else if(oxLenMax==oxLenMin) //alert(oxName+'Àº(´Â) '+oxLenMax+'±ÛÀÚ ÀÔ´Ï´Ù.');
                        alert(ox_tpl(oxLang('formCheckLength',langType),{'name':oxName,'length':oxLenMax}));
                    else //alert(oxName+'Àº(´Â) '+oxLenMin+'~'+oxLenMax+'±ÛÀÚ ÀÔ´Ï´Ù.');
                        alert(ox_tpl(oxLang('formCheckLengthRange',langType),{'name':oxName,'oxLenMin':oxLenMin,'oxLenMax':oxLenMax}));
                    ti.focus();return false;
                }
            }
        }catch(err){
            //alert('confirm fail');
            return false;
        }
    }
    return true;
}


//link Url,select form name,result target field
function loadData(url,sel,target,param) {
    var CD = sel.options[sel.selectedIndex].value;    // Ã¹¹øÂ° selectboxÀÇ ¼±ÅÃµÈ ÅØ½ºÆ®
    var form = sel.form.name;
    //alert(url+"&form="+form+"&MODULE_CD=" + CD + "&target=" + target);
    dynamic.src = url+"&form="+form+"&"+param+"=" + CD + "&target=" + target;

}
function ClearOption(form,target) {
   //alert("tttt"+form+"rr"+target);
   var len = document.forms[form].elements[target].length;
   //eval("var len = document.forms['"+ form +"'].elements['"+ target +"'].length;");
   for (i=len; i>-1; i--) {
       document.forms[form].elements[target].option[i] = null;
   }
}

/**
 * <input type="text" id="filepath" oxName="Ã·ºÎÆÄÀÏ" oxNeed="0">
 * <img src="_oxdir/oxjs/__magicdir__/file_attach.gif" onmouseover="oxInputFile('{»ý¼ºÇÒ¾÷·ÎµåÆÄÀÏ°´Ã¼ÀÌ¸§}','filepath',this)">
 *
 * ¼­ºê¹ÔÇÏ±â Àü ox_formChecker ¿Í ox_InputFileChecker({string:Ã¼Å©È®ÀåÀÚ±×·ì(ÄÞ¸¶·Î±¸ºÐ)},{boolean:true(ALLOW),false(DENY)}) ·Î Ã¼Å© ÇÊ¼ö
 */
function getFileExt(fname,isUpper) {
    var pointer = fname.lastIndexOf(".");
    if (pointer == -1) return false;
    if (isUpper) return fname.substr(pointer+1,fname.length).toUpperCase();
    else return fname.substr(pointer+1,fname.length).toLowerCase();
}
function ox_InputFileChecker() {
    var args = ox_InputFileChecker.arguments;
    if (typeof(oxInputFileElms) == "undefined") return true;

    for (var i in oxInputFileElms) {
        try {
            var textElm = document.getElementById(i); //filePath °´Ã¼
            if (!textElm.style) continue; //filePath °´Ã¼°¡ ¾øÀ¸¸é continue
            var fileElm = document.getElementsByName(oxInputFileElms[i]); //file °´Ã¼
        }catch(e) { //filePath °´Ã¼ È¤Àº file °´Ã¼°¡ ¾øÀ¸¸é continue(filePath °´Ã¼°¡ ¾ø´Â °æ¿ì file °´Ã¼µµ ¾ø´Ù°í ÆÇ´Ü)
            continue;
        }
        var textVal = (typeof(textElm.value) == "undefined")? textElm.innerText : textElm.value; //filePath
        if (typeof(fileElm) != "undefined" && fileElm.length) fileElm = fileElm[0]; //file °´Ã¼ ¼±ÅÃ
        else { //file °´Ã¼°¡ ¾ø°í
            if (textVal == "") continue; //filePath °¡ ºñ¾ú´Ù¸é continue
            else { //ºÎÁ¤ÇÑ ¹æ¹ýÀ¸·Î filePath ¸¦ ÀÔ·ÂÇÑ °æ¿ì
                alert(oxLang("fileCheckAbnormal")); //alert("Ã·ºÎµÈ ÆÄÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
                textElm.focus();
                return false;
            }
        }
        //¿©±â¼­ºÎÅÍ file °´Ã¼ÀÇ Á¸Àç°¡ È®½ÇÇÏ´Ù´Â ÀüÁ¦·Î Ã³¸®
        if (textVal == "") { //file °´Ã¼°¡ ÀÖÀ¸³ª filePath ¸¦ °­Á¦·Î Áö¿î °æ¿ì(ÆÄÀÏÃ·ºÎ Ãë¼Ò)
            oxInputFileRemove(fileElm);
            continue;
        }else if (fileElm.value == "" || fileElm.value != textVal) { //file °´Ã¼´Â ÀÖÀ¸³ª Ã·ºÎ¸¦ ÇÏÁö ¾Ê¾Ò°Å³ª, filePath ¸¦ °­Á¦·Î ÀÔ·Â/¼öÁ¤ÇÏ¿© ±× °ªÀÌ ¼­·Î ´Ù¸¥ °æ¿ì
            alert(oxLang("fileCheckAbnormal")); //alert("Ã·ºÎµÈ ÆÄÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
            textElm.focus();
            return false;
        }else{ //file °´Ã¼¸¦ ÅëÇÑ ¿Ã¹Ù¸¥ Ã·ºÎ(È®ÀåÀÚ °Ë»ç°¡ ÇÊ¿äÇÏ´Ù¸é ½Ç½ÃÇÏ°í ¾Æ´Ï¶ó¸é Åë°ú)
            if (args.length && typeof(args[0]) == "string" && args[0].length) {
                var fileExeList = args[0].toLowerCase().split(",");
                var fileExe = getFileExt(fileElm.value);
                if (fileExe) {
                    var allowType = Boolean(Number(args[1]));
                    if ((allowType && !in_array(fileExe,fileExeList)) || (!allowType && in_array(fileExe,fileExeList))) {
                        var msgBuf = fileExe+oxLang("fileCheckExtUnknown"); //"´Â »ç¿ë °¡´ÉÇÑ ÆÄÀÏ È®ÀåÀÚ°¡ ¾Æ´Õ´Ï´Ù.\n";
                        if (allowType && !in_array(fileExe,fileExeList)) msgBuf += oxLang("fileCheckExtKnownList"); //"»ç¿ë °¡´ÉÇÑ ÆÄÀÏ È®ÀåÀÚ´Â ´ÙÀ½°ú °°½À´Ï´Ù.\n\n";
                        else msgBuf += oxLang("fileCheckExtKnownList"); //"´ÙÀ½ ÆÄÀÏ È®ÀåÀÚ´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.\n\n";
                        msgBuf += args[0];
                        alert(msgBuf);
                        textElm.focus();
                        return false;
                    }
                }else{
                    alert(oxLang("fileCheckAbnormal")); //alert("Ã·ºÎµÈ ÆÄÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
                    oxInputFileRemove(fileElm);
                    textElm.focus();
                    return false;
                }
            }
        }
    }
    return true;
}
function oxInputFile(fileElmName,textElmId,btnElm) {
    try { //µ¿ÀÏÇÑ nameÀ» °¡Áø ÆÄÀÏ °´Ã¼´Â »ý¼ºÇÒ ¼ö ¾ø´Ù.
        var fileElm = document.getElementsByName(fileElmName);
        if (typeof(fileElm) != "undefined" && fileElm.length) return false;
        else oxInputFileCreate(fileElmName,textElmId,btnElm);
    }catch(e) {
        oxInputFileCreate(fileElmName,textElmId,btnElm);
    }
}
function oxInputFileCreate(fileElmName,textElmId,btnElm) {
    var textElm = document.getElementById(textElmId);
    var oxName = (textElm.getAttribute("oxName") == null)? oxLang("attachFile") : textElm.getAttribute("oxName");
    var oxNeed = (textElm.getAttribute("oxNeed") == null)? 0 : textElm.getAttribute("oxNeed");
    try { //[Ã£¾Æº¸±â]¹öÆ°ÀÇ margin °ª¿¡ µû¸¥ À§Ä¡ º¸Á¤
        var mt = (btnElm.currentStyle.marginTop == "auto")? 0 : btnElm.currentStyle.marginTop;
        var mr = (btnElm.currentStyle.marginRight == "auto")? 0 : btnElm.currentStyle.marginRight;
        var mb = (btnElm.currentStyle.marginBottom == "auto")? 0 : btnElm.currentStyle.marginBottom;
        var ml = (btnElm.currentStyle.marginLeft == "auto")? 0 : btnElm.currentStyle.marginLeft;
    }catch(e) {
        var mt = 0; var mr = 0; var mb = 0; var ml = 0;
    }
    var spanTag = document.createElement("<SPAN style=\"margin:"+mt+" "+mr+" "+mb+" "+ml+";padding:0;\"></SPAN>");
    var fileTag = document.createElement("<input type=\"file\" name=\""+fileElmName+"\" oxName=\""+oxName+"\" oxNeed=\""+oxNeed+"\" style=\"cursor:pointer\">");
    spanTag.style.overflow = "hidden";
    spanTag.style.position = "absolute";
    spanTag.style.filter = "alpha(opacity=0)";
    spanTag.style.width = btnElm.offsetWidth;
    spanTag.style.height = btnElm.offsetHeight;
    fileTag.style.position = "relative";
    fileTag.style.left = -4;
    fileTag.style.width = btnElm.offsetWidth;
    fileTag.style.height = btnElm.offsetHeight;
    fileTag.onchange = function() {
        if (typeof(textElm.value) == "undefined") textElm.innerText = this.value;
        else textElm.value = this.value;
    }
    fileTag.onmouseover = function() {
        var textVal = (typeof(textElm.value) == "undefined")? textElm.innerText : textElm.value;
        if (this.value != "" && this.value != textVal) oxInputFileRemove(this);
    }
    spanTag.insertAdjacentElement("afterBegin",fileTag);
    btnElm.insertAdjacentElement("beforeBegin",spanTag);
    oxInputFileSet(fileElmName,textElmId);
}
function oxInputFileRemove(fileElm) {
    fileElm.parentNode.removeChild(fileElm);
}
function oxInputFileSet(fileElmName,textElmId) {
    if (typeof(oxInputFileElms) == "undefined") oxInputFileElms = {};
    if (!in_array(fileElmName,oxInputFileElms)) oxInputFileElms[textElmId] = fileElmName;
}

//ÇÃ·¡½Ã ¿ÀÇÁÁ§Æ® µîÀÇ È°¼ºÈ­
function oxActiveObj(obj) {
    try {obj.outerHTML = obj.outerHTML;}
    catch(e) {return;}
}
//<div> <object FLASH><embed FLASH></embed></object><script language=javascript>oxActiveX()</ script> </div>
function oxActiveX() {
    try {
        var obj = thisScript().parentElement;
        if (obj.children.length == 2 && obj.tagName == "DIV")
            obj.innerHTML = obj.children(0).outerHTML;
    }catch(e){
    }
}
function oxActiveHtml(obj,html,type) {
    if (type == "outer") obj.outerHTML = html;
    else obj.innerHTML = html;
}
function oxActiveWrite(html) {
    document.write(html);
}

/**
 * var ox = new oxc_calendar('ox'); //º¯¼ö ÀÌ¸§°ú µ¿ÀÏÇÑ °ªÀ» ³Ñ±è
 * ox.dateClicked = function(strVal) {
 *     alert(strVal);
 * }
 * <tag onclick="xx.innerHTML=ox.calendar('2006-04-06')">
 */
function oxc_calendar(variableName){
    this.vn = variableName;
    this.lastDay = function(objY,objM){
        if (objM<1) {objM = 12 - objM; objY--;}
        else if (12 < objM) {objM = objM - 12; objY++;}
        if (objM==2) {
            if ((objY % 4 == 0 && objY % 100 != 0) || objY % 400 == 0) return 29;
            else return 28;
        }else if (objM==1 || objM==3 || objM==5 || objM==7 || objM==8 || objM==10 || objM==12) return 31;
        else return 30;
    }

    this.mkdate = function(objY,objM,objD){
        var year,month,day,last_day,today;
        last_day = this.lastDay(objY,objM);
        if (objM<1) {objM = 12 + objM; objY--;}
        else if (12<objM) {objM = objM-12; objY++;}
        if(objD<1) {
            objM--;
            if (objM<1) {objM = 12 + objM; objY--;}
            last_day = this.lastDay(objY,objM);
            objD = last_day+objD
        }else if (last_day<objD){
            objM++;
            if (12<objM) {objM = objM-12; objY++;}
            objD = objD    - last_day;
        }
        today = new Date(objY,objM-1,objD);
        year = today.getFullYear();
        month =1+today.getMonth();
        day =  today.getDate();
        if (month<10) today=year+'-0'+month;
        else today=year+'-'+month;
        if (day<10) today += '-0'+day;
        else today += '-'+day;
        return today;
    }

    this.changeMe = function (objWrite,objY,objM,strD){
        var Y=objY.options[objY.selectedIndex].value;
        var M=objM.options[objM.selectedIndex].value;
        var D=strD;
        if (M<10) M='0'+M;
        if (D<10) D='0'+D;
        objWrite.innerHTML = this.calendar(Y+'-'+M+'-'+D);
    }

    this.dateClick = function (strVal){
        if (typeof(this.dateClicked)!='function') {
            alert("Undefined Function. 'dateClicked(str Date)'" );
        }else return this.dateClicked(strVal);

    }

    this.changeMe2 = function (objWrite,Y,M,D,monthNum){
        M = M - (-(monthNum));
        if (M>12) {
            M= M - 12;
            Y= Y-(-1); // - ¸¦ µÎ¹ø ¾´ °ÍÀº '1'+'1'='11' ÀÌ µÇ´Â °ÍÀ» ¹æÁöÇÏ±â À§ÇÔ.
        }else if(M<1) {
            M= 12 - M;
            Y= Y-1;
        }
        if (M<10) M='0'+M;
        if (D<10) D='0'+D;
        objWrite.innerHTML = this.calendar(Y+'-'+M+'-'+D);
    }

    this.calendar = function (strDate)
    {// date format : Y-m-d
        var year,month,day,last_day,first_dname,last_dname;
        var da_begin,da_finish,da_arr,tmp_i,tmpCnt=0,tmpCnt2=0,buf;
        var today = new Date();
            year = today.getFullYear();
            month = 1+today.getMonth();
            day =  today.getDate();
            today = this.mkdate(year,month,day);
        if (strDate==null || strDate=='') strDate = today;
        year = strDate.substr(0,4);
        month = strDate.substr(5,2);
        day = strDate.substr(8,2);
        today = this.mkdate(year,month,day);

        last_day = this.lastDay(year,month);
        first_dname  = new Date(year,month-1,1).getDay();
        last_dname  = new Date(year,month-1,last_day).getDay();

        da_begin = (6-first_dname==6)? 1:1-first_dname;
        da_finish= (6-last_dname==0)? last_day:last_day+(6-last_dname);
        da_arr=new Array();
        tmp_i = da_begin;
        while (tmp_i <= da_finish) {
            fulldate = this.mkdate(year,month,tmp_i);
            da_tmp = fulldate.substr(8,2);
            da_tmp =  (tmp_i < 1 || tmp_i>last_day) ? "<font color=silver>"+da_tmp+"</font>":da_tmp;
            da_arr[tmpCnt]= new Array(da_tmp,fulldate);
            da_arr[tmpCnt][2]=(tmp_i < 1 || tmp_i>last_day)? "0":"1";
            tmpCnt++;
            tmp_i++;
        }

        buf =
            '<table style="font-size:9pt;table-layout:fixed;" id=' +this.vn+ '_oxCalTbl border=0 cellspacing=1 cellpadding=1 width="100%" style="cursor:hand" onclick="">' +
            '<tr align=center><td colspan=7 height=1><img height=1 width=1></td></tr>' +
            '<tr>' +
            '<td colspan=7 align=center>&nbsp;';

        buf +="<img src='"+dirHTC+"/__magicdir__/prev.gif' onclick='" +this.vn+ ".changeMe2(" +this.vn+ "_oxCalTbl.parentElement,"+year+","+month+","+day+",-1)' style='cursor:pointer' align='absmiddle' alt='ÀÌÀü´Þ'>&nbsp;";
        buf +="<select style='font-size:9pt' id=" +this.vn+ "_oxCalYear onchange=\"" +this.vn+ ".changeMe(" +this.vn+ "_oxCalTbl.parentElement,this," +this.vn+ "_oxCalMonth,'"+day+"')\">";
            i=1910;
            tmpSelected='';
            while (i<2040) {i++;
                tmpSelected = (i==year) ? " selected":"";
                buf += "<option value='"+i+"'"+tmpSelected+">"+i+"</option>";
            }
        buf +="</select>";
        buf +="<select style='font-size:9pt' id=" +this.vn+ "_oxCalMonth onchange=\"" +this.vn+ ".changeMe(" +this.vn+ "_oxCalTbl.parentElement," +this.vn+ "_oxCalYear,this,'"+day+"')\">";
            i=0;j=0;
            tmpSelected='';
            while (i<12) {i++;
                tmpSelected = (i==month) ? " selected":"";
                j = (i<10) ? '0'+i:i;
                buf += "<option value='"+i+"'"+tmpSelected+">"+i+"</option>";
            }
        buf +="</select>&nbsp;";
        buf +="<img src='"+dirHTC+"/__magicdir__/next.gif' onclick='" +this.vn+ ".changeMe2(" +this.vn+ "_oxCalTbl.parentElement,"+year+","+month+","+day+",+1)' style='cursor:pointer' align='absmiddle' alt='´ÙÀ½´Þ'>";
        buf +=
            '</td>' +
            '</tr>' +
            '<tr align=center><td colspan=7 height=1><img height=1 width=1></td></tr>' +
            '<tr align=center bgcolor=#efefef style="color:#666666;font-size:8pt;padding:1px">' +
            '<td><tt>ÀÏ</tt></td>' +
            '<td><tt>¿ù</tt></td>' +
            '<td><tt>È­</tt></td>' +
            '<td><tt>¼ö</tt></td>' +
            '<td><tt>¸ñ</tt></td>' +
            '<td><tt>±Ý</tt></td>' +
            '<td><tt>Åä</tt></td>' +
            '</tr>';
        /*
            '<td>ÀÏ</td>' +
            '<td>¿ù</td>' +
            '<td>È­</td>' +
            '<td>¼ö</td>' +
            '<td>¸ñ</td>' +
            '<td>±Ý</td>' +
            '<td>Åä</td>' +

        */
        i=0;
        while(tmpCnt2 < tmpCnt) {
            dk = da_arr[tmpCnt2][0];
            dv = da_arr[tmpCnt2][1];
            dd = da_arr[tmpCnt2][2];
            if (i==0) {colour='tomato';buf += "<tr align=center>";}
            else if (i==6) colour='dodgerblue';
            else colour='#666666';
            fontweight="";
            if (dk==day) {fontweight=";FONT-WEIGHT: bolder;";colour='red';}

            daybox = "<td style='color:"+colour+fontweight+";font-size:11px;'"+
                (dd=="1" ? "onclick=" +this.vn+ ".dateClick('"+dv+"')" : "onclick=\"" +this.vn+ "_oxCalTbl.parentElement.innerHTML=" +this.vn+ ".calendar('"+dv+"')\"")+
                " onmouseover=\"this.style.backgroundColor='#e5e5e5';\""+
                " onmouseout=\"this.style.backgroundColor='transparent';\">"+dk+"</td>";
            buf += daybox;
            tmpCnt2++;
            if (i==6) {buf += "</tr>";i=0;}
            else i++;
        }

        buf += "<tr><td colspan=7 align=center><img width=1 height=1></td></tr></table>";

        return buf;
    }

}
function ox_fixPosition(obj,absoluteTop,relativeLeft){
    // »ó´Ü¿¡¼­ºÎÅÍ Æ¯Á¤À§Ä¡(»ó´ëÀ§Ä¡)¿¡ °íÁ¤½ÃÅ²´Ù. °¡·Î´Â µðÀÚÀÎ¿¡¼­ Ãâ·ÂµÇ´Â À§Ä¡¿¡ µû¶ó °áÁ¤(»ó´ëÀ§Ä¡)µÇ¸ç ¿©¹éÀ» ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
    // obj: Layer Block tag ID , absoluteTop: px , relativeLeft: px
    try{
        obj.style.position='absolute';
        obj.style.setExpression ('top',absoluteTop+" + (unExistValue = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + 'px'");
        obj.style.marginLeft = relativeLeft;
        return true;
    }catch(e){
        return false;
    }
}

/* function ox_getTextBox
TEXT ¿µ¿ªÀÇ À§Ä¡¿Í Å©±â¸¦ °è»êÇÑ´Ù.
<div id=tBox>my text</div>
var objBox = ox_getTextBox(tBox);
*/
function ox_getTextBox(obj){
    var tmp, tmpBody = document.body , tmpBox = {};
    tmpBox.top = 0;
    tmpBox.left = 0;
    tmpBox.right = 0;
    tmpBox.bottom = 0;
    tmpBox.width = 0;
    tmpBox.height = 0;
    try{
        tmp = obj.getClientRects();
        tmpBox.top = tmp[0].top + tmpBody.scrollTop;
        tmpBox.left = tmp[0].left + tmpBody.scrollLeft;
        tmpBox.right = tmp[tmp.length-1].right + tmpBody.scrollLeft;
        tmpBox.bottom = tmp[tmp.length-1].bottom + tmpBody.scrollTop;
        tmpBox.width = tmpBox.right - tmpBox.left;
        tmpBox.height = tmpBox.bottom - tmpBox.top;
        return tmpBox;
    }catch(e){
        return tmpBox;
    }

}

/* objectWidth(obj)
object ¾ÈÂÊ¿¡ ÀÖ´Â ÄÁÅÙÆ®ÀÇ °¡Àå Å« width ¸¦ Ã£¾ÆÁØ´Ù.
´ÙÀÌ³ª¹ÍÇÏ°Ô ÄÁÅÙÆ®¸¦ Áß¾ÓÀ§Ä¡¿¡ Ç¥½ÃÇÒ¶§ ¾´´Ù.
    <center>
    <div id=outer style="display:block; text-align:left; border:1 solid silver;">
    <div id=inner style="display:inline">
    content: table, image, text,..
    </div></div>
    </center>
    <script language=javascript>outer.style.width = 2 + objectWidth(inner);</ script>
*/
function objectWidth(obj){
    var tmp = obj.getClientRects();
    var tmpWidth = 0;
    var tmpWidth2 = 0;
    var tmpCount = -1;
    while (++tmpCount < tmp.length){
        tmpWidth2 = tmp[0].right - tmp[0].left;
        if (tmpWidth < tmpWidth2) tmpWidth = tmpWidth2;
    }
    return tmpWidth;
}

/* function ox_objView
objectÀÇ ¼Ó¼ºÀ» È®ÀÎÇÒ ¶§ »ç¿ëÇÑ´Ù.
*/
function ox_objView(obj){
    //var obj = ox_getTextBox(obj);
    var buf = '';
    for (tmpKey in obj) {
        try{
            buf += tmpKey + ": " + obj[tmpKey] + "\n";
        }catch(e){
        }
    }
    return buf;
}

/*
°£´ÜÇÑ ÆÁÀ» Ç¥½ÃÇÕ´Ï´Ù.
 - argument ³»¿ë(text,html),¹è°æ»ö,Å×µÎ¸®µÎ²²
 - ex) <div onmouseover="ox_desc('infoText','#FFFFFF','0px')" onmouseout="ox_descClose()">[¹öÆ°]</div>
*/
var ox_descPop;
function ox_desc(){
    try {
        var e = window.event;
        var src = e.srcElement;
        var posX,posY;
        var argv,txtObj,color,borderBuf,tmpObj = new Object();
        ox_descPop = window.createPopup();
        argv = ox_desc.arguments;
        if (argv.length < 1 || argv[0] == "") return;
        txtObj = argv[0];
        color = (argv.length > 1)? argv[1] : "#fffacd";
        borderBuf = (argv.length > 2)? argv[2] : "1px solid gray";
        ox_descPop.document.open();
        ox_descPop.document.write('<html><style>body, td, div{font-size:9pt}</style><body style="margin:0;overflow:hidden;border:'+borderBuf+';" bgcolor="'+color+'"><nobr>'+txtObj+'</nobr></body></html>');
        posX = event.x + 10;
        posY = event.y + 10;
        ox_descPop.document.close();
        ox_descPop.show(posX,posY,0,0,document.body);
        tmpObj.w = ox_descPop.document.body.children(0).offsetWidth + 2;
        tmpObj.h = ox_descPop.document.body.children(0).offsetHeight + 2;
        ox_descPop.show(posX,posY,tmpObj.w,tmpObj.h,document.body);
    }catch(e){
    }
}
function ox_descClose(){
    if (typeof(ox_descPop)=='object' && ox_descPop.isOpen) ox_descPop.hide();
}

/*
 ·Î ±× ÀÎ  ¹Ú ½º  submit check
*/
function ox_logCheck(form) {
    if(!hiddenFramePostLink(form,true))
        return false;
    return true;
}
/*
 ·Î ±× ÀÎ ¹Ú ½º ·Î  ÀÌ µ¿
 type : login ,logout
 actionFile : main.php
 */
function ox_logPop(type,actionFile) {
    if(actionFile=='') actionFile = 'main.php';
    retUrl = escape(document.location.href);
    //logUrl = actionFile+"?mt=content&mp=oxmember&mm=oxmember&cmd=login&retUrl="+retUrl;
    if(type =='login') {
        //logUrl = actionFile+"?mt=page&mp=member&cm=oxmember&cmd=login&subcmd=remote&returnUrl="+retUrl;
        logUrl = actionFile+"?mt=content&cp=oxmember&cm=oxmember&cmd=login&subcmd=remote&returnUrl="+retUrl;
        popup('login',600,350,logUrl,'yes');
    }else {
        logUrl = actionFile+"?mt=content&cp=oxmember&cm=oxmember&cmd=logout&subcmd=remote&returnUrl="+retUrl;
        go_link(logUrl);
    }
    //go_link(logUrl);

}
function ox_menuconfPop(actionFile,oxid) {
    linkUrl = actionFile+"?mt=manage&mp=menu_list_page&mm=menuconf&mode=edit&content=1&aid="+oxid;
    popup('__OXMANAGEPOPUP__',800,600,linkUrl,'yes');
}
function ox_confPop(actionFile,mm,oxid) {
    linkUrl = actionFile+"?mt=manage&mp=module&mm="+mm+"&mode=mod&mancmd=config&oxid="+oxid;
    popup('__OXMANAGEPOPUP__',770,600,linkUrl,'yes');
}

function ox_printPop(actionFile,mm,oxid,CID) {
    if(mm =="oxbbs") {
        linkUrl = actionFile+"?mt=content&mp="+mm+"&mm="+mm+"&cmd=view&oxid="+oxid+"&BID="+CID;
    }else {
        linkUrl = actionFile+"?mt=content&mp="+mm+"&mm="+mm+"&cmd=view&oxid="+oxid+"&ID="+CID;
    }
    popWin = popup('__OX_PRINT__',770,600,linkUrl,'yes');
    popWin.print();
}

function ox_scrapPop(actionFile,mm,oxid,CID) {
    if(mm =="oxbbs") {
        linkUrl = actionFile+"?mt=content&mp="+mm+"&mm="+mm+"&cmd=scrap&oxid="+oxid+"&BID="+CID;
    }else {
        linkUrl = actionFile+"?mt=content&mp="+mm+"&mm="+mm+"&cmd=scrap&oxid="+oxid+"&ID="+CID;
    }
    popWin = popup('__OX_SCRAP__',770,600,linkUrl,'yes');
//    popWin.print();
}
function ox_emailPop(actionFile,mm,oxid,CID) {
    if(mm =="oxbbs") {
        linkUrl = actionFile+"?mt=content&mp="+mm+"&mm="+mm+"&cmd=sendMail&oxid="+oxid+"&BID="+CID;
    }else {
        linkUrl = actionFile+"?mt=content&mp="+mm+"&mm="+mm+"&cmd=sendMail&oxid="+oxid+"&ID="+CID;
    }
    popWin = popup('__OX_SCRAP__',770,600,linkUrl,'yes');
//    popWin.print();
}
function ox_printHtml(strHtml,strTitle) {
    var sty = document.all.tags('LINK');
    var buf = '<html><head><title>';
    var styKey = -1, width=650, height=400;
    buf += strTitle + '</title>';
    if (sty.length>0) {
        while (++styKey < sty.length) {
            buf += sty[styKey].outerHTML;
        }
    }
    sty = document.all.tags('STYLE');
    styKey = -1;
    if (sty.length>0) {
        while (++styKey < sty.length) {
            buf += sty[styKey].outerHTML;
        }
    }
    if (ox_printHtml.arguments.length > 3) {
        height = ox_printHtml.arguments[3];
        width = ox_printHtml.arguments[2];
    }else if (ox_printHtml.arguments.length > 2) width = ox_printHtml.arguments[2];
    buf += '<script language="javascript">function go_print() {window.print();} document.onclick = function() {if (confirm("'+oxLang('closeWindow')+'")) window.close();}</'+'script>';
    buf += '</head><body style="margin:0"><body></html>';
    popWin = popup('__OX_PRINT__',width,height,'','yes');
    popWin.document.open();
    popWin.document.write(buf);
    popWin.document.close();
    popWin.document.body.innerHTML = strHtml;
    popWin.go_print();
}

function ox_addBodyOnLoad(thisNewOnLoad) {
    // body tag¿¡ onload ºÎ¿¡ ½ÇÇàµÉ ³»¿ëÀ» Ãß°¡ÇÏ´Â ÇÔ¼ö.
    var thisOldOnLoad;
    if (typeof(thisNewOnLoad)!='function') return false;
    if (typeof(document.body.onload)=='function'){
        thisOldOnLoad = document.body.onload
        document.body.onload = function(){
            thisOldOnLoad();
            thisNewOnLoad();
        }
    }else{
        document.body.onload = function(){
            thisNewOnLoad();
        }
    }
    return true;
    /* //usage
        function al1(){ alert(1); }
        function al2(){ alert(2); }
        ox_addBodyOnLoad (al1);
        ox_addBodyOnLoad (al2);
    */
}

/**
* desc : alert javascript error object
* <code>
    try{
        undefinedFunction();
    }catch(e){
        alertErr(e);
    }
* </code>
*/
function alertErr(e){
    var buf = '';
    /*
    for (ee in e) {
        buf += ee+': '+e[ee].toString()+'\n';
    }
    */
    buf += 'message: '+e.message;
    buf += '\nnumber: '+(e.number & 0xFFFF);
    buf += '\nname: '+e.name;
    buf += '\ndescription: '+e.description;
    alert(buf);
}

/* funtion popupImage() ÀÌ¹ÌÁö Å©±â¿¡ ¸ÂÃç¼­ Ã¢À» ¿¬´Ù.
* param (string) image src [,(string) window title [,(boolean) force to open window]]
* src : (string) image src
* title : (string) window title
* force : (boolean) trueÀÌ¸é »õÃ¢À¸·Î ¿¬´Ù, falseÀÌ¸é ±âÁ¸Ã¢ÀÌ ÀÖÀ» ½Ã ±âÁ¸Ã¢À¸·Î ¿¬´Ù.
*/
var popupImageOpened=false;
var popupImageMaxWidth = 800;
var popupImageMaxHeight = 600;
function popupImage(){
    var src='',title='',force=false,buf='';
    var argv = popupImage.arguments;
    if (argv.length<1 || typeof(argv[0])!='string' || argv[0].length<1) return;
    src = argv[0];
    title = 'ImageURL: ' + src;
    if (argv.length>2) {
        title = argv[1];
        force = (argv[2]==false) ? false:true;
    }else if (argv.length>1) {
        if (typeof(argv[1])=='boolean') {
            force = argv[1];
            title = src;
        }else{
            title = argv[1];
        }
    }

    if (typeof(popupImageOpened)!='object' || popupImageOpened.closed || force){
        popupImageOpened = window.open('','_blank','width=100,height=100,status=no,toolbar=no,resizable=yes',true);
    }

    buf = '\
    <html><head><title>'+title+
    '</title></head><body style="margin:0;border:0" onload="resizeMe()">\
    <div id=scrollLayer style="overflow:auto">\
    <img id=bigimg src="'+src+'" alt="Big Image" oxMsg="'+oxLang('closeWindow')+'" onclick="if (confirm(this.oxMsg)) window.close()">\
    <script language=javascript>\
    var onetime = true;\
    function resizeMe(){\
    var w = bigimg.width;\
    var h = bigimg.height;\
    if (w>'+popupImageMaxWidth+') {w='+popupImageMaxWidth+';scrollLayer.style.width=w;}\
    if (h>'+popupImageMaxHeight+') {h='+popupImageMaxHeight+';scrollLayer.style.height=h;}\
    window.resizeBy(w-document.body.clientWidth,h-document.body.clientHeight);\
    window.setTimeout("windowResize()",300);\
    }\
    function windowResize(){\
        if (onetime) {\
            onetime = false;\
            window.onresize = windowResize;\
            return;\
        }\
        scrollLayer.style.width = document.body.clientWidth;\
        scrollLayer.style.height = document.body.clientHeight;\
    }\
    </'+'script>\
    </div></body></html>';

    popupImageOpened.document.open();
    popupImageOpened.document.write(buf);
    popupImageOpened.document.close();

}

/**
* desc tabMaker example
< script>var Tab1 = new tabMaker(88,27,88,27,true,'tabimage/tab_on.gif','tabimage/tab_off.gif');</ script>
<style>
.tab2{margin-right:-10px; color:#642; font:normal 8pt µ¸¿ò,sans-serif; background-color:transparent; border:none;}
.tabDiv {display:none}
</style>
<div style="margin-bottom:-1px;height:27">
<div id=tabArea style="position:absolute;">
    <input type=button class=tab oxtab=1 oxtabView=0 value='±âº»Á¤º¸' onclick='Tab1.tabClick(this,tabViewArea)' href='aaa.html' target='_blank'
    ><input type=button class=tab oxtab=1 oxtabView=1 value='ÆÄÀÏ¹Ú½º' onclick='Tab1.tabClick(this,tabViewArea)'
    ><input type=button class=tab oxtab=1 oxtabView=2 value='¿¬°á¸ðµâ' onclick='Tab1.tabClick(this,tabViewArea)'
    ><input type=button class=btn value="more" onclick="Tab1.more()">
&nbsp;</div>
</div>
<form id=tabViewArea style="border:1 solid silver">
    <div oxtab=1 oxtabView=0 class=tabDiv>
    view 0
    </div>
    <div oxtab=1 oxtabView=1 class=tabDiv>
    view 1
    </div>
    <table oxtab=1 oxtabView=2 class=tabDiv border=1 cellpadding=0 cellspacing=0>
    <tr><td>view 3</td></tr></table>
</form>
< script>tabArea.children(0).click();< /script>
*/
function tabMaker(){//params bigWidth,bigHeight,smallHeight,bgImg,imgBig,imgSmall,bigColor,smallColor,bigWeight,SmallWeight
    this.obj = false;
    this.more = function (){
        if (this.obj===false) return;
        if (typeof(this.obj.href)=='undefined') return;
        if (typeof(this.obj.target)=='undefined') {
            go_link(this.obj.href);
        }else {
            go_link(this.obj.href,this.obj.target);
        }
    }
    this.tabClick = function (obj,objArea){
        var cnt=0,tmp;
        if (typeof(obj.oxtab)=='undefined') return;
        while (cnt < obj.parentElement.children.length) {
            tmp = obj.parentElement.children(cnt++);
            if (typeof(tmp.oxtab)!='undefined' && tmp.oxtab==obj.oxtab) {
                if (tmp==obj){
                    obj.style.height = this.bigHeight;
                    obj.style.width = this.bigWidth;
                    obj.style.color = this.bigColor;
                    obj.style.fontWeight = this.bigWeight;
                    if (this.bgImg) obj.style.backgroundImage='url('+this.imgBig+')';
                }else{
                    tmp.style.height = this.smallHeight;
                    tmp.style.width = this.smallWidth;
                    tmp.style.color = this.smallColor;
                    tmp.style.fontWeight = this.smallWeight;
                    if (this.bgImg) tmp.style.backgroundImage='url('+this.imgSmall+')';
                }
            }
        }
        this.obj = obj;
        this.tabView(obj,objArea);
    }
    this.tabView = function (obj,objArea){
        var cnt=0,tmp;
        while (cnt < objArea.children.length) {
            tmp = objArea.children(cnt++);
            if (typeof(tmp.oxtab)!='undefined' && tmp.oxtab==obj.oxtab) {
                if (tmp.oxtabView==obj.oxtabView) tmp.style.display='block';
                else tmp.style.display='none';
            }
        }
    }
    this.reset = function(){
        this.bigWidth=88;
        this.bigHeight=27;
        this.smallWidth=88;
        this.smallHeight=27;
        this.bgImg = true;
        this.imgBig = dirHTC+'/__magicdir__/tab_on.gif';
        this.imgSmall = dirHTC+'/__magicdir__/tab_off.gif';
        this.bigColor = '#000000';
        this.smallColor = '#404040';
        this.bigWeight = 'bold';
        this.smallWeight = 'normal';
    }
    this.init = function(obj){
        if (obj.length>0) this.bigWidth=obj[0];
        if (obj.length>1) this.bigHeight=obj[1];
        if (obj.length>2) this.smallWidth=obj[2];
        if (obj.length>3) this.smallHeight=obj[3];
        if (obj.length>4) this.bgImg = obj[4];
        if (obj.length>5) this.imgBig = obj[5];
        if (obj.length>6) this.imgSmall = obj[6];
        if (obj.length>7) this.bigColor = obj[7];
        if (obj.length>8) this.smallColor = obj[8];
        if (obj.length>9) this.bigWeight = obj[9];
        if (obj.length>10) this.SmallWeight = obj[10];
    }
    this.reset();
    if (tabMaker.arguments.length>0) this.init(tabMaker.arguments);
}

/**
* desc ÀÌ¹ÌÁöÅÂ±×(IMG)¸¦ ÀÌ¿ëÇÑ ÅÇ¸Þ´º, tabMaker¿Í µ¿ÀÏÇÏ°Ô »ç¿ëÇÑ´Ù.
<div id=tabArea style="position:absolute;">
    <img class=tab oxtab=2 oxtabView=0 src="img1_out.gif" src_over="img1_over.gif" onclick='Tab2.tabClick(this,tabViewArea)' href='aaa.html' target='_blank'
    ><img class=tab oxtab=2 oxtabView=1 src="img2_out.gif" src_over="img2_over.gif" onclick='Tab2.tabClick(this,tabViewArea)' href='aaa.html'
    ><img class=tab oxtab=2 oxtabView=2 src="img3_out.gif" src_over="img3_over.gif" onclick='Tab2.tabClick(this,tabViewArea)'
    ><input type=button class=btn value="more" onclick="Tab2.more()">
&nbsp;</div>
*/
function tabMakerImage(){
    this.obj = false;
    this.first = true;
    this.img;
    this.selectedViewer = false;
    this.more = function (){
        if (this.obj===false) return;
        if (typeof(this.obj.href)=='undefined' || this.obj.href==this.obj.src) return;
        if (typeof(this.obj.target)=='undefined') {
            go_link(this.obj.href);
        }else {
            go_link(this.obj.href,this.obj.target);
        }
    }
    this.tabClick = function (obj,objArea){
        var cnt=0,tmp;
        if (typeof(obj.oxtab)=='undefined') return;
        if (this.first) this.init(obj);
        while (cnt < obj.parentElement.children.length) {
            tmp = obj.parentElement.children(cnt++);
            if (typeof(tmp.oxtab)!='undefined' && tmp.oxtab==obj.oxtab) {
                if (tmp==obj){
                    tmp.tabNow=true;
                    if (typeof(tmp.src_over)!='undefined') tmp.src = tmp.src_over;
                }else{
                    tmp.tabNow=false;
                    if (typeof(tmp.src_out)!='undefined') tmp.src = tmp.src_out;
                }
            }
        }
        this.obj = obj;
        this.tabView(obj,objArea);
    }
/*
    var Tab = new tabMakerImage();
    Tab.tabFunc = function (obj) {
        var tBox;
        if (this.selectedViewer!=false) this.selectedViewer.removeNode();
        tBox = document.createElement('DIV');
        tBox.style.border="2px dashed orange";
        tBox.style.position="absolute";
        tBox.style.height = obj.offsetHeight;
        tBox.style.width = obj.offsetWidth;
        this.selectedViewer = tBox;
        obj.insertAdjacentElement('BeforeBegin',this.selectedViewer);
        //this.selectedViewer.innerText=' ';
        alert(obj.oxtabView);
    }
*/
    this.tabFunc = function (obj) {
    }
    this.tabView = function (obj,objArea){
        var cnt=0,tmp;
        while (cnt < objArea.children.length) {
            tmp = objArea.children(cnt++);
            if (typeof(tmp.oxtab)!='undefined' && tmp.oxtab==obj.oxtab) {
                if (tmp.oxtabView==obj.oxtabView) tmp.style.display='block';
                else tmp.style.display='none';
            }
        }
    }
    this.init = function (obj){
        var cnt=0,cnt2=0,tmp;
        this.first = false;
        this.img = new Array();
        while (cnt < obj.parentElement.children.length) {
            tmp = obj.parentElement.children(cnt++);
            if (typeof(tmp.oxtab)!='undefined') {
                if (typeof(tmp.src)!='undefined') {
                    tmp.src_out = tmp.src;
                    //tmp.src_set = tmp.src
                }
                if (typeof(tmp.src_over)!='undefined') {
                    this.img[cnt2] = new Image();
                    this.img[cnt2].src = tmp.src_over;
                    cnt2++;
                }
                if (typeof(tmp.onmouseover)!='function') {
                    tmp.onmouseover = function () {
                        if (!this.tabNow && typeof(this.src_over)!='undefined') this.src = this.src_over;
                    }
                    if (typeof(tmp.onmouseout)!='function') {
                        tmp.onmouseout = function () {
                            if (!this.tabNow && typeof(this.src_out)!='undefined') this.src = this.src_out;
                        }
                    }
                }
            }
        }
    }
}
function oxrandom(min,max){
    var randScale = 0;
    if (typeof(min)=='undefined' || typeof(max)=='undefined') return Math.ceil(Math.random()*1000);
    else if (min > max) {
        randScale = max;
        max = min;
        min = randScale;
    }
    randScale = max - min;
    return (min + Math.round(Math.random()*randScale));
}

/** memo send furnction
* type : 1- memo send , 2: friend list
* tUrl : main.php
* frid : send userID
 */
function oxmemo_send(type,tUrl,frid) {
    var memoUrl = tUrl+"?mt=content&cp=memo&cm=memo";
    if(type ==1) memoUrl = memoUrl+"&cmd=send&FRID="+frid;
    else if(type ==2) memoUrl = memoUrl+"&cmd=frlist";
    else if(type ==3) memoUrl = memoUrl+"&cmd=list&subcmd=inbox";
    memoWnd = popup('memo',520,400,memoUrl,'yes');
    memoWnd.focus();
}

/**
* {JSVAR KEY} À» Ä¡È¯ÇÑ´Ù.
* objArray = {key_1:value1,key_2:value_2}
*/
function ox_tpl(objData,objArray){
    var key,obj,regExp;
    if (objData==='') return '';
    if (typeof(objArray)!='object') return objData;
    //try{
        for (key in objArray) {
            key = key.replace(/(^\s*)|(\s*$)/g, "");
            obj = objArray[key];
            regExp = eval('/{JSVAR\\s+'+key+'\\s*}/g');
            objData = objData.replace(regExp,obj);
        }
    //}catch(e){
        return objData;
    //}
    return objData;
}


/**
* ÀÚµ¿À¸·Î ½ºÅ©·Ñ µÇ°Ô ÇÑ´Ù.
    <div id=box style="border:1 solid red;width:200">
    <table border=0 desc="content" style="border:1 solid green">
    <tr><td>
    1. °¡³ª´Ù¶ó¸¶¹Ù<br>
    2. ³ª´Ù¶ó¸¶¹Ù»ç<br>
    3. ´Ù¶ó¸¶¹Ù»ç¾Æ<br>
    4. ¶ó¸¶¹Ù»ç¾ÆÀÚ<br>
    5. ¸¶¹Ù»ç¾ÆÀÚÂ÷
    </td></tr></table>
    </div>
    < script >oxSelfScrollSet(box,50,2,1);</ script >
// object, interval msec, shift step, scroll direction(1:up,2:down,3:left,4:right)
*/
function oxSelfScrollSet(obj,sec,step,direction){
    if (direction==null) direction=1;
    obj.oxSelfScroll = new oxSelfScroll(obj,sec,step,direction);
}
// object, interval msec, shift step, scroll direction(1:up,2:down,3:left,4:right)
function oxSelfScroll(obj,sec,step,direction){ // obj.children(0) ÀÇ  size ´Â  5ÀÌ»ó ÀÌ¾î¾ß ÇÑ´Ù.
    this.box=false;
    this.item=false;
    this.sec = 300;// 300ms
    this.step=10;
    this.name = '';
    this.itemSize = 100;
    this.direction = 1;
    this.init = function(obj,sec,step,direction) {
        var objSty;
        var objNum;
        var bufBegin,bufGlue,bufEnd,bufTbl='';
        var bufItem = obj.children(0).outerHTML;
        var startPoint = 0;
        this.name = obj.uniqueID;
        this.box = obj;
        this.item = obj.children(0);
        this.sec = sec;
        this.step = step;
        this.direction = (direction<1 || direction>4) ? 1:direction ;
        objSty = obj.style;
        if (!objSty.width) objSty.width=obj.offsetWidth;
        if (!objSty.height) objSty.height=obj.offsetHeight;
        objSty.overflow='hidden';
        obj.oxSelfScrollState = 0;
        obj.onmouseover = function() {
            this.oxSelfScrollState = 1;
        };
        obj.onmouseout = function() {
            this.oxSelfScrollState = 0;
        };


        if (direction < 3) {// up,down
            this.itemSize = parseInt(this.item.offsetHeight,10);
            if (this.itemSize < 5) return;
            objNum = Math.ceil(parseInt(objSty.height,10)/parseInt(this.item.offsetHeight));
            startPoint = (direction < 2) ? 0:- this.itemSize;
            if (objNum<=2) objNum = 2;
            else objNum++;
            bufBegin ='<table border=0 cellpadding=0 cellspacing=0 width='+
                this.item.offsetWidth+
                ' height='+(objNum*parseInt(this.item.offsetHeight))+
                '>';
            bufGlue = '<tr><td>'+bufItem+'</td></tr>';
            bufEnd = '</table>';
        }else {// left,right
            this.itemSize = parseInt(this.item.offsetWidth,10);
            if (this.itemSize < 5) return;
            objNum = Math.ceil(parseInt(objSty.width,10)/parseInt(this.item.offsetWidth));
            startPoint=(direction < 4) ? 0:- this.itemSize;
            if (objNum<=2) objNum = 2;
            else objNum++;
            bufBegin ='<table border=0 cellpadding=0 cellspacing=0 height='+
                this.item.offsetHeight+
                ' width='+(objNum*parseInt(this.item.offsetWidth))+
                '><tr>';
            bufGlue = '<td>'+bufItem+'</td>';
            bufEnd = '</tr></table>';

        }

        while (objNum-->0) {
            bufTbl += bufGlue;
        }
        obj.innerHTML = bufBegin+bufTbl+bufEnd;
        this.item = obj.children(0);
        if (direction < 3) {// up,down
            this.item.style.marginTop = startPoint;
        }else {// left,right
            this.item.style.marginLeft = startPoint;
        }
        this.run();
    };
    this.run = function() {
        var newMargin;
        setTimeout(this.name+'.oxSelfScroll.run()',this.sec);
        if (this.box.oxSelfScrollState) return;
        objSty = this.item.style;

        if (direction==1) {
            newMargin = parseInt(objSty.marginTop,10) - this.step;
            if (Math.abs(newMargin) >= this.itemSize) {
                newMargin += this.itemSize;
            }
            objSty.marginTop = newMargin;
        }else if (direction==2) {
            newMargin = parseInt(objSty.marginTop,10) + this.step;
            if (newMargin >= 0) {
                newMargin -= this.itemSize;
            }
            objSty.marginTop = newMargin;
        }else if (direction==3) {
            newMargin = parseInt(objSty.marginLeft,10) - this.step;
            if (Math.abs(newMargin) >= this.itemSize) {
                newMargin += this.itemSize;
            }
            objSty.marginLeft = newMargin;
        }else {
            newMargin = parseInt(objSty.marginLeft,10) + this.step;
            if (newMargin >= 0) {
                newMargin -= this.itemSize;
            }
            objSty.marginLeft = newMargin;
        }

    };
    this.init(obj,sec,step,direction);
}

function htmlspecialchars(str) {
    if (typeof(str) == "object" || typeof(str) == "boolean") return "";
    var str = str.toString();
    str = str.replace(/\&/g,"&amp;");
    str = str.replace(/\</g,"&lt;");
    str = str.replace(/\>/g,"&gt;");
    str = str.replace(/\'/g,"&#039;");
    str = str.replace(/\"/g,"&quot;");
    return str;
}

function enterSubmit(btnId,eType) {
    if (event.keyCode == 13) try {
        if (typeof(eType) == "undefined") eType = "onclick";
        document.getElementById(btnId).fireEvent(eType);
    }catch(e){}
}

function in_array() {
    if (!arguments.length) return false;
    for (var i=1; i<arguments.length; i++) {
        if (typeof(arguments[i]) == "object") {
            for (var j in arguments[i]) if (arguments[0] == arguments[i][j]) return true;
        }else if (arguments[0] == arguments[i]) return true;
    }
    return false;
}

function ox_varGET() {
    var args = ox_varGET.arguments;
    var getUrl = location.href;
    try {
        var getStr = getUrl.substr(getUrl.indexOf("?")+1);
        getStr = getStr.replace(/\"/g,'\\"');
        getStr = getStr.replace(/\s*\=+\s*/g,'":"');
        getStr = '{"'+getStr.replace(/\s*\&+\s*/g,'","')+'"}';
        var obj = new Object();
        eval('obj = '+getStr+';');
        if (args.length > 0) {
            if (typeof(obj[args[0]]) != "undefined") return obj[args[0]];
            else {
                if (args.length > 1) return args[1];
                else return false;
            }
        }else return false;
    }catch(e){
        return false;
    }
}

//<img onerror="ox_onError(this,'__magicdir__/image/noimage.gif')"> - µÎ¹øÂ° ÆÄ¶ó¸ÞÅÍÀÇ ÀÌ¹ÌÁö·Î Ãâ·ÂÀ» ½ÃµµÇÏ°í ¶Ç´Ù½Ã onerrer ÀÌº¥Æ® ¹ß»ý½Ã oxjs/__magicdir__/image/noimage.gif ·Î Ãâ·ÂÀ» ½ÃµµÇÏ°í ¶Ç ´Ù½Ã onerror ÀÌº¥Æ® ¹ß»ý½Ã return false
//<img onerror="ox_onError(this)"> - oxjs/__magicdir__/image/noimage.gif ·Î Ãâ·ÂÀ» ½ÃµµÇÏ°í ¶Ç ´Ù½Ã onerror ÀÌº¥Æ® ¹ß»ý½Ã return false
function ox_onError() {
    var args = ox_onError.arguments;
    if (args.length > 0) {
        var elm = args[0];
        if (args.length > 1) {
            var img = args[1];
            if (!elm.getAttribute("oxError")) {
                elm.setAttribute("oxError",1);
                elm.src = img;
            }else{
                if (elm.getAttribute("oxError") == 1) {
                    var img = dirHTC+"/__magicdir__/noimage.gif";
                    elm.setAttribute("oxError",2);
                    elm.src = img;
                }return false;
            }
        }else{
            var img = dirHTC+"/__magicdir__/noimage.gif";
            if (!elm.getAttribute("oxError")) {
                elm.setAttribute("oxError",1);
                elm.src = img;
            }else return false;
        }
    }else return false;
}

// oxsolution layer Manager
// ÅÆÀ¸·Î Ã¢À» °ü¸®ÇÒ¶§ »ç¿ëÇÑ´Ù.
// flash µî object°¡ ²À È°¼ºÈ­ µÇ¾î ÀÖ´Â »óÅÂ¸¦ À¯ÁöÇØ¾ß ÇÒ ¶§ »ç¿ëÇÑ´Ù.
// var lay = new oxlayerManager;
// lay.add(obj1); lay.add(obj2); lay.add(obj2); //°ü¸®ÇÒ layer¸¦ ÀÔ·Â
// lay.setObj(obj1) // È°¼ºÈ­ÇÒ layer ÀÔ·Â (ÃÖÃÊ »ç¿ë ½Ã ³ª¸ÓÁö ·¹ÀÌ¾î´Â ÀÚµ¿À¸·Î ºñÈ°¼º)
function oxlayerManager() {
    this.layers = new Array();
    this.current = -1;
    this.checkList = function (obj) {
        var tCnt = -1;
        while (++tCnt < this.layers.length) {
            if (this.layers[tCnt] === obj) return tCnt;
        }
        return -1;
    }
    this.add = function(obj) {
        if (this.checkList(obj)!=-1) return false;
        this.layers[this.layers.length] = obj;
        return true;
    }
    this.setObj = function(obj) {
        var tCnt = -1, tNum;
        tNum = (this.checkList(obj));
        if (tNum == -1) return false; // ¸ñ·Ï¿¡ ¾ø´Ù
        if (this.current != -1) {
            if (tNum == this.current) return true; // ¾îÂîµÇ¾úµç È°¼ºÈ­»óÅÂ
            this.setOff(this.layers[this.current]);
            this.setOn(this.layers[tNum]);
            this.current = tNum;
            return true;
        }
        while (++tCnt < this.layers.length) {
            if (this.layers[tCnt] === obj) {
                this.current = tCnt;
                this.setOn(this.layers[tCnt]);
            }else {
                this.setOff(this.layers[tCnt]);
            }
        }
        if (this.current != -1) return true;
        else return false;
    }
    this.setOn = function (obj){
        obj.runtimeStyle.position = '';
        obj.runtimeStyle.left = '';
        obj.runtimeStyle.top = '';
    }
    this.setOff = function (obj){
        obj.runtimeStyle.position = 'absolute';
        obj.runtimeStyle.left = '-3000';
        obj.runtimeStyle.top = '-3000';
    }
}

// oxsolution flash uploader
// var uploader = new oxflashup('uploader');// ÆÄ¶ó¸ÞÅ¸¿Í º¯¼ö¸íÀÌ µ¿ÀÏÇØ¾ß ÇÑ´Ù.
// uploader.createNow(); //HTMLÀÌ ·ÎµùµÇ¾î ÃÖÃÊ·Î ·»´õ¸µ µÇ´Â ½ÃÁ¡¿¡¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Ù. 
// uploader.createIn(objId); //DIV °°Àº ¿¤¸®¸ÕÆ®ÀÇ innerHTML·Î »ý¼º
// À§ÀÇ µÑÁß ÇÏ³ª ÈÄ¿¡...
// uploader.maxFileSize = -1;// °³º°ÆÄÀÏ ¿ë·®Á¦ÇÑ
// uploader.uploadUrl = 'up.php';// ¾÷·Îµå URL
// uploader.exts = {'desc':'imgs','ext':'*.jpg; *.jpeg; *.gif; *.png'};
// uploader.onUploadBegin = function(){ .....
//    <input type=button value="open" onclick="uploader.browse()">
//    <input type=button value="upload" onclick="uploader.upload()">
function oxflashup(myName){
    // flash version 8 ÀÌ»ó
    // È¯°æ¼³Á¤
    this.maxFileSize = -1;// °³º°ÆÄÀÏ ¿ë·®Á¦ÇÑ
    this.uploadUrl = '';// ¾÷·Îµå URL
    this.instanceName = myName;
    this.uploader = '';
    this.exts = {'desc':'0','ext':'0'};//{'desc':'imgs','ext':'*.jpg; *.jpeg; *.gif; *.png'}; // ÆÄÀÏ¼±ÅÃ¿¡¼­ ÀÍ½ºÅÙ¼ÇÀ» ÁöÁ¤ÇÒÁö ¸»Áö
    this.fileList = {};
    this.ready = false;
    this.totalSize = 0;// ¼±ÅÃÇÑ ÀüÃ¼ ¿ë·®
    this.totalFiles = 0;// ¼±ÅÃÇÑ ÀüÃ¼ °³¼ö
    this.extSet = function(desc,ext) {
        this.exts.desc = desc; // "Images (*.jpg, *.jpeg, *.gif, *.png)";
        this.exts.ext = ext; // "*.jpg; *.jpeg; *.gif; *.png";
    }
    this.extInit = function() {
        this.exts = {'desc':'0','ext':'0'};
    }
    // flash control box
    this.createStr = function() {
        var tmp, tmpId, tmpHeight=20, tmpWidth=140;
        tmpId = 'oxflashuploader'+oxrandom(1000,9999);
        tmp  ='<object id="'+tmpId+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
        tmp +=' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
        tmp +=' width="'+tmpWidth+'" height="'+tmpHeight+'" align="middle">';
        tmp +='<param name="allowScriptAccess" value="sameDomain" /><PARAM NAME="Scale" VALUE="ExactFit" />';
        tmp +='<param name="movie" value="'+dirHTC+'/__magicdir__/oxflashup.swf" /><param name="quality" value="high" />';
        tmp +='<param NAME=wmode VALUE=transparent /></object>';
        return {'str':tmp,'tid':tmpId};
    }
    this.createNow = function() {
        // runtime only
        var tmp;
        tmp = this.createStr();
        document.write(tmp.str);
        this.uploader = document.getElementById(tmp.tid);
    }
    this.createIn = function(obj) {
        var tmp;
        tmp = this.createStr();
        obj.innerHTML = tmp.str;
        this.uploader = obj.children(0);
    }
    this.uploaderInit = function() {
        if (this.uploader != ''){
            this.uploader.init(this.instanceName, this.maxFileSize, this.uploadUrl, this.exts.desc, this.exts.ext);
            this.ready = true;
        }
    }
    // µ¿ÀÛ method
    /*
    this.browse = function(){
        if (this.ready!=true) this.uploaderInit();
        this.uploader.fileOpen();
    }
    this.upload = function() {
        this.uploader.uploadBegin();
    }
    */
    this.remove = function(name) {
        if (this.fileList.hasOwnProperty(name)) {
            this.uploader.removeFile(name);
            this.onSelected(this.uploader.getFileList());
        }
    }
    // ÀÌº¥Æ® ÇÇµå¹é
    this.onSelected = function() {
        var result, tmpArr, tmpCnt=-1, tmpObj, tmpList = {};
        if (arguments.length<1) return;
        result = arguments[0];
        //alert(result);
        tmpArr = result.split('|');
        this.totalSize = 0;
        this.totalFiles = 0;
        while (++tmpCnt < tmpArr.length) {
            if (tmpArr[tmpCnt].search(':')<0) continue;
            tmpObj = tmpArr[tmpCnt].split(':');
            tmpList[tmpObj[0]] = tmpObj[1];
            this.totalFiles ++;
            this.totalSize += parseInt(tmpObj[1]);
        }

        this.fileList = tmpList;// {fileName1:size1,fileName2:size2,..}
        this.onAfterSelected();
    }
    this.onUploadBegin = function() {// ¾÷·ÎµåÀÇ ½ÃÀÛ
    }
    this.onUploadBeginOne = function() {//°¢ ÆÄÀÏÀÇ ¾÷·Îµå ½ÃÀÛ (filename)
    }
    this.onUploadFinishOne = function() {//°¢ ÆÄÀÏÀÇ ¾÷·Îµå ¿Ï·á (filename)
    }
    this.onProgess = function() { //(file,uploaded size,file size)
    }
    this.onUploadError = function() { //(file,errKind,errorMsg)
    }
    this.onUploadFinish = function() {// ¾÷·ÎµåÀÇ ¿Ï·á
    }
    this.onAfterSelected = function() {// ÆÄÀÏ¼±ÅÃ ÈÄÀÇ »ç¿ëÀÚ ÇÚµé·¯
    }
    this.onSizeOver = function(size){// ÁöÁ¤µÈ ¿ë·®º¸´Ù Å« ÆÄÀÏÀÌ ÀÖÀ» ¶§
        alert("file size over (Max: "+size+")");
    }
    //this.create();
}
function oxFlashTag(){
    var tmpUrl,sizeX=100,sizeY=100;
    if (arguments.length<1) return '';
    switch (arguments.length) {
        case 3: sizeY = arguments[2];
        case 2: sizeX = arguments[1];
        case 1: tmpUrl = arguments[0];
    }
    return '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" \
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" \
width='+sizeX+' height='+sizeY+'><PARAM NAME=movie VALUE="'+tmpUrl+'"> \
<PARAM NAME=loop VALUE=true> \
<PARAM NAME=quality VALUE=high> \
<PARAM NAME=devicefont VALUE=true> \
<PARAM NAME="Scale" VALUE="ExactFit"> \
<PARAM NAME="Play" VALUE=-1> \
<PARAM NAME="WMode" VALUE="Transparent"> \
<EMBED src="'+tmpUrl+'" loop=1 quality=high devicefont=true scale="ExactFit" Play=-1 \
wmode="transparent" \
width='+sizeX+' height='+sizeY+' TYPE="application/x-shockwave-flash" \
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></EMBED> \
</OBJECT>';

}
//<img name="ox_resizeImg" src="{imageUrl}"> - name ¼Ó¼º¿¡ ox_resizeImg °ªÀÎ ÀÌ¹ÌÁö¸¦ ¸ðµÎ ¸®»çÀÌÁî
//ox_addBodyOnLoad(resizeImg); - onload ÀÌº¥Æ®¿¡¼­ ½ÇÇàÇÔ
function resizeImg() {
    var img = document.getElementsByName("ox_resizeImg");
    var imgBuf = new Array();
    for (var i=0; i<img.length; i++) {
        var buf = new Object();
        buf["ELEMENT"] = img[i];
        buf["WIDTH"] = buf["ELEMENT"].offsetWidth;
        if (buf["ELEMENT"].style.display == "none") buf["DISPLAY"] = false;
        else{
            buf["DISPLAY"] = true;
            buf["ELEMENT"].style.display = "none";
        }
        imgBuf.push(buf);
    }
    for (var i=0; i<imgBuf.length; i++) {
        if (!imgBuf[i]["DISPLAY"]) continue;
        var parentElm = findTD(imgBuf[i]["ELEMENT"]);
        if (imgBuf[i]["WIDTH"] > parentElm.clientWidth * (95 / 100)) {
            imgBuf[i]["ELEMENT"].style.width = parentElm.clientWidth * (95 / 100);
        }
        imgBuf[i]["ELEMENT"].style.display = "block";
    }
}
function findTD(obj) {
    var maxCnt = 20;
    try {
        while (obj.tagName != "TD") {
            if (obj.tagName == "BODY" || --maxCnt < 0) return false;
            obj = obj.parentElement;
        }
        return obj;
    }catch (err) {
        return false;
    }
}
function ox_help() {
    var args = ox_help.arguments;
    var elmIds = new Array();
    var pLeft = 20;
    var pTop = 0;
    switch (args.length) {
        case 3: pTop = args[2];
        case 2: pLeft = args[1];
        case 1:
            if (typeof(args[0]) == "string" && typeof(args[0].type) == "undefined") elmIds.push(args[0]);
            else { //event °´Ã¼°¡ ³Ñ¾î¿Â Çö»ó(attachEvent·Î ºÒ¸° °æ¿ì)
                if (typeof(this.idBuf) != "object") break;
                elmIds = this.idBuf;
                this.idBuf = new Array();
            }
        break;
        default: return false;
    }
    for (var i in elmIds) {
        var elmId = elmIds[i];
        if (typeof(elmId) != "string" || elmId == "") continue;
        var pos = abspos();
        var elm = document.getElementById(elmId);
        if (!elm.offsetWidth && !elm.offsetHeight) {
            elm.style.display = "block";
            elm.style.left = pos.x + pLeft;
            elm.style.top = pos.y + pTop;
            elm.style.zIndex = 1000;
            posInnerDoc(elm);
            var frameIdBuf = oxrandom(1000000,9999999);
            var frameBuf = "<IFRAME id=\"frame_"+frameIdBuf+"\" src=\"about:blank\" frameborder=\"1\" width=\""+elm.offsetWidth+"\" height=\""+elm.offsetHeight+"\" style=\"position:absolute;display:block;top:"+elm.style.top+";left:"+elm.style.left+";z-index:-1;filter:mask();\"></IFRAME>";
            document.body.insertAdjacentHTML("beforeEnd",frameBuf);
            elm.setAttribute("desc",frameIdBuf);
            if (typeof(this.idBuf) == "undefined") this.idBuf = new Array();
            this.idBuf.push(elmId);
            document.detachEvent("onclick",ox_help);
            document.attachEvent("onclick",ox_help);
        }else{
            elm.style.display = "none";
            elm.style.left = -1000;
            elm.style.top = -1000;
            var frameIdBuf = elm.getAttribute("desc");
            if ((typeof(frameIdBuf) == "number" || typeof(frameIdBuf) == "string") && frameIdBuf != "") {
                var helpFrame = document.getElementById("frame_"+frameIdBuf);
                helpFrame.removeNode(true);
            }
            for (var j in this.idBuf) {
                if (this.idBuf[j] == elmId) {
                    this.idBuf.splice(j,1);
                    break;
                }
            }
            if (!this.idBuf.length) document.detachEvent("onclick",ox_help);
        }
    }
    eventStop();
}
function posInnerDoc(obj) {
    var eventPosX = parseInt(obj.style.left);
    var eventObjW = parseInt(obj.offsetWidth ? obj.offsetWidth : obj.style.pixelWidth);
    var documentW = parseInt(document.body.clientWidth);
    var sWid = (eventPosX + eventObjW) - documentW;
    if (sWid > 0) obj.style.left = eventPosX - sWid;
}
function eventStop() {
    if (event.stopPropagation) {
        event.stopPropagation();
    }else{
        event.cancelBubble = true;
    }
}
function castNum(obj) {
    var fObj;
    fObj = parseFloat(obj);
    if (isNaN(fObj)) return 0;
    else return fObj;
}
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];}
}
oxLangLoad('ko');
//oxLangLoad('en');
oxLangSet('ko');

function ox_showLogin(divName,x,y) {
    if(remoteLoginDiv.style.visibility =="visible"){
        eval(divName+".style.left=-1000;");
        eval(divName+".style.top=-1000;");
        eval(divName+".style.visibility='hidden';");
    }else {
        eval(divName+".style.left=document.body.scrollLeft + window.event.x-"+x+";");
        eval(divName+".style.top=document.body.scrollTop + window.event.y-"+y+";");
        eval(divName+".style.visibility='visible'");
    }
}
var reloadType = "yes";
function setReloadType(t) {
    reloadType = t;
}
function getReloadType() {
    return reloadType;
}
function reloadOpener() {
    var t = getReloadType();
    if (!in_array(t,["no","yes","close"]) || isUndefined(window.opener)) return;
    if (t != "no") window.opener.location.reload();
    if (t == "close") window.close();
}
