/** 
 * x.js compiled from X 4.0 with XC 0.27b. 
 * Distributed by GNU LGPL. For copyrights, license, documentation and more visit Cross-Browser.com 
 * Copyright 2001-2005 Michael Foster (Cross-Browser.com)
 **/

var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();
if(window.opera){
  var i=xUA.indexOf('opera');
  if(i!=-1){
    var v=parseInt(xUA.charAt(i+6));
    xOp7Up=v>=7;
    xOp6Dn=v<7;
  }
}
else if(navigator.vendor!='KDE' && document.all && xUA.indexOf('msie')!=-1){
  xIE4Up=parseFloat(navigator.appVersion)>=4;
  xIE4=xUA.indexOf('msie 4')!=-1;
  xIE5=xUA.indexOf('msie 5')!=-1;
  xIE6=xUA.indexOf('msie 6')!=-1;
}
else if(document.layers){xNN4=true;}
var xMac=xUA.indexOf('mac')!=-1;
var xFF=xUA.indexOf('firefox')!=-1;

// (element, event(without 'on'), event listener(function name)[, caption])
function xAddEventListener(e,eT,eL,cap)
{
  if(!(e=xGetElementById(e))) return;
  eT=eT.toLowerCase();
  if((!xIE4Up && !xOp7Up) && e==window) {
    if(eT=='resize') { window.xPCW=xClientWidth(); window.xPCH=xClientHeight(); window.xREL=eL; xResizeEvent(); return; }
    if(eT=='scroll') { window.xPSL=xScrollLeft(); window.xPST=xScrollTop(); window.xSEL=eL; xScrollEvent(); return; }
  }
  var eh='e.on'+eT+'=eL';
  if(e.addEventListener) e.addEventListener(eT,eL,cap);
  else if(e.attachEvent) e.attachEvent('on'+eT,eL);
  else eval(eh);
}
// called only from the above
function xResizeEvent()
{
  if (window.xREL) setTimeout('xResizeEvent()', 250);
  var cw = xClientWidth(), ch = xClientHeight();
  if (window.xPCW != cw || window.xPCH != ch) { window.xPCW = cw; window.xPCH = ch; if (window.xREL) window.xREL(); }
}

function xScrollEvent()
{
  if (window.xSEL) setTimeout('xScrollEvent()', 250);
  var sl = xScrollLeft(), st = xScrollTop();
  if (window.xPSL != sl || window.xPST != st) { window.xPSL = sl; window.xPST = st; if (window.xSEL) window.xSEL(); }
}

function xAppendChild(oParent, oChild)
{
  if (oParent.appendChild) return oParent.appendChild(oChild);
  else return null;
}

function xClientHeight()
{
  var h=0;
  if(xOp6Dn) h=window.innerHeight;
  else if(document.compatMode == 'CSS1Compat' && !window.opera && document.documentElement && document.documentElement.clientHeight)
    h=document.documentElement.clientHeight;
  else if(document.body && document.body.clientHeight)
    h=document.body.clientHeight;
  else if(xDef(window.innerWidth,window.innerHeight,document.width)) {
    h=window.innerHeight;
    if(document.width>window.innerWidth) h-=16;
  }
  return h;
}

function xClientWidth()
{
  var w=0;
  if(xOp6Dn) w=window.innerWidth;
  else if(document.compatMode == 'CSS1Compat' && !window.opera && document.documentElement && document.documentElement.clientWidth)
    w=document.documentElement.clientWidth;
  else if(document.body && document.body.clientWidth)
    w=document.body.clientWidth;
  else if(xDef(window.innerWidth,window.innerHeight,document.height)) {
    w=window.innerWidth;
    if(document.height>window.innerHeight) w-=16;
  }
  return w;
}

function xCreateElement(sTag)
{
  if (document.createElement) return document.createElement(sTag);
  else return null;
}

function xDef()
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
  return true;
}

function xDeleteCookie(name, path)
{
  if (xGetCookie(name)) {
    document.cookie = name + "=" +
                    "; path=" + ((!path) ? "/" : path) +
                    "; expires=" + new Date(0).toGMTString();
  }
}

function xDisplay(e,s)
{
  if(!(e=xGetElementById(e))) return null;
  if(e.style && xDef(e.style.display)) {
    if (xStr(s)) e.style.display = s;
    return e.style.display;
  }
  return null;
}

function xEvent(evt) // object prototype
{
  var e = evt || window.event;
  if(!e) return;
  if(e.type) this.type = e.type;
  if(e.target) this.target = e.target;
  else if(e.srcElement) this.target = e.srcElement;

  // Section B
  if (e.relatedTarget) this.relatedTarget = e.relatedTarget;
  else if (e.type == 'mouseover' && e.fromElement) this.relatedTarget = e.fromElement;
  else if (e.type == 'mouseout') this.relatedTarget = e.toElement;
  // End Section B

  if(xOp6Dn) { this.pageX = e.clientX; this.pageY = e.clientY; }
  else if(xDef(e.pageX,e.pageY)) { this.pageX = e.pageX; this.pageY = e.pageY; }
  else if(xDef(e.clientX,e.clientY)) { this.pageX = e.clientX + xScrollLeft(); this.pageY = e.clientY + xScrollTop(); }

  // Section A
  if (xDef(e.offsetX,e.offsetY)) {
    this.offsetX = e.offsetX;
    this.offsetY = e.offsetY;
  }
  else if (xDef(e.layerX,e.layerY)) {
    this.offsetX = e.layerX;
    this.offsetY = e.layerY;
  }
  else {
    this.offsetX = this.pageX - xPageX(this.target);
    this.offsetY = this.pageY - xPageY(this.target);
  }
  // End Section A
  
  if (e.keyCode) { this.keyCode = e.keyCode; } // for moz/fb, if keyCode==0 use which
  else if (xDef(e.which) && e.type.indexOf('key')!=-1) { this.keyCode = e.which; }

  this.shiftKey = e.shiftKey;
  this.ctrlKey = e.ctrlKey;
  this.altKey = e.altKey;
}

function xFirstChild(e, t)
{
  var c = e ? e.firstChild : null;
  if (t) while (c && c.nodeName != t) { c = c.nextSibling; }
  else while (c && c.nodeType != 1) { c = c.nextSibling; }
  return c;
}

function xGetBodyWidth() {
  var cw = xClientWidth();
  var sw = window.document.body.scrollWidth;
  return cw>sw?cw:sw;
}

function xGetBodyHeight() {
  var cw = xClientHeight();
  var sw = window.document.body.scrollHeight;
  return cw>sw?cw:sw;
}

function xGetComputedStyle(oEle, sProp, bInt)
{
  var s, p = 'undefined';
  var dv = document.defaultView;
  if(dv && dv.getComputedStyle){
    s = dv.getComputedStyle(oEle,'');
    if (s) p = s.getPropertyValue(sProp);
  }
  else if(oEle.currentStyle) {
    // convert css property name to object property name for IE
    var a = sProp.split('-');
    sProp = a[0];
    for (var i=1; i<a.length; ++i) {
      c = a[i].charAt(0);
      sProp += a[i].replace(c, c.toUpperCase());
    }   
    p = oEle.currentStyle[sProp];
  }
  else return null;
  return bInt ? (parseInt(p) || 0) : p;
}

function xGetCookie(name)
{
  var value=null, search=name+"=";
  if (document.cookie.length > 0) {
    var offset = document.cookie.indexOf(search);
    if (offset != -1) {
      offset += search.length;
      var end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      value = unescape(document.cookie.substring(offset, end));
    }
  }
  return value;
}

function xGetElementById(e)
{
  if(typeof(e)!='string') return e;
  if(document.getElementById) e=document.getElementById(e);
  else if(document.all) e=document.all[e];
  else e=null;
  return e;
}

function xGetElementsByAttribute(sTag, sAtt, sRE, fn)
{
  var a, list, found = new Array(), re = new RegExp(sRE, 'i');
  list = xGetElementsByTagName(sTag);
  for (var i = 0; i < list.length; ++i) {
    a = list[i].getAttribute(sAtt);
    if (!a) {a = list[i][sAtt];}
    if (typeof(a)=='string' && a.search(re) != -1) {
      found[found.length] = list[i];
      if (fn) fn(list[i]);
    }
  }
  return found;
}

function xGetElementsByClassName(c,p,t,f)
{
  var found = new Array();
  var re = new RegExp('\\b'+c+'\\b', 'i');
  var list = xGetElementsByTagName(t, p);
  for (var i = 0; i < list.length; ++i) {
    if (list[i].className && list[i].className.search(re) != -1) {
      found[found.length] = list[i];
      if (f) f(list[i]);
    }
  }
  return found;
}

function xGetElementsByTagName(t,p)
{
  var list = null;
  t = t || '*';
  p = p || document;
  if (xIE4 || xIE5) {
    if (t == '*') list = p.all;
    else list = p.all.tags(t);
  }
  else if (p.getElementsByTagName) list = p.getElementsByTagName(t);
  return list || new Array();
}

function xGetURLArguments()
{
  var idx = location.href.indexOf('?');
  var params = new Array();
  if (idx != -1) {
    var pairs = location.href.substring(idx+1, location.href.length).split('&');
    for (var i=0; i<pairs.length; i++) {
      nameVal = pairs[i].split('=');
      params[i] = nameVal[1];
      params[nameVal[0]] = nameVal[1];
    }
  }
  return params;
}

function xHeight(e,h)
{
  if(!(e=xGetElementById(e))) return 0;
  if (xNum(h)) {
    if (h<0) h = 0;
    else h=Math.round(h);
  }
  else h=-1;
  var css=xDef(e.style);
  if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    h = xClientHeight();
  }
  else if(css && xDef(e.offsetHeight) && xStr(e.style.height)) {
    if(h>=0) {
      var pt=0,pb=0,bt=0,bb=0;
      if (document.compatMode=='CSS1Compat') {
        var gcs = xGetComputedStyle;
        pt=gcs(e,'padding-top',1);
        if (pt !== null) {
          pb=gcs(e,'padding-bottom',1);
          bt=gcs(e,'border-top-width',1);
          bb=gcs(e,'border-bottom-width',1);
        }
        // Should we try this as a last resort?
        // At this point getComputedStyle and currentStyle do not exist.
        else if(xDef(e.offsetHeight,e.style.height)){
          e.style.height=h+'px';
          pt=e.offsetHeight-h;
        }
      }
      h-=(pt+pb+bt+bb);
      if(isNaN(h)||h<0) return null;
      else e.style.height=h+'px';
    }
    h=e.offsetHeight;
  }
  else if(css && xDef(e.style.pixelHeight)) {
    if(h>=0) e.style.pixelHeight=h;
    h=e.style.pixelHeight;
  }
  return h;
}

function xHex(sn, digits, prefix)
{
  var p = '';
  var n = Math.ceil(sn);
  if (prefix) p = prefix;
  n = n.toString(16);
  for (var i=0; i < digits - n.length; ++i) {
    p += '0';
  }
  return p + n;
}

function xHide(e){return xVisibility(e,0);}

function xInnerHtml(e,h)
{
  if(!(e=xGetElementById(e)) || !xStr(e.innerHTML)) return null;
  var s = e.innerHTML;
  if (xStr(h)) {e.innerHTML = h;}
  return s;
}

function xLeft(e, iX)
{
  if(!(e=xGetElementById(e))) return 0;
  var css=xDef(e.style);
  if (css && xStr(e.style.left)) {
    if(xNum(iX)) e.style.left=iX+'px';
    else {
      iX=parseInt(e.style.left);
      if(isNaN(iX)) iX=0;
    }
  }
  else if(css && xDef(e.style.pixelLeft)) {
    if(xNum(iX)) e.style.pixelLeft=iX;
    else iX=e.style.pixelLeft;
  }
  return iX;
}

function xMoveTo(e,x,y)
{
  xLeft(e,x);
  xTop(e,y);
}

function xName(e)
{
  if (!e) return e;
  else if (e.id && e.id != "") return e.id;
  else if (e.name && e.name != "") return e.name;
  else if (e.nodeName && e.nodeName != "") return e.nodeName;
  else if (e.tagName && e.tagName != "") return e.tagName;
  else return e;
}

function xNextSib(e,t)
{
  var s = e ? e.nextSibling : null;
  if (t) while (s && s.nodeName != t) { s = s.nextSibling; }
  else while (s && s.nodeType != 1) { s = s.nextSibling; }
  return s;
}

function xNum()
{
  for(var i=0; i<arguments.length; ++i){if(isNaN(arguments[i]) || typeof(arguments[i])!='number') return false;}
  return true;
}

function xOffsetLeft(e)
{
  if (!(e=xGetElementById(e))) return 0;
  if (xDef(e.offsetLeft)) return e.offsetLeft;
  else return 0;
}

function xOffsetTop(e)
{
  if (!(e=xGetElementById(e))) return 0;
  if (xDef(e.offsetTop)) return e.offsetTop;
  else return 0;
}

function xPad(s,len,c,left)
{
  if(typeof s != 'string') s=s+'';
  if(left) {for(var i=s.length; i<len; ++i) s=c+s;}
  else {for (i=s.length; i<len; ++i) s+=c;}
  return s;
}

function xPageX(e)
{
  if (!(e=xGetElementById(e))) return 0;
  var x = 0;
  while (e) {
    if (xDef(e.offsetLeft)) x += e.offsetLeft;
    e = xDef(e.offsetParent) ? e.offsetParent : null;
  }
  return x;
}

function xPageY(e)
{
  if (!(e=xGetElementById(e))) return 0;
  var y = 0;
  while (e) {
    if (xDef(e.offsetTop)) y += e.offsetTop;
    e = xDef(e.offsetParent) ? e.offsetParent : null;
  }
//  if (xOp7Up) return y - document.body.offsetTop; // v3.14, temporary hack for opera bug 130324 (reported 1nov03)
  return y;
}

function xParent(e, bNode)
{
  if (!(e=xGetElementById(e))) return null;
  var p=null;
  if (!bNode && xDef(e.offsetParent)) p=e.offsetParent;
  else if (xDef(e.parentNode)) p=e.parentNode;
  else if (xDef(e.parentElement)) p=e.parentElement;
  return p;
}

function xPreventDefault(e)
{
  if (e && e.preventDefault) e.preventDefault()
  else if (window.event) window.event.returnValue = false;
}

function xPrevSib(e,t)
{
  var s = e ? e.previousSibling : null;
  if (t) while(s && s.nodeName != t) {s=s.previousSibling;}
  else while(s && s.nodeType != 1) {s=s.previousSibling;}
  return s;
}

function xRemoveEventListener(e,eT,eL,cap)
{
  if(!(e=xGetElementById(e))) return;
  eT=eT.toLowerCase();
  if((!xIE4Up && !xOp7Up) && e==window) {
    if(eT=='resize') { window.xREL=null; return; }
    if(eT=='scroll') { window.xSEL=null; return; }
  }
  var eh='e.on'+eT+'=null';
  if(e.removeEventListener) e.removeEventListener(eT,eL,cap);
  else if(e.detachEvent) e.detachEvent('on'+eT,eL);
  else eval(eh);
}

function xResizeTo(e,w,h)
{
  xWidth(e,w);
  xHeight(e,h);
}

function xScrollLeft(e, bWin)
{
  var offset=0;
  if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    var w = window;
    if (bWin && e) w = e;
    if(w.document.documentElement && w.document.documentElement.scrollLeft) offset=w.document.documentElement.scrollLeft;
    else if(w.document.body && xDef(w.document.body.scrollLeft)) offset=w.document.body.scrollLeft;
  }
  else {
    e = xGetElementById(e);
    if (e && xNum(e.scrollLeft)) offset = e.scrollLeft;
  }
  return offset;
}

function xScrollTop(e, bWin)
{
  var offset=0;
  if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    var w = window;
    if (bWin && e) w = e;
    if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.document.documentElement.scrollTop;
    else if(w.document.body && xDef(w.document.body.scrollTop)) offset=w.document.body.scrollTop;
  }
  else {
    e = xGetElementById(e);
    if (e && xNum(e.scrollTop)) offset = e.scrollTop;
  }
  return offset;
}

function xSetCookie(name, value, expire, path)
{
  document.cookie = name + "=" + escape(value) +
                    ((!expire) ? "" : ("; expires=" + expire.toGMTString())) +
                    "; path=" + ((!path) ? "/" : path);
}

function xShow(e) {return xVisibility(e,1);}


function xStr(s)
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])!='string') return false;}
  return true;
}

function xTop(e, iY)
{
  if(!(e=xGetElementById(e))) return 0;
  var css=xDef(e.style);
  if(css && xStr(e.style.top)) {
    if(xNum(iY)) e.style.top=iY+'px';
    else {
      iY=parseInt(e.style.top);
      if(isNaN(iY)) iY=0;
    }
  }
  else if(css && xDef(e.style.pixelTop)) {
    if(xNum(iY)) e.style.pixelTop=iY;
    else iY=e.style.pixelTop;
  }
  return iY;
}

function xVisibility(e, bShow)
{
  if(!(e=xGetElementById(e))) return null;
  if(e.style && xDef(e.style.visibility)) {
    if (xDef(bShow)) e.style.visibility = bShow ? 'visible' : 'hidden';
    return e.style.visibility;
  }
  return null;
}

function xWidth(e,w)
{
  if(!(e=xGetElementById(e))) return 0;
  if (xNum(w)) {
    if (w<0) w = 0;
    else w=Math.round(w);
  }
  else w=-1;
  var css=xDef(e.style);
  if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    w = xClientWidth();
  }
  else if(css && xDef(e.offsetWidth) && xStr(e.style.width)) {
    if(w>=0) {
      var pl=0,pr=0,bl=0,br=0;
      if (document.compatMode=='CSS1Compat') {
        var gcs = xGetComputedStyle;
        pl=gcs(e,'padding-left',1);
        if (pl !== null) {
          pr=gcs(e,'padding-right',1);
          bl=gcs(e,'border-left-width',1);
          br=gcs(e,'border-right-width',1);
        }
        // Should we try this as a last resort?
        // At this point getComputedStyle and currentStyle do not exist.
        else if(xDef(e.offsetWidth,e.style.width)){
          e.style.width=w+'px';
          pl=e.offsetWidth-w;
        }
      }
      w-=(pl+pr+bl+br);
      if(isNaN(w)||w<0) return null;
      else e.style.width=w+'px';
    }
    w=e.offsetWidth;
  }
  else if(css && xDef(e.style.pixelWidth)) {
    if(w>=0) e.style.pixelWidth=w;
    w=e.style.pixelWidth;
  }
  return w;
}

function xZIndex(e,uZ)
{
  if(!(e=xGetElementById(e))) return 0;
  if(e.style && xDef(e.style.zIndex)) {
    if(xNum(uZ)) e.style.zIndex=uZ;
    uZ=parseInt(e.style.zIndex);
  }
  return uZ;
}

function xStopPropagation(evt)
{
  if (evt && evt.stopPropagation) evt.stopPropagation();
  else if (window.event) window.event.cancelBubble = true;
}


/**
 * @file common.js
 * @author zero (zero@nzeo.com)
 * @brief 몇가지 유용한 & 기본적으로 자주 사용되는 자바스크립트 함수들 모음
 **/

/**
 * @brief location.href에서 특정 key의 값을 return
 **/
String.prototype.getQuery = function(key) {
    var idx = this.indexOf('?');
    if(idx == -1) return null;
    var query_string = this.substr(idx+1, this.length);
    var args = {}
    query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function() { args[arguments[1]] = arguments[2]; });

    var q = args[key];
    if(typeof(q)=="undefined") q = "";

    return q;
}

/**
 * @brief location.href에서 특정 key의 값을 return
 **/
String.prototype.setQuery = function(key, val) {
    var idx = this.indexOf('?');
    var uri = this;
    uri = uri.replace(/#$/,'');

    if(idx != -1) {
        uri = this.substr(0, idx);
        var query_string = this.substr(idx+1, this.length);
        var args = new Array();
        query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function() { args[arguments[1]] = arguments[2]; });

        args[key] = val;

        var q_list = new Array();
        for(var i in args) {
        if( !args.hasOwnProperty(i) ) continue;
            var arg = args[i];
            if(!arg.toString().trim()) continue;

            q_list[q_list.length] = i+'='+arg;
        }
        uri = uri+"?"+q_list.join("&");
    } else {
        if(val.toString().trim()) uri = uri+"?"+key+"="+val;
    }

    uri = uri.replace(/^https:\/\//i,'http://');
    if(typeof(ssl_actions)!='undefined' && typeof(ssl_actions.length)!='undefined' && uri.getQuery('act')) {
        var act = uri.getQuery('act');
        for(i=0;i<ssl_actions.length;i++) {
            if(ssl_actions[i]==act) {
                uri = uri.replace(/^http:\/\//i,'https://');
                break;
            }
        }
    }
    return uri;
}

/**
 * @breif replace outerHTML
 **/
function replaceOuterHTML(obj, html) {
    if(obj.outerHTML) {
        obj.outerHTML = html;
    } else {
        var dummy = xCreateElement("div"); 
        xInnerHtml(dummy, html);
        var parent = obj.parentNode;
        while(dummy.firstChild) {
            parent.insertBefore(dummy.firstChild, obj);
        }
        parent.removeChild(obj);
    }
}

/**
 * @breif get outerHTML
 **/
function getOuterHTML(obj) {
    if(obj.outerHTML) return obj.outerHTML;
    var dummy = xCreateElement("div");
    dummy.insertBefore(obj, dummy.lastChild);
    return xInnerHtml(dummy);
}

/**
 * @brief xSleep(micro time) 
 **/
function xSleep(sec) {
    sec = sec / 1000;
    var now = new Date();
    var sleep = new Date();
    while( sleep.getTime() - now.getTime() < sec) {
        sleep = new Date();
    }      
}


/**
 * @brief string prototype으로 trim 함수 추가
 **/
String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

/**
 * @brief 주어진 인자가 하나라도 defined되어 있지 않으면 false return
 **/
function isDef() {
    for(var i=0; i<arguments.length; ++i) {
        if(typeof(arguments[i])=="undefined") return false;
    }
    return true;
}

/**
 * @brief 윈도우 오픈
 * 열려진 윈도우의 관리를 통해 window.focus()등을 FF에서도 비슷하게 구현함
 **/
var winopen_list = new Array();
function winopen(url, target, attribute) {
    try {
        if(target != "_blank" && winopen_list[target]) {
            winopen_list[target].close();
            winopen_list[target] = null;
        }
    } catch(e) {
    }

    if(typeof(target)=='undefined') target = '_blank';
    if(typeof(attribute)=='undefined') attribute = '';
    var win = window.open(url, target, attribute);
    win.focus();
    if(target != "_blank") winopen_list[target] = win;
}

/**
 * @brief 팝업으로만 띄우기 
 * common/tpl/popup_layout.html이 요청되는 제로보드 XE내의 팝업일 경우에 사용
 **/
function popopen(url, target) {
    if(typeof(target)=="undefined") target = "_blank";
    winopen(url, target, "left=10,top=10,width=10,height=10,scrollbars=no,resizable=yes,toolbars=no");
}

/**
 * @brief 메일 보내기용
 **/
function sendMailTo(to) {
    location.href="mailto:"+to;
}

/**
 * @brief url이동 (open_window 값이 N 가 아니면 새창으로 띄움)
 **/
function move_url(url, open_wnidow) {
    if(!url) return false;
    if(typeof(open_wnidow)=='undefined') open_wnidow = 'N';
    if(open_wnidow=='N') open_wnidow = false;
    else open_wnidow = true;

    if(/^\./.test(url)) url = request_uri+url;

    if(open_wnidow) {
        winopen(url);
    } else {
        location.href=url;
    }
    return false;
}

/**
 * @brief 특정 Element의 display 옵션 토글
 **/
function toggleDisplay(obj, display_type) {
    var obj = xGetElementById(obj);
    if(!obj) return;
    if(!obj.style.display || obj.style.display != 'none') {
        obj.style.display = 'none';
    } else {
        if(display_type) obj.style.display = display_type;
        else obj.style.display = '';
    }
}

/**
 * @brief 멀티미디어 출력용 (IE에서 플래쉬/동영상 주변에 점선 생김 방지용)
 **/
function displayMultimedia(src, width, height, auto_start, flashvars) {
    if(src.indexOf('files')==0) src = request_uri+src;
    if(auto_start) auto_start = "true";
    else auto_start = "false";

    var clsid = "";
    var codebase = "";
    var html = "";

    if(typeof(flashvars)=="undefined") flashvars = "";

    if(/\.swf/i.test(src)) {
        clsid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; 
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";
        html = ""+
            "<object classid=\""+clsid+"\" codebase=\""+codebase+"\" width=\""+width+"\" height=\""+height+"\" flashvars=\""+flashvars+"\">"+
            "<param name=\"wmode\" value=\"transparent\" />"+
            "<param name=\"allowScriptAccess\" value=\"sameDomain\" />"+
            "<param name=\"movie\" value=\""+src+"\" />"+
            "<param name=\"quality\" value=\"high\" />"+
            "<param name=\"flashvars\" value=\""+flashvars+"\" />"+
            "<embed src=\""+src+"\" autostart=\""+auto_start+"\"  width=\""+width+"\" height=\""+height+"\" flashvars=\""+flashvars+"\" wmode=\"transparent\"></embed>"+
            "<\/object>";
    } else if(/\.flv/i.test(src)) {
        html = "<embed src=\""+request_uri+"common/tpl/images/flvplayer.swf\" allowfullscreen=\"true\" autostart=\""+auto_start+"\" width=\""+width+"\" height=\""+height+"\" flashvars=\"&file="+src+"&width="+width+"&height="+height+"&autostart="+auto_start+"\" />";
    } else {
        html = "<embed src=\""+src+"\" autostart=\""+auto_start+"\" width=\""+width+"\" height=\""+height+"\"></embed>";
    }
    document.writeln(html);
}

/**
 * @brief 에디터에서 사용되는 내용 여닫는 코드 (고정, zbxe용)
 **/
function zbxe_folder_open(id) {
    var open_text_obj = xGetElementById("folder_open_"+id);
    var close_text_obj = xGetElementById("folder_close_"+id);
    var folder_obj = xGetElementById("folder_"+id);
    open_text_obj.style.display = "none";
    close_text_obj.style.display = "block";
    folder_obj.style.display = "block";
}

function zbxe_folder_close(id) {
    var open_text_obj = xGetElementById("folder_open_"+id);
    var close_text_obj = xGetElementById("folder_close_"+id);
    var folder_obj = xGetElementById("folder_"+id);
    open_text_obj.style.display = "block";
    close_text_obj.style.display = "none";
    folder_obj.style.display = "none";
}


/**
 * @brief 에디터에서 사용하되 내용 여닫는 코드 (zb5beta beta 호환용으로 남겨 놓음)
 **/
function svc_folder_open(id) {
    var open_text_obj = xGetElementById("_folder_open_"+id);
    var close_text_obj = xGetElementById("_folder_close_"+id);
    var folder_obj = xGetElementById("_folder_"+id);
    open_text_obj.style.display = "none";
    close_text_obj.style.display = "block";
    folder_obj.style.display = "block";
}

function svc_folder_close(id) {
    var open_text_obj = xGetElementById("_folder_open_"+id);
    var close_text_obj = xGetElementById("_folder_close_"+id);
    var folder_obj = xGetElementById("_folder_"+id);
    open_text_obj.style.display = "block";
    close_text_obj.style.display = "none";
    folder_obj.style.display = "none";
}

/**
 * @brief 팝업의 경우 내용에 맞춰 현 윈도우의 크기를 조절해줌 
 * 팝업의 내용에 맞게 크기를 늘리는 것은... 쉽게 되지는 않음.. ㅡ.ㅜ
 * popup_layout 에서 window.onload 시 자동 요청됨.
 **/
function setFixedPopupSize() {

    if(xGetElementById('popBody')) {
        if(xHeight('popBody')>500) {
            xGetElementById('popBody').style.overflowY = 'scroll';
            xGetElementById('popBody').style.overflowX = 'hidden';
            xHeight('popBody', 500);
        }
    }

    var w = xWidth("popup_content");
    var h = xHeight("popup_content");

    var obj_list = xGetElementsByTagName('div');
    for(i=0;i<obj_list.length;i++) {
        var ww = xWidth(obj_list[i]);
        var id = obj_list[i].id;
        if(id == 'waitingforserverresponse' || id == 'fororiginalimagearea' || id == 'fororiginalimageareabg') continue;
        if(ww>w) w = ww;
    }

    // 윈도우에서는 브라우저 상관없이 가로 픽셀이 조금 더 늘어나야 한다.
    if(xUA.indexOf('windows')>0) {
        if(xOp7Up) w += 10;
        else if(xIE4Up) w += 10;
        else w += 6;
    }
    window.resizeTo(w,h);
   
    var h1 = xHeight(window.document.body);
    window.resizeBy(0,h-h1);

    window.scrollTo(0,0);
}

/**
 * @brief 이름, 게시글등을 클릭하였을 경우 팝업 메뉴를 보여주는 함수
 **/
xAddEventListener(window, 'load', createPopupMenu);
xAddEventListener(document, 'click', chkPopupMenu);

var loaded_popup_menus = new Array();

/* 멤버 팝업 메뉴 레이어를 생성하는 함수 (문서 출력이 완료되었을때 동작) */
function createPopupMenu(evt) {
    var area = xGetElementById("popup_menu_area");
    if(area) return;
    area = xCreateElement("div");
    area.id = "popup_menu_area";
    area.style.visibility = 'hidden';
    document.body.appendChild(area);
}

/* 클릭 이벤트 발생시 이벤트가 일어난 대상을 검사하여 적절한 규칙에 맞으면 처리 */
function chkPopupMenu(evt) {
    // 이전에 호출되었을지 모르는 팝업메뉴 숨김
    var area = xGetElementById("popup_menu_area");
    if(!area) return;

    if(area.style.visibility!="hidden") area.style.visibility="hidden";

    // 이벤트 대상이 없으면 무시
    var e = new xEvent(evt);
    if(!e) return;

    // 대상의 객체 구함
    var obj = e.target;
    if(!obj) return;

    // obj의 nodeName이 div나 span이 아니면 나올대까지 상위를 찾음
    if(obj && obj.nodeName != 'DIV' && obj.nodeName != 'SPAN') obj = obj.parentNode;
    if(!obj || (obj.nodeName != 'DIV' && obj.nodeName != 'SPAN')) return;

    // 객체의 className값을 구함
    var class_name = obj.className;
    if(!class_name) return;

    // className을 분리
    var class_name_list = class_name.split(' ');
    var menu_id = '';
    var menu_id_regx = /^([a-zA-Z]+)_([0-9]+)$/ig;
    for(var i in class_name_list) {
        if(menu_id_regx.test(class_name_list[i])) {
            menu_id = class_name_list[i];
            break;
        }
    }
    if(!menu_id) return;

    // module명과 대상 번호가 없으면 return
    var tmp_arr = menu_id.split('_');
    var module_name = tmp_arr[0];
    var target_srl = tmp_arr[1];
    if(!module_name || !target_srl || target_srl < 1) return;

    // action이름을 규칙에 맞게 작성
    var action_name = "get" + module_name.substr(0,1).toUpperCase() + module_name.substr(1,module_name.length-1) + "Menu";

    // 서버에 메뉴를 요청
    var params = new Array();
    params["target_srl"] = target_srl;
    params["cur_mid"] = current_mid;
    params["cur_act"] = current_url.getQuery('act');
    params["menu_id"] = menu_id;
    params["page_x"] = e.pageX;
    params["page_y"] = e.pageY;

    var response_tags = new Array("error","message","menus");

    if(loaded_popup_menus[menu_id]) {
        displayPopupMenu(params, response_tags, params);
        return;
    }

    show_waiting_message = false;
    exec_xml(module_name, action_name, params, displayPopupMenu, response_tags, params);
    show_waiting_message = true;
}

function displayPopupMenu(ret_obj, response_tags, params) {
    var target_srl = params["target_srl"];
    var menu_id = params["menu_id"];
    var menus = ret_obj['menus'];
    var html = "";

    if(loaded_popup_menus[menu_id]) {
        html = loaded_popup_menus[menu_id];
    } else {
        if(menus) {
            var item = menus['item'];
            if(item.length<1) item = new Array(item);
            if(item.length) {
                for(var i=0;i<item.length;i++) {
                    var url = item[i].url;
                    var str = item[i].str;
                    var icon = item[i].icon;
                    var target = item[i].target;

                    var styleText = "";

                    if(icon) styleText = " style=\"background:url('"+icon+"') no-repeat left center; padding-left:18px; \"";
                    switch(target) {
                        case "popup" :
                                click_str = " onclick=\"popopen('"+url+"','"+target+"')\"; return false;";
                            break;
                        case "self" :
                                click_str = " onclick=\"location.href='"+url+"'\"; return false;";
                            break;
                        case "javascript" :
                                click_str = " onclick=\""+url+"\"; return false;";
                            break;
                        default :
                                click_str = " onclick=\"window.open('"+url+"')\"; return false;";
                            break;
                    }

                    html += '<div class="item" onmouseover="this.className=\'item_on\'" onmouseout="this.className=\'item\'"'+styleText+click_str+'>'+str+'</div> ';
                }
            }
        }
        loaded_popup_menus[menu_id] =  html;
    }

    // 레이어 출력
    if(html) {
        var area = xGetElementById("popup_menu_area");
        xInnerHtml(area, "<div class=\"box\">"+html+"</div>");
        xLeft(area, params["page_x"]);
        xTop(area, params["page_y"]);
        if(xWidth(area)+xLeft(area)>xClientWidth()+xScrollLeft()) xLeft(area, xClientWidth()-xWidth(area)+xScrollLeft());
        if(xHeight(area)+xTop(area)>xClientHeight()+xScrollTop()) xTop(area, xClientHeight()-xHeight(area)+xScrollTop());
        area.style.visibility = "visible";
    }
}

/**
 * @brief 추천/비추천,스크랩,신고기능등 특정 srl에 대한 특정 module/action을 호출하는 함수
 **/
function doCallModuleAction(module, action, target_srl) {
    var params = new Array();
    params['target_srl'] = target_srl;
    params['cur_mid'] = current_mid;
    exec_xml(module, action, params, completeCallModuleAction);
}

function completeCallModuleAction(ret_obj, response_tags) {
    if(ret_obj['message']!='success') alert(ret_obj['message']);
    location.reload();
}

/**
 * @brief 날짜 선택 (달력 열기) 
 **/
function open_calendar(fo_id, day_str, callback_func) {
    if(typeof(day_str)=="undefined") day_str = "";

    var url = "./common/tpl/calendar.php?";
    if(fo_id) url+="fo_id="+fo_id;
    if(day_str) url+="&day_str="+day_str;
    if(callback_func) url+="&callback_func="+callback_func;

    popopen(url, 'Calendar');
}

/* 언어코드 (lang_type) 쿠키값 변경 */
function doChangeLangType(obj) {
    if(typeof(obj)=="string") {
        setLangType(obj);
    } else {
        var val = obj.options[obj.selectedIndex].value;
        setLangType(val);
    }
    location.reload();
}
function setLangType(lang_type) {
    var expire = new Date();
    expire.setTime(expire.getTime()+ (7000 * 24 * 3600000));
    xSetCookie('lang_type', lang_type, expire);
}

/* 미리보기 */
function doDocumentPreview(obj) {
    var fo_obj = obj;
    while(fo_obj.nodeName != "FORM") {
        fo_obj = fo_obj.parentNode;
    }
    if(fo_obj.nodeName != "FORM") return;
    var editor_sequence = fo_obj.getAttribute('editor_sequence');

    var content = editorGetContent(editor_sequence);

    var win = window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");

    var dummy_obj = xGetElementById("previewDocument");

    if(!dummy_obj) {
        var fo_code = '<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'">'+
                      '<input type="hidden" name="module" value="document" />'+
                      '<input type="hidden" name="act" value="dispDocumentPreview" />'+
                      '<input type="hidden" name="content" />'+
                      '</form>';
        var dummy = xCreateElement("DIV");
        xInnerHtml(dummy, fo_code);
        window.document.body.insertBefore(dummy,window.document.body.lastChild);
        dummy_obj = xGetElementById("previewDocument");
    }

    if(dummy_obj) {
        dummy_obj.content.value = content;
        dummy_obj.submit();
    }
}

/* 게시글 저장 */
function doDocumentSave(obj) {
    var editor_sequence = obj.form.getAttribute('editor_sequence');
    var prev_content = editorRelKeys[editor_sequence]['content'].value;
    if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined' && typeof(editorGetContent)=='function') {
        var content = editorGetContent(editor_sequence);
        editorRelKeys[editor_sequence]['content'].value = content;
    }

    var oFilter = new XmlJsFilter(obj.form, "member", "procMemberSaveDocument", completeDocumentSave);
    oFilter.addResponseItem("error");
    oFilter.addResponseItem("message");
    oFilter.addResponseItem("document_srl");
    oFilter.proc();

    editorRelKeys[editor_sequence]['content'].value = prev_content;
    return false;
}

function completeDocumentSave(ret_obj) {
    xGetElementsByAttribute('input', 'name', 'document_srl')[0].value = ret_obj['document_srl'];
    alert(ret_obj['message']);
}

/* 저장된 게시글 불러오기 */
var objForSavedDoc = null;
function doDocumentLoad(obj) {
    // 저장된 게시글 목록 불러오기
    objForSavedDoc = obj.form;
    popopen(request_uri.setQuery('module','member').setQuery('act','dispSavedDocumentList'));
}

/* 저장된 게시글의 선택 */
function doDocumentSelect(document_srl) {
    if(!opener || !opener.objForSavedDoc) {
        window.close();
        return;
    }

    // 게시글을 가져와서 등록하기
    opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispBoardWrite');
    window.close();
}


/* 스킨 정보 */
function viewSkinInfo(module, skin) {
    popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+module+"&skin="+skin, 'SkinInfo');
}

/* 체크박스 선택 */
function checkboxSelectAll(form, name, option){ 
    var value;
    var fo_obj = xGetElementById(form);
    for ( var i = 0 ; i < fo_obj.length ; i++ ){
        if(typeof(option) == "undefined") {
            var select_mode = fo_obj[i].checked;
            if ( select_mode == 0 ){
                value = true;
                select_mode = 1;
            }else{
                value = false;
                select_mode = 0;
            }
        }
        else if(option == true) value = true
        else if(option == false) value = false

        if(fo_obj[i].name == name) fo_obj[i].checked = value;
    }
}

/* 체크박스를 실행 */
function clickCheckBoxAll(form, name) {
    var fo_obj = xGetElementById(form);
    for ( var i = 0 ; i < fo_obj.length ; i++ ){
        if(fo_obj[i].name == name) fo_obj[i].click();
    }
}

/* 관리자가 문서를 관리하기 위해서 선택시 세션에 넣음 */
var addedDocument = new Array();
function doAddDocumentCart(obj) {
    var srl = obj.value;
    addedDocument[addedDocument.length] = srl;
    setTimeout(function() { callAddDocumentCart(addedDocument.length); }, 100);
}

function callAddDocumentCart(document_length) {
    if(addedDocument.length<1 || document_length != addedDocument.length) return;
    var params = new Array();
    params["srls"] = addedDocument.join(",");
    exec_xml("document","procDocumentAdminAddCart", params, null);
    addedDocument = new Array();
}

/* ff의 rgb(a,b,c)를 #... 로 변경 */
function transRGB2Hex(value) {
    if(!value) return value;
    if(value.indexOf('#') > -1) return value.replace(/^#/, '');

    if(value.toLowerCase().indexOf('rgb') < 0) return value;
    value = value.replace(/^rgb\(/i, '').replace(/\)$/, '');
    value_list = value.split(',');

    var hex = '';
    for(var i = 0; i < value_list.length; i++) {
        var color = parseInt(value_list[i], 10).toString(16);
        if(color.length == 1) color = '0'+color;
        hex += color;
    }
    return hex;
}

/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/

var Base64 = {

    // private property
    _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",

    // public method for encoding
    encode : function (input) {
        var output = "";
        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
        var i = 0;

        input = Base64._utf8_encode(input);

        while (i < input.length) {

            chr1 = input.charCodeAt(i++);
            chr2 = input.charCodeAt(i++);
            chr3 = input.charCodeAt(i++);

            enc1 = chr1 >> 2;
            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
            enc4 = chr3 & 63;

            if (isNaN(chr2)) {
                enc3 = enc4 = 64;
            } else if (isNaN(chr3)) {
                enc4 = 64;
            }

            output = output +
            this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
            this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);

        }

        return output;
    },

    // public method for decoding
    decode : function (input) {
        var output = "";
        var chr1, chr2, chr3;
        var enc1, enc2, enc3, enc4;
        var i = 0;

        input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

        while (i < input.length) {

            enc1 = this._keyStr.indexOf(input.charAt(i++));
            enc2 = this._keyStr.indexOf(input.charAt(i++));
            enc3 = this._keyStr.indexOf(input.charAt(i++));
            enc4 = this._keyStr.indexOf(input.charAt(i++));

            chr1 = (enc1 << 2) | (enc2 >> 4);
            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
            chr3 = ((enc3 & 3) << 6) | enc4;

            output = output + String.fromCharCode(chr1);

            if (enc3 != 64) {
                output = output + String.fromCharCode(chr2);
            }
            if (enc4 != 64) {
                output = output + String.fromCharCode(chr3);
            }

        }

        output = Base64._utf8_decode(output);

        return output;

    },

    // private method for UTF-8 encoding
    _utf8_encode : function (string) {
        string = string.replace(/\r\n/g,"\n");
        var utftext = "";

        for (var n = 0; n < string.length; n++) {

            var c = string.charCodeAt(n);

            if (c < 128) {
                utftext += String.fromCharCode(c);
            }
            else if((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            }
            else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }

        }

        return utftext;
    },

    // private method for UTF-8 decoding
    _utf8_decode : function (utftext) {
        var string = "";
        var i = 0;
        var c = c1 = c2 = 0;

        while ( i < utftext.length ) {

            c = utftext.charCodeAt(i);

            if (c < 128) {
                string += String.fromCharCode(c);
                i++;
            }
            else if((c > 191) && (c < 224)) {
                c2 = utftext.charCodeAt(i+1);
                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                i += 2;
            }
            else {
                c2 = utftext.charCodeAt(i+1);
                c3 = utftext.charCodeAt(i+2);
                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                i += 3;
            }

        }

        return string;
    }

}

/* select - option의 disabled=disabled 속성을 IE에서도 체크하기 위한 함수 */
if(xIE4Up) {
    xAddEventListener(window, 'load', activateOptionDisabled);

    function activateOptionDisabled(evt) {
        var sels = xGetElementsByTagName('select');
        for(var i=0; i < sels.length; i++){
            var disabled_exists = false;
            for(var j=0; j < sels[i].options.length; j++) {
                if(sels[i].options[j].disabled) {
                    sels[i].options[j].style.color = '#CCCCCC';
                    disabled_exists = true;
                }
            }

            if(!disabled_exists) continue;
            
            sels[i].oldonchange = sels[i].onchange;
            sels[i].onchange = function() {  
                if(this.options[this.selectedIndex].disabled) {
                    if(this.options.length<=1) this.selectedIndex = -1;
                    else if(this.selectedIndex < this.options.length - 1) this.selectedIndex++;
                    else this.selectedIndex--;
                } else {
                    if(this.oldonchange) this.oldonchange();
                }
            }

            if(sels[i].selectedIndex >= 0 && sels[i].options[ sels[i].selectedIndex ].disabled) sels[i].onchange();

        }
    }
}


/* 보안 로그인 모드로 전환 */
function toggleSecuritySignIn() {
    var href = location.href;
    if(/https:\/\//i.test(href)) location.href = href.replace(/^https/i,'http');
    else location.href = href.replace(/^http/i,'https');
}   

/* 하위호환성 문제 */
if(typeof(resizeImageContents) == 'undefined')
{
    function resizeImageContents() {}
}

/**
 * @file   common/js/xml_handler.js
 * @author zero <zero@nzeo.com>
 * @brief  zbxe내에서 ajax기능을 이용함에 있어 module, act를 잘 사용하기 위한 자바스크립트
 **/

// xml handler을 이용하는 user function
var show_waiting_message = true;
function exec_xml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) {
    var oXml = new xml_handler();
    oXml.reset();
    for(var key in params) {
	if(!params.hasOwnProperty(key)) continue;
        var val = params[key];
        oXml.addParam(key, val);
    }
    oXml.addParam("module", module);
    oXml.addParam("act", act);

    if(typeof(response_tags)=="undefined" || response_tags.length<1) response_tags = new Array('error','message');

    oXml.request(xml_response_filter, oXml, callback_func, response_tags, callback_func_arg, fo_obj);
}

// 결과 처리 후 callback_func에 넘겨줌
function xml_response_filter(oXml, callback_func, response_tags, callback_func_arg, fo_obj) {
    var xmlDoc = oXml.getResponseXml();
    if(!xmlDoc) return null;

    var waiting_obj = xGetElementById("waitingforserverresponse");
    if(waiting_obj) waiting_obj.style.visibility = "hidden";

    var ret_obj = oXml.toZMsgObject(xmlDoc, response_tags);
    if(ret_obj["error"]!=0) {
        alert(ret_obj["message"]);
        return null;
    }

    if(ret_obj["redirect_url"]) {
        location.href=ret_obj["redirect_url"];
        return null;
    }

    if(!callback_func) return null;

    callback_func(ret_obj, response_tags, callback_func_arg, fo_obj);

    return null;
}

// xml handler
function xml_handler() {
    this.objXmlHttp = null;
    this.method_name = null;
    this.xml_path = request_uri+"index.php";

    this.params = new Array();

    this.reset = xml_handlerReset;
    this.getXmlHttp = zGetXmlHttp;
    this.request = xml_handlerRequest;
    this.setPath = xml_handlerSetPath;
    this.addParam = xml_handlerAddParam;
    this.getResponseXml = xml_handlerGetResponseXML;
    this.toZMsgObject = xml_handlerToZMsgObject;
    this.parseXMLDoc = xml_parseXmlDoc;

    this.objXmlHttp = this.getXmlHttp();
}

function zGetXmlHttp() {
    if (window.XMLHttpRequest) return new XMLHttpRequest();
    else if (window.ActiveXObject) {
        try {
            return new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            return new ActiveXObject("Microsoft.XMLHTTP");
        }
    }       
    return null;
}

function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags, callback_func_arg, fo_obj) {
    var rd = "";
    rd += "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"
    +  "<methodCall>\n"
    +  "<params>\n"

    for (var key in this.params) {
        if(!this.params.hasOwnProperty(key)) continue;
        var val = this.params[key];
        rd += "<"+key+"><![CDATA["+val+"]]></"+key+">\n";
    }

    rd += "</params>\n"
    +  "</methodCall>\n";

    // ssl action
    if(typeof(ssl_actions)!='undefined' && typeof(ssl_actions.length)!='undefined' && typeof(this.params['act'])!='undefined' && /^https:\/\//i.test(location.href) ) {
        var action = this.params['act'];
        for(i=0;i<ssl_actions.length;i++) {
            if(ssl_actions[i]==action) {
                this.xml_path = this.xml_path.replace(/^http:\/\//i,'https://');
                break;
            }
        }
    }

    if(this.objXmlHttp.readyState!=0) {
        this.objXmlHttp.abort();
        this.objXmlHttp = this.getXmlHttp();
    }
    this.objXmlHttp.onreadystatechange = function () {callBackFunc(xmlObj, callBackFunc2, response_tags, callback_func_arg, fo_obj)};

    // 모든 xml데이터는 POST방식으로 전송. try-cacht문으로 오류 발생시 대처
    try {

        this.objXmlHttp.open("POST", this.xml_path, true);

    } catch(e) {
        alert(e);
        return;
    }

    // ajax 통신중 대기 메세지 출력 (show_waiting_message값을 false로 세팅시 보이지 않음)
    var waiting_obj = xGetElementById("waitingforserverresponse");
    if(show_waiting_message && waiting_obj) {
        xInnerHtml(waiting_obj, waiting_message);

        xTop(waiting_obj, xScrollTop()+20);
        xLeft(waiting_obj, xScrollLeft()+20);
        waiting_obj.style.visibility = "visible";
    }

    this.objXmlHttp.send(rd);
}

function xml_handlerSetPath(path) {
    this.xml_path = "./"+path;
}


function xml_handlerReset() {
    this.objXmlHttp = this.getXmlHttp();
    this.params = new Array();
}

function xml_handlerAddParam(key, val) {
    this.params[key] = val;
}

function xml_handlerGetResponseXML() {
    if(this.objXmlHttp && this.objXmlHttp.readyState == 4 && isDef(this.objXmlHttp.responseXML)) {
        var xmlDoc = this.objXmlHttp.responseXML;
        this.reset();
        return xmlDoc;
    }
    return null;
}

function xml_parseXmlDoc(dom) {
    if(!dom) return;

    var ret_obj = new Array();

    var obj = dom.firstChild;
    if(!obj) return;

    while(obj) {
        if(obj.nodeType == 1) {

            var name = obj.nodeName;
            var value = null;

            if(obj.childNodes.length==1 && obj.firstChild.nodeType != 1) {
                value = obj.firstChild.nodeValue;
            } else {
                value = this.parseXMLDoc(obj);
            }

            if(typeof(ret_obj[name])=='undefined') {
                ret_obj[name] = value;
            } else {
                if(ret_obj[name].length>0) {
                    ret_obj[name][ret_obj[name].length] = value;
                } else {
                    var tmp_value = ret_obj[name];
                    ret_obj[name] = new Array();
                    ret_obj[name][ret_obj[name].length] = tmp_value;
                    ret_obj[name][ret_obj[name].length] = value;
                }
            }

        }
        obj = obj.nextSibling;
    }
    return ret_obj;
}

function xml_handlerToZMsgObject(xmlDoc, tags) {
    if(!xmlDoc) return null;
    if(!tags) tags = new Array("error","message");
    tags[tags.length] = "redirect_url";
    tags[tags.length] = "act";

    var parsed_array = this.parseXMLDoc(xmlDoc.getElementsByTagName('response')[0]);

    var obj_ret = new Array();
    for(var i=0; i<tags.length; i++) {
        var key = tags[i];
        if(parsed_array[key]) obj_ret[key] = parsed_array[key];
        else obj_ret[key] = null;
    }
    return obj_ret;
}

/**
 * @file   common/js/xml_js_filter.js
 * @author zero (zero@nzeo.com)
 * @brief  xml filter에서 사용될 js
 *
 * zbxe 에서 form의 동작시 필수입력 여부등을 선처리하고 xml_handler.js의 exec_xml()을 통해서
 * 특정 모듈과의 ajax 통신을 통해 process를 진행시킴
 **/

var alertMsg = new Array();
var target_type_list = new Array();
var notnull_list = new Array();
var extra_vars = new Array();

/**
 * @function filterAlertMessage
 * @brief ajax로 서버에 요청후 결과를 처리할 callback_function을 지정하지 않았을 시 호출되는 기본 함수
 **/
function filterAlertMessage(ret_obj) {
    var error = ret_obj["error"];
    var message = ret_obj["message"];
    var act = ret_obj["act"];
    var redirect_url = ret_obj["redirect_url"];
    var url = location.href;

    if(typeof(message)!="undefined"&&message&&message!="success") alert(message);

    if(typeof(act)!="undefined" && act) url = current_url.setQuery("act", act);
    else if(typeof(redirect_url)!="undefined" && redirect_url) url = redirect_url;

    if(url == location.href) url = url.replace(/#(.+)$/,'');

    location.href = url;
}

/**
 * @class XmlJsFilter
 * @authro zero (zero@nzeo.com)
 * @brief form elements, module/act, callback_user_func을 이용하여 서버에 ajax로 form 데이터를 넘기고 결과를 받아오는 js class
 **/
function XmlJsFilter(form_object, module, act, callback_user_func) {
    this.field = new Array();
    this.parameter = new Array();
    this.response = new Array();

    this.fo_obj = form_object;
    this.module = module;
    this.act = act;
    this.user_func = callback_user_func;
    this.setFocus = XmlJsFilterSetFocus;
    this.addFieldItem = XmlJsFilterAddFieldItem;
    this.addParameterItem = XmlJsFilterAddParameterItem;
    this.addResponseItem = XmlJsFilterAddResponseItem;
    this.getValue = XmlJsFilterGetValue;
    this.executeFilter = XmlJsFilterExecuteFilter;
    this.checkFieldItem = XmlJsFilterCheckFieldItem;
    this.getParameterParam = XmlJsFilterGetParameterParam;
    this.alertMsg = XmlJsFilterAlertMsg;
    this.proc = XmlJsFilterProc;
}

function XmlJsFilterSetFocus(target_name) {
    var obj = this.fo_obj[target_name];
    if(typeof(obj)=='undefined' || !obj) return;
    
    var length = obj.length;
    try {
        if(typeof(length)!='undefined') {
            obj[0].focus();
        } else {
            obj.focus();
        }
    } catch(e) {
    }
}

function XmlJsFilterAddFieldItem(target, required, minlength, maxlength, equalto, filter) {
    var obj = new Array(target, required, minlength, maxlength, equalto, filter);
    this.field[this.field.length] = obj;
}

function XmlJsFilterAddParameterItem(param, target) {
    var obj = new Array(param, target);
    this.parameter[this.parameter.length] = obj;
}

function XmlJsFilterAddResponseItem(name) {
    this.response[this.response.length] = name;
}

function XmlJsFilterGetValue(target_name) {
    var obj = this.fo_obj[target_name];
    if(typeof(obj)=='undefined' || !obj) return '';
    var value = '';
    var length = obj.length;
    var type = obj.type;
    if((typeof(type)=='undefined'||!type) && typeof(length)!='undefined' && typeof(obj[0])!='undefined' && length>0) type = obj[0].type;
    else length = 0;

    switch(type) {
        case 'checkbox' :
                if(length>0) {
                    var value_list = new Array();
                    for(var i=0;i<length;i++) {
                        if(obj[i].checked) value_list[value_list.length] = obj[i].value;
                    }
                    value = value_list.join('|@|');
                } else {
                    if(obj.checked) value = obj.value;
                    else value = '';
                }
            break;
        case 'radio' :
                if(length>0) {
                    for(var i=0;i<length;i++) {
                        if(obj[i].checked) value = obj[i].value;
                    }
                } else {
                    if(obj.checked) value = obj.value;
                    else value = '';
                }
            break;
        case 'select' :
        case 'select-one' :
                if(obj.selectedIndex>=0) value = obj.options[obj.selectedIndex].value;
            break;
        default :
                if(length>0 && target_type_list[target_name]) {
                    switch(target_type_list[target_name]) {
                        case 'kr_zip' :
                                var val1 = obj[0].value;
                                var val2 = obj[1].value;
                                if(val1&&val2) {
                                    value = val1+'|@|'+val2;
                                }
                            break;
                        case 'tel' :
                                var val1 = obj[0].value;
                                var val2 = obj[1].value;
                                var val3 = obj[2].value;
                                if(val1&&val2&&val3) {
                                    value = val1+'|@|'+val2+'|@|'+val3;
                                }
                            break;
                    }

                } else {
                    value = obj.value;
                }
            break;
    }

    if(typeof(value)=='undefined'||!value) return '';
    return value.trim();
}

function XmlJsFilterExecuteFilter(filter, value) {
    switch(filter) {
        case "email" :
        case "email_address" :
                var regx = /^[_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+)*@[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*$/;
                return regx.test(value);
            break;
        case "userid" :
        case "user_id" :
                var regx = /^[a-zA-Z]+([_0-9a-zA-Z]+)*$/;
                return regx.test(value);
            break;
        case "homepage" :
                var regx = /^(http|https|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-\/\~]+)+(:[0-9]{2,4})*$/;       
                return regx.test(value);
            break;
        case "korean" :
                var regx = /^[가-힣]*$/; 
                return regx.test(value);
            break;
        case "korean_number" :
                var regx = /^[가-힣0-9]*$/; 
                return regx.test(value);
            break;
        case "alpha" :
                var regx = /^[a-zA-Z]*$/; 
                return regx.test(value);
            break;
        case "alpha_number" :
                var regx = /^[a-zA-Z][a-zA-Z0-9\_]*$/; 
                return regx.test(value);
            break;
        case "number" :
            return !isNaN(value);
        break;
    }

    return null;
}

function XmlJsFilterAlertMsg(target, msg_code, minlength, maxlength) {
    var target_msg = "";

    if(alertMsg[target]!='undefined') target_msg = alertMsg[target];
    else target_msg = target;

    var msg = "";
    if(typeof(alertMsg[msg_code])!='undefined') {
        if(alertMsg[msg_code].indexOf('%s')>=0) msg = alertMsg[msg_code].replace('%s',target_msg);
        else msg = target_msg+alertMsg[msg_code];
    } else {
        msg = msg_code;
    }

    if(typeof(minlength)!='undefined' && typeof(maxlength)!='undefined') msg += "("+minlength+"~"+maxlength+")";

    alert(msg);
    this.setFocus(target);

    return false;
}

function XmlJsFilterCheckFieldItem() {
    for(var i=0; i<extra_vars.length;i++) {
        var name = extra_vars[i];
        this.addFieldItem(name, false, 0, 0, "", "");
    }

    for(var i=0; i<this.field.length;i++) {
        var item = this.field[i];
        var target = item[0];
        var required = item[1];
        var minlength = item[2];
        var maxlength = item[3];
        var equalto = item[4];
        var filter = item[5].split(",");

        if(typeof(this.fo_obj[target])=='undefined') continue;

        for(var j=0; j<notnull_list.length; j++) {
            if(notnull_list[j]==target) required = true;
        }

        var value = this.getValue(target);
        if(!required && !value) continue;
        if(required && !value && this.fo_obj[target]) return this.alertMsg(target,'isnull');

        if(minlength>0 && maxlength>0 && (value.length < minlength || value.length > maxlength)) return this.alertMsg(target, 'outofrange', minlength, maxlength);

        if(equalto) {
            var equalto_value = this.getValue(equalto);
            if(equalto_value != value) return this.alertMsg(target, 'equalto');
        }

        if(filter.length && filter[0]) {
            for(var j=0;j<filter.length;j++) {
                var filter_item = filter[j];
                if(!this.executeFilter(filter_item, value)) return this.alertMsg(target, "invalid_"+filter_item);
            }
        }
    }
    return true;
} 

function XmlJsFilterGetParameterParam() {
    if(!this.fo_obj) return new Array();

    var prev_name = '';
    if(this.parameter.length<1) {
        for(var i=0;i<this.fo_obj.length;i++) {
            var name = this.fo_obj[i].name;
            if(typeof(name)=='undefined'||!name||name==prev_name) continue;
            this.addParameterItem(name, name);
            prev_name = name;
        }
    }

    var params = new Array();
    for(var i=0; i<this.parameter.length;i++) {
        var item = this.parameter[i];
        var param = item[0];
        var target = item[1];
        var value = this.getValue(target);
        params[param] = value;
    }
    return params;
}

function XmlJsFilterProc(confirm_msg) {
    var result = this.checkFieldItem();
    if(!result) return false;

    if(typeof(confirm_msg)=='undefined') confirm_msg = '';

    var params = this.getParameterParam();
    var response = this.response;
    if(confirm_msg && !confirm(confirm_msg)) return false;
    if(!this.act) {
        this.user_func(this.fo_obj, params);
        return true;
    }
    exec_xml(this.module, this.act, params, this.user_func, response, params, this.fo_obj);

    return null;
}

// form proc
function procFilter(fo_obj, filter_func) {
    // form문 안에 위지윅 에디터가 세팅되어 있을 경우 에디터의 값과 지정된 content field를 sync
    var editor_sequence = fo_obj.getAttribute('editor_sequence');
    if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined') { 
        editorRelKeys[editor_sequence]['content'].value = editorGetContent(editor_sequence);
    }

    filter_func(fo_obj);
    return false;
}

/**
 * @brief 카운터 정보 수집 javascript
 * window.onload 이벤트 후에 counter 모듈을 호출한다.
 **/

// 이벤트 등록
xAddEventListener(window,'load',doCallCounter);

// counter 모듈을 호출하는 함수
function doCallCounter() {
    show_waiting_message = false;
    exec_xml('counter','procCounterExecute');
    show_waiting_message = true;
}

/**
 * @brief 카운터 정보 수집 javascript
 * window.onload 이벤트 후에 scmcounter 모듈을 호출한다.
 **/

// 이벤트 등록
xAddEventListener(window,'load',doCallSCMLogCounter);

// scmcounter 모듈을 호출하는 함수
function doCallSCMLogCounter() {
    var params = new Array();

	if (typeof(parent.document) != "unknown") {
		var url = parent.document.URL; 
	} else { 
		var url = "none"; 
	} 
	
	if(document.referrer == url) {
		var log_ref=parent.document.referrer; 
	} else {
		var log_ref=document.referrer; 
	}

    params["referrer"] = log_ref;
    params["href"] = document.location.href;
    params["regdate"] = scmlog_regdate;
    params["scmlog_mid"] = scmlog_mid;
    params["scmlog_search_keyword"] = scmlog_search_keyword;

    show_waiting_message = false;
    exec_xml('scmlog','procSCMLogCounterExecute', params, null);
    show_waiting_message = true;
}
/**
 * @brief	화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
 * @author  zero ( http://www.zeroboard.com/ )
 * @modify	KAi ( http://kai.ibbun.net/ )
 *   - 전체 이미지가 아닌 컨텐츠 내의 이미지만 체크로 속도향상
 *   - <A> 테그가 없는 이미지 객체에 <A> 테그 생성
 *   - 여러 객체에서 이미지 체크 처리루틴 추가 [08-06-17]
 *   - 이미지 그룹을 지정하기 위한 고유 아이디 추출 루틴 개선 [08-06-28]
 *   - 각 라이브러리 초기화 함수 통일 [08-07-04]
 **/
var ABzb={p:{d:"(document)_([0-9]+)",c:"(comment)_([0-9]+)"},c:{d:0,c:0}};var ABgid;var ABsid=1;function ActiveBox_init(){if(typeof ABdid=='string'&&ABdid.length>1){ABdid=ABdid.split(',');for(var i in ABdid){try{var a=document.getElementById(ABdid[i]).getElementsByTagName('IMG');resizeImageContents(a)}catch(e){}}}else{var a=document.getElementsByTagName('IMG');resizeImageContents(a)}ActiveBox_initLibrary();return true}function resizeImageContents(a){for(var i in a){var b=a[i];if(!b.parentNode)continue;if(/\/modules\//i.test(b.src))continue;if(/\/layouts\//i.test(b.src))continue;if(/\/widgets\//i.test(b.src))continue;if(/\/classes\//i.test(b.src))continue;if(/\/common\/tpl\//i.test(b.src))continue;if(/\/member_extra_info\//i.test(b.src))continue;var d=b.parentNode;while(d){if(d.className&&d.className.search(/xe_content|document_|comment_/i)!=-1)break;d=d.parentNode}if(!d||d.className.search(/xe_content|document_|comment_/i)<0)continue;if(d.parentNode)xWidth(d,xWidth(d.parentNode));d.style.width='100%';d.style.overflow='hidden';var f=xWidth(d);if(d.parentNode&&xWidth(d.parentNode)<f)f=xWidth(d.parentNode);var g=xWidth(b);var h=xHeight(b);var A=b.parentNode;var c=ActiveBox_getCaptionFromObject(b);try{for(var n in ABzb.p){if(ABgid=d.className.match(ABzb.p[n]))break}}catch(e){ABgid={0:1,1:1,2:1}}if(g>f){var j=f;var k=Math.round(h*j/g);xWidth(b,j);xHeight(b,k);if(A&&A.nodeName!='A'){ActiveBox_addElement(b,c)}else if(A.nodeName=='A'&&ABuhv=='use'){if(A.href.match(/\.(bmp|gif|jpg|jp2|jpeg|png)$/gi)){ActiveBox_modifyAttributesToAchor_Img(A,b,c)}else{ActiveBox_addAttributesToAnchor_Html(A,b,c)}}}else{var l=new Image();l.src=b.src;if(A&&A.nodeName!='A'&&(l.width>f||l.width!=g)){ActiveBox_addElement(b,c)}else if(A.nodeName=='A'&&ABuhv=='use'){if(A.href.match(/\.(bmp|gif|jpg|jp2|jpeg|png)$/gi)){ActiveBox_modifyAttributesToAchor_Img(A,b,c)}else{ActiveBox_addAttributesToAnchor_Html(A,b,c)}}}}}ActiveBox_addEvent(window,'load',ActiveBox_init);


/*-------------------------------------*
**	ActiveBox library
**	by KAi ( http://kai.ibbun.net/ )
**-------------------------------------*/
function ActiveBox_addElement(B,c){var A=document.createElement('A');ActiveBox_addAttributesToAchor_Img(A,B,c);applyElement(A,B)}function applyElement(A,B){B.parentNode.insertBefore(A,B);A.appendChild(B)}function ActiveBox_getCaptionFromObject(i){var t=i.title;var a=i.alt;return(!t||t.length==0)?(!a||a.length==0)?'Nosubject':a:t}function ActiveBox_addEvent(a,b,c){try{a.detachEvent('on'+b,c);a.attachEvent('on'+b,c)}catch(e){try{a.addEventListener(b,c,false)}catch(e){a['on'+b]=c}}}
/******************************************************************************
Name:    Highslide JS
Version: 4.0.5 (August 30 2008)
Config:  default +events +unobtrusive +imagemap +slideshow +positioning +transitions +inline +ajax +iframe +flash +packed
Author:  Torstein Hønsi
Support: http://highslide.com/support

Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).

You are free:
	* to copy, distribute, display, and perform the work
	* to make derivative works

Under the following conditions:
	* Attribution. You must attribute the work in the manner  specified by  the
	  author or licensor.
	* Noncommercial. You may not use this work for commercial purposes.

* For  any  reuse  or  distribution, you  must make clear to others the license
  terms of this work.
* Any  of  these  conditions  can  be  waived  if  you  get permission from the 
  copyright holder.

Your fair use and other rights are in no way affected by the above.
******************************************************************************/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('m j={W:{9q:\'bH...\',9r:\'7F P bG\',a5:\'7F P bF P bD\',7X:\'bE P bI K\',ag:\'bJ by <i>94 93</i>\',af:\'bN P bM 94 93 bL\',7V:\'96\',7T:\'9b\',7O:\'9a\',7Q:\'92\',7P:\'92 (bK)\',8M:\'bC\',8Y:\'90\',8Z:\'90 1y (95)\',8P:\'91\',8Q:\'91 1y (95)\',7U:\'96 (7G 19)\',7W:\'9b (7G 3h)\',7S:\'9a\',8O:\'bt K\',3s:\'bs %1 br %2\',8j:\'7F P 1V 2O, bq 98 bu P 2I. bv 7G bA S 1x 98 2K.\'},5j:\'Q/bz/\',8h:\'bx.5i\',aW:10,7c:5c,9S:10,a2:5c,3C:15,6q:15,4h:15,3N:15,4H:bw,9i:0.75,8l:L,82:5,3j:2,83:3,9U:\'3T 3h\',9Y:1,ax:1k,aI:L,ah:\'bO://bP.c6/Q/\',8L:L,3t:[],6g:9L,3Z:0,6F:50,5U:1k,7D:L,4l:L,3i:\'5l\',7t:L,3l:\'1E\',6O:\'1E\',6K:I,6I:I,8p:L,2N:97,3H:97,5y:L,1M:\'c4-c3\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" 1Y="{j.W.8M}"><D></D></D>\'+\'</1e></1e>\'},5n:[],6V:L,X:[],72:[\'5y\',\'3l\',\'6O\',\'6K\',\'6I\',\'1M\',\'3j\',\'cc\',\'ca\',\'c9\',\'8R\',\'bo\',\'c1\',\'bU\',\'8N\',\'8p\',\'3Y\',\'5h\',\'3t\',\'3Z\',\'7a\',\'H\',\'N\',\'5U\',\'7D\',\'4l\',\'bT\',\'bS\',\'bQ\',\'2x\',\'7t\',\'3E\',\'4q\',\'3i\',\'8A\',\'7b\',\'2N\',\'3H\',\'6P\',\'9D\',\'2Y\',\'3P\',\'b2\',\'aY\',\'1a\'],1N:[],8B:0,6W:{x:[\'aF\',\'19\',\'3Q\',\'3h\',\'aJ\'],y:[\'5w\',\'1c\',\'8v\',\'3T\',\'6H\']},6y:{},8N:{},8R:{},8A:{8J:{},24:{},8H:{}},5H:[],6u:[],4f:{},42:[],6C:[],4K:[],6i:{},8q:{},1r:(18.5e&&!1q.3M),5b:/aN/.16(3U.68),4k:/bR.+aV:1\\.[0-8].+aO/.16(3U.68),$:q(1w){E 18.7o(1w)},2w:q(1R,5C){1R[1R.1b]=5C},1f:q(8S,3K,3G,4U,8X){m C=18.1f(8S);k(3K)j.8C(C,3K);k(8X)j.J(C,{7J:0,6M:\'1H\',bV:0});k(3G)j.J(C,3G);k(4U)4U.1S(C);E C},8C:q(C,3K){S(m x 35 3K)C[x]=3K[x]},J:q(C,3G){S(m x 35 3G){k(j.1r&&x==\'28\'){k(3G[x]>0.99)C.F.7s(\'71\');M C.F.71=\'bW(28=\'+(3G[x]*2U)+\')\'}M C.F[x]=3G[x]}},3S:q(){m 1R=3U.ay.5R("bZ");E 1R[1]?9h(1R[1]):I},5x:q(){m 4g=18.8D&&18.8D!=\'aS\'?18.5E:18.1d;m b=18.1d;m 7i=(1q.6e&&1q.8W)?1q.6e+1q.8W:(b.7l>b.1z?b.7l:b.1z),7q=(1q.5V&&1q.8V)?1q.5V+1q.8V:(b.8T>b.1s?b.8T:b.1s),4N=j.1r?4g.7l:(18.5E.7k||64.6e),4X=j.1r?4g.7g:(18.5E.7g||64.5V);m H=j.1r?4g.7k:(18.5E.7k||64.6e),N=j.1r?4g.7g:64.5V;E{4N:7i<4N?4N:7i,4X:7q<4X?4X:7q,H:H,N:N,5t:j.1r?4g.5t:b7,5s:j.1r?4g.5s:bn}},5I:q(C){k(/4Z/i.16(C.3W)){m 5T=18.2L(\'1F\');S(m i=0;i<5T.1b;i++){m u=5T[i].bj;k(u&&u.2h(/^.*?#/,\'\')==C.2Z.4i){C=5T[i];5k}}}m p={x:C.9c,y:C.7E};4E(C.8U){C=C.8U;p.x+=C.9c;p.y+=C.7E;k(C!=18.1d&&C!=18.5E){p.x-=C.5t;p.y-=C.5s}}E p},2A:q(a,24,3D){k(a.4D)E 24;1t{21 j.4u(a,24,3D);E 1k}1u(e){E L}},8b:q(a,24,3D){k(a.4D)E 24;S(m i=0;i<j.42.1b;i++){k(j.42[i]&&j.42[i].a==a){j.42[i].aP();j.42[i]=I;E 1k}}1t{j.9y=L;21 j.4u(a,24,3D,\'4e\');E 1k}1u(e){E L}},76:q(){E j.1f(\'1e\',{1h:\'Q-4e-O\',2v:j.7C(j.7R.9d)})},48:q(C,3W,1h){m Y=C.2L(3W);S(m i=0;i<Y.1b;i++){k((21 54(1h)).16(Y[i].1h)){E Y[i]}}E I},7C:q(s){s=s.2h(/\\s/g,\' \');m 2f=/{j\\.W\\.([^}]+)\\}/g,63=s.1B(2f),W;S(m i=0;i<63.1b;i++){W=63[i].2h(2f,"$1");k(1K j.W[W]!=\'2j\')s=s.2h(63[i],j.W[W])}E s},70:q(){m Y=18.2L(\'a\');S(m i=0;i<Y.1b;i++){k(/^Q$/.16(Y[i].6k)){k(j.1o(j,\'9w\',{4Q:Y[i]})){Y[i].2o=q(){E j.2A(f)}}Y[i].7s(\'6k\')}m 1B=/^Q-(2W|1i)$/.b9(Y[i].6k);k(1B){(q(){m t=1B[1];k(j.1o(j,\'9w\',{4Q:Y[i],14:t})){Y[i].2o=q(){E j.8b(f,{2x:t})}}})();Y[i].7s(\'6k\')}}k(!j.aH)26(j.70,50);M j.51()},6Q:q(a){S(m i=0;i<j.4K.1b;i++){k(j.4K[i][0]==a){m c=j.4K[i][1];j.4K[i][1]=c.4L(1);E c}}E I},aL:q(e){m 1R=j.7u();S(m i=0;i<1R.4y.1b;i++){m a=1R.4y[i];k(j.3X(a,\'2x\')==\'2W\'&&j.3X(a,\'7t\'))j.2w(j.6C,a)}j.7Y(0)},7Y:q(i){k(!j.6C[i])E;m a=j.6C[i];m 5q=j.4W(j.3X(a,\'7a\'));k(!5q)5q=j.76();m 2W=21 j.5Y(a,5q,1);2W.7j=q(){};2W.36=q(){j.2w(j.4K,[a,5q]);j.7Y(i+1)};2W.7r()},9s:q(){m 7v=0,6x=-1;S(m i=0;i<j.X.1b;i++){k(j.X[i]){k(j.X[i].T.F.1J&&j.X[i].T.F.1J>7v){7v=j.X[i].T.F.1J;6x=i}}}k(6x==-1)j.2P=-1;M j.X[6x].3F()},3X:q(a,5p){a.4D=a.2o;m p=a.4D?a.4D():I;a.4D=I;E(p&&1K p[5p]!=\'2j\')?p[5p]:(1K j[5p]!=\'2j\'?j[5p]:I)},5S:q(a){m 1a=j.3X(a,\'1a\');k(1a)E 1a;E a.1T},4W:q(1w){m 1U=j.$(1w),47=j.8q[1w],a={};k(!1U&&!47)E I;k(!47){47=1U.4L(L);47.1w=\'\';j.8q[1w]=47;E 1U}M{E 47.4L(L)}},4r:q(d){j.8g.1S(d);j.8g.2v=\'\'},2l:q(A){k(!j.2t){j.2t=j.1f(\'1e\',{1h:\'Q-bd\',5u:\'\',2o:q(){k(j.1o(j,\'bc\'))j.1V()}},{1m:\'2c\',19:0},j.2p,L);j.2G(1q,\'3O\',j.5r)}j.2t.F.1A=\'\';j.5r();j.2t.5u+=\'|\'+A.U;k(j.4k&&j.9v)j.2t.F.5D=\'8i(\'+j.5j+\'ba.9e)\';M j.2g(j.2t,0,A.3Z,j.6F)},7y:q(U){k(!j.2t)E;k(1K U!=\'2j\')j.2t.5u=j.2t.5u.2h(\'|\'+U,\'\');k((1K U!=\'2j\'&&j.2t.5u!=\'\')||(j.2J&&j.3X(j.2J,\'3Z\')))E;k(j.4k&&j.9v)j.2t.F.5D=\'1H\';M j.2g(j.2t,j.3Z,0,j.6F);26(q(){j.J(j.2t,{1A:\'1H\',H:0,N:0})},j.6F)},5r:q(A){k(!j.2t)E;m 2X=j.5x();m h=(j.1r&&A&&A.T)?2b(A.T.F.1c)+2b(A.T.F.N)+(A.11?A.11.2T:0):0;j.J(j.2t,{H:2X.4N+\'B\',N:1g.41(2X.4X,h)+\'B\'})},6p:q(C,1G){j.51();m A=j.R=j.3k(C);1t{m 9u=j.2J=A.6S(1G);9u.2o()}1u(e){j.R=j.2J=I}1t{A.1V()}1u(e){}E 1k},2K:q(C){E j.6p(C,-1)},1x:q(C){E j.6p(C,1)},5P:q(e){k(!e)e=1q.2C;k(!e.1X)e.1X=e.88;k(e.1X.9x)E L;k(!j.1o(j,\'bm\',e))E L;m 1G=I;bi(e.b3){3f 32:1G=2;5k;3f 34:3f 39:3f 40:1G=1;5k;3f 8:3f 33:3f 37:3f 38:1G=-1;5k;3f 27:3f 13:1G=0}k(1G!==I){k(1G!=2)j.4A(18,1q.3M?\'81\':\'80\',j.5P);k(!j.8L)E L;k(e.6s)e.6s();M e.b8=1k;m A=j.3k();k(A){k(1G==0){A.1V()}M k(1G==2){k(A.1y)A.1y.9I()}M{k(A.1y)A.1y.2R();j.6p(A.U,1G)}E 1k}}E L},c2:q(1p){j.2w(j.1N,1p)},cv:q(52){j.2w(j.6u,52)},8e:q(4Q){m C,2f=/^Q-T-([0-9]+)$/;C=4Q;4E(C.2Z){k(C.1w&&2f.16(C.1w))E C.1w.2h(2f,"$1");C=C.2Z}C=4Q;4E(C.2Z){k(C.3W&&j.5O(C)){S(m U=0;U<j.X.1b;U++){m A=j.X[U];k(A&&A.a==C)E U}}C=C.2Z}E I},3k:q(C){k(1K C==\'2j\')E j.X[j.2P]||I;k(1K C==\'3s\')E j.X[C]||I;k(1K C==\'8y\')C=j.$(C);E j.X[j.8e(C)]||I},5O:q(a){E(a.2o&&a.2o.9K().2h(/\\s/g,\' \').1B(/j.(dr|e)dq/))},aj:q(){S(m i=0;i<j.X.1b;i++)k(j.X[i]&&j.X[i].5B)j.9s()},1o:q(4O,8u,9t){E 4O&&4O[8u]?(4O[8u](4O,9t)!==1k):L},7L:q(e){k(!e)e=1q.2C;k(e.cf>1)E L;k(!e.1X)e.1X=e.88;m C=e.1X;4E(C.2Z&&!(/Q-(2O|2I|4e|3O)/.16(C.1h))){C=C.2Z}m A=j.3k(C);k(A&&(A.4P||!A.5B))E L;k(A&&e.14==\'7H\'){k(e.1X.9x)E L;m 1B=C.1h.1B(/Q-(2O|2I|3O)/);k(1B){j.2s={A:A,14:1B[1],19:A.x.G,H:A.x.D,1c:A.y.G,N:A.y.D,9C:e.6m,9B:e.6t};j.2G(18,\'6D\',j.65);k(e.6s)e.6s();k(/Q-(2O|4e)-8f/.16(A.O.1h)){A.3F();j.8x=L}E 1k}M k(/Q-4e/.16(C.1h)&&j.2P!=A.U){A.3F();A.5Q()}}M k(e.14==\'aC\'){j.4A(18,\'6D\',j.65);k(j.2s){k(j.2s.14==\'2O\')j.2s.A.O.F.4B=j.53;m 3g=j.2s.3g;k(!3g&&!j.8x&&!/(2I|3O)/.16(j.2s.14)){k(j.1o(A,\'do\'))A.1V()}M k(3g||(!3g&&j.9y)){j.2s.A.5Q()}k(j.2s.A.3w)j.2s.A.3w.F.1A=\'1H\';k(3g)j.1o(j.2s.A,\'ds\',j.2s);k(3g)j.5r(A);j.8x=1k;j.2s=I}M k(/Q-2O-8f/.16(C.1h)){C.F.4B=j.53}}E 1k},65:q(e){k(!j.2s)E L;k(!e)e=1q.2C;m a=j.2s,A=a.A;k(A.1i){k(!A.3w)A.3w=j.1f(\'1e\',I,{1m:\'2c\',H:A.x.D+\'B\',N:A.y.D+\'B\',19:0,1c:0,1J:4,5D:(j.1r?\'dt\':\'1H\'),28:0.dw},A.T,L);k(A.3w.F.1A==\'1H\')A.3w.F.1A=\'\'}a.5L=e.6m-a.9C;a.5J=e.6t-a.9B;m 85=1g.du(1g.9A(a.5L,2)+1g.9A(a.5J,2));k(!a.3g)a.3g=(a.14!=\'2O\'&&85>0)||(85>(j.dm||5));k(a.3g&&e.6m>5&&e.6t>5){k(!j.1o(A,\'dg\',a))E 1k;k(a.14==\'3O\')A.3O(a);M A.2I(a)}E 1k},9l:q(e){1t{k(!e)e=1q.2C;m 56=/df/i.16(e.14);k(!e.1X)e.1X=e.88;k(j.1r)e.84=56?e.dd:e.dy;m A=j.3k(e.1X);k(!A.5B)E;k(!A||!e.84||j.3k(e.84)==A||j.2s)E;j.1o(A,56?\'di\':\'dl\',e);S(m i=0;i<A.1N.1b;i++){m o=j.$(\'2i\'+A.1N[i]);k(o&&o.4F){m 29=56?0:o.28,P=56?o.28:0;j.2g(o,29,P)}}}1u(e){}},2G:q(C,2C,3A){1t{C.2G(2C,3A,1k)}1u(e){1t{C.9z(\'5A\'+2C,3A);C.dk(\'5A\'+2C,3A)}1u(e){C[\'5A\'+2C]=3A}}},4A:q(C,2C,3A){1t{C.4A(2C,3A,1k)}1u(e){1t{C.9z(\'5A\'+2C,3A)}1u(e){C[\'5A\'+2C]=I}}},5M:q(i){k(j.6V&&j.5n[i]&&j.5n[i]!=\'2j\'){m 1F=18.1f(\'1F\');1F.4c=q(){1F=I;j.5M(i+1)};1F.1a=j.5n[i]}},aE:q(3s){k(3s&&1K 3s!=\'dD\')j.82=3s;m 1R=j.7u();S(m i=0;i<1R.4v.1b&&i<j.82;i++){j.2w(j.5n,j.5S(1R.4v[i]))}k(j.1M)21 j.5o(j.1M,q(){j.5M(0)});M j.5M(0);m 5i=j.1f(\'1F\',{1a:j.5j+j.8h})},6f:q(){k(!j.2p){j.2p=j.1f(\'1e\',I,{1m:\'2c\',19:0,1c:0,H:\'2U%\',1J:j.4H},18.1d,L);j.22=j.1f(\'a\',{1h:\'Q-22\',1Y:j.W.9r,2v:j.W.9q,1T:\'5X:;\'},{1m:\'2c\',1c:\'-3J\',28:j.9i,1J:1},j.2p);j.8g=j.1f(\'1e\',I,{1A:\'1H\'},j.2p);j.3d=j.1f(\'1e\',I,{8F:\'8K\',dC:\'dA\'},I,L);1g.dB=q(t,b,c,d){E c*t/d+b};1g.b1=q(t,b,c,d){E c*(t/=d)*t+b};1g.b0=q(t,b,c,d){k((t/=d/2)<1)E c/2*t*t+b;E-c/2*((--t)*(t-2)-1)+b};S(m x 35 j.6E){k(1K j[x]!=\'2j\')j.W[x]=j[x];M k(1K j.W[x]==\'2j\'&&1K j.6E[x]!=\'2j\')j.W[x]=j.6E[x]}j.a9=(j.1r&&j.3S()<=6&&4s.9V==\'9R:\');j.1o(f,\'dz\')}},av:q(){j.9o=L;k(j.6U)j.6U()},51:q(){m Y=18.2L(\'*\'),5e=[],4v=[],4y=[],30={},2f;S(m i=0;i<Y.1b;i++){2f=j.5O(Y[i]);k(2f){j.2w(5e,Y[i]);k(2f[0]==\'j.2A\')j.2w(4v,Y[i]);M k(2f[0]==\'j.8b\')j.2w(4y,Y[i]);m g=j.3X(Y[i],\'2Y\')||\'1H\';k(!30[g])30[g]=[];j.2w(30[g],Y[i])}}j.44={5e:5e,30:30,4v:4v,4y:4y};E j.44},7u:q(){E j.44||j.51()},2g:q(C,o,4a,3x,i,3r){k(1K i==\'2j\'){k(1K 3x!=\'3s\')3x=5c;k(3x<25){j.J(C,{28:4a});E}i=j.5H.1b;3r=4a>o?1:-1;m 5d=(25/(3x-3x%25))*1g.an(o-4a)}o=9h(o);m 73=(C.2g===0||C.2g===1k||(C.2g==2&&j.1r));C.F.1v=((73?4a:o)<=0)?\'1n\':\'1Z\';k(73||o<0||(3r==1&&o>4a))E;k(C.46&&C.46.i!=i){9X(j.5H[C.46.i]);o=C.46.o}C.46={i:i,o:o,5d:(5d||C.46.5d)};C.F.1v=(o<=0)?\'1n\':\'1Z\';j.J(C,{28:o});j.5H[i]=26(q(){j.2g(C,o+C.46.5d*3r,4a,I,i,3r)},25)},1V:q(C){m A=j.3k(C);k(A)A.1V();E 1k}};j.5o=q(1M,36){f.36=36;f.1M=1M;m v=j.3S(),5K;f.6Z=j.1r&&v>=5.5&&v<7;k(!1M){k(36)36();E}j.6f();f.2B=j.1f(\'2B\',{cA:0},{1v:\'1n\',1m:\'2c\',cy:\'cx\'},j.2p,L);m 77=j.1f(\'77\',I,I,f.2B,1);f.2D=[];S(m i=0;i<=8;i++){k(i%3==0)5K=j.1f(\'5K\',I,{N:\'1E\'},77,L);f.2D[i]=j.1f(\'2D\',I,I,5K,L);m F=i!=4?{cw:0,cB:0}:{1m:\'4j\'};j.J(f.2D[i],F)}f.2D[4].1h=1M;f.9g()};j.5o.6c={9g:q(){m 1a=j.5j+(j.cH||"cG/")+f.1M+".9e";m 9f=j.5b?j.2p:I;f.3n=j.1f(\'1F\',I,{1m:\'2c\',19:\'-3J\',1c:\'-3J\'},9f,L);m 3c=f;f.3n.4c=q(){3c.9j()};f.3n.1a=1a},9j:q(){m o=f.2T=f.3n.H/4,1C=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],2l={N:(2*o)+\'B\',H:(2*o)+\'B\'};j.4r(f.3n);S(m i=0;i<=8;i++){k(1C[i]){k(f.6Z){m w=(i==1||i==7)?\'2U%\':f.3n.H+\'B\';m 1e=j.1f(\'1e\',I,{H:\'2U%\',N:\'2U%\',1m:\'4j\',2F:\'1n\'},f.2D[i],L);j.1f(\'1e\',I,{71:"cD:cE.ad.cu(ct=ck, 1a=\'"+f.3n.1a+"\')",1m:\'2c\',H:w,N:f.3n.N+\'B\',19:(1C[i][0]*o)+\'B\',1c:(1C[i][1]*o)+\'B\'},1e,L)}M{j.J(f.2D[i],{5D:\'8i(\'+f.3n.1a+\') \'+(1C[i][0]*o)+\'B \'+(1C[i][1]*o)+\'B\'})}k(1q.3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.X[j.2P])j.X[j.2P].1V()}m 1C=j.5I(C);m x=f.x={};x.t=C.H?2b(C.H):C.1z;x.1P=1C.x;x.2V=(C.1z-x.t)/2;m y=f.y={};y.t=C.N?2b(C.N):C.1s;y.1P=1C.y;y.2V=(C.1s-y.t)/2;x.V=x.1j=y.V=y.1j=0;k(/4Z/i.16(C.3W))f.aA(C);f.T=j.1f(\'1e\',{1w:\'Q-T-\'+f.U,1h:f.7b},{1v:\'1n\',1m:\'2c\',1J:j.4H++},I,L);f.T.cm=f.T.cn=j.9l;k(f.2Q==\'2O\'&&f.3j==2)f.3j=0;k(!f.1M||(f.R&&f.2S&&f.3t[1]==\'4b\')){f[f.2Q+\'7d\']()}M k(j.4f[f.1M]){f.6R();f[f.2Q+\'7d\']()}M{f.4V();m A=f;21 j.5o(f.1M,q(){A.6R();A[A.2Q+\'7d\']()})}E L};j.4u.6c={6R:q(x,y){m o=f.11=j.4f[f.1M];o.2B.F.1J=f.T.F.1J;j.4f[f.1M]=I},4V:q(){k(f.66||f.22)E;f.22=j.22;m A=f;f.22.2o=q(){A.6Y()};k(!j.1o(f,\'cr\'))E;m A=f,l=(f.x.1P+f.x.2V+(f.x.t-f.22.1z)/2)+\'B\',t=(f.y.1P+(f.y.t-f.22.1s)/2)+\'B\';k(!23&&f.R&&f.3t[1]==\'4b\')m 23=f.R;k(23){l=(23.x.G+23.x.cb+23.x.V+(23.x.D-f.22.1z)/2)+\'B\';t=(23.y.G+23.y.cb+23.y.V+(23.y.D-f.22.1s)/2)+\'B\';f.22.F.1J=j.4H++}26(q(){k(A.22)j.J(A.22,{19:l,1c:t})},2U)},cq:q(){m A=f;m 1F=18.1f(\'1F\');f.O=1F;1F.4c=q(){k(j.X[A.U])A.4R()};k(j.co)1F.cp=q(){E 1k};1F.1h=\'Q-2O\';j.J(1F,{1v:\'1n\',1A:\'4S\',1m:\'2c\',6P:\'3J\',1J:3});1F.1Y=j.W.8j;k(j.5b)j.2p.1S(1F);k(j.1r&&j.cI)1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){26(q(){k(A.11)A.11.2B.F.1v="1Z"},t);26(q(){A.60()},t+50)}M 26(q(){A.5z()},t)},6L:q(P){1t{k(P.1G)j.J(f.T,{28:P.1G});j.J(f.T,{H:(P.2z+P.2e+P.3b+2*f.x.cb)+\'B\',N:(P.2u+P.2a+P.3a+2*f.y.cb)+\'B\',19:P.2n+\'B\',1c:P.2m+\'B\'});j.J(f.O,{1c:P.2a+\'B\',19:P.2e+\'B\',H:P.2z+\'B\',N:P.2u+\'B\'});k(f.2q){j.J(f.4G,{19:(f.x.G-P.2n+f.x.V-P.2e)+\'B\',1c:(f.y.G-P.2m+f.y.V-P.2a)+\'B\'});f.1l.F.1v=\'1Z\'}k(f.11&&f.3j){m o=f.11.2T-P.o;f.11.3q(f,{x:P.2n+o,y:P.2m+o,w:P.2z+P.2e+P.3b+ -2*o,h:P.2u+P.2a+P.3a+ -2*o},1)}f.T.F.1v=\'1Z\'}1u(e){1q.4s.1T=f.1a}},2g:q(1Q,29,P){f.3j=1k;m A=f,t=1Q?5c:0;k(1Q){j.J(f.T,{28:0});f.6L(P);f.O.F.1v=\'1Z\';j.2g(f.T,0,1)}k(f.11){f.11.2B.F.1J=f.T.F.1J;m 3r=1Q||-1;S(m i=29.o;3r*i<=3r*P.o;i+=3r,t+=25){(q(){m o=1Q?P.o-i:29.o-i;26(q(){A.11.3q(A,{x:(A.x.G+o),y:(A.y.G+o),w:(A.x.D-2*o+A.x.V+A.x.1j),h:(A.y.D-2*o+A.y.V+A.y.1j)},1)},t)})()}}k(1Q)26(q(){A.60()},t+50);M{26(q(){k(A.11)A.11.5F(A.4l);j.2g(A.T,1,0);26(q(){A.5z()},5c)},t)}},4b:q(1Q,29,P){k(!1Q)E;m A=f,43=2b(j.6g/25),R=f.R;j.4A(18,\'6D\',j.65);j.J(f.O,{H:P.2z+\'B\',N:P.2u+\'B\'});f.11=f.R.11;f.R.11=I;f.4n=j.1f(\'1e\',{1h:\'Q-2O\'},{1m:\'2c\',1J:4,2F:\'1n\',1A:\'1H\'});m 6N={9W:R,a0:f};S(m x 35 6N){f[x]=6N[x].O.4L(1);j.J(f[x],{1m:\'2c\',6M:0,1v:\'1Z\'});f.4n.1S(f[x])}f.T.1S(f.4n);29={2n:R.x.G,2z:R.x.D,2e:R.x.V,3b:R.x.1j,2m:R.y.G,2u:R.y.D,2a:R.y.V,3a:R.y.1j,o:1/43};P.2u=f.y.D;P.o=1;m t,3P=1g.b0;f.79(29);q 7e(){k(A.1I){A.T.1S(A.1I);S(m i=0;i<A.R.1N.1b;i++){m 3m=j.$(\'2i\'+A.R.1N[i]);k(3m.9P===A.U)A.1I.1S(3m);M j.2g(3m,3m.28,0)}}A.4n.F.1A=\'\';A.R.O.F.1A=\'1H\'};k(/aV:1\\.[0-8].+aO/.16(3U.68))26(7e,0);M 7e();k(j.5b){m 1B=3U.68.1B(/aN\\/([0-9]{3})/);k(1B&&2b(1B[1])<d1)f.T.F.1v=\'1Z\'}S(m i=1;i<=43;i++){t=1g.3R(i*(j.6g/43));(q(){m K={},74=i;S(m x 35 29){m 5C=3P(t,29[x],P[x]-29[x],j.6g);K[x]=(x!=\'o\')?1g.3R(5C):5C}26(q(){A.79(K)},t)})()}26(q(){A.9Z()},t+2U)},79:q(K){1t{k(f.11)f.11.3q(f,{x:K.2n,y:K.2m,w:K.2z+K.2e+K.3b,h:K.2u+K.2a+K.3a},1);f.R.T.F.d2=\'cs(\'+(K.2m-f.R.y.G)+\'B, \'+(K.2z+K.2e+K.3b+2*f.R.x.cb+K.2n-f.R.x.G)+\'B, \'+(K.2u+K.2a+K.3a+2*f.R.y.cb+K.2m-f.R.y.G)+\'B, \'+(K.2n-f.R.x.G)+\'B)\';j.J(f.O,{1c:K.2a+\'B\',19:K.2e+\'B\',4h:(f.y.G-K.2m)+\'B\',3C:(f.x.G-K.2n)+\'B\'});j.J(f.T,{1c:K.2m+\'B\',19:K.2n+\'B\',H:(K.2e+K.3b+K.2z+2*f.x.cb)+\'B\',N:(K.2a+K.3a+K.2u+2*f.y.cb)+\'B\'});j.J(f.4n,{H:K.2z+\'B\',N:K.2u+\'B\',19:K.2e+\'B\',1c:K.2a+\'B\',1v:\'1Z\'});j.J(f.9W,{1c:(f.R.y.G-K.2m+f.R.y.V-K.2a)+\'B\',19:(f.R.x.G-K.2n+f.R.x.V-K.2e)+\'B\'});j.J(f.a0,{28:K.o,1c:(f.y.G-K.2m+f.y.V-K.2a)+\'B\',19:(f.x.G-K.2n+f.x.V-K.2e)+\'B\'});j.J(f.1I,{H:K.2z+\'B\',N:K.2u+\'B\',19:(K.2e+f.x.cb)+\'B\',1c:(K.2a+f.y.cb)+\'B\'})}1u(e){}},9Z:q(){f.T.F.5D=f.ch||\'\';f.T.F.1v=f.O.F.1v=\'1Z\';f.4n.F.1A=\'1H\';f.a.1h+=\' Q-7x-3l\';f.60();f.R.5z()},ar:q(o,C){k(!f.R)E 1k;S(m i=0;i<f.R.1N.1b;i++){m 3m=j.$(\'2i\'+f.R.1N[i]);k(3m&&3m.2i==o.2i){f.8r();3m.9P=f.U;j.2w(f.1N,f.R.1N[i]);E L}}E 1k},60:q(){f.5B=L;f.3F();k(f.2q&&f.3i==\'87\')f.6j();k(f.2q){k(f.1i){1t{m A=f,2k=f.1i.7p||f.1i.59.18;j.2G(2k,\'7H\',q(){k(j.2P!=A.U)A.3F()})}1u(e){}k(j.1r&&1K f.4P!=\'ci\')f.1i.F.H=(f.3E-1)+\'B\'}}k(f.3Z)j.2l(f);k(j.2J&&j.2J==f.a)j.2J=I;f.9F();k(f.1I)f.at();j.1o(f,\'cj\')},9F:q(){m U=f.U;m 1M=f.1M;21 j.5o(1M,q(){1t{j.X[U].9J()}1u(e){}})},9J:q(){m 1x=f.6S(1);k(1x&&1x.2o.9K().1B(/j\\.2A/))m 1F=j.1f(\'1F\',{1a:j.5S(1x)})},6S:q(1G){m 6X=f.6a(),as=j.44.30[f.2Y||\'1H\'];k(!as[6X+1G]&&f.1y&&f.1y.9G){k(1G==1)E as[0];M k(1G==-1)E as[as.1b-1]}E as[6X+1G]||I},6a:q(){m 1R=j.44.30[f.2Y||\'1H\'];S(m i=0;i<1R.1b;i++){k(1R[i]==f.a)E i}E I},aR:q(){k(f[f.5h]){m 1R=j.44.30[f.2Y||\'1H\'];m s=j.W.3s.2h(\'%1\',f.6a()+1).2h(\'%2\',1R.1b);f[f.5h].2v=\'<1e 2d="Q-3s">\'+s+\'</1e>\'+f[f.5h].2v}},9N:q(){k(f.1y)E;k(!f.R){S(m i=0;i<j.6u.1b;i++){m 1W=j.6u[i],4z=1W.2Y;k(4z===f.2Y){f.1y=21 j.7m(1W)}}}M{f.1y=f.R.1y}m 1W=f.1y;k(!1W)E;m A=1W.A=f;1W.9O();k(1W.7n){m o=1W.9M||{};o.4I=1W.3u;o.2i=\'3u\';f.4M(o)}k(!f.R&&f.3Y)1W.3z(L);k(1W.3Y){1W.3Y=26(q(){j.1x(A.U)},(1W.cl||9L))}},6Y:q(){j.X[f.U]=I;k(j.2J==f.a)j.2J=I;j.7y();k(f.22)j.22.F.19=\'-3J\';j.1o(f,\'9E\')},aB:q(){k(f.4T)E;f.4T=j.1f(\'a\',{1T:j.ah,1h:\'Q-4T\',2v:j.W.ag,1Y:j.W.af});f.4M({4I:f.4T,1m:\'1c 19\',2i:\'4T\'})},8o:q(6T,a4){S(m i=0;i<6T.1b;i++){m 14=6T[i],s=I;k(14==\'8m\'&&!j.1o(f,\'cF\'))E;M k(14==\'4J\'&&!j.1o(f,\'cC\'))E;k(!f[14+\'5N\']&&f.6n)f[14+\'5N\']=14+\'-S-\'+f.6n;k(f[14+\'5N\'])f[14]=j.4W(f[14+\'5N\']);k(!f[14]&&!f[14+\'78\']&&f[14+\'am\'])1t{s=dc(f[14+\'am\'])}1u(e){}k(!f[14]&&f[14+\'78\']){s=f[14+\'78\']}k(!f[14]&&!s){m 1x=f.a.a6;4E(1x&&!j.5O(1x)){k((21 54(\'Q-\'+14)).16(1x.1h||I)){f[14]=1x.4L(1);5k}1x=1x.a6}}k(!f[14]&&!s&&f.5h==14)s=\'\\n\';k(!f[14]&&s)f[14]=j.1f(\'1e\',{1h:\'Q-\'+14,2v:s});k(a4&&f[14]){m o={1m:(14==\'4J\')?\'5w\':\'6H\'};S(m x 35 f[14+\'a3\'])o[x]=f[14+\'a3\'][x];o.4I=f[14];f.4M(o)}}},31:q(3W,1v,2r){m Y=18.2L(3W);m 4w=3W==\'*\'?\'2F\':\'1v\';S(m i=0;i<Y.1b;i++){k(4w==\'1v\'||(18.cz.db(Y[i],"").dh(\'2F\')==\'1E\'||Y[i].ac(\'1n-by\')!=I)){m 2E=Y[i].ac(\'1n-by\');k(1v==\'1Z\'&&2E){2E=2E.2h(\'[\'+f.U+\']\',\'\');Y[i].5g(\'1n-by\',2E);k(!2E)Y[i].F[4w]=Y[i].8c}M k(1v==\'1n\'){m 3o=j.5I(Y[i]);3o.w=Y[i].1z;3o.h=Y[i].1s;k(!f.3Z){m ab=(3o.x+3o.w<2r.x||3o.x>2r.x+2r.w);m aa=(3o.y+3o.h<2r.y||3o.y>2r.y+2r.h)}m 8d=j.8e(Y[i]);k(!ab&&!aa&&8d!=f.U){k(!2E){Y[i].5g(\'1n-by\',\'[\'+f.U+\']\');Y[i].8c=Y[i].F[4w];Y[i].F[4w]=\'1n\'}M k(!2E.1B(\'[\'+f.U+\']\')){Y[i].5g(\'1n-by\',2E+\'[\'+f.U+\']\')}}M k(2E==\'[\'+f.U+\']\'||j.2P==8d){Y[i].5g(\'1n-by\',\'\');Y[i].F[4w]=Y[i].8c||\'\'}M k(2E&&2E.1B(\'[\'+f.U+\']\')){Y[i].5g(\'1n-by\',2E.2h(\'[\'+f.U+\']\',\'\'))}}}}},3F:q(){f.T.F.1J=j.4H++;S(m i=0;i<j.X.1b;i++){k(j.X[i]&&i==j.2P){m 4p=j.X[i];4p.O.1h+=\' Q-\'+4p.2Q+\'-8f\';k(4p.2S){4p.O.F.4B=j.1r?\'ae\':\'8a\';4p.O.1Y=j.W.a5}j.1o(f,\'dF\')}}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7h();M f.55();E}1t{f.3I=21 bl()}1u(e){1t{f.3I=21 ak("bk.a8")}1u(e){1t{f.3I=21 ak("ad.a8")}1u(e){f.7j()}}}m 3c=f;f.3I.aZ=q(){k(3c.3I.6B==4){k(3c.1w)3c.7h();M 3c.55()}};f.3I.ao("b6",f.1a,L);f.3I.bf(I)},7h:q(){j.6f();m 3K=1q.3M||j.a9?{1a:\'ce:bX\'}:I;f.1i=j.1f(\'1i\',3K,{1m:\'2c\',19:\'-3J\'},j.2p);f.55()},55:q(){m s=f.a7||f.3I.bY;k(f.6h)j.6i[f.1a]=s;k(!j.1r||j.3S()>=5.5){s=s.2h(/\\s/g,\' \').2h(21 54(\'<c0[^>]*>\',\'al\'),\'\').2h(21 54(\'<6z[^>]*>.*?</6z>\',\'al\'),\'\');k(f.1i){m 2k=f.1i.7p;k(!2k&&f.1i.59)2k=f.1i.59.18;k(!2k){m 3c=f;26(q(){3c.55()},25);E}2k.ao();2k.aq(s);2k.1V();1t{s=2k.7o(f.1w).2v}1u(e){1t{s=f.1i.18.7o(f.1w).2v}1u(e){}}}M{s=s.2h(21 54(\'^.*?<1d[^>]*>(.*?)</1d>.*?$\',\'i\'),\'$1\')}}j.48(f.O,\'6d\',\'Q-1d\').2v=s;f.36();S(m x 35 f)f[x]=I}};j.7m=q(52){j.51();S(m x 35 52)f[x]=52[x];k(f.7n)f.a1()};j.7m.6c={a1:q(){f.3u=j.1f(\'1e\',{2v:j.7C(j.7R.3u)},I,j.2p);m 5a=[\'3z\',\'2R\',\'2K\',\'1x\',\'2I\',\'Z-2A\',\'1V\'];f.1L={};m 3c=f;S(m i=0;i<5a.1b;i++){f.1L[5a[i]]=j.48(f.3u,\'1D\',\'Q-\'+5a[i]);f.4d(5a[i])}f.1L.2R.F.1A=\'1H\';f.49(\'Z-2A\')},9O:q(){k(f.9G)E;m 5i=f.A.6a(),2f=/6b$/;k(5i==0)f.49(\'2K\');M k(2f.16(f.1L.2K.2L(\'a\')[0].1h))f.4d(\'2K\');k(5i+1==j.44.30[f.2Y||\'1H\'].1b){f.49(\'1x\');f.49(\'3z\')}M k(2f.16(f.1L.1x.2L(\'a\')[0].1h)){f.4d(\'1x\');f.4d(\'3z\')}},4d:q(1L){m 9H=f,a=f.1L[1L].2L(\'a\')[0],2f=/6b$/;a.2o=q(){9H[1L]();E 1k};k(2f.16(a.1h))a.1h=a.1h.2h(2f,\'\')},49:q(1L){m a=f.1L[1L].2L(\'a\')[0];a.2o=q(){E 1k};k(!/6b$/.16(a.1h))a.1h+=\' 6b\'},9I:q(){k(f.3Y)f.2R();M f.3z()},3z:q(9Q){k(f.1L){f.1L.3z.F.1A=\'1H\';f.1L.2R.F.1A=\'\'}f.3Y=L;k(!9Q)j.1x(f.A.U)},2R:q(){k(f.1L){f.1L.2R.F.1A=\'1H\';f.1L.3z.F.1A=\'\'}9X(f.3Y);f.3Y=I},2K:q(){f.2R();j.2K(f.1L.2K)},1x:q(){f.2R();j.1x(f.1L.1x)},2I:q(){},\'Z-2A\':q(){j.3k().7N()},1V:q(){j.1V(f.1L.1V)}};k(18.6B&&j.1r){m 1a=(1q.4s.9V==\'9R:\')?\'://0\':\'5X:c7(0)\';18.aq(\'<6z 14="c5/5X" aQ="aQ" 1a="\'+1a+\'" \'+\'aZ="k (f.6B == \\\'bp\\\') j.av();"\'+\'><\\/6z>\')}j.6E=j.W;m bB=j.4u;j.2G(18,\'6D\',q(e){j.6y={x:e.6m,y:e.6t}});j.2G(18,\'7H\',j.7L);j.2G(18,\'aC\',j.7L);j.2G(1q,\'7K\',j.aE);j.2G(1q,\'7K\',j.aL);j.2G(1q,\'7K\',q(){j.aH=L});j.70();',62,848,'|||||||||||||||this||||hs|if||var||||function||||||||||exp|px|el|span|return|style|min|width|null|setStyles|size|true|else|height|content|to|highslide|last|for|wrapper|key|p1|lang|expanders|els|full||outline|||type||test||document|left|src|length|top|body|div|createElement|Math|className|iframe|p2|false|innerContent|position|hidden|fireEvent|overlay|window|ie|offsetHeight|try|catch|visibility|id|next|slideshow|offsetWidth|display|match|pos|li|auto|img|op|none|overlayBox|zIndex|typeof|btn|outlineType|overlays|justify|tpos|up|arr|appendChild|href|node|close|ss|target|title|visible||new|loading|tgt|params||setTimeout||opacity|from|yp1|parseInt|absolute|class|xp1|re|fade|replace|hsId|undefined|doc|dim|ymin|xmin|onclick|container|isHtml|imgPos|dragArgs|dimmer|yspan|innerHTML|push|objectType|scrollerDiv|xspan|expand|table|event|td|hiddenBy|overflow|addEventListener|ratio|move|upcoming|previous|getElementsByTagName|marginMin|minWidth|image|focusKey|contentType|pause|isImage|offset|100|tb|ajax|page|slideshowGroup|parentNode|groups|showHideElements||||in|onLoad||||yp2|xp2|pThis|clearing|minSpan|case|hasDragged|right|objectLoadTime|outlineWhileAnimating|getExpander|anchor|oDiv|graphic|elPos|clientSpan|setPosition|dir|number|transitions|controls|wDiff|releaseMask|dur|marginMax|play|func|scroll|marginLeft|custom|objectWidth|focus|styles|minHeight|xmlHttp|9999px|attribs|swf|opera|marginBottom|resize|easing|center|round|ieVersion|bottom|navigator|hDiff|tagName|getParam|autoplay|dimmingOpacity||max|sleeping|steps|anchors|trans|fading|clone|getElementByClass|disable|oFinal|crossfade|onload|enable|html|pendingOutlines|iebody|marginTop|name|relative|geckoMac|preserveContent|sizeOverlayBox|fadeBox|allowReduce|blurExp|objectHeight|discardElement|location|cNode|Expander|images|prop|moveOnly|htmls|sg|removeEventListener|cursor|scrollingContent|getParams|while|hideOnMouseOut|mediumContent|zIndexCounter|overlayId|heading|cacheBindings|cloneNode|createOverlay|pageWidth|obj|isClosing|element|contentLoaded|block|credits|parent|showLoading|getNode|pageHeight|minY|area||updateAnchors|options|styleRestoreCursor|RegExp|loadHTML|over|minX|maxX|contentWindow|buttons|safari|250|step|all|ruler|setAttribute|numberPosition|cur|graphicsDir|break|before|maxY|preloadTheseImages|Outline|param|cache|setDimmerSize|scrollTop|scrollLeft|owner|hsPos|above|getPageSize|allowSizeReduction|afterClose|on|isExpanded|val|background|documentElement|destroy|mask|faders|getPosition|dY|tr|dX|preloadFullImage|Id|isHsAnchor|keyHandler|redoShowHide|split|getSrc|imgs|allowWidthReduction|innerHeight|changed|javascript|Ajax|hideSelects|afterExpand|hideIframes|kdeBugCorr|matches|self|dragHandler|onLoadStarted|maincontent|userAgent|ul|getAnchorIndex|disabled|prototype|DIV|innerWidth|init|transitionDuration|pre|cachedGets|writeExtendedContent|rel|currentStyle|clientX|thumbsUserSetId|curW|previousOrNext|marginRight|stl|preventDefault|clientY|slideshows|positionOverlay|tId|topmostKey|mouse|script|fullExpandLabel|readyState|preloadTheseAjax|mousemove|langDefaults|dimmingDuration|os|below|targetY|removeChild|targetX|setSize|border|names|align|maxWidth|getCacheBinding|connectOutline|getAdjacentAnchor|types|onDomReady|continuePreloading|oPos|current|cancelLoading|hasAlphaImageLoader|setClickEvents|filter|overrides|skip|pI||getSelfRendered|tbody|Text|crossfadeStep|contentId|wrapperClassName|expandDuration|Create|prep|doWrapper|clientHeight|getElementContent|xScroll|onError|clientWidth|scrollWidth|Slideshow|useControls|getElementById|contentDocument|yScroll|run|removeAttribute|cacheAjax|getAnchors|topZ|hasMovedMin|active|undim|IFRAME|SELECT|htmlGetSize|replaceLang|allowHeightReduction|offsetTop|Click|arrow|mousedown|setObjContainerSize|padding|load|mouseClickHandler|correctIframeSize|doFullExpand|moveText|closeTitle|closeText|skin|moveTitle|nextText|previousTitle|previousText|nextTitle|fullExpandTitle|preloadAjaxElement|changeSize|keydown|keypress|numberOfImagesToPreload|outlineStartOffset|relatedTarget|distance|swfobject|after|srcElement|fitOverlayBox|pointer|htmlExpand|origProp|wrapperKey|getWrapperKey|blur|garbageBin|restoreCursor|url|restoreTitle|mouseIsOver|allowMultipleInstances|caption|show|getInline|dragByHeading|clones|genOverlayBox|thumbnailId|other|evt|middle|mY|hasFocused|string|mX|swfOptions|idCounter|setAttribs|compatMode|newHeight|clear|hasExtendedContent|attributes|wmode|flashvars|both|enableKeyListener|resizeTitle|headingOverlay|fullExpandText|pauseText|pauseTitle|captionOverlay|tag|scrollHeight|offsetParent|scrollMaxY|scrollMaxX|nopad|playText|playTitle|Play|Pause|Close|JS|Highslide|spacebar|Previous|200|and||Move|Next|offsetLeft|contentWrapper|png|appendTo|preloadGraphic|parseFloat|loadingOpacity|onGraphicLoad|vis|wrapperMouseHandler|modMarginRight|thumb|isDomReady|hide|loadingText|loadingTitle|focusTopmost|args|adj|dimmingGeckoFix|onSetClickEvent|form|hasHtmlexpanders|detachEvent|pow|clickY|clickX|maxHeight|onHideLoading|prepareNextOutline|repeat|sls|hitSpace|preloadNext|toString|500|overlayOptions|initSlideshow|checkFirstAndLast|reuse|wait|https|restoreSteps|htmlPrepareClose|fullExpandPosition|protocol|oldImg|clearTimeout|fullExpandOpacity|crossfadeEnd|newImg|getControls|restoreDuration|Overlay|addOverlay|focusTitle|nextSibling|cachedGet|XMLHTTP|ie6SSL|clearsY|clearsX|getAttribute|Microsoft|hand|creditsTitle|creditsText|creditsHref|sleep|reOrder|ActiveXObject|gi|Eval|abs|open|createFullExpand|write|reuseOverlay||showOverlays|getOverlays|domReady|panel|padToMinWidth|appVersion|gotOverlays|getImageMapAreaCorrection|writeCredits|mouseup|tmpMin|preloadImages|leftpanel|correctRatio|pageLoaded|showCredits|rightpanel|htmlSizeOperations|preloadAjax|vendor|Safari|Gecko|awake|defer|getNumber|BackCompat|destroyObject|KDE|rv|expandSteps|doPanels|fadeInOut|onreadystatechange|easeInOutQuad|easeInQuad|easingClose|keyCode|onAfterGetCaption|onAfterGetHeading|GET|pageXOffset|returnValue|exec|geckodimmer|onDoFullExpand|onDimmerClick|dimming|onCreateFullExpand|send|useOnHtml|onAfterClose|switch|useMap|Msxml2|XMLHttpRequest|onKeyDown|pageYOffset|headingId|complete|click|of|Image|Full|drag|Use|1001|zoomout||graphics|keys|HsExpander|Resize|front|Expand|bring|cancel|Loading|actual|Powered|esc|homepage|the|Go|http|vikjavev|maincontentEval|Macintosh|maincontentText|maincontentId|headingEval|margin|alpha|blank|responseText|MSIE|link|headingText|registerOverlay|shadow|drop|text|no|void|header|captionEval|captionText||captionId|footer|about|button|onInit|wrapperBG|boolean|onAfterExpand|scale|interval|onmouseover|onmouseout|blockRightClick|oncontextmenu|imageCreate|onShowLoading|rect|sizingMethod|AlphaImageLoader|addSlideshow|lineHeight|collapse|borderCollapse|defaultView|cellSpacing|fontSize|onBeforeGetHeading|progid|DXImageTransform|onBeforeGetCaption|outlines|outlinesDir|flushImgSize|htmlCreate|expressInstallSwfurl|floor|version|embedSWF|flash|transparent|circle|toLowerCase|nodeName|300|insertBefore|coords|shape|tmpHeight|allowtransparency|onAfterGetContent|static|525|clip|onBeforeGetContent|onBeforeExpand|fixedControls|getTime|frameborder|Date|reflow|newWidth|getComputedStyle|eval|fromElement|StopPlay|mouseover|onDrag|getPropertyValue|onMouseOver|default|attachEvent|onMouseOut|dragSensitivity|removeSWF|onImageClick|200px|xpand|htmlE|onDrop|white|sqrt|onCreateOverlay|01|onBeforeClose|toElement|onActivate|1px|linearTween|paddingTop|object|onFocus|onBlur'.split('|'),0,{}))

/******************************************************************************
Name:    Highslide JS
Version: 3.3.18 (Apr 30 2008)
Config:  default
Author:  Torstein H?si
Support: http://vikjavev.no/highslide/forum

Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).

You are free:
	* to copy, distribute, display, and perform the work
	* to make derivative works

Under the following conditions:
	* Attribution. You must attribute the work in the manner  specified by  the
	  author or licensor.
	* Noncommercial. You may not use this work for commercial purposes.

* For  any  reuse  or  distribution, you  must make clear to others the license
  terms of this work.
* Any  of  these  conditions  can  be  waived  if  you  get permission from the
  copyright holder.

Your fair use and other rights are in no way affected by the above.
******************************************************************************/

//	초기화 함수
function ActiveBox_initLibrary() {

	hs.graphicsDir = AB_ROOT_DIR;//'/addons/activebox/lib.highslide/images/';
	
	hs.outlineType = 'rounded-white';
	hs.outlineWhileAnimating = "1";
	hs.fadeInOut = false;
	
	hs.captionOverlay.position = "bottom center";
	hs.captionOverlay.opacity = ".7";
	hs.captionOverlay.hideOnMouseOut = true;
	
	hs.fullExpandPosition = "bottom right";
	hs.fullExpandOpacity = ".6";

	//	Tell Highslide to use the thumbnail's title for captions
	hs.captionEval = 'this.thumb.title';
	hs.showCredits = false;
    	hs.dragByHeading = false;
    	hs.lang = { 
	loadingText : 'Loading...',
	loadingTitle : '',
	focusTitle : '',
	fullExpandTitle : '',
	creditsText : '',
	creditsTitle : '',
	restoreTitle : ''
    	};
    	hs.numberOfImagesToPreload = "0";
    	
    	hs.expandSteps = "10"; // number of steps in zoom. Each step lasts for duration/step milliseconds.
    	hs.expandDuration = "250"; // milliseconds
    	hs.restoreSteps = "10";
    	hs.restoreDuration = "250";
}



/*-------------------------------------*
**	TAG INITIALIZE FUNCTION
**	for Highslide
**-------------------------------------*/
//	A = <A> object , B = <IMG> object , c = Caption(.title or .alt attribute)
function ActiveBox_addAttributesToAnchor_Html(A,B,c) {
	A.title=c;
	A.onclick=(function(){return hs.htmlExpand(this,{objectType:'iframe',width:ABpW,height:ABpH});});
}

function ActiveBox_modifyAttributesToAchor_Img(A,B,c) {
	A.title=c;
	A.id='thumb_'+ABsid++;
	A.className='highslide';
	A.onclick=(function(){return hs.expand(this);});
}

function ActiveBox_addAttributesToAchor_Img(A,B,c) {
	A.href=B.src;

	ActiveBox_modifyAttributesToAchor_Img(A,B,c);
}
/**
 * @file   modules/board/js/board.js
 * @author zero (zero@nzeo.com)
 * @brief  board 모듈의 javascript
 **/

/* 글쓰기 작성후 */
function completeDocumentInserted(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];
    var mid = ret_obj['mid'];
    var document_srl = ret_obj['document_srl'];
    var category_srl = ret_obj['category_srl'];

    //alert(message);

    var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
    if(category_srl) url = url.setQuery('category',category_srl);
    location.href = url;
}

/* 글 삭제 */
function completeDeleteDocument(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];
    var mid = ret_obj['mid'];
    var page = ret_obj['page'];

    var url = current_url.setQuery('mid',mid).setQuery('act','').setQuery('document_srl','');
    if(page) url = url.setQuery('page',page);

    //alert(message);

    location.href = url;
}

/* 검색 실행 */
function completeSearch(fo_obj, params) {
    fo_obj.submit();
}

function completeVote(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];
    alert(message);
    location.href = location.href;
}

// 현재 페이지 reload
function completeReload(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];

    location.href = location.href;
}

/* 댓글 글쓰기 작성후 */
function completeInsertComment(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];
    var mid = ret_obj['mid'];
    var document_srl = ret_obj['document_srl'];
    var comment_srl = ret_obj['comment_srl'];

    var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
    if(comment_srl) url = url.setQuery('rnd',comment_srl)+"#comment_"+comment_srl;

    //alert(message);

    location.href = url;
}

/* 댓글 삭제 */
function completeDeleteComment(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];
    var mid = ret_obj['mid'];
    var document_srl = ret_obj['document_srl'];
    var page = ret_obj['page'];

    var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
    if(page) url = url.setQuery('page',page);

    //alert(message);

    location.href = url;
}

/* 트랙백 삭제 */
function completeDeleteTrackback(ret_obj) {
    var error = ret_obj['error'];
    var message = ret_obj['message'];
    var mid = ret_obj['mid'];
    var document_srl = ret_obj['document_srl'];
    var page = ret_obj['page'];

    var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
    if(page) url = url.setQuery('page',page);

    //alert(message);

    location.href = url;
}

/* 카테고리 이동 */
function doChangeCategory() {
    var sel_obj = xGetElementById("board_category");
    var sel_idx = sel_obj.selectedIndex;
    var category_srl = sel_obj.options[sel_idx].value;
    location.href = current_url.setQuery('category',category_srl);
}

/* 스크랩 */
function doScrap(document_srl) {
    var params = new Array();
    params["document_srl"] = document_srl;
    exec_xml("member","procMemberScrapDocument", params, null);
}

function search(fo_obj) {
	var oFilter = new XmlJsFilter(fo_obj, "board", "", completeSearch);
	oFilter.addFieldItem("search_target",true,0,0,"","");
	oFilter.addFieldItem("search_keyword",true,0,40,"","");
	oFilter.addParameterItem("mid","mid");
	oFilter.addParameterItem("search_target","search_target");
	oFilter.addParameterItem("search_keyword","search_keyword");
	oFilter.addResponseItem("error");
	oFilter.addResponseItem("message");
	return oFilter.proc();
}
alertMsg["search_target"] = "검색대상";
alertMsg["search_keyword"] = "검색어";
alertMsg["mid"] = "모듈이름";
target_type_list["search_target"] = "";
target_type_list["search_keyword"] = "";
alertMsg["isnull"] = "%s의 값을 입력해주세요";
alertMsg["outofrange"] = "%s의 글자 길이를 맞추어 주세요.";
alertMsg["equalto"] = "%s의 값이 잘못 되었습니다.";
alertMsg["invalid_email"] = "%s의 형식이 잘못되었습니다. (예: zbxe@zeroboard.com)";
alertMsg["invalid_userid"] = "%s의 형식이 잘못되었습니다.\n영문,숫자와 _로 만드실 수 있으며 제일 앞은 영문이어야 합니다";
alertMsg["invalid_user_id"] = "%s의 형식이 잘못되었습니다.\n영문,숫자와 _로 만드실 수 있으며 제일 앞은 영문이어야 합니다";
alertMsg["invalid_homepage"] = "%s의 형식이 잘못되었습니다. (예: http://www.zeroboard.com)";
alertMsg["invalid_korean"] = "%s의 형식이 잘못되었습니다. 한글로만 입력해주셔야 합니다";
alertMsg["invalid_korean_number"] = "%s의 형식이 잘못되었습니다. 한글과 숫자로만 입력해주셔야 합니다";
alertMsg["invalid_alpha"] = "%s의 형식이 잘못되었습니다. 영문으로만 입력해주셔야 합니다";
alertMsg["invalid_alpha_number"] = "%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해주셔야 합니다";
alertMsg["invalid_number"] = "%s의 형식이 잘못되었습니다. 숫자로만 입력해주셔야 합니다";

// Hide And Show Toggle
var cc=0
function hideShow(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="none";
    } else {
        cc=0
        document.getElementById(id).style.display="block";
    }
}

// Show And Hide Toggle
var cc=0
function showHide(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="block";
    } else {
        cc=0
        document.getElementById(id).style.display="none";
    }
}

// Local Navigation Toggle
function lnbToggle(id) {
	for(num=1; num<=3; num++) document.getElementById('D3MG'+num).style.display='none'; //D4MG1~D4MG3 까지 숨긴 다음
	document.getElementById(id).style.display='block'; //해당 ID만 보임
}

// IS
function chkIsKind(key, value) {
    showHide('selectOrder');
    xGetElementById('search_target'+key).checked = true;
    xInnerHtml('search_target_label', value);
}

