/**
 * @author Lee Yeong Cheon
 * @version 1.01, 07/12/13
 * @since javascript 1.5
 */

  // Message Define
  var Message = {
    deniedWinOpen   : "웹브라우저가 이 사이트에서 팝업창을 차단하였습니다.",
    XMLHttpRequest  : { nonSupported : "XMLHttpRequest를 지원하지 않는 브라우저 입니다." },
    validation      : { Require             : "%S 항목은 필수 입력 항목 입니다.",
                        NotSpace            : "%S 항목은 공백을 사용 할 수 없습니다.",
                        NotNumber           : "%S 항목은 숫자를 사용 할 수 없습니다.",
                        NotKorean           : "%S 항목은 한글을 사용 할 수 없습니다.",
                        NotEnglish          : "%S 항목은 영문을 사용 할 수 없습니다.",
                        NotSpecial          : "%S 항목은 특수문자를 사용 할 수 없습니다.",
                        Length              : "%S 항목은 %S자 이상 %S자 이하로 입력해야 합니다.",
                        MinLength           : "%S 항목은 %S자 이상 입력해야 합니다.",
                        EquLength           : "%S 항목은 %S자를 입력해야 합니다.",
                        MaxLengthError      : "%S 항목은 %S자 이하로 입력해야 합니다.",
                        //LengthRangeError    : "%S 항목의 minlength 속성의 값은 0보다 크거나 같은 양의 정수이고,\nmaxlength 보다 작거나 같아야 합니다.",
                        MinLengthError      : "%S 항목의 minlength 속성의 값은 0보다 크거나 같은 양의 정수이어야 합니다.",
                        RRN                 : "%S 항목은 유효하지 않은 주민등록번호입니다.",
                        Regexp              : "%S 항목은 형식이 맞지 않습니다.",
                        Prefix              : "%S 항목은 %S 로 시작해야 합니다." ,
                        Suffix              : "%S 항목은 %S 로 끝나야 합니다." ,
                        Space               : "%S 항목은 공백만 사용 할 수 있습니다.",
                        Number              : "%S 항목은 숫자만 사용 할 수 있습니다.",
                        Korean              : "%S 항목은 한글만 사용 할 수 있습니다.",
                        English             : "%S 항목은 영문자만 사용 할 수 있습니다.",
                        Special             : "%S 항목은 특수문자만 사용 할 수 있습니다.",
                        Word                : "%S 항목은 문단 구성 문자(공백, 숫자, 한글, 영문)로 이루어진 문자만 사용 할 수 있습니다.",
                        Other               : "%S 항목은 %S 만 사용 할 수 있습니다.",
                        NotLogin            : "로그인되지 않았습니다. 로그인후 사용해 주십시요." }
  }

  // Key Code Define
  var Key = {
    BACKSPACE : 8,
    TAB       : 9,
    ENTER     : 13,
    SHIFT     : 16,
    LCTRL     : 17,
    LALT      : 18,
    RALT      : 21,
    RCTRL     : 25,
    ESC       : 27,
    FS        : 28,
    GS        : 29,
    RS        : 30,
    US        : 31,
    SPACE     : 32,
    PAGEUP    : 33,
    PAGEDOWN  : 34,
    END       : 35,
    HOME      : 36,
    LEFT      : 37,
    UP        : 38,
    RIGHT     : 39,
    DOWN      : 40,
    INSERT    : 45,
    DELETE    : 46,
    F5        : 116
  }

  // Mouse Code Define
  var Mouse = {
    LEFT      : 1,
    RIGHT     : window.ActiveXObject ? 2 : 3,
    CENTER    : window.ActiveXObject ? 4 : 2
  }

  // Character Reference Define
  var Char = {
    NULL      : String.fromCharCode("0"),   // \u0000 null
    SOH       : String.fromCharCode("1"),   // \u0001 start of heading
    STX       : String.fromCharCode("2"),   // \u0002 start of text
    ETX       : String.fromCharCode("3"),   // \u0003 end of text
    EOT       : String.fromCharCode("4"),   // \u0004 end of transmission
    ENQ       : String.fromCharCode("5"),   // \u0005 enquiry
    ACK       : String.fromCharCode("6"),   // \u0006 acknowledge
    BEL       : String.fromCharCode("7"),   // \u0007 bel
    BS        : String.fromCharCode("8"),   // \u0008 backspace
    TAB       : String.fromCharCode("9"),   // \u0009 horizontal tab
    LF        : String.fromCharCode("10"),  // \u000A NL line feed, new line
    VT        : String.fromCharCode("11"),  // \u000B vertical tab
    FF        : String.fromCharCode("12"),  // \u000C NP form feed, new page
    CR        : String.fromCharCode("13"),  // \u000D carriage Return
    SO        : String.fromCharCode("14"),  // \u000E shift out
    SI        : String.fromCharCode("15"),  // \u000F shift in
    DLE       : String.fromCharCode("16"),  // \u0010 data link escape
    DC1       : String.fromCharCode("17"),  // \u0011 device control 1
    DC2       : String.fromCharCode("18"),  // \u0012 device control 2
    DC3       : String.fromCharCode("19"),  // \u0013 device control 3
    DC4       : String.fromCharCode("20"),  // \u0014 device control 4
    NAK       : String.fromCharCode("21"),  // \u0015 negative acknowledge
    SYN       : String.fromCharCode("22"),  // \u0016 synchronous idle
    ETB       : String.fromCharCode("23"),  // \u0017 end of trans. block
    CAN       : String.fromCharCode("24"),  // \u0018 cancel
    EM        : String.fromCharCode("25"),  // \u0019 end of medium
    SUB       : String.fromCharCode("26"),  // \u001A substitute
    ESC       : String.fromCharCode("27"),  // \u001B escape
    FS        : String.fromCharCode("28"),  // \u001C file separator
    GS        : String.fromCharCode("29"),  // \u001D group separator
    RS        : String.fromCharCode("30"),  // \u001E record separator
    US        : String.fromCharCode("31"),  // \u001F unit separator
    SPACE     : String.fromCharCode("32")   // \u0020 space
  }

  // FF, Opera to MSIE event property binding
  function EventHandler(event) {
    window.event.x = event.pageX;
    window.event.y = event.pageY;
    window.event.clientX = event.pageX;
    window.event.clientY = event.pageY;
    window.event.screenX = event.screenX;
    window.event.screenY = event.screenY;
    window.event.offsetX = event.offsetX ? event.offsetX : event.layerX;
    window.event.offsetY = event.offsetY ? event.offsetY : event.layerY;
    window.event.type = event.type;
    window.event.button = event.which;
    window.event.keyCode = event.which;
    window.event.srcElement = event.target;
  }

  // MSIE, FF, Opera Event 객체  호환 설정
  if(!window.event && window.captureEvents) {
    window.event = new Object;
    document.addEventListener("mousemove", EventHandler, false);
    document.addEventListener("mouseover", EventHandler, false);
    document.addEventListener("mouseout", EventHandler, false);
    document.addEventListener("mousedown", EventHandler, false);
    document.addEventListener("mouseup", EventHandler, false);
    document.addEventListener("click", EventHandler, false);
    document.addEventListener("dblclick", EventHandler, false);
    window.addEventListener("keypress", EventHandler, false);
    window.addEventListener("keydown", EventHandler, false);
    window.addEventListener("keyup", EventHandler, false);
  }

  window.onbeforeunload = function() {
    __flash_unloadHandler = function() {
      externalProbSet = true;
      obj = document.getElementsByTagName("OBJECT");
      for (i=0;i<obj.length;i++){
        var theObj = eval(obj[i]);
        theObj.style.display = "none";
        for (var prop in theObj){
          if (typeof(theObj[prop]) == "function"){
            theObj[prop]=null;
          }
        }
      }
    }
    if (window.onunload != __flash_unloadHandler){
      __flash_savedUnloadHandler = window.onunload;
      window.onunload = __flash_unloadHandler;
    }
  }