if(typeof String.prototype.trim !== "function") {String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g, "");};}function _conformance() {if(isIE9) {return true;}else if(isIE8) {alert("현재 접속하신 브라우저는 서비스 이용시 일부 호환성의 문제가 있습니다.\n원활한 서비스 이용을 위해서는 최신 버전의 브라우저 사용을 권장합니다.");return true;}else if(isIE7) {alert("현재 접속하신 브라우저는 서비스 이용시 정상적인 서비스 이용이 불가능 합니다.\n최신 버전의 브라우저 사용을 권장합니다.");return false;}return true;}function _scrollHeight() {var ht;ht = $(win).height();if(body[0]) {ht = body.prop("scrollHeight") > ht ? body.prop("scrollHeight") : ht;}if(html[0]) {ht = html.prop("scrollHeight") > ht ? html.prop("scrollHeight") : ht;}return ht;}function _scrollBarWidth() {var inner = $(doc.createElement("p"));inner.css({"width": "100%","height": "200px"});var outer = $(doc.createElement("div"));outer.css({"position": "absolute","top": "0","left": "0","visibility": "hidden","width": "200px","height": "150px","overflow": "hidden"});outer.append(inner);$("body").append(outer);var beforeWD = inner[0].offsetWidth;outer.css("overflow", "scroll");var afterWD = inner[0].offsetWidth;if(beforeWD == afterWD) {afterWD = outer[0].clientWidth;}outer.remove();return (beforeWD - afterWD);}function _winWidth() {return $(win).width() + _scrollBarWidth();}function _alertSwitch(_callBlind, _obj, _msg, _class, _function) {if(_callBlind) {_blind(true, function() {_alert(_obj, _msg, _class, _function);});}else {_alert(_obj, _msg, _class, _function);}}function _confirmSwitch(_callBlind, _msg, _class, _agreeFunction, _disFunction) {if(_callBlind) {_blind(true, function() {_confirm(_msg, _class, _agreeFunction, _disFunction);});}else {_confirm(_msg, _class, _agreeFunction, _disFunction);}}function _download(_dir, _saveName, _realName) {var form = $("#download");var input;if(form[0]) {form.remove();}form = $(doc.createElement("form"));form.attr({"id": "download","encoding": "application/x-www-form-urlencoded","action": "/download","target": "","method": "post"});form.css({"display": "none"});input = $(doc.createElement("input"));input.attr({"type": "hidden","name": "dir","value": _dir});form.append(input);input = $(doc.createElement("input"));input.attr({"type": "hidden","name": "saveName","value": _saveName});form.append(input);input = $(doc.createElement("input"));input.attr({"type": "hidden","name": "realName","value": _realName});form.append(input);$("body").append(form);form[0].submit();form.remove();}function _go(_action) {if(f) {f.encoding = "application/x-www-form-urlencoded";f.method = "post";f.target = "";f.action = _action;f.submit();}else {_alertSwitch(true, null, "올바른 폼 태그 요소가 아닙니다.", "err");}}function _submit(_action, _callBlind) {var iframe = $("#ifrProc");if(iframe[0] && f) {var cnt = $(f).find(":file").size();f.encoding = cnt > 0 ? "multipart/form-data" : "application/x-www-form-urlencoded";f.method = "post";f.target = "ifrProc";f.action = _action;if(_callBlind) {_blind(true);}f.submit();}else {_alertSwitch(true, null, "올바른 폼 태그 요소가 아닙니다.", "err");}}function _resetExecFrame() {var iframe;iframe = $(doc.createElement("iframe"));iframe.attr({"id": "ifrProc","name": "ifrProc"});$("#ifrProc").replaceWith(iframe);}function _checkErrorForAjax(_callHide, _function) {var number = $("input[name='errorNumber']");var message = $("input[name='errorMessage']");if(number[0] && message[0]) {if(number.val() == "21") {alert("회원 정보 조회에 실패했습니다.\n로그인 후 이용가능 합니다.");loc.href = "/";}else {_alertSwitch(true, null, message.val(), "err", _function);}}else {if(_callHide) {_blind(false);}}}function _lockdown(_obj, _name, _e, _callBlind, _function) {if(_e.keyCode != 9 && _e.keyCode != 17) {_alertSwitch(_callBlind, _obj, "%s은(는) 수정하실 수 없습니다.", "err", _function);if(_e.preventDefault) {_e.preventDefault();}else {_e.returnValue = false;}}}function _checkValueForText(_obj, _name, _callBlind, _function) {if(_obj.name == "edtCont") {var instance = CKEDITOR.instances.edtCont;if(instance) {var data = instance.getData();if(data.replace(/\s/g,"").length < 1) {_alertSwitch(_callBlind, null, "%s을(를) 입력해 주세요.".replace("%s", _name),"err", function() {instance.focus();if(typeof(_function) == "function") {_function();}});return false;}_obj.value = data;return true;}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}else {if(_obj) {if(_obj.value.replace(/\s/g,"").length < 1) {_alertSwitch(_callBlind, _obj, "%s을(를) 입력해 주세요.".replace("%s", _name),"err", _function);return false;}return true;}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}}function _checkValueForSelect(_obj, _name, _callBlind, _function) {if(_obj) {if(_obj.value.replace(/\s/g,"").length < 1) {_alertSwitch(_callBlind, _obj, "%s을(를) 선택해 주세요.".replace("%s", _name),"err", _function);return false;}return true;}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _checkValueForRadio(_objName, _name, _callBlind, _function) {var objs = doc.getElementsByName(_objName);if(objs && objs.length > 0) {for(var i = 0; i < objs.length; i++) {if(objs[i].checked) {return true;}}_alertSwitch(_callBlind, objs[0], "%s을(를) 선택해 주세요.".replace("%s", _name),"err", _function);return false;}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _verifyValues(_objs, _types, _names, _callBlind, _function) {if(_objs.length != _types.length || _objs.length != _names.length) {_alertSwitch(_callBlind, null, "처리 중 문제가 발생했습니다.
잠시 후 다시 시도해 주세요.", "err", _function);return false;}for(var i = 0; i < _objs.length; i++) {if(_types[i] == "TT") {if(!_checkValueForText(_objs[i], _names[i], _callBlind, _function)) {return false;}}else if(_types[i] == "ST") {if(!_checkValueForSelect(_objs[i], _names[i], _callBlind, _function)) {return false;}}else if(_types[i] == "RCX") {if(!_checkValueForRadio(_objs[i].name, _names[i], _callBlind, _function)) {return false;}}}return true;}function _onlyNumbers(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[0-9]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "숫자만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyNumbersAndPeriod(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[0-9.]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "숫자만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyNumbersAndComma(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[0-9,]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "숫자만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyNumbersAndHyphen(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[0-9-]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "' - ' 기호 또는 숫자만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyNumbersAndSharp(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[0-9#]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "' # ' 기호 또는 숫자만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyNumbersAndENG(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[_a-zA-Z0-9-]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "영문 또는 숫자만 입력 가능합니다. ", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyNumbersAndENGAllowSpace(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[_a-zA-Z0-9-\s]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "영문 또는 숫자만 입력 가능합니다. ", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyKORAndENG(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[가-힣ㄱ-ㅎㅏ-ㅣa-zA-Z]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "한글 또는 영문만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyKORAndENGAllowSpace(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[가-힣ㄱ-ㅎㅏ-ㅣa-zA-Z\s]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "한글 또는 영문만 입력 가능합니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _onlyEmailCharacter(_obj, _callBlind, _function) {if(_obj) {var pattern = /^[_a-zA-Z0-9-.@]+$/;var str = _obj.value;if(str.length > 0 && !pattern.test(str)) {_alertSwitch(_callBlind, _obj, "잘못된 %s 입니다.", "err", _function);}}else {_alertSwitch(_callBlind, null, "올바른 폼 태그 요소가 아닙니다.", "err", _function);}}function _convertZero(_obj, _e) {if(_obj) {if(_obj.readOnly) {return;}var evt = _e ? _e : win.event;if(evt.type.toLowerCase() == "focus" && eval(_obj.value.replace(/\s/g, "")) == 0) {_obj.value = "";}else if(evt.type.toLowerCase() == "blur" && _obj.value.replace(/\s/g, "").length < 1) {_obj.value = "0";}}}function _addNumberCommas(_obj) {if(_obj) {_obj.value = _obj.value.toString().replace(/[,]/g, "");if(_obj.value.indexOf(".") > -1) {var natural = _obj.value.toString().substring(0, _obj.value.indexOf("."));var decimal = _obj.value.toString().substring(_obj.value.indexOf(".") + 1, _obj.value.toString().length).replace(/[.]/g, "");_obj.value = natural.replace(/\B(?=(\d{3})+(?!\d))/g, ",") + "." + decimal;}else {_obj.value = _obj.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");}}}function _replaceEscapeChar(_value) {if(_value.replace(/\s/g, "").length > 0) {_value = _value.replace(/[&]/g, "&");_value = _value.replace(/[<]/g, "<");_value = _value.replace(/[>]/g, ">");_value = _value.replace(/["]/g, """);_value = _value.replace(/[']/g, "'");}return _value;}function _replaceUnescapeChar(_value) {if(_value.replace(/\s/g, "").length > 0) {_value = _value.replace(/&/g, "&");_value = _value.replace(/</g, "<");_value = _value.replace(/>/g, ">");_value = _value.replace(/"/g, "\"");_value = _value.replace(/'/g, "'");}return _value;}function _replaceMoneyFormat(_value) {if(_value.toString().replace(/\s/g, "").length > 0) {_value = _value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");}return _value;}function _selectRadioValue(_objs, _value) {if(_objs) {for(var i = 0; i < _objs.length; i++) {if(_objs[i].value == _value) {_objs[i].checked = true;}}}}function _setEmailDomain(_obj, _value) {if(_obj) {if(_value == "_self") {_obj.style.display = "inline";_obj.value = "";_obj.focus();}else {_obj.style.display = "none";_obj.value = _value;}}}function _insertWord(_obj, _value) {if(_obj && _value.length > 0) {var value = _obj.value;var start = _obj.selectionStart;var end = _obj.selectionEnd;if(!start && !end && doc.selection) {var bookmark = doc.selection.createRange().getBookmark();_obj.selection = _obj.createTextRange();_obj.selection.moveToBookmark(bookmark);_obj.selectLeft = _obj.createTextRange();_obj.selectLeft.collapse(true);_obj.selectLeft.setEndPoint("EndToStart", _obj.selection);start = _obj.selectLeft.text.length;end = _obj.selectLeft.text.length + _obj.selection.text.length;_obj.value = value.substring(0, start) + _value + value.substring(end);_obj.selection.move("character", start + 1);_obj.selection.select();}else {_obj.value = value.substring(0, start) + _value + value.substring(end);_obj.selectionStart = _obj.selectionEnd = start + 1;}}}function _insertTabWord(_obj, _e) {var keyCode = _e.keyCode ? _e.keyCode : _e.charCode ? _e.charCode : _e.which;if(keyCode == 9) {var value = _obj.value;var start = _obj.selectionStart;var end = _obj.selectionEnd;if(!start && !end && doc.selection) {var bookmark = doc.selection.createRange().getBookmark();_obj.selection = _obj.createTextRange();_obj.selection.moveToBookmark(bookmark);_obj.selectLeft = _obj.createTextRange();_obj.selectLeft.collapse(true);_obj.selectLeft.setEndPoint("EndToStart", _obj.selection);start = _obj.selectLeft.text.length;end = _obj.selectLeft.text.length + _obj.selection.text.length;_obj.value = value.substring(0, start) + "\t" + value.substring(end);_obj.selection.move("character", start + 1);_obj.selection.select();}else {_obj.value = value.substring(0, start) + "\t" + value.substring(end);_obj.selectionStart = _obj.selectionEnd = start + 1;}if(_e.preventDefault) {_e.preventDefault();}else {_e.returnValue = false;}return false;}}function _getNodeIndex(_doc, _obj) {if(_obj != null) {var objs = _doc.getElementsByName(_obj.name);if(objs) {for(var i = 0; i < objs.length; i++) {if(_obj == objs[i]) {return i;}}}}return -1;}function _getCheckedValue(_objs) {if(_objs) {for(var i = 0; i < _objs.length; i++) {if(_objs[i].checked) {return _objs[i].value;}}}}function _getTextForAjax(_responseText) {if(_responseText.indexOf(" -1) {return _responseText;}return _responseText.toString().replace(/\r/g, "").replace(/\n/g, "").replace(/\t/g, "");}function _setCookie(_name, _value, _expireday, _close) {var expire = new Date();expire.setDate(expire.getDate() + _expireday);document.cookie = _name + "=" + _value + "; path=/; expires=" + expire.toGMTString() + ";";if(_close) {self.close();}}function _getCookieValue(_name) {var begin = doc.cookie.indexOf(_name);var value = "";if(begin > -1) {begin += _name.length + 1;var end = doc.cookie.indexOf(";", begin) == -1 ? doc.cookie.length : doc.cookie.indexOf(";", begin);value = doc.cookie.substring(begin, end);}return unescape(value);}function _copyClipboard(_value, _callBlind, _function) {if(agent.indexOf("msie") > -1) {win.clipboardData.setData("Text", _value);_alertSwitch(_callBlind, null, "클립보드에 복사되었습니다.
Ctrl + V 키로 붙여넣기가 가능합니다.", "err", _function);}else {prompt("하단의 문자열을 Ctrl + C 키로 복사 하시면\nCtrl + V 키로 붙여넣기가 가능합니다.", _value);}}function _showNotification(_title) {if("Notification" in win) {if(Notification.permission === "granted") {var noti = new Notification(_title);_closeNotification(noti);}else if(Notification.permission !== "denied") {Notification.requestPermission(function (permission) {if(!("permission" in Notification)) {Notification.permission = permission;}if(permission === "granted") {var noti = new Notification(_title);_closeNotification(noti);}});}}}function _closeNotification(_noti) {if(_noti) {setTimeout(function() {_noti.close();}, 1000);}}