document.write(''); document.write(''); /** * ´Ù±¹¾î alert() ¸Þ¼¼Áö¸¦ Ãâ·Â * ex : i18nAlert('I18NUtil.getLabel(localeCode, "IBA00001","°³º°1ȸÀÌüÇѵµ±Ý¾×ÀÌ ÃÊ°úÇÏ¿´½À´Ï´Ù.")') (½ºÅ©¸³Æ²¸´ÀÓ.) * @param msg : ´Ù±¹¾î ¸Þ¼¼Áö * @return : alert(msg) ¸Þ¼¼Áö */ function i18nAlert(msg, form, field, fldClear){ var alertElem = document.createElement("span"); alertElem.innerHTML = msg; if ("" == alertElem.outerText || null == alertElem.outerText || "undefined" == alertElem.outerText){ uf_alert(msg, 401, 206, form, field, fldClear); }else{ uf_alert(alertElem.outerText, 401, 206, form, field, fldClear); } } /** * ´Ù±¹¾î confirm() ¸Þ¼¼Áö¸¦ Ãâ·Â * ex : i18nConfirm('I18NUtil.getLabel(localeCode, "COA00001","¼öÁ¤ÇϽðڽÀ´Ï±î?")') (½ºÅ©¸³Æ²¸´ÀÓ.) * @param msg : ´Ù±¹¾î ¸Þ¼¼Áö * @return : alert(msg) ¸Þ¼¼Áö */ function i18nConfirm(msg){ var confirmElem = document.createElement("span"); confirmElem.innerHTML = msg; if ("" == confirmElem.outerText || null == confirmElem.outerText || "undefined" == confirmElem.outerText){ return confirm(msg); }else{ return confirm(confirmElem.outerText); } } //----------------------------------- ÆäÀÌÁö initialize °ü·Ã ÇÔ¼ö ½ÃÀÛ ------------------------------------------------// /** * html ÆäÀÌÁö ·ÎµùÈÄ ÃÖÃÊ ½ÇÇàÇÏ´Â ½ºÅ©¸³Æ®. */ initializeHtmlPage(); /** * ÃÖÃÊ ·Îµù½Ã ÆäÀÌÁö Ãʱ⠼³Á¤ */ function initializeHtmlPage() { for ( var i = 0 ; i < document.forms.length ; i++) { document.forms[i].initialize = initializeHtmlForm; document.forms[i].initialize(); } // a ÅÂ±× "#" º¯°æó¸®. 2008.10.30 À¥Äɽà ÀÌÀçÈ£ //var elemLinks = document.all.tags('A'); var elemLinks = $('a'); for (var idxLink=0; idxLink < elemLinks.length; idxLink++) { var obj = elemLinks[idxLink]; var link = obj.href; if(link.substring(link.length-1) == "#") obj.href = "#_dummy"; } // ¿¹±ÝÆÝµå ±ÝÀ¶»óÇ°¸ô »óÇ°Á¤º¸ÀÇ ÅÂ±× ¾Èº¸ÀÌ°Ô... /*var caps = document.all.tags('CAPTION'); for(i=0; i < caps.length; i++){ var obj = caps[i]; obj.style.display = 'none'; }*/ } /** * È£ÃâµÈ Æû¸¶´Ù ¼ÂÆÃÇϱâ. *
initialize½Ã ¼ÂÆÃÇÏ´Â Á¤º¸ : Çʼö ¿ä¼Ò(css),mask,letter type */ function initializeHtmlForm() { //spiderSubmit ÇÒ´ç //this.spiderSubmit = formSubmitValidation; this.spiderSubmit = formSubmit; this.submitstat = "false"; // ÀÔ·ÂÇʵå ÇϳªÀÎ °æ¿ì ¿£ÅÍÅ° ÀԷ½à ¸®·Îµå ¹æÁö try{ var dummy_e = document.createElement("input"); dummy_e.setAttribute("type", "text"); dummy_e.setAttribute("name", "_DUMMY_INPUT"); dummy_e.setAttribute("title", "_DUMMY_INPUT"); dummy_e.style.display = "none"; this.appendChild(dummy_e); }catch(e){} for (var i = 0 ; i < this.elements.length ; i++) { if ($(this.elements[i]).is('input')) { //mask°¡ ÀÖÀ»°æ¿ì #Àº °ªÀ» ÀǹÌÇÔ. if (this.elements[i].getAttribute("maskform") != undefined && this.elements[i].getAttribute("maskform") != "") { if(this.elements[i].getAttribute("maskform") != "usermask") initSetMaskUp(this.elements[i]);//mask ŸÀÔ(ex : ####/##/## , ####-##-## , ######-####### , ###-##-##### , ...) } //¹®ÀÚ Å¸ÀÔÀÌ ÀÖÀ»°æ¿ì if (this.elements[i].getAttribute("chartype") != undefined) { initSetLetterType(this.elements[i]);//¹®ÀÚ ¼Â(english,korean,english+number, number, floatmoney,int)ŸÀÔ } //¼Ó¼ºÀÌ ÀÖÀ»°æ¿ì if ( this.elements[i].getAttribute("disablecss") != undefined) { initSetAttribute(this.elements[i]); } //uppercase°¡ ÀÖÀ» °æ¿ì if (this.elements[i].getAttribute("uppercase") != undefined){ if(this.elements[i].getAttribute("chartype") == undefined){ $(this.elements[i]).bind('keyup', function(){ this.value=this.value.toUpperCase(); }); } } //lowercase°¡ ÀÖÀ» °æ¿ì if (this.elements[i].getAttribute("lowercase") != undefined){ if(this.elements[i].getAttribute("chartype") == undefined){ initSetUpperLower(this.elements[i]) } } } if(this.elements[i].onkeyup == undefined){ this.elements[i].onkeyup = setOverSetFocus; } } } /** * uppercase, lowercase ¼³Á¤½Ã keyPress½Ã À̺¥Æ® ¹ß»ý. */ function initSetUpperLower(elem) { /* if(elem.onkeypress == undefined){ elem.onkeypress = setUpperLowerCase; } */ if($(elem).attr("onkeypress") == undefined){ $(elem).bind('keypress', function(){ setUpperLowerCase(); }); } } function setUpperLowerCase() { var pKey = String.fromCharCode(event.keyCode); if($(event.srcElement).attr('uppercase') != undefined) { if(event.keyCode >= 97 && event.keyCode <= 122){ //event.srcElement.value = (event.srcElement.value + pKey).toUpperCase(); event.srcElement.value = event.srcElement.value.toUpperCase(); //event.returnValue=false; } } if($(event.srcElement).attr('lowercase') != undefined) { if(event.keyCode >= 65 && event.keyCode <= 90){ //event.srcElement.value = (event.srcElement.value + pKey).toLowerCase(); event.srcElement.value = event.srcElement.value.toLowerCase(); //event.returnValue=false; } } } /** * maxLength, maxbyte ¼³Á¤½Ã keyUp½Ã À̺¥Æ® ¹ß»ý. */ function initSetMaxLength(elem) { if(elem.onkeyup == undefined){ elem.onkeyup = setOverSetFocus; } } /** * maxLength, maxbyte ¼³Á¤½Ã ÃÖ´ë°ªº¸´Ù ´õ µé¾î¿ÔÀ»½Ã ÀÚµ¿ Æ÷Ä¿½º À̵¿. *
ex : setOverSetFocus() */ function setOverSetFocus() { //this °³Ã¼°¡ ¼ÓÇÑ ÆûÀ̸§ °¡Á®¿À±â var thisFrm = eval(this.parentElement); while("form" != thisFrm.tagName.toString().toLowerCase()) { thisFrm = eval(thisFrm.parentElement); } var nextFocus = this; var eleValue = this.value; //´ÙÀ½ Æ÷Ä¿½º Ÿ°Ù °¡Á®¿À±â. for (var i = 0 ; i < thisFrm.elements.length ; i++) { if ($(this).attr('auto-fcs') != undefined && $(this).attr('auto-fcs')=='no') break; //ÇöÀç this°ªÀÌ ¼±ÅÃµÈ elementsÀÌ¸é ´ÙÀ½À¸·Î À̵¿µÉ Æ÷Ä¿½º¸¦ °¡Á®¿À±â À§ÇÑ ·ÎÁ÷¼öÇà. if(this == thisFrm.elements[i]) { if(thisFrm.elements[i].nextfocus != undefined && thisFrm[thisFrm.elements[i].nextfocus] != undefined) { //nextfocus ¼Ó¼ºÀÌ ÀÖÀ»°æ¿ì nextfocus°ªÀ» ´ÙÀ½ Æ÷Ä¿½º·Î Àâ´Â´Ù. nextFocus = thisFrm[thisFrm.elements[i].nextfocus]; break; } //elements°¡ undefined µÉ¶§ ±îÁö ¼öÇàÇÔ. while(thisFrm.elements[++i] != undefined) { //ÇöÀç elementsÀÇ ºÎ¸ðÁßÀÇ ¼Ó¼ºÀÌ display = noneÀÌ¸é ´ÙÀ½ Æ÷Ä¿½º Ÿ°ÙÀ» °¡Á®¿Â´Ù. var targetCursor = eval(thisFrm.elements[i].parentElement); while("form" != targetCursor.tagName.toString().toLowerCase()) { if(targetCursor.parentElement.style.display == "none") break; targetCursor = eval(targetCursor.parentElement); } if(targetCursor.parentElement.style.display == "none") continue; //elementsŸÀÔÀÌ input (text,radio,checkbox), textarea, select ÀÏ°æ¿ì ´ÙÀ½ Æ÷Ä¿½º objÀúÀå. // /ibs/jsp/common/com_tranpwdreg_i.jsp¿¡¼­ ½ÃÅ©¸´Æ® Ä«µå ÀÔ·ÂÇÏ´Â ºÎºÐ¿¡ display°¡ noneÀÎ °æ¿ì Á¦¿Ü (style = "tx h") if(thisFrm.elements[i].tagName.toString().toLowerCase() == "input" && ((thisFrm.elements[i].type == "text" && thisFrm.elements[i].className != "tx h" )|| ( thisFrm.elements[i].type == "password" && thisFrm.elements[i].className != "tx h" )) || (thisFrm.elements[i].tagName.toString().toLowerCase() == "textarea" && thisFrm.elements[i].className != "tx h" )|| (thisFrm.elements[i].tagName.toString().toLowerCase() == "select" && thisFrm.elements[i].className != "tx h" )) { // nextFocus °´Ã¼°¡ È°¼ºÈ­ µÇÁö ¾ÊÀº »óÅÂÀÌ¸é ´ÙÀ½ °´Ã¼·Î.... if(!(thisFrm.elements[i].disabled==true || thisFrm.elements[i].readonly != undefined || thisFrm.elements[i].style.display == "none")){ nextFocus = thisFrm.elements[i]; break; } } } } } if(nextFocus == this) this.autoTab = "off"; // ¿£ÅÍÅ° ÀԷ½à ó¸®. ´ÙÀ½Æ÷Ä¿½º·ÎÀ̵¿. ´ÙÀ½ Æ÷Ä¿½º ¾øÀ»°æ¿ì ¼­ºê¹Ô. //Æ÷Ä¿½º À̵¿. maxLength 2147483647Àº maxLengthÀÇ °ªÀ» ÁÖÁö ¾Ê¾ÒÀ»°æ¿ì ±âº»ÀûÀ¸·Î ÁÖ´Â ÃÖ´ë°ª. if(($(this).attr('maxbyte') != undefined && $(this).attr('maxbyte') != "undefined") && ($(this).attr('maxLength') != undefined && $(this).attr('maxLength') != "undefined") ) { //1. maxbyte¿Í maxLength¸¦ µÑ´Ù ¼±Åà ÇÏ¿´À»¶§.. if((this.maxLength < this.value.length) || ($(this).attr('maxbyte') < calculate_msglen(this.value))) { this.blur(); this.value = ""; this.focus(); this.value = cutStringToByte(eleValue, $(this).attr('maxbyte')); } }else if(($(this).attr('maxbyte') == undefined || $(this).attr('maxbyte') == "undefined") && ($(this).attr('maxLength') != undefined && $(this).attr('maxLength') != "undefined")) { //2. maxLength¸¸ ¼³Á¤ÇßÀ»¶§.. //ÇѱÛÀÌ Æ÷ÇÔµÈ chartype°æ¿ì´Â maxLength-2 °ªÀ» ³Ñ±ä´Ù. 20080721 ±èÀç¹ü Ãß°¡. if($(this).attr("chartype") == "kor" || $(this).attr("chartype") == "kornum" || $(this).attr("chartype") == "koreng" || $(this).attr("chartype") == "korengnum") { var _maxlen = this.maxLength-2; if(this.getAttribute("fullchar") == "false") _maxlen = this.maxLength; if((this.getAttribute("fullchar") == "false" && _maxlen < calculate_msglen(this.value)) || (this.getAttribute("fullchar") != "false" && (_maxlen/2) < this.value.length)){ this.blur(); this.value = ""; this.focus(); if(this.getAttribute("fullchar") == "false") this.value = cutStringToByte(eleValue, _maxlen); else this.value = eleValue.substring(0,(this.maxLength-2)/2); } } else if(this.maxLength <= this.value.length) { this.value = eleValue.substring(0, this.maxLength); } }else if(($(this).attr('maxbyte') != undefined || $(this).attr('maxbyte') != "undefined") && this.maxLength == 2147483647) { //3. maxByte¸¸ ¼³Á¤ÇßÀ»¶§.. if($(this).attr('maxbyte') < calculate_msglen(this.value) ) { this.blur(); this.value = ""; this.focus(); this.value = cutStringToByte(eleValue, $(this).attr('maxbyte')); } } if($(this).attr('chartype') == "money") this.value = changeIntMoneyType(this.value); if($(this).attr('chartype') == "floatmoney") this.value = changeIntFloatMoneyType(this.value); } /** * ¹®ÀÚ¿­À» Byte±æÀÌ·Î À߶ó¿È. *
ex : cutStringToByte(form1.name.value, bytelength) * @param strValue : ¹ÙÀÌÆ® ±æÀÌ·Î ÀÚ¸¦ ¹®ÀÚ¿­ * @param cutByte : ¹ÙÀÌÆ® ±æÀÌ */ function cutStringToByte(strValue,cutByte) { var sumLength = 0; var resultStr = ""; for(var i= 0;i < strValue.length; i++) { if( escape(strValue.charAt(i)).length > 3 ) { strLength = 2; } else if (strValue.charAt(i) == '<' || strValue.charAt(i) == '>') { strLength = 4; } else { strLength = 1 ; } if ( cutByte < (sumLength + strLength) ) { break; } sumLength += strLength; resultStr += strValue.charAt(i); } return resultStr; } /** * ¼Ó¼º¿¡ µû¸¥ inputâ »óÅ ¼ÂÆÃ. *
ex : initSetAttribute(form1.name) * @param elem : À̺¥Æ®¸¦ ¼ÂÆÃÇÒ element */ function initSetAttribute(elem) { if (elem.disablecss == "true") { elem.disabled = true; if(elem.type.toString().toLowerCase() == "text") { elem.className = "frameworkDisabled"; } } } /** * ¼ýÀÚ¿­ ¸¶½ºÅ© ¾º¿ì±â *
ex : initSetMaskUp(form1.name) * @param elem : ¸¶½ºÅ©¸¦ ¼ÂÆÃÇÒ element */ function initSetMaskUp(elem) { elem.onkeypress = setKeyInputNumberOnly; if(elem.onfocus == undefined) elem.onfocus = filterGetNumberOnly; if(elem.onblur == undefined) elem.onblur = setInitMaskUp; } /** * ÁֹΠ»ç¾÷ÀÚ ¹øÈ£ onkeyupÀ̺¥Æ®½Ã ¸¶½ºÅ© ¾º¿ì±â *
ex : psnCrnMaskup(form1.name) * @param elem : ¸¶½ºÅ©¸¦ ¼ÂÆÃÇÒ element */ function psnCrnMaskup(elem) { var data = getOnlyNumberFormat(elem.value); elem.value = data; if(data.length <= 6) { return; } else if(data.length > 6 && data.length <= 7) { elem.value = data.substr(0,6) + "-" + data.substring(6); } else if (data.length > 7 && data.length <= 10) { elem.value = data.substr(0,3) + "-" + data.substr(3,2) + "-" + data.substring(5); } else if (data.length > 10 && data.length <= 13) { elem.value = data.substr(0,6) + "-" + data.substring(6); } else if(data.length > 13) { elem.value = data.substr(0,6) + "-" + data.substr(6,7); } } /** * ÆäÀÌÁö ÃʱâÈ­½Ã¿¡ onfocus À̺¥Æ®¿¡ ÇÒ´çµÇ¸é ÀÌ Elemnent¿¡ ¼ýÀÚ¿ÜÀÇ ¹®ÀÚ("," , "/" , "-")´Â focus½Ã¿¡ Á¦°ÅµÊ */ function filterGetNumberOnly() { this.value = getOnlyNumberFormat(this.value); this.select(); } /** * ¹®ÀÚ¿­¿¡¼­ ¼ýÀÚ¸¸ »©¿À±â üũ ·ÎÁ÷ * ex : getOnlyNumberFormat(form1.name.value) * @param sv : º¯È¯ÇÒ String °ª */ function getOnlyNumberFormat(sv) { if(sv == null) return; var temp=""; var ret = ""; for(var index = 0 ; index < sv.length ; index++) { temp = parseInt(sv.charAt(index), 10); if( temp >= 0 || temp <= 9) { ret +=temp; } } return ret; } /** * ÆäÀÌÁö ÃʱâÈ­½Ã¿¡ ¸¶½ºÅ© ¼³Á¤°ª´ë·Î º¯È¯Çϱâ */ function setInitMaskUp() { var mask = this.maskform; if(this.value == "") return; var inputV = getOnlyNumberFormat(this.value); for ( var i = 0 ; i < mask.length ; i++) { if ( mask.substring(i,i+1) != "#" ) inputV = inputV.substring(0,i) + mask.substring(i,i+1) + inputV.substring(i); } this.value = inputV; } /** * ÆäÀÌÁö ÃʱâÈ­½Ã ¼ýÀÚ¸¸ ÀԷ¹ޱâ */ function setKeyInputNumberOnly() { if(event.shiftKey == true) event.returnValue = false; if ( event.keyCode < 48 || event.keyCode > 57 )//¼ýÀÚ Å°Äڵ尪 { // enter, tab, backspace ¹æÇâÅ°(¾Õ,µÚ)´Â ¿¹¿Üó¸® if(event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) { return true; } event.returnValue = false; } var pKey = String.fromCharCode(event.keyCode); if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * ¼ýÀÚ¸¸ ÀÔ·ÂÇÏ´Â INPUTâ¿¡ ºÙ¿©³Ö±â¸¦ ÇßÀ» °æ¿ì¿¡µµ ¼ýÀÚ¸¸ ÀÔ·Â µÇ°Ô. */ function setPasteNumberOnly() { var clipdata = window.clipboardData.getData("Text"); clipdata = clipdata.replace(/-/gi,""); if(clipdata.match(/^\d+$/ig) == null){ //alert("Çü½ÄÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù."); return false; } var element = document.all.tags('INPUT'); for(var idx=0; idx < element.length; idx++){ var obj = element[idx]; if(obj.onpaste && obj == this){ obj.value = clipdata.substring(0,clipdata.length); } } event.returnValue = false; } /** * ÆäÀÌÁö ÃʱâÈ­½Ã¿¡ ¾ð¾î ¹× ¼ýÀÚÇü ÀÔ·Â ¹× Ç¥Çö ó¸®. * @param elem : À̺¥Æ®¸¦ ¼ÂÆÃÇÒ element */ function initSetLetterType(elem) { elem.style.imeMode = "disabled"; if (elem.getAttribute("chartype") == "kor")//Çѱ۸¸ { elem.style.imeMode = "active"; if(elem.onkeypress == undefined) elem.onkeypress = setLetterKoreanOnly; } else if (elem.getAttribute("chartype") == "kornum")//ÇѱÛ+¼ýÀÚ { elem.style.imeMode = "active"; if(elem.onkeypress == undefined) elem.onkeypress = setLetterKorNumOnly; } else if (elem.getAttribute("chartype") == "koreng")//ÇѱÛ+¿µ¹® { elem.style.imeMode = "active"; if(elem.onkeypress == undefined) elem.onkeypress = setLetterKorEngOnly; } else if (elem.getAttribute("chartype") == "korengnum")//ÇѱÛ+¿µ¹®+¼ýÀÚ { elem.style.imeMode = "active"; if(elem.onkeypress == undefined) elem.onkeypress = setLetterKorEngNumOnly; } else if (elem.getAttribute("chartype") == "eng")//¿µ¾î¸¸ { //if(elem.onkeypress == undefined) elem.onkeypress = setLetterEnglishOnly; if($(elem).attr("onkeypress") == undefined){ $(elem).bind('keypress', function(){ $(this).val($(this).val().replace(/[^a-z]/gi, "")); }); } } else if (elem.getAttribute("chartype") == "engnum")//¿µ¾î+¼ýÀÚ { elem.style.imeMode = "disabled"; //if(elem.onkeypress == undefined) elem.onkeypress = setLetterEngNumOnly; if($(elem).attr("onkeypress") == undefined){ var _regexpStr = getUserChar($(elem), '^a-z|0-9'); $(elem).bind('keyup', function(){ $(this).val($(this).val().replace(eval('/['+_regexpStr +']/gi'), "")); }); } } else if (elem.getAttribute("chartype") == "float")//½Ç¼öÇü { //if(elem.onkeypress == undefined) elem.onkeypress = setLetterFloatOnly; if($(elem).attr("onkeypress") == undefined){ $(elem).bind('keyup', function(){ $(this).val($(this).val().replace(/[^0-9\\.\\-]/gi, "")); }); } } else if (elem.getAttribute("chartype") == "int")//Á¤¼öÇü { //if(elem.onkeypress == undefined) elem.onkeypress = setLetterInteger; if($(elem).attr("onkeypress") == undefined){ $(elem).bind('keyup', function(){ $(this).val($(this).val().replace(/[^0-9\\-]/gi, "")); }); } } else if (elem.getAttribute("chartype") == "onlynum")//¿ÀÁ÷ ¼ýÀÚ¸¸ { //if(elem.onkeypress == undefined) elem.onkeypress = setKeyInputNumberOnly; //if(elem.onpaste == undefined) elem.onpaste = setPasteNumberOnly; if($(elem).attr("onkeypress") == undefined) $(elem).bind('keyup', function(){ $(this).val($(this).val().replace(/[^0-9]/gi, "")); }); if($(elem).attr("onpaste") == undefined) $(elem).bind('paste', function(){ $(this).val($(this).val().replace(/[^0-9]/gi, "")); }); } else if (elem.getAttribute("chartype") == "money")//Á¤¼ö·Î¸¸ µÈ ¾ÆÁÖ ±âº»ÀûÀÎ ±Ý¾× Ç¥½Ã { if($(elem).attr("onkeyup") == undefined){ $(elem).bind('keypress', function(){ $(this).val($(this).val().replace(/[^0-9\\,\\-]/gi, "")); }); } if($(elem).attr("onblur") == undefined){ $(elem).bind('blur', function(){ $(this).val($(this).val().toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); }); } //$(elem).attr("style", "text-align:right"); elem.style.textAlign="right"; /* elem.style.textAlign="right"; if(elem.onkeyup == undefined) elem.onkeypress = setKeydownMoney;//Å°°¡ ´­·¯Á³À»¶§ if(elem.onkeypress == undefined) elem.onkeyUp = setKeypressMoney;//Å°¸¦ ´­·¶´Ù ³õ¾ÒÀ»¶§ if(elem.onblur == undefined) elem.onblur = setKeypressMoney; */ } else if (elem.getAttribute("chartype") == "floatmoney") { if($(elem).attr("onkeyup") == undefined){ $(elem).bind('keypress', function(){ $(this).val($(this).val().replace(/[^0-9\\.\\,\\-]/gi, "")); }); } if($(elem).attr("onblur") == undefined){ $(elem).bind('blur', function(){ $(this).val($(this).val().toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); }); } //$(elem).attr("style", "text-align:right"); elem.style.textAlign="right"; //elem.style.textAlign="right"; //if(elem.onkeyup == undefined) elem.onkeypress = setKeydownFloatMoney;//Å°°¡ ´­·¯Á³À»¶§ //if(elem.onkeypress == undefined) elem.onkeypress = setFloatMoney;//Å°¸¦ ´­·¶´Ù ³õ¾ÒÀ»¶§ //if(elem.onblur == undefined) elem.onblur = setFloatMoney; } } /** * µ¿Àû Á¤±Ô½ÄÀ» À§ÇÑ userChar ¸®ÅÏ */ function getUserChar(obj, _regexpStr) { if (obj != undefined && obj.attr("userchar") != undefined && '' != obj.attr("userchar")) { var _userKey = obj.attr("userchar"); for(i=0;i< _userKey.length;i++) { _regexpStr += '\\'+_userKey.charAt(i); } } return _regexpStr; } /** * ÆäÀÌÁö ÃʱâÈ­½Ã -,¼ýÀÚ ÀԷ¹ޱâ( - Å°Äڵ尪 189) */ function setKeydownMoney() { if(event.shiftKey == true) event.returnValue = false; if ( event.keyCode < 48 || event.keyCode > 57 ) //¼ýÀÚ Å°Äڵ尪 { // enter, tab, backspace ¹æÇâÅ°(¾Õ,µÚ),delete´Â ¿¹¿Üó¸® if(event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 189 || event.keyCode == 46) { return true; } event.returnValue = false; } } /** * ÆäÀÌÁö ÃʱâÈ­ ½Ã¿¡ ±Ý¾× ÇüÅÂÀÏ °æ¿ì Å° ÀԷ½à ±Ý¾× ÇüÅ·ΠÀüȯ */ function setKeypressMoney() { var ev = event.srcElement; var pKey = String.fromCharCode(event.keyCode); var tempV = ev.value; if(tempV.length > 0){ var stat = true; while(stat) { if(tempV.length > 0 && tempV.substring(0,1)==0) { tempV = tempV.substr(1); } else { stat = false; } } } var moneyReg = new RegExp('(-?[0-9]+)([0-9]{3})'); tempV = tempV;// + pKey; tempV = tempV.replace(/\,/g, ""); while(moneyReg.test(tempV)) { tempV = tempV.replace(moneyReg, '$1,$2'); } ev.value = tempV; if(event.keyCode == 9){ev.select();} //event.returnValue=false; } /** * ½ºÆ®¸µ°ªÀ» Á¤¼öÇü ¸Ó´Ï ÇüÅ·Πº¯È¯ *
ex : changeIntMoneyType("1100000") ¸®ÅϵǴ µ¥ÀÌŸ : 1,100,000 * @param data : º¯È¯ÇÒ String µ¥ÀÌŸ * @return ±Ý¾× ÇüÅ·Πº¯È¯µÈ ½ºÆ®¸µ */ function changeIntMoneyType(data) { var tempV = data; var moneyReg = new RegExp('(-?[0-9]+)([0-9]{3})'); tempV = tempV.replace(/\,/g, ""); try{ if(tempV != '') tempV = parseInt(tempV).toString(); }catch(e){} while(moneyReg.test(tempV)) { tempV = tempV.replace(moneyReg, '$1,$2'); } return (tempV == 'NaN') ? 0 : tempV; } function changeIntFloatMoneyType(data) { var tempV = data; var floatnum = "" if(tempV.indexOf(".") != -1) { floatnum = tempV.substring(tempV.indexOf("."));// + pKey; tempV = tempV.substring(0,tempV.indexOf(".")); } else { tempV = tempV;// + pKey; } var moneyReg = new RegExp('(-?[0-9]+)([0-9]{3})'); tempV = tempV.replace(/\,/g, ""); while(moneyReg.test(tempV)) { tempV = tempV.replace(moneyReg, '$1,$2'); } tempV = tempV+floatnum; return tempV; } /** * ½Ç¼öÇü ±Ý¾× ÀÔ·ÂÁ¦¾î ½ºÅ©¸³Æ®. ¼ýÀÚ , . , - °ª¸¸ ÀԷ¹ÞÀ½. ¼Ò¼öÁ¡ µÎ° ÀÚ¸®±îÁö¸¸ ÀÔ·ÂµÊ */ function setKeydownFloatMoney() { if(event.shiftKey == true) event.returnValue = false; var floatindex = event.srcElement.value.indexOf("."); if(floatindex != -1) { var floatNum = event.srcElement.value.substring(floatindex+1); if (event.keyCode == 8 ) return; else if (floatNum.length > 1 ) event.returnValue = false; } if ( event.keyCode < 48 || event.keyCode > 57 ) //¼ýÀÚ Å°Äڵ尪 { if( event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 189 || event.keyCode == 46) { return; } else if( event.keyCode == 190 && floatindex == -1 ) { return } event.returnValue = false; } } /** * Å° ÀԷ½à float ŸÀÔÀÇ ±Ý¾× ÇüÅ·ΠÀüȯ */ function setFloatMoney() { var ev = event.srcElement; var pKey = String.fromCharCode(event.keyCode); var tempV = ev.value; var floatnum = "" if(tempV.indexOf(".") != -1) { floatnum = tempV.substring(tempV.indexOf("."));// + pKey; tempV = tempV.substring(0,tempV.indexOf(".")); } else { tempV = tempV;// + pKey; } var moneyReg = new RegExp('(-?[0-9]+)([0-9]{3})'); tempV = tempV.replace(/\,/g, ""); while(moneyReg.test(tempV)) { tempV = tempV.replace(moneyReg, '$1,$2'); } ev.value = tempV+floatnum; if(event.keyCode == 9){ev.select();} event.returnValue=false; } /** * Å° ÀԷ½à Çѱ۸¸ ÀԷ¹ޱâ */ function setLetterKoreanOnly() { var pKey = String.fromCharCode(event.keyCode); // ½ºÆäÀ̽º Çã¿ë if(event.keyCode != 32 && !((pKey.charCodeAt() > 0x3130 && pKey.charCodeAt() < 0x318F) || (pKey.charCodeAt() >= 0xAC00 && pKey.charCodeAt() <= 0xD7A3))) { event.returnValue=false; delete eReg; } if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ÇѱÛ,¼ýÀÚ ÀԷ¹ޱâ */ function setLetterKorNumOnly() { var pKey = String.fromCharCode(event.keyCode); // ½ºÆäÀ̽º Çã¿ë if(event.keyCode != 32 && !((pKey.charCodeAt() > 0x3130 && pKey.charCodeAt() < 0x318F) || (pKey.charCodeAt() >= 0xAC00 && pKey.charCodeAt() <= 0xD7A3) || !setKeyInputNumberOnly())) { event.returnValue=false; delete eReg; } if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ¿µ¹®,¼ýÀÚ ÀԷ¹ޱâ================================== */ function setLetterEngNumOnly() { var pKey = String.fromCharCode(event.keyCode); var eReg = /[a-zA-Z]/g; var intReg = /[0-9\\-]/g;; // ½ºÆäÀ̽º Çã¿ë if(event.keyCode != 32 && (pKey!="\r" && !eReg.test(pKey)) && !intReg.test(pKey)) { event.returnValue=false; delete eReg; delete intReg; } //alert("event.srcElement.userchar : "+event.srcElement.userchar); setUpperLowerCase(); if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ÇѱÛ,¿µ¾î¸¸ ÀԷ¹ޱâ */ function setLetterKorEngOnly() { var pKey = String.fromCharCode(event.keyCode); var eReg = /[a-zA-Z]/g; // ½ºÆäÀ̽º Çã¿ë if(event.keyCode != 32 && !((pKey.charCodeAt() > 0x3130 && pKey.charCodeAt() < 0x318F) || (pKey.charCodeAt() >= 0xAC00 && pKey.charCodeAt() <= 0xD7A3) || !(pKey!="\r" && !eReg.test(pKey)))) { event.returnValue=false; delete eReg; } setUpperLowerCase(); if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ÇѱÛ,¿µ¾î,¼ýÀÚ¸¸ ÀԷ¹ޱâ */ function setLetterKorEngNumOnly() { var pKey = String.fromCharCode(event.keyCode); var eReg = /[a-zA-Z]/g; // ½ºÆäÀ̽º Çã¿ë if(event.keyCode != 32 && !((pKey.charCodeAt() > 0x3130 && pKey.charCodeAt() < 0x318F) || (pKey.charCodeAt() >= 0xAC00 && pKey.charCodeAt() <= 0xD7A3) || !(pKey!="\r" && !eReg.test(pKey)) || !setKeyInputNumberOnly())) { event.returnValue=false; delete eReg; } setUpperLowerCase(); if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ¿µ¾î¸¸ ÀԷ¹ޱâ */ function setLetterEnglishOnly() { var pKey = String.fromCharCode(event.keyCode); var eReg = /[a-zA-Z]/g; // ½ºÆäÀ̽º Çã¿ë if(event.keyCode != 32 && pKey!="\r" && !eReg.test(pKey)) //¿£ÅÍÅ° ¹× regkey°¡ ¾Æ´Ò°æ¿ì ¸®ÅÏ event.returnValue=false; delete eReg; setUpperLowerCase(); if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ¼ýÀÚ,- °ª¸¸ ÀԷ¹ÞÀ½. */ function setLetterInteger() { var pKey = String.fromCharCode(event.keyCode); var intReg = /[0-9\\-]/g; if(pKey!="\r" && !intReg.test(pKey)) //¿£ÅÍÅ° ¹× regkey°¡ ¾Æ´Ò°æ¿ì ¸®ÅÏ event.returnValue=false; delete intReg; if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } /** * Å° ÀԷ½à ¼ýÀÚ , . , - °ª¸¸ ÀԷ¹ÞÀ½. */ function setLetterFloatOnly() { var pKey = String.fromCharCode(event.keyCode); var floatReg = /[0-9\\.\\-]/g; if(pKey!="\r" && !floatReg.test(pKey)) //¿£ÅÍÅ° ¹× regkey°¡ ¾Æ´Ò°æ¿ì ¸®ÅÏ event.returnValue=false; delete floatReg; if( event.srcElement.userchar != undefined) { var userKey = event.srcElement.userchar; for(i=0;i< userKey.length;i++) { if(pKey == userKey.charAt(i)) { event.returnValue=true; break; } } } } //-----------------------------------------------------------------------------------------------------------------// //----------------------------------- ÆäÀÌÁö initialize °ü·Ã ÇÔ¼ö ³¡ ------------------------------------------------// /** * ÃÖ¼Ò°ª üũ ·ÎÁ÷ *
ex : validationMinimum("100000","10000") * @param minV : ÁöÁ¤µÈ ÃÖ¼Ò value * @param inV : ÀÔ·ÂµÈ Value * @return boolean */ function validationMinimum(minV,inV) { if (minV == "") { i18nAlert("Á¤ÇØÁø ÃÖ¼Ò°ªÀÌ ¾ø½À´Ï´Ù."); return false; } if ( parseFloat(inV) < parseFloat(minV) ) { return false; } return true; } /** * ÃÖ´ë°ª üũ ·ÎÁ÷ *
ex : validationMaximum("100000","10000") * @param maxV : ÁöÁ¤µÈ ÃÖ´ë value * @param inV : ÀÔ·ÂµÈ Value * @return boolean */ function validationMaximum(maxV,inV) { if (maxV == "") { i18nAlert("It decides and there is not a position maximum price"); return false; } if ( parseFloat(maxV) < parseFloat(inV) ) { return false; } return true; } /** * ÃÖ´ë btye üũ ·ÎÁ÷ *
ex : validationMaxByte(form1.inputname.value , 10) * @param textObj : üũÇÒ String value * @param length_limit : ÃÖ´ë byte * @return boolean */ function validationMaxByte(textObj, length_limit) { var length = calculate_msglen(textObj); var kor_cnt = Math.floor(length_limit/2); if (length > length_limit) { return false; } return true; } /** * ÃÖ¼Ò btye üũ ·ÎÁ÷ *
ex : validationMaxByte(form1.inputname.value , 10) * @param textObj : üũÇÒ String value * @param length_limit : ÃÖ¼Ò byte * @return boolean */ function validationMinByte(textObj, length_limit) { var length = calculate_msglen(textObj); var kor_cnt = Math.floor(length_limit/2); if (length < length_limit) { return false; } return true; } /** * ÇÑ±Û 2±ÛÀÚ ¿µ¹® 1±ÛÀÚ·Î ±æÀÌ ÃøÁ¤ÇÏ¿© ¹®ÀÚ¿­ÀÇ byte ±æÀ̸¦ ¸®ÅÏÇÑ´Ù. * @param üũÇÒ String value * @return ÃøÁ¤ÇÑ ÇØ´ç °ªÀÇ byte ±æÀÌ */ function calculate_msglen(message) { var nbytes = 0; for (i=0; i 4) { nbytes += 2; } else if (ch == '\n') { if (message.charAt(i-1) != '\r') { nbytes += 1; } } else if (ch == '<' || ch == '>') { nbytes += 4; } else { nbytes += 1; } } return nbytes; } /** * get,put ¸¸ µÇ´Â hash table *
ex : *
var temphash = new javascriptHashtable() *
temphash.put("key1","Åä¿äÀÏ"); °ª ³Ö±â *
temphash.put("key2","ÀÏ¿äÀÏ"); *
temphash.get("key1"); °ª °¡Á®¿À±â * @constructor var temp = new javascriptHashtable(); */ function javascriptHashtable(){ this.hash = new Array(); } javascriptHashtable.prototype.get = function (key) { if(this.hash[key] == undefined) return "null"; else return this.hash[key]; } javascriptHashtable.prototype.put = function (key, value) { if (key == null || value == null) return i18nAlert("key and value do not permit null or blank"); if (this.hash[key] != null) return i18nAlert("already exist value"); this.hash[key] = value; } /** * ÁßøµÈ css¿¡¼­ ÇØ´ç css¸¸ Á¦°Å *
removeCss(["input1","input2"],"input1") * @param cssArr : ¼³Á¤µÇ¾î ÀÖ´Â class ¹è¿­. (Âü°í·Î css´Â class="input1 input2" ÀÌ·±½ÄÀ¸·Î Áߺ¹µÉ¼ö ÀÖ´Ù. * @param reAtt : Á¦°ÅÇÒ css¸í * @return Á¦°ÅÇÒ css°¡ Á¦°ÅµÈ ½ºÆ®¸µ°ª */ function removeCss(cssArr,reAtt) { var retCss=""; for( var i = 0 ; i < cssArr.length ; i++) { if(reAtt != cssArr[i] ) retCss += cssArr[i] + " "; } return retCss; } /** * sider FrameWorkÀÇ form submit ÇÔ¼ö */ //var tokenValue = ""; function formSubmitValidation() { //ÀÌÁß ¼­ºê¹Ø ¹æÁö if(this.submitstat != "false") { i18nAlert("¿äûÇϽŠ³»¿ëÀÌ Ã³¸®ÁßÀÔ´Ï´Ù.
È®ÀÎÀ» ´©¸£½Ã°í Àá½Ã ±â´Ù·Á ÁֽʽÿÀ"); return; } else { this.submitstat = "validating"; //±âº» ¹ë¸®µ¥ÀÌ¼Ç Ã¼Å© ÇÔ¼ö È£Ãâ if(initBaseValidationCheck(this)) { this.submitstat = "true"; XecureSubmit(this); // this.submit(); } else { this.submitstat = "false"; return; } } } /** * validation check ·ÎÁ÷À» »« form submitÇÔ¼ö * º» ÇÔ¼ö¿¡¼­´Â Áߺ¹ Submit üũ¸¸ ÇÑÈÄ formÀ» SubmitÇÑ´Ù. */ //var tokenValue = ""; function formSubmit() { //ÀÌÁß ¼­ºê¹Ø ¹æÁö if(this.submitstat != "false") { i18nAlert("¿äûÇϽŠ³»¿ëÀÌ Ã³¸®ÁßÀÔ´Ï´Ù.
È®ÀÎÀ» ´©¸£½Ã°í Àá½Ã ±â´Ù·Á ÁֽʽÿÀ"); try {if (document.form1 != undefined) {reset_submit(document.form1);}} catch(e){} return; } else { this.submitstat = "true"; //var tokenValue = ""; //tokenValue = "null"; // XSS °ËÁõ if(xssCheck(this) == false){ reset_submit(this); return; } XecureSubmit(this); // this.submit(); } } function xssCheck(f){ for (var i = 0 ; i < f.elements.length ; i++) { if (f.elements[i].tagName.toString().toLowerCase() == "input" ) { var tmp_val = f.elements[i].value.toUpperCase(); var err_msg = "ÀԷ°ªÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù."; if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf("SCRIPT>") > -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; }else if(tmp_val.indexOf(" -1){ alert(err_msg); return false; } } } } /** * submitStateFalse ÇÔ¼ö * submit »óŸ¦ ¾Ë·ÁÁÖ´Â submitstat °ªÀ» false·Î ¹Ù²ãÁÖ´Â ÇÔ¼ö. */ function submitStateFalse(frm) { frm.submitstat = "false"; } /** * validation check ÇÔ¼ö * @param checkForm : validation °Ë»ç¸¦ ÇÒ Æû. * @return boolean */ function initBaseValidationCheck(checkForm, fldClear) { try{uf_session_time_reset();}catch(e){} for (var i = 0 ; i < checkForm.elements.length ; i++) { //maskÇÑ °ª¿¡¼­ ¸¶½ºÅ© °ª »èÁ¦ if ( ( checkForm.elements[i].getAttribute("maskform") != undefined && checkForm.elements[i].getAttribute("maskform") != "") || checkForm.elements[i].getAttribute("chartype") == "money") { if(checkForm.elements[i].getAttribute("maskform") == "usermask") { checkForm.elements[i].value = unMaskEngNum(checkForm.elements[i].value);//»ç¿ëÀÚ ¸¶½ºÅ© Áö¿ì±â ·ÎÁ÷. } else { checkForm.elements[i].value = getOnlyNumberFormat(checkForm.elements[i].value); } } //input ŸÀÔ if (checkForm.elements[i].tagName.toString().toLowerCase() == "input" ) { //Çʼö °ª üũ if ( checkForm.elements[i].getAttribute("nullable") == "false") { if(checkForm.elements[i].type.toString().toLowerCase() == "text" || checkForm.elements[i].type.toString().toLowerCase() == "password") { if( checkForm.elements[i].value == "" ) { //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Çʼö ÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert("Çʼö ÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ } if ( !checkForm.elements[i].getAttribute("class") != "" ) { checkForm.elements[i].setAttribute("class", "frameworkNullable"); } else { checkForm.elements[i].setAttribute("class", checkForm.elements[i].getAttribute("class") + " " + "frameworkNullable"); } //heckForm.elements[i].select(); //checkForm.elements[i].select(); return false; } else //Çѹø validation¿¡¼­ css¼³Á¤ÀÌ µÇ¾úÀ»°æ¿ì »©¾ß Çϱ⠶§¹®¿¡. { //var classArr = checkForm.elements[i].getAttribute("className").split(" "); if( $(checkForm.elements[i]).attr("class") != undefined && $(checkForm.elements[i]).attr("class") != ""){ var classArr = checkForm.elements[i].getAttribute("class").split(" "); checkForm.elements[i].setAttribute("class", removeCss(classArr,"frameworkNullable")); } } } else if(checkForm.elements[i].type.toString().toLowerCase() == "checkbox" || checkForm.elements[i].type.toString().toLowerCase() == "radio") { var checkState = false; var elementArray = eval("checkForm."+checkForm.elements[i].name); for(var ct = 0 ; ct < elementArray.length ; ct++) { if(elementArray[ct].checked == true) { checkState = true; break; } } if (checkState == false) { //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Çʼö ÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert("Çʼö ÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ } //checkForm.elements[i].focus(); return false; } } } if( checkForm.elements[i].value != "") { //ÃÖ´ë°ª üũ if ( checkForm.elements[i].getAttribute("maximum") != undefined && checkForm.elements[i].getAttribute("maximum") != "") { if ( !validationMaximum(checkForm.elements[i].getAttribute("maximum") , checkForm.elements[i].value) ) { var errMsg = "ÀԷ°ªÀ» % »çÀÌ·Î ÀÔ·ÂÇØ Áֽñ⠹ٶø´Ï´Ù."; if(checkForm.elements[i].getAttribute("minimum") != undefined && checkForm.elements[i].getAttribute("minimum") != "") { //minimum±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minimum")+"~"+checkForm.elements[i].getAttribute("maximum")); }else{ //maximum¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%","~"+checkForm.elements[i].getAttribute("maximum")); } //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg , checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Á¤ÇØÁø ÃÖ´ë°ªº¸´Ù Å®´Ï´Ù." );//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("Á¤ÇØÁø ÃÖ´ë°ªº¸´Ù Å®´Ï´Ù."); } //checkForm.elements[i].select(); return false; } } //ÃÖ¼Ò°ª üũ if ( checkForm.elements[i].getAttribute("minimum") != undefined && checkForm.elements[i].getAttribute("minimum") != "") { if ( !validationMinimum(checkForm.elements[i].getAttribute("minimum") , checkForm.elements[i].value) ) { var errMsg = "ÀԷ°ªÀ» % »çÀÌ·Î ÀÔ·ÂÇØ Áֽñ⠹ٶø´Ï´Ù."; if(checkForm.elements[i].maximum != undefined && checkForm.elements[i].maximum != "") { //maximum±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minimum")+"~"+checkForm.elements[i].maximum); }else{ //minimum¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minimum")+"~"); } //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg , checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." );//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù."); } //checkForm.elements[i].select(); return false; } } //ÃÖ´ë ¹ÙÀÌÆ® üũ if ( checkForm.elements[i].getAttribute("maxbyte") != undefined && checkForm.elements[i].getAttribute("maxbyte") != "") { if ( !validationMaxByte(checkForm.elements[i].value , checkForm.elements[i].getAttribute("maxbyte")) ) { var errMsg = "ÀÔ·ÂÀ» % ÀÚ¸®·Î ÇØÁֽʽÿÀ."+"(BYTE)"; if(checkForm.elements[i].getAttribute("minbyte") != undefined && checkForm.elements[i].getAttribute("minbyte") != "") { //minbyte±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minbyte")+"~"+checkForm.elements[i].getAttribute("maxbyte")); }else{ //maxbyte¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%", checkForm.elements[i].getAttribute("maxbyte")); } var kor_cnt = Math.floor(checkForm.elements[i].getAttribute("maxbyte")/2); //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert( "[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg, checkForm, checkForm.elements[i], fldClear ); //alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "ÃÖ´ë ¹ÙÀÌÆ®¸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("maxbyte") + " BYTE)");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("ÃÖ´ë ¹ÙÀÌÆ®¸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("maxbyte") + " BYTE)"); } //checkForm.elements[i].select(); return false; } } //ÃÖ¼Ò ¹ÙÀÌÆ® üũ if(checkForm.elements[i].getAttribute("minbyte") != undefined && checkForm.elements[i].getAttribute("minbyte") !="") { if(checkForm.elements[i].value.length == 0 || (!validationMinByte(checkForm.elements[i].value, checkForm.elements[i].getAttribute("minbyte"))) ) { var errMsg = "ÀÔ·ÂÀ» % ÀÚ¸®·Î ÇØÁֽʽÿÀ."+"(BYTE)"; if(checkForm.elements[i].getAttribute("maxbyte") != undefined && checkForm.elements[i].getAttribute("maxbyte") != "") { //maxbyte±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minbyte")+"~"+checkForm.elements[i].getAttribute("maxbyte")); }else{ //minbyte¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minbyte")+"~"); } var kor_cnt = Math.floor(checkForm.elements[i].getAttribute("minbyte")/2); if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg, checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("minbyte") + " BYTE)");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("minbyte") + " BYTE)"); } //checkForm.elements[i].select(); return false; } } //ÇѱÛÀÌ µé¾î°£ Input°ªÀº 2byteÀü°¢ ¹®ÀÚ·Î ¹Ù²ãÁØ´Ù. ÀÌÀçÈ£ Â÷Àå´Ô ¿äûÀ¸·Î 20080721 ±èÀç¹ü Ãß°¡. if( checkForm.elements[i].getAttribute("chartype") == "kor" || checkForm.elements[i].getAttribute("chartype") == "kornum" || checkForm.elements[i].getAttribute("chartype") == "koreng" || checkForm.elements[i].getAttribute("chartype") == "korengnum" ) { var isWhanSungHangul = HangulUtils.checkWhanSungHangul(checkForm.elements[i].value); if( !isWhanSungHangul.isWhanSung ) { var errorChar = isWhanSungHangul.errorChar; var _infoMsg = "Áö¿øÇÏÁö ¾Ê´Â ÇѱÛÀÌ ÀԷµǾú½À´Ï´Ù.["+errorChar+"]"; alert(_infoMsg); return false; } if(checkForm.elements[i].getAttribute("fullchar") != "false") checkForm.elements[i].value = convert2ByteCharToString(checkForm.elements[i].value); } //ÃÖ¼Ò ±æÀÌ Ã¼Å© if(checkForm.elements[i].getAttribute("minlength") != undefined && checkForm.elements[i].getAttribute("minlength") != "") { if( checkForm.elements[i].getAttribute("chartype") == "kor" || checkForm.elements[i].getAttribute("chartype") == "kornum" || checkForm.elements[i].getAttribute("chartype") == "koreng" || checkForm.elements[i].getAttribute("chartype") == "korengnum" ) { var isWhanSungHangul = HangulUtils.checkWhanSungHangul(checkForm.elements[i].value); if( !isWhanSungHangul.isWhanSung ) { var errorChar = isWhanSungHangul.errorChar; var _infoMsg = "Áö¿øÇÏÁö ¾Ê´Â ÇѱÛÀÌ ÀԷµǾú½À´Ï´Ù.["+errorChar+"]"; alert(_infoMsg); return false; } if(checkForm.elements[i].getAttribute("fullchar") != "false") checkForm.elements[i].value = convert2ByteCharToString(checkForm.elements[i].value); var _minlen = checkForm.elements[i].getAttribute("minlength")-2; if(checkForm.elements[i].getAttribute("fullchar") == "false") _minlen = checkForm.elements[i].getAttribute("minlength"); if ( checkForm.elements[i].value.length == 0 || (!validationMinByte(checkForm.elements[i].value , (_minlen))) ) { var errMsg = "ÀÔ·ÂÀ» % ÀÚ¸®·Î ÇØÁֽʽÿÀ."+"(LENGTH)"; if(checkForm.elements[i].getAttribute("maxLength") != undefined && checkForm.elements[i].getAttribute("maxLength") != "" && checkForm.elements[i].getAttribute("maxLength") != "2147483647") { //maxLength±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. //alert(checkForm.elements[i].getAttribute("maxLength").value); errMsg = errMsg.replace("%",_minlen/2+"~"+(checkForm.elements[i].getAttribute("maxLength")-2)/2); }else{ //minlength¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",_minlen/2); } var kor_cnt = Math.floor((_minlen)/2); //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg, checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("minlength") + " LENGTH)");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("minlength") + " LENGTH)"); } //checkForm.elements[i].select(); return false; } }else { //alert('2'); //checkForm, checkForm.element[i] //alert(checkForm); //alert(checkForm.elements[i]); if(checkForm.elements[i].value.length < checkForm.elements[i].getAttribute("minlength")) { var errMsg = "ÀÔ·ÂÀ» % ÀÚ¸®·Î ÇØÁֽʽÿÀ."; if(checkForm.elements[i].getAttribute("maxLength") != undefined && checkForm.elements[i].getAttribute("maxLength") != "" && checkForm.elements[i].getAttribute("maxLength") != "2147483647") { //maxLength±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. if(checkForm.elements[i].getAttribute("minlength") != checkForm.elements[i].getAttribute("maxLength")){ errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minlength")+"~"+checkForm.elements[i].getAttribute("maxLength")); }else{ errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("maxLength")); } //errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minlength")+"~"+checkForm.elements[i].getAttribute("maxLength")); }else{ //minlength¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minlength")); } if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg, checkForm, checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("minlength") + " LENGTH)");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("Á¤ÇØÁø ÃÖ¼Ò°ªº¸´Ù ÀÛ½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("minlength") + " LENGTH)"); } //checkForm.elements[i].focus(); return false; } } } //ÃÖ´ë ±æÀÌ Ã¼Å© if ( checkForm.elements[i].getAttribute("maxLength") != undefined && checkForm.elements[i].getAttribute("maxLength") != "") { //ÇѱÛÀÌ µé¾î°£ Input°ªÀº -2 byte·Î maxByte üũ¸¦ ÇÑ´Ù. 20080721 ±èÀç¹ü Ãß°¡. if( checkForm.elements[i].getAttribute("chartype") == "kor" || checkForm.elements[i].getAttribute("chartype") == "kornum" || checkForm.elements[i].getAttribute("chartype") == "koreng" || checkForm.elements[i].getAttribute("chartype") == "korengnum" ) { var isWhanSungHangul = HangulUtils.checkWhanSungHangul(checkForm.elements[i].value); if( !isWhanSungHangul.isWhanSung ) { var errorChar = isWhanSungHangul.errorChar; var _infoMsg = "Áö¿øÇÏÁö ¾Ê´Â ÇѱÛÀÌ ÀԷµǾú½À´Ï´Ù.["+errorChar+"]"; alert(_infoMsg); return false; } if(checkForm.elements[i].getAttribute("fullchar") != "false") checkForm.elements[i].value = convert2ByteCharToString(checkForm.elements[i].value); var _maxlen = checkForm.elements[i].getAttribute("maxLength")-2; if(checkForm.elements[i].getAttribute("fullchar") == "false") _maxlen = checkForm.elements[i].getAttribute("maxLength"); if ( !validationMaxByte(checkForm.elements[i].value , (_maxlen)) ) { var errMsg = "ÀÔ·ÂÀ» % ÀÚ¸®·Î ÇØÁֽʽÿÀ."; if(checkForm.elements[i].getAttribute("minlength") != undefined && checkForm.elements[i].getAttribute("minlength") != "") { //minlength±îÁö ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. if(checkForm.elements[i].getAttribute("minlength") != checkForm.elements[i].getAttribute("maxLength")){ errMsg = errMsg.replace("%",checkForm.elements[i].getAttribute("minlength")/2+"~"+_maxlen/2); }else{ errMsg = errMsg.replace("%",_maxlen/2); } }else{ //maxLength¸¸ ¼³Á¤µÇ¾î ÀÖÀ¸¸é.. errMsg = errMsg.replace("%",(checkForm.elements[i].getAttribute("maxLength")-2)/2); } var kor_cnt = Math.floor((_maxlen)/2); //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + errMsg, checkForm , checkForm.elements[i], fldClear);//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ //i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "ÃÖ´ë ±æÀ̸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù." + "(~"+checkForm.elements[i].getAttribute("maxLength") + " LENGTH)");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert(errMsg, null, null, null, null, fldClear); //i18nAlert("ÃÖ´ë ±æÀ̸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù." + "(~"+_maxlen + " LENGTH)"); } //checkForm.elements[i].select(); return false; } } } } //select ŸÀÔÀÌ ÇʼöÀ϶§ } else if ( checkForm.elements[i].tagName.toString().toLowerCase() == "select" ) { if(checkForm.elements[i].disabled==true) checkForm.elements[i].disabled = false; if(checkForm.elements[i].getAttribute("nullable") == "false" && checkForm.elements[i].value == "") { //colname ¾îÆ®¸®ºäÆ® Ãß°¡µÇ¸é¼­ ºñ±³ÇÏ´Â if¹® Ãß°¡.20080129 if(checkForm.elements[i].getAttribute("collname") != undefined) { i18nAlert("[" + checkForm.elements[i].getAttribute("collname") + "] " + "Çʼö ÀÔ·Â »çÇ×ÀÔ´Ï´Ù.");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ }else{ i18nAlert("Çʼö ÀÔ·Â »çÇ×ÀÔ´Ï´Ù.");//alert ¸Þ¼¼Áö ÇÔ¼ö È£Ãâ } //checkForm.elements[i].focus(); return false; } } /* * ä³Îº° ¼­ºñ½º°¡´É¿©ºÎ üũ(ex:°£Åõ) * 2008.10.27 À¥Äɽà ÀÌÀçÈ£ */ if(checkForm.elements[i].getAttribute("chkOrgSts") != undefined){ if(checkForm.elements[i].getAttribute("chkOrgSts") == "OUTBANK"){ if(!chkErrBank(checkForm, checkForm.elements[i])) return false; } if(!chkStatusChl(checkForm.elements[i].getAttribute("chkOrgSts"), checkForm.elements[i].value)){ if(checkForm.elements[i].getAttribute("chkOrgSts").indexOf("TIIS")>-1) i18nAlert("ÇöÀç °£Á¢ÅõÀÚ ½Ã½ºÅÛÀå¾Ö·Î ÇØ´ç°èÁÂÀÇ °Å·¡°¡ ºÒ°¡ÇÕ´Ï´Ù.", checkForm, checkForm.elements[i]); return false; } } }//for¹® ³¡ try { // ars Ãß°¡ÀÎÁõ ÀÎÁõ¿äû üũ if ($('#smsVerifyForm').is(':visible') || $('#smsForm').is(':visible')) { if ($('#chk_Certdscd_2').length>0 || $('#chk_Certdscd_3').length>0 || $('#chk_Certdscd_5').length>0) { var arsChk = $(":radio[name='chk_Certdscd']:checked").val(); var arsPcChk = $(":radio[name='pc_chk_Certdscd']:checked").val(); if ((arsChk != undefined && arsChk == '2') || (arsPcChk != undefined && arsPcChk == '2')) { if ($('#_2CH_ARS_VERIFY_RESULT').length>0 && $('#_2CH_ARS_VERIFY_RESULT').val() != 'ok') { var _isPassed = false; try { if (document.form2._2CH_ARS_VERIFY_RESULT!=undefined && document.form2._2CH_ARS_VERIFY_RESULT.value == "ok") { _isPassed = true; } } catch (e) {} if (!_isPassed) { if ($('#_2CH_ARS_VERIFY_RESULT').val() == 'no') { i18nAlert('ARS ÀÎÁõ¿äûÀÌ Á¤»óÀûÀ¸·Î ½ÇÇàµÇÁö ¾Ê¾Ò½À´Ï´Ù.
Àç¿äû ÇϽñ⠹ٶø´Ï´Ù.'); } else { i18nAlert('ARS ÀÎÁõ¿äûÀÌ ½ÇÇàµÇÁö ¾Ê¾Ò½À´Ï´Ù.
ARS ÀÎÁõ¿äûÀ» ¸ÕÀú ÇØÁֽñ⠹ٶø´Ï´Ù.'); } return false; } } } if ($('#div_add_cert').is(':visible') && arsChk == undefined && arsPcChk == undefined) { i18nAlert('º¸¾È°­È­¸¦ À§ÇÑ Ãß°¡ÀÎÁõÀ» ¼±ÅÃÇϽñ⠹ٶø´Ï´Ù.'); return false; } } } //µðÁöÅÐOTP ÀÎÁõ¿äû¿©ºÎ if($("#W_CRTC_NO").val() !="" && $("#W_CD_GRP_DATA_CON").val() == ""){ i18nAlert('µðÁöÅÐOTP ÀÎÁõ¹øÈ£ ¿äûÀ» ÇϽñ⠹ٶø´Ï´Ù.'); return false; } } catch (e) {} // ars Ãß°¡ÀÎÁõ ÀÎÁõ¿äû üũ if ($('#chk_Certdscd_2').length>0 && $('#chk_Certdscd_2').is(':visible')==false) { try {$("input:radio[name='chk_Certdscd'][value='2']").prop("checked", false);} catch (e) {} try {$("input:radio[name='pc_chk_Certdscd'][value='2']").prop("checked", false);} catch (e) {} } /* * Åõä³Î ¼­ºñ½º°¡´É¿©ºÎ üũ * 2011-05-16 ÀÌ°æ¼ö */ return true; } /** * ¼­ºê¹Ô½Ã ÇØ´ç °Å·¡Ã¤³ÎÀÇ ¼­ºñ½º°¡´É¿©ºÎ üũ * 2008.10.28 À¥Äɽà ÀÌÀçÈ£ */ function chkStatusChl(chl_id, value){ /* * °£Åõ üũ. * '96' °èÁÂÀÎ °æ¿ì ... */ if(chl_id == "TIIS"){ if(value.length == 14){ chkValue = value.substring(9, 11); if(chkValue == "96" && "false" == "true"){ return false; } } } // °£ÅõÁ¶È¸ °Å·¡ üũ if(chl_id == "TIIS_INQ"){ if(value.length == 14){ chkValue = value.substring(9, 11); if(chkValue == "96" && ("false" == "true" || "false" == "true") ){ return false; } } } // °£ÅõÀÌü °Å·¡ üũ if(chl_id == "TIIS_TRN"){ if(value.length == 14){ chkValue = value.substring(9, 11); if(chkValue == "96" && ("false" == "true" || "false" == "true") ){ return false; } } } return true; } // ŸÇà»óÅ üũ function chkErrBank(frm, elem){ if("true" == "false" && elem.value != "003"){ uf_alert("ŸÇà¼Û±Ý°Å·¡°¡ ÀϽÃÀûÀÎ °Å·¡·® Áõ°¡·Î ÀÎÇØ Àá½Ã Áߴܵǰí ÀÖ½À´Ï´Ù.
Àá½Ã ÈÄ¿¡ ´Ù½Ã ÀÌ¿ëÇÏ¿© ÁֽʽÿÀ.
¹®ÀÇÀüÈ­ 1588-2588(515)"); return false; } return true; } /** * MaskUpµÈ µ¥ÀÌŸ¿¡¼­ ¸¶½ºÅ© Delemeter Á¦¿ÜÇÏ°í °ª ¸®ÅÏ *
ex : unMaskUpData(form1.name) * @param element : ¸¶½ºÅ©ÇÑ ¿ä¼Ò name ¶Ç´Â ÇØ´ç °´Ã¼ ÀÚü. * @return ±¸ºÐÀÚ¸¦ Á¦¿ÜÇÑ µ¥ÀÌŸ°ª */ function unMaskUpData(element) { var unmaskData = ""; //maskÇÑ °ª¿¡¼­ ¸¶½ºÅ© °ª »èÁ¦ if ( ( element.maskform != undefined && element.maskform != "") || element.chartype == "money") { unmaskData = getOnlyNumberFormat(element.value);//spcommon.js¿¡ ÀÖ´Â ¼ýÀÚ¸¸ »©¿À±â ·ÎÁ÷ } else unmaskData = element.value; return unmaskData; } /** * »ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ ¸¶½ºÅ©¾÷ ½ºÅ¸ÀÏÁß ¿µ¾î,¼ýÀÚ È¥ÇÕÀÎ µ¥ÀÌŸÀÇ mask¸¦ Áö¿ï¶§ »ç¿ë ¿µ¾î,¼ýÀÚ ÀÌ¿ÜÀÇ ¹®ÀÚ Á¦°Å *
ex : unMaskEngNum(String) * @param element : ¸¶½ºÅ©°¡ ÀÖ´Â String * @return ±¸ºÐÀÚ¸¦ Á¦¿ÜÇÑ String */ function unMaskEngNum(data) { var accReg = new RegExp('([a-zA-Z0-9])'); var temp = ""; for(var i = 0 ; i < data.length ; i++) { if(accReg.test(data.substr(i,1))) { temp += data.substr(i,1); } } return temp; } /** * °øÅë javascript ¸ðµâ */ /** * window.showModalDialog(arg1,arg2,arg3) ¿É¼Ç ¹è¿­ÀÇ °¹¼ö¸¦ Á¤È®È÷ ³Ö¾îÁà¾ß ÇÕ´Ï´Ù. °ªÀÌ ÇÊ¿ä ¾øÀ¸¸é '' À» ³Ö½À´Ï´Ù. * ex : openPopModal(a.html,"test",[³ÐÀÌ,³ôÀÌ,center¿©ºÎ,xÁÂÇ¥,yÁÂÇ¥,scroll¿©ºÎ,resizable¿©ºÎ]) * openPopModal(a.html,"test",['200','200','yes','200','200','yes','yes']) * scrollÀº default=yesÀÓ , center°¡ yes·Î µÇ¾îÀ־ x,yÁÂÇ¥°¡ ÀÖÀ¸¸é ÁÂÇ¥¿¡ µû¸¥´Ù. * @param url : ÁÖ¼Ò * @param arg : ³Ñ°ÜÁÙ ÆĶó¹ÌÅÍ * @param option : â°ü·Ã ¿É¼Ç(¹è¿­ Çü½Ä) */ function openPopModal(url, arg, option) { var sFeatures = ""; if(option != undefined) { var popWidth = option[0]; var popHeight = option[1]; var popCenter = option[2] == "" ? "yes" : option[2]; var popXpos = option[3]; var popYpos = option[4]; var popScroll = option[5] == "" ? "yes" : option[5]; var popResize = option[6] == "" ? "no" : option[6]; sFeatures = "dialogWidth:"+popWidth+"px"; sFeatures += ";dialogHeight:"+popHeight+"px"; sFeatures += ";center:"+popCenter; sFeatures += ";dialogLeft:"+popXpos+"px"; sFeatures += ";dialogTop:"+popYpos+"px"; sFeatures += ";scroll:"+popScroll; sFeatures += ";resizable:"+popResize; } //Xecure Àû¿ëµÇ¸é Ç®¾îÁÖ¾î¾ß ÇÔ var qs ; var path = "/"; var cipher; var xecure_url; // get path info & query string & hash from url qs_begin_index = url.indexOf('?'); path = getPath(url) // get query string action url if ( qs_begin_index < 0 ) { qs = ""; } else { qs = url.substring(qs_begin_index + 1, url.length ); } if( gIsContinue == 0 ) { gIsContinue = 1; if( IsNetscape60() ) // Netscape 6.0 cipher = document.XecureWeb.nsIXecurePluginInstance.BlockEnc(xgate_addr, path, XecureEscape(qs), "GET"); else cipher = document.XecureWeb.BlockEnc(xgate_addr, path, XecureEscape(qs),"GET"); gIsContinue = 0; } else { i18nAlert(busy_info); return false; } if( cipher == "" ) return XecureWebError(); xecure_url = path + "?q=" + escape_url(cipher); // adding character set information if(usePageCharset) xecure_url += "&charset=" + document.charset; url = xecure_url; if(arg == "") arg = this;//ÆĶó¹ÌÅÍ°¡ ¾øÀ» °æ¿ì ÇöÀç ºÎ¸ðâÀ» ³Ñ±è. window.showModalDialog(url, arg, sFeatures); } /** * window.showModelessDialog(arg1,arg2,arg3) ¿É¼Ç ¹è¿­ÀÇ °¹¼ö¸¦ Á¤È®È÷ ³Ö¾îÁà¾ß ÇÕ´Ï´Ù. °ªÀÌ ÇÊ¿ä ¾øÀ¸¸é '' À» ³Ö½À´Ï´Ù. * ex : openPopModeless(a.html,"test",[³ÐÀÌ,³ôÀÌ,center¿©ºÎ,xÁÂÇ¥,yÁÂÇ¥,scroll¿©ºÎ,resizable¿©ºÎ]) * openPopModeless(a.html,"test",['200','200','yes','200','200','yes','yes']) * scrollÀº default=yesÀÓ , center°¡ yes·Î µÇ¾îÀ־ x,yÁÂÇ¥°¡ ÀÖÀ¸¸é ÁÂÇ¥¿¡ µû¸¥´Ù. * @param url : ÁÖ¼Ò * @param arg : ÆĶó¹ÌÅÍ * @param option : â°ü·Ã ¿É¼Ç(¹è¿­Çü½Ä) * @return : ¿ÀǽÃŲ window */ function openPopModeless(url, arg, option) { var sFeatures = ""; if(option != undefined) { var popWidth = option[0]; var popHeight = option[1]; var popCenter = option[2] == "" ? "yes" : option[2]; var popXpos = option[3]; var popYpos = option[4]; var popScroll = option[5] == "" ? "yes" : option[5]; var popResize = option[6] == "" ? "yes" : option[6]; var sFeatures = "dialogWidth:"+popWidth+"px"; sFeatures += ";dialogHeight:"+popHeight+"px"; sFeatures += ";center:"+popCenter; sFeatures += ";dialogLeft:"+popXpos+"px"; sFeatures += ";dialogTop:"+popYpos+"px"; sFeatures += ";scroll:"+popScroll; sFeatures += ";resizable:"+popResize; } //Xecure Àû¿ëµÇ¸é Ç®¾îÁÖ¾î¾ß ÇÔ var qs ; var path = "/"; var cipher; var xecure_url; // get path info & query string & hash from url qs_begin_index = url.indexOf('?'); path = getPath(url) // get query string action url if ( qs_begin_index < 0 ) { qs = ""; } else { qs = url.substring(qs_begin_index + 1, url.length ); } if( gIsContinue == 0 ) { gIsContinue = 1; if( IsNetscape60() ) // Netscape 6.0 cipher = document.XecureWeb.nsIXecurePluginInstance.BlockEnc(xgate_addr, path, XecureEscape(qs), "GET"); else cipher = document.XecureWeb.BlockEnc(xgate_addr, path, XecureEscape(qs),"GET"); gIsContinue = 0; } else { i18nAlert(busy_info); return false; } if( cipher == "" ) return XecureWebError(); xecure_url = path + "?q=" + escape_url(cipher); // adding character set information if(usePageCharset) xecure_url += "&charset=" + document.charset; url = xecure_url; if(arg == "") arg = this;//ÆĶó¹ÌÅÍ°¡ ¾øÀ» °æ¿ì ÇöÀç ºÎ¸ðâÀ» ³Ñ±è. var win = window.showModelessDialog(url, arg, sFeatures); return win; } /** * window.open(arg1,arg2,arg3) ¿É¼Ç ¹è¿­ÀÇ °¹¼ö¸¦ Á¤È®È÷ ³Ö¾îÁà¾ß ÇÕ´Ï´Ù. °ªÀÌ ÇÊ¿ä ¾øÀ¸¸é '' À» ³Ö½À´Ï´Ù. * ex :
* openWinPop(a.html,"»õâÀÓ","form À̸§",[³ÐÀÌ,³ôÀÌ,xÁÂÇ¥,yÁÂÇ¥,scroll¿©ºÎ,resizable¿©ºÎ,ÁÖ¼Òâ¿©ºÎ,menu var ¿©ºÎ,toolbar ¿©ºÎ,»óŹ٠¿©ºÎ])
* openWinPop(act,"popupWin","form2") -> form µ¥ÀÌŸ¸¦ submit Çϸ鼭 ÀϹÝÀûÀΠâ Å©±â
* openWinPop("test.web","popupWin","form2",["500","600"]) -> form µ¥ÀÌŸ¸¦ submit Çϸ鼭 Æ˾÷ »çÀÌÁî°¡ 500,600 À» ¶ç¿ï °æ¿ì
* openWinPop(act,"popupWin"); form µ¥ÀÌŸ¾øÀÌ ÀϹÝÀûÀÎ Å©±âÀÇ Æ˾÷À» ¶ç¿ï°æ¿ì
* openWinPop("test.web?a=1","popupWin","",["500","600"]) -> form µ¥ÀÌŸ¾øÀÌ Æ˾÷À» ¶ç¿ï °æ¿ì
* scrollÀº default=yesÀÓ , center°¡ yes·Î µÇ¾îÀ־ x,yÁÂÇ¥°¡ ÀÖÀ¸¸é ÁÂÇ¥¿¡ µû¸¥´Ù.
* @param url : ÁÖ¼Ò * @param popname : À©µµ¿ì À̸§ * @param option : â°ü·Ã ¿É¼Ç(¹è¿­ Çü½Ä) */ function openWinPop(url, popname , formName , option) { var sFeatures =""; if(option != undefined){ var popWidth = option[0] == "" ? "600" : option[0]; var popHeight = option[1] == "" ? "450" : option[1]; var popLeft = option[2] == "" ? 0 : option[2]; var popTop = option[3] == "" ? 0 : option[3]; var popScroll = option[4] == "" ? "no" : option[4]; var popResize = option[5] == "" ? "yes" : option[5]; var popLocation = option[6] == "" ? "no" : option[6]; var popMenubar = option[7] == "" ? "no" : option[7]; var popToolbar = option[8] == "" ? "no" : option[8]; var popStatus = option[9] == "" ? "no" : option[9]; sFeatures = "width="+popWidth; sFeatures += ",height="+popHeight; sFeatures += ",left="+popLeft; sFeatures += ",top="+popTop; sFeatures += ",scrollbars="+popScroll; sFeatures += ",resizable="+popResize; sFeatures += ",location="+popLocation; sFeatures += ",menubar="+popMenubar; sFeatures += ",toolbar="+popToolbar; sFeatures += ",status="+popStatus; } if(formName != undefined && formName != "") { var newWin = window.open('', popname, sFeatures); var submitform = eval("document."+formName); submitform.action=url; submitform.target=popname; submitform.submit(); // XecureSubmit(submitform); } else { // var newWin = window.open(url, popname, sFeatures); var newWin = XecureNavigate(url, popname, sFeatures); newWin.focus(); return newWin; } } /** * onblur À̺¥Æ®¿¡ »ç¿ëµÇ¸ç ù¹ø° ÀÎÀÚ¿Í ÇØ´ç input ¶Ç´Â select °´Ã¼°ªÀÌ µ¿ÀÏÇϸé * ÇÑ°³ÀÌ»óÀÇ ÀÎDz,select âÀ» inable,disable ½ÃÅ°±â *
ex: *
ÆûÀÌ ÀÖÀ»°æ¿ì(ÆûÀ̸§:aForm) ex : onblur=orderDisableDiv('aaa',['aForm.dis1','aForm.dis2',...]) *
ÆûÀÌ ¾øÀ»°æ¿ì ex : onblur=orderDisableDiv('aaa',['dis1','dis2',...]) * @param divValue : disable ±âÁØ°ª * @param divName : disable ½Ãų °³Ã¼ÀÇ name(¹è¿­ 1°³ ÀÌ»ó) */ function orderDisableDiv(divValue,divName) { var eventValue = event.srcElement.value; if(eventValue == divValue) { for(var i = 0 ; i < divName.length ; i++) { var eventTag = eval(divName[i]); //inputâÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "input" ) { eventTag.readOnly = true; eventTag.disabled = true; eventTag.style.backgroundColor = "#cccccc"; } //select boxÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "select") eventTag.disabled = true; } } else { for(var i = 0 ; i < divName.length ; i++) { var eventTag = eval(divName[i]); //inputâÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "input" ) { eventTag.readOnly = false; eventTag.disabled = false; eventTag.style.backgroundColor = ""; } //select boxÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "select") eventTag.disabled = false; } } } /** * ´Þ·Â ¶ç¿ì±â *
ex : sp_calendar('aform.cal1') * @param : ¸®ÅÏ°ªÀÌ µé¾î°¥ inputÀÇ name */ function openCalendar(name,orgObject) { /* var targetDate = eval(name); var tDateValue = getOnlyNumberFormat(targetDate.value); if(tDateValue.length == 0 ) { document.getElementById("minical_ifr").contentWindow.Calendar(targetDate, null, event); } else if(validateDate8(tDateValue)) { document.getElementById("minical_ifr").contentWindow.Calendar(targetDate, null, event); } else { targetDate.select(); } */ var _orgObject=orgObject; var targetDate = eval(name); var tDateValue = getOnlyNumberFormat(targetDate.value); if(tDateValue.length == 0 ) { Calendar(targetDate, null, event,_orgObject); } else if(validateDate8(tDateValue)) { Calendar(targetDate, null, event,_orgObject); } else { targetDate.select(); } $("#minical").focus(); } /** * ´Þ·Â ¶ç¿ì±â À§Ä¡ÁöÁ¤À» ÇÒ ¼ö ÀÖ´Ù.(´Þ·Â À̹ÌÁö ¹öÆ°À» ±âÁØÀ¸·Î x,yÃàÀ¸·ÎºÎÅÍ ¸¶À̳ʽº) *
ex : sp_calendar('aform.cal1', '100' , '100') * @param : ¸®ÅÏ°ªÀÌ µé¾î°¥ inputÀÇ name, x, y */ function openCalendarPosition(name, x , y) { var targetDate = eval(name); var tDateValue = getOnlyNumberFormat(targetDate.value); if(tDateValue.length == 0 ) { document.getElementById("minical_ifr").contentWindow.CalendarPosition(targetDate, x, y, event); } else if(validateDate8(tDateValue)) { document.getElementById("minical_ifr").contentWindow.CalendarPosition(targetDate, x, y, event); } else { targetDate.select(); } } /** * µðºñ Äõ¸® ¸®½ºÆ® Æ˾÷. ÀÌ¹Ì µî·ÏµÇ¾î ÀÖ´Â Æ˾÷ActionÀÇ URL°ú Æ˾÷¿¡¼­ ¼±ÅÃµÈ °ªÀÌ ÀÔ·ÂµÉ parentâÀÇ nameÀ» ³Ñ±â¸é * Æ˾÷¿¡¼­ ¼±ÅÃµÈ °ªÀÌ ¼ÂÆÃµÊ °ª µÎ°³¸¦ ¼ÂÆÃÇÏ¿© parentâ¿¡ inputname, inputname_display¿¡ ¼ÂÆõÊ. *
ex : openPopupUnit("popup.web","form1.name","500","600"){ * @param targetUrl : Æ˾÷À¸·Î µî·ÏµÇ¾î ÀÖ´Â Action URL * @param inputName : parentâ¿¡¼­ °ªÀ¸·Î »ç¿ëµÉ input name * @param width : Æ˾÷â ³ÐÀÌ * @param height : Æ˾÷â ³ôÀÌ */ function openPopupUnit(targetUrl,inputName,width,height){ var url = targetUrl + "?inputName="+inputName; var popupWin = window.open(url,"popupWin","width="+width+",height="+height+",toolbar=no,resizable=yes"); } /** * ¼öÁ¤ , »èÁ¦, ¼öÁ¤Ãë¼Ò,»èÁ¦Ãë¼Ò ¹öÆ° Ŭ¸¯½ÃÀÇ ¹öÆ° enable ÇÔ¼ö *
ex : displayBtnOrder( "doUpdateCancel" ) * @param targetMethod : ¼öÁ¤,»èÁ¦ ¼öÁ¤Ãë¼Ò,»èÁ¦Ãë¼ÒÀÇ ¸í·É°ª. /js/common.js¿¡ µî·ÏµÇ¾î ÀÖÀ½. */ function displayBtnOrder( targetMethod ) { if ( targetMethod == updateMethod ) { registeTD.style.display="none"; updateConfirmTD.style.display="inline"; updateCancelTD.style.display="inline"; deleteConfirmTD.style.display="none"; deleteCancelTD.style.display="none"; } else if( targetMethod == deleteMethod ) { registeTD.style.display="none"; updateConfirmTD.style.display="none"; updateCancelTD.style.display="none"; deleteConfirmTD.style.display="inline"; deleteCancelTD.style.display="inline"; } else { registeTD.style.display="inline"; updateConfirmTD.style.display="none"; updateCancelTD.style.display="none"; deleteConfirmTD.style.display="none"; deleteCancelTD.style.display="none"; } } /** * üũ¹Ú½º üũ Ç®±â *
ex : unCheckedCheckBoxState( "name" ) * @param checkName : uncheck ÇÒ Ã¼Å© ¹Ú½º À̸§ */ function unCheckedCheckBoxState( checkName ) { var checkingBox = eval( "form1."+checkName ); if(checkingBox.length == undefined) { checkingBox.checked = false; } else { for(var i = 0 ; i < checkingBox.length ; i++) { if(checkingBox[i].checked == true) { checkingBox[i].checked = false; } } } } /** * ÇÑ°³ ÀÌ»óÀÇ Ã¼Å©¹Ú½ºÀÇ »óÅ Á¡°ËÇϱâ *
ex : searchCheckBoxState( "name" ) * @param »óŸ¦ Á¡°ËÇÒ Ã¼Å©¹Ú½º À̸§ * @return array[0] üũ¹Ú½ºÁß Ã¼Å©µÈ °¹¼ö,array[1] üũµÈ °ÍÁß ¸¶Áö¸·À¸·Î üũµÈ üũ¹Ú½ºÀÇ value */ function searchCheckBoxState( checkName ) { var checkCnt = 0; var checkedLine = 0; var checkingBox = eval( "form1."+checkName ); if(checkingBox.length == undefined) { if(checkingBox.checked == true) return [1,0]; else return [0,0]; } for(var i = 0 ; i < checkingBox.length ; i++) { if(checkingBox[i].checked == true) { checkCnt++; checkedLine = checkingBox[i].value; } } return [checkCnt,checkedLine]; } /** * ÀÎDz âÀÇ »óÅ º¯°æ readOnly,color »ö»ó º¯°æ *
changeReadOnlyState(["name1","name2"]) * @param »óŸ¦ º¯°æÇÒ ÀÎDz â À̸§ ¹è¿­ */ function changeReadOnlyState(changeArray) { for(var i = 0 ; i < changeArray.length ; i++) { var eventTag = eval(changeArray[i]); //inputâÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "input" ) { eventTag.readOnly = true; eventTag.style.color = "#777777"; } //select boxÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "select") eventTag.disabled = true; } } /** * ÀÎDz âÀÇ »óÅ º¯°æ Editable,color »ö»ó º¯°æ *
changeEditableState(["name1","name2"]) * @param »óŸ¦ º¯°æÇÒ ÀÎDz â À̸§ ¹è¿­ */ function changeEditableState(changeArray) { for(var i = 0 ; i < changeArray.length ; i++) { var eventTag = eval(changeArray[i]); //inputâÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "input" ) { eventTag.readOnly = false; eventTag.style.color = ""; } //select boxÀ϶§ if ( eventTag.tagName.toString().toLowerCase() == "select") eventTag.disabled = false; } } /** * Á¶È¸ÀÏÀÌ ¿À´Ã ³¯Â¥º¸´Ù Å«Áö üũ *
ex : validateSearchDate("20060812", "20060812" ) * @param startDate : üũÇÒ ³¯Â¥(yyyymmdd) , * @param nowDate : ±âÁØ ³¯Â¥(yyyymmdd) * @return : boolean */ function validateSearchDate(startDate, nowDate ) { if(startDate.length > 8) { i18nAlert("Á¶È¸ÀÏÀÌ À߸øµÇ¾ú½À´Ï´Ù."); return false; } if( parseInt(startDate,10) > parseInt(nowDate,10) ) { return false; } return true; } /** * Á¶È¸±â°£ üũ * ex : validateSearchPeriodDate("20060613","20060714",3) * @param startDate : Á¶È¸ ½ÃÀÛÀÏ(yyyymmdd) * @param nowDate : ±âÁØ ÀÏ(yyyymmdd) * @param period : Á¶È¸ ±â°£(int) * @return : boolean */ function validateSearchPeriodDate(startDate, nowDate , period) { if(startDate.length > 8) { i18nAlert("Á¶È¸ÀÏÀÌ À߸øµÇ¾ú½À´Ï´Ù."); return false; } var startYY = parseInt(startDate.substring(0,4),10); var endYY = parseInt(nowDate.substring(0,4),10); var startMM = parseInt(startDate.substring(4,6),10); var endMM = parseInt(nowDate.substring(4,6),10); var startDD = parseInt(startDate.substring(6),10); var endDD = parseInt(nowDate.substring(6),10); var dd = endDD - startDD; var startToEnd = ( ( endYY - startYY ) * 12) + endMM - startMM; if( startToEnd > parseInt(period,10) ) { i18nAlert("Á¶È¸±â°£Àº ÇöÀç¿ù ±âÁØÀ¸·Î \"+period+\"°³¿ù ÀÌÀü±îÁö¸¸ Á¶È¸ °¡´ÉÇÕ´Ï´Ù."); return false; } else if(startToEnd == parseInt(period,10)) { if(dd >= 0) { i18nAlert("Á¶È¸±â°£Àº ÇöÀç¿ù ±âÁØÀ¸·Î \"+period+\"°³¿ù ÀÌÀü±îÁö¸¸ Á¶È¸ °¡´ÉÇÕ´Ï´Ù."); return false; } } return true; } function uf_photo_register(){ } //½ÅÀԱݰèÁÂÁöÁ¤¼­ºñ½º¾È³» function uf_newAccountServiceNotify(){ if (cookie.get("newAccount") != "done"){ open_main_bottom_ifname('/uib/jsp/popup/newAccountServiceNotify.jsp','500', '300','newAccount','newAccount','500'); } } //function uf_news_ibk_150204(){ // if (cookie.get("news_ibk_150204") != "done"){ // open_main_bottom_ifname('/uib/jsp/popup/news_ibk_150204.jsp','500', '300','news_ibk_150204','news_ibk_150204','30'); // } //} /** * È­¸é ÇÁ¸°Æ® * ex : printPage() * @return : void */ function printPage(){ window.print(); } /** * ¹Ý°¢¹®ÀÚ¸¦ Àü°¢¹®ÀÚ·Î º¯È¯ * */ function convert2ByteCharToString(x_string) { // Ư¼ö¹®ÀÚ Àü°¢Ã³¸® var x_2byteString = ""; //ÄÁ¹öÆ®µÈ ¹®ÀÚ for(i=0;i < x_string.length;i++) { var c = x_string.charCodeAt(i); //if(32 <= c && c <= 126) { //Àü°¢À¸·Î º¯È¯µÉ¼ö ÀÖ´Â ¹®ÀÚÀÇ ¹üÀ§ if((32 <= c && c <= 47) || (58 <= c && c <= 64) || (91 <= c && c <= 96) || (123 <= c && c <= 126)) { //Àü°¢À¸·Î º¯È¯µÉ¼ö ÀÖ´Â ¹®ÀÚÀÇ ¹üÀ§ if(c == 32) { //½ºÆäÀ̽ºÀΰæ¿ì ascii ÄÚµå 32 //¾Æ·¡¿Í °°ÀÌ º¯È¯½Ã ±úÁü. //x_2byteString = x_2byteString + unescape("%uFFFC"); x_2byteString = x_2byteString + unescape("%u"+gf_DecToHex(12288)); } else { x_2byteString = x_2byteString + unescape("%u"+gf_DecToHex(c+65248)); } }else{ x_2byteString = x_2byteString + x_string.charAt(i); } } return x_2byteString; } function convert2ByteChar(x_char) { var x_2byteChar = ""; //ÄÁ¹öÆ®µÈ ¹®ÀÚ var c = x_char.charCodeAt(0); if(32 <= c && c <= 126) { //Àü°¢À¸·Î º¯È¯µÉ¼ö ÀÖ´Â ¹®ÀÚÀÇ ¹üÀ§ if(c == 32) { //½ºÆäÀ̽ºÀΰæ¿ì ascii ÄÚµå 32 //¾Æ·¡¿Í °°ÀÌ º¯È¯½Ã ±úÁü. //x_2byteChar = unescape("%uFFFC"); x_2byteChar = unescape("%u"+gf_DecToHex(12288)); } else { x_2byteChar = unescape("%u"+gf_DecToHex(c+65248)); } } return x_2byteChar; } function gf_DecToHex(dec) { return dec.toString(16); } /* * È­¸éŬ¸¯½Ã Æ˾÷ DIV °¨Ãß´Â ÇÔ¼ö * À¥Äɽà ÀÌÀçÈ£ 2008.11.16 */ var _HiddenIfrmObj; //var _isIfrmView = "false"; var _isLayerOpen = "false"; //var _isLayerLoad; function hiddenIfrm(){ try{ // ¹®¼­ TITLE ÁöÁ¤ // Æ˾÷â ŸÀÌƲ¿¡ url ¹× '#'Ç¥½Ã ¾È³ª¿À°Ô.... document.title = " IBK ±â¾÷ÀºÇà "; if(_isLayerOpen == "false"){ //_isLayerLoad = "false"; return; } //if(_HiddenIfrmObj != undefined && _isIfrmView == "true" && layer_opened != null && (_HiddenIfrmObj.style.display != "none" || _HiddenIfrmObj.style.visibility == "visible")){ if(_HiddenIfrmObj != undefined && (_HiddenIfrmObj.style.display != "none" || _HiddenIfrmObj.style.visibility == "visible")){ if(_HiddenIfrmObj.style.display != 'none') _HiddenIfrmObj.style.display = 'none' if(_HiddenIfrmObj.style.visibility == 'visible') _HiddenIfrmObj.style.visibility = 'hidden' _HiddenIfrmObj = undefined; //_isIfrmView = "false"; //layer_opened = null; _isLayerOpen = "false"; } }catch(e){} } function enableScroll(){ window.execScript("document.onmousewheel = function(){return true;}"); window.execScript("document.onkeydown = function(){return true;}"); } /* * ¸µÅ©Å¬¸¯½Ã, ¸¶¿ì½º½ºÅ©·Ñ½Ã shiftÅ° ¹æÁö * ¸µÅ© »õâÀ¸·Î ¿­¸®°Å³ª, shift ´©¸¥ »óÅ¿¡¼­ ½ºÅ©·Ñ½Ã µÚ·Î°¡±â, ¾ÕÀ¸·Î°¡±â ¹æÁö. */ function processShift() { try { if(event.shiftKey) { event.returnValue = false; } } catch(e) {} } try{ if(document.body.onclick == null || document.body.onclick == undefined) document.body.onclick = processShift; if(document.body.onmousewheel == null || document.body.onmousewheel == undefined) document.body.onmousewheel = processShift; }catch(e){} // ¸¶¿ì½º ±â´É Á¦ÇÑ(¿À¸¥ÂÊ ¹öÆ° ¹«½Ã var IS_INT_MOUSE = false; // Ư¼öÅ° ±â´É Á¦ÇÑ(Ctrl + R, Ctrl + N, F5, Ctrl + V) var IS_INT_KEY = false; if("R" != "T"){ IS_INT_MOUSE = true; IS_INT_KEY = true; } if(IS_INT_MOUSE) { document.oncontextmenu = function(){return false} document.body.onselectstart = function(){return false} } if (IS_INT_KEY){ if(document.body) document.body.onkeydown = processKey; } function processKey() { if((event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82/* --Ctrl + V Çã¿ë-- || event.keyCode == 86*/)) || (event.keyCode >= 112 && event.keyCode <= 123)) { if(event.keyCode == 116){ uf_alert('»õ·Î°íħ ÇÒ ¼ö ¾ø´Â ÆäÀÌÁöÀÔ´Ï´Ù.'); } event.keyCode = 0; event.cancelBubble = true; event.returnValue = false; return false; } } // ·¹À̾î À̵¿°ü·Ã ÇÔ¼ö if(document.all.head != null && document.all.head != undefined) { document.all.head.onmousedown = ifrDragStart; } // ¼¼¼ÇŸÀÓüũº¯¼ö ÃʱâÈ­ try{ if(document.all.hahaha == undefined && document.all.timer1 == undefined){ if(parent){ parent.uf_reset_timeout(); } if(opener){ opener.uf_reset_timeout(); } } }catch(e){} // »õâ ÀÚµ¿Å©±â Á¶Àý if(opener){ var w; var h; var cw; var ch; var doc = document; var win = window; w = doc.body.offsetWidth; h = doc.body.scrollHeight; ch = doc.body.clientHeight; if(doc.XGridObj != undefined){ doc.XGridObj.style.width = '100%'; //h = h - 17; } if(h > 700){ h = 700 doc.body.style.overflow=''; w = w + 20; win.resizeTo(w, h); }else{ win.resizeBy(0, h-ch); //doc.body.style.overflow='hidden'; } var nLeft = screen.width/2 - w/2 ; var nTop = screen.height/2 - h/2 ; win.moveTo(nLeft, nTop); } //ºê¶ó¿ìÀú ŸÀÌƲ Á¤º¸ var docTitle = document.title; var url = window.location.href+''; var docLocaleCode = "KO"; try {docLocaleCode = calendarLocale;} catch (e) {} docTitle = (("KO"==docLocaleCode)?"±â¾÷ÀÎÅͳݹðÅ·":"Corporate Internet Banking") + ' - 6'; document.title = docTitle; if(parent){ parent.document.title = docTitle; } //À¥·Î°Å(ÆäÀÌÁöºä Ä«¿îÆ®) ¼Ò½º var weblog_port = ''; if(url.indexOf('kiup') > -1) weblog_port = '1004'; //±â¾÷ else weblog_port = '1003'; //°³ÀÎ // var arrForms = new Array (document.form1, document.form2, parent.document.form1, parent.document.form2); for(var i = 0 ; i < arrForms.length ; i++) { if (arrForms[i] != undefined) { try {clearFieldWithFrm(arrForms[i], 'HTML_TOKEN_EXCEPT_URL'); } catch (e) {} try {clearFieldWithFrm(arrForms[i], 'XGridHiddenFrame'); } catch (e) {} try {clearFieldWithFrm(arrForms[i], 'n_attention_4_xgrid');} catch (e) {} try {clearFieldWithFrm(arrForms[i], 'hiddenFrame_submit');} catch (e) {} } } // ÇØÅ·Â÷´Ü±â ½ÇÇà //document.write(''); function openFraudPopup() { } $(document).ready(function(){ try { $("input[readonly=true]").on("keydown", function(event) { if (event.keyCode == 8) { event.preventDefault(); } }); $("input[readonly=readonly]").on("keydown", function(event) { if (event.keyCode == 8) { event.preventDefault(); } }); } catch(e) {} if(navigator.userAgent.indexOf('Firefox') >=0){ (function(){ var events=["mousedown","mouseover","mouseout","mousemove","mousedrag","click","dbclick","keypress","keyup"]; for(var i=0;i 0) { for(var i = 0; i < _str.length; i++) { var tmpChar = _str.charAt(i); var regExp = new RegExp("^[°¡-Èþ]+$", "g"); var matches = regExp.exec(tmpChar); if (matches != null) { var isWhanSungHangul = false; for(var k = 0; k < WHANG_SUNG_HANGUL.length; k++) { if(WHANG_SUNG_HANGUL[k] == tmpChar) { isWhanSungHangul = true; break; } } if(isWhanSungHangul == false) { return {isWhanSung : false, errorChar : tmpChar}; } } } return {isWhanSung : true}; } return {isWhanSung : false, errorChar : ''}; } }; }(); try {if (parent.tokenValue != undefined) {parent.clearFieldWithFrm(parent.document.form1,'HTML_TOKEN_EXCEPT_URL');}} catch(e){}