function btnSubmit(obj) { // ID È®ÀÎ if ( false == checkFormID(obj.id) ) { return ; } // ºñ¹Ð¹øÈ£ È®ÀÎ ¹× ÀçÈ®ÀÎ if ( false == checkFormPWD(obj.passwd) ) { return ; } // À̸§ È®ÀÎ if ( false == checkFormcName(obj.c_name_kr ,'¾÷ü¸íÀ» ' ) ) { return ; } if ( false == checkFormcName(obj.ceo_name ,'´ëÇ¥ÀÚ¸¦ ' ) ) { return ; } // ¿ìÆí ¹øÈ£ if ( false == checkFormZip(obj.sZip) ) { return ; } // ÁÖ¼Ò if ( false == checkFormAddress(obj.sAddr1) ) { return ; } if ( false == checkFormAddress(obj.sAddr2) ) { return ; } if ( false == checkFormcName(obj.item_list ,'Àü½Ãǰ¸ñÀ» ' ) ) { return ; } if ( false == checkFormcName(obj.c_num1 ,'»ç¾÷ÀÚ¹øÈ£¸¦ ' ) ) { return ; } if ( false == checkFormcName(obj.up ,'¾÷Ÿ¦ ' ) ) { return ; } if ( false == checkFormcName(obj.jong ,'Á¾¸ñÀ» ' ) ) { return ; } if ( false == checkFormcName(obj.name ,'´ã´çÀÚ¸¦ ' ) ) { return ; } if ( false == checkFormcName(obj.buse ,'ºÎ¼­¸¦ ' ) ) { return ; } if ( false == checkFormcName(obj.jik ,'Á÷À§À» ' ) ) { return ; } // ÀüÈ­ if ( false == checkFormTel(obj.sTel1) ) { return; } if ( false == checkFormTel(obj.sTel2) ) { return; } if ( false == checkFormTel(obj.sTel3) ) { return; } if ( false == checkFormTel(obj.sFax1) ) { return; } if ( false == checkFormTel(obj.sFax2) ) { return; } if ( false == checkFormTel(obj.sFax3) ) { return; } if ( false == checkFormTel(obj.sHp1) ) { return; } if ( false == checkFormTel(obj.sHp2) ) { return; } if ( false == checkFormTel(obj.sHp3) ) { return; } // Email È®ÀÎ if ( false == checkFormEmail(obj.sEmail) ) { return; } if ( false == checkFormcName(obj.homepage ,'ȨÆäÀÌÁö¸¦ ' ) ) { return ; } if ( false == checkFormView() ) { return ; } if ( false == checkFormBooth(obj.booth_1 , obj.booth_2 ) ) { return ; } obj.submit(); } function checkFormView() { if(document.app_form.item[0].checked== false && document.app_form.item[1].checked== false && document.app_form.item[2].checked== false && document.app_form.item[3].checked== false && document.app_form.item[4].checked== false ) { alert ("Àü½Ãǰ¸ñ ºÐ·ù¸¦ ¼±ÅÃÇÏ¿© Áֽʽÿä."); document.app_form.item[0].focus(); return false; } if(document.app_form.viewcase[0].checked== false && document.app_form.viewcase[1].checked== false && document.app_form.viewcase[2].checked== false && document.app_form.viewcase[3].checked== false && document.app_form.viewcase[4].checked== false ) { alert ("Àü½Ãǰ¸ñ ºÐ·ù¸¦ ¼±ÅÃÇÏ¿© Áֽʽÿä."); document.app_form.viewcase[0].focus(); return false; } if(document.app_form.apply[0].checked== false && document.app_form.apply[1].checked== false) { alert ("±âÂü°¡¿©ºÎ¸¦ ¼±ÅÃÇÏ¿© Áֽʽÿä."); document.app_form.apply[0].focus(); return false; } } function checkFormBooth4(obj1, obj2 , obj3 , obj4 ) { result1 = isSpace(obj1); result2 = isSpace(obj2); result3 = isSpace(obj3); result4 = isSpace(obj4); if ( false == result1 && false == result2 && false == result3 && false == result4 ) { alert( ' ºÎ½º¸¦ ÀÔ·ÂÇϽŠÈÄ¿¡ È®ÀÎÇϼ¼¿ä. '); obj1.focus(); obj1.select(); return false; } result1 = isNumber(obj1); result2 = isNumber(obj2); result3 = isNumber(obj3); result4 = isNumber(obj4); if ( false == result1 || false == result2 || false == result3 || false == result4) { alert( ' ¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj1.focus(); return false; } } function checkFormBooth(obj1, obj2 ) { result1 = isSpace(obj1); result2 = isSpace(obj2); if ( false == result1 && false == result2 ) { alert( ' ºÎ½º¸¦ ÀÔ·ÂÇϽŠÈÄ¿¡ È®ÀÎÇϼ¼¿ä. '); obj1.focus(); obj1.select(); return false; } result1 = isNumber(obj1); result2 = isNumber(obj2); if ( false == result1 || false == result2 ) { alert( ' ¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj1.focus(); return false; } } function ChangeSubmit1(obj) { // ºñ¹Ð¹øÈ£ È®ÀÎ ¹× ÀçÈ®ÀÎ if ( false == checkFormPWD(obj.sPwd1) ) { return ; } if (obj.sPwd1.value != obj.sPwd2.value) { return ; } // Email È®ÀÎ if ( false == checkFormEmail(obj.sEmail) ) { return; } // ¿ìÆí ¹øÈ£ if ( false == checkFormZip(obj.sZip) ) { return ; } // ÁÖ¼Ò if ( false == checkFormAddress(obj.sAddr1) ) { return ; } if ( false == checkFormAddress(obj.sAddr2) ) { return ; } // ÀüÈ­ if ( false == checkFormTel(obj.sTel1) ) { return; } if ( false == checkFormTel(obj.sTel2) ) { return; } if ( false == checkFormTel(obj.sTel3) ) { return; } obj.submit(); } // À̺¥Æ®¼º - ·Î±ä½Ã ȸ¿øÁ¤º¸ confirm ---------- function eventMemInfo(obj) { // Email È®ÀÎ if ( false == checkFormEmail(obj.Email) ) { return; } // ÀüÈ­ if ( false == checkFormTel(obj.Phone1) ) { return; } if ( false == checkFormTel(obj.Phone2) ) { return; } if ( false == checkFormTel(obj.Phone3) ) { return; } // Mobile if ( false == checkFormTel(obj.Mobile1) ) { return; } if ( false == checkFormTel(obj.Mobile2) ) { return; } if ( false == checkFormTel(obj.Mobile3) ) { return; } obj.submit(); } //----------------------------------------------- function checkFormID(obj) { result = isSpace(obj); if ( false == result ) { alert(' ID¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); return false; } result = isSpecialKey(obj); if ( true == result ) { alert ( ' Ư¼ö¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. '); obj.focus(); obj.select(); return false; } result = checkCode(obj); if ( true == result ) { alert ( ' Ư¼ö¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. '); obj.focus(); obj.select(); return false; } result = checkRange(obj, 4, 10); if ( false == result ) { alert ( ' ¿µ/¼ýÀÚ 4~10ÀÚ À̳»·Î ÀÔ·ÂÇϼ¼¿ä. '); obj.focus(); obj.select(); return false; } } function checkFormPWD(obj) { result = isSpace(obj); if ( false == result ) { alert( ' ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇϽŠÈÄ¿¡ È®ÀÎÇϼ¼¿ä. '); return false; } result = isSpecialKey(obj); if ( true == result ) { alert ( ' Ư¼ö¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù '); obj.focus(); obj.select(); return false; } result = checkRange(obj, 4, 10); if ( false == result ) { alert ( ' ¿µ/¼ýÀÚ 4~10ÀÚÀ̳»·Î ±âÀçÇØ ÁÖ¼¼¿ä. '); obj.focus(); obj.select(); return false; } } function checkFormEmail(obj) { result = isSpace(obj); if ( false == result ) { alert( ' EmailÀ» ÀÔ·ÂÇϽŠÈÄ¿¡ È®ÀÎÇϼ¼¿ä. '); obj.focus(); obj.select(); return false; } result = isSKey4Email(obj); if ( true == result ) { alert ( ' Ư¼ö ¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ') obj.focus(); obj.select(); return false; } if ( obj.value.indexOf(".") < 0 || obj.value.indexOf("@") < 0 ) { alert ( ' À̸ÞÀÏ ÁÖ¼Ò¸¦ ´Ù½Ã È®ÀÎÇÏ¿© Áֽʽÿä. ') obj.focus(); obj.select(); return false; } } function checkFormName(obj) { result = isSpace(obj); if ( false == result ) { alert ( ' À̸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ' ); return false; } result = isSpecialKey(obj); if ( true == result ) { alert ( ' Ư¼ö¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù '); obj.focus(); obj.select(); return false; } result = checkRange(obj, 4, 8) if ( false == result ) { alert ( ' À̸§ÀÌ ³Ê¹« ª°Å³ª ±é´Ï´Ù. ' ); obj.focus(); obj.select(); return false; } if ( false != isNumber(obj) || false != isAlpha(obj) ) { alert ( ' Çѱ۷ΠÀÔ·ÂÇØ ÁÖ¼¼¿ä. ' ); obj.focus(); obj.select(); return false; } } function checkFormcName(obj,str) { result = isSpace(obj); if ( false == result ) { alert ( str + 'ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ' ); obj.focus(); obj.select(); return false; } } function checkFormSNo(obj) { result = isSpace(obj); if ( false == result ) { alert( ' Áֹεî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.'); return false; } result = isNumber(obj); if ( false == result ) { alert ( ' ¼ýÀÚ·Î ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ' ); obj.focus(); obj.select(); return false; } result = checkRange(obj, 6, 6); if ( false == result ) { alert ( ' 6 ÀÚ¸®·Î ÀÔ·ÂÇØÁÖ¼¼¿ä. '); obj.focus(); obj.select(); return false; } } function checkFormSNo1(obj) { //alert('aaa'); var DT = new Date(); var curYear = DT.getYear(); var curMonth = DT.getMonth()+1; var curDay = DT.getDate(); var inYear = "19" + obj.value.substr(0, 2); var inMonth = obj.value.substr(2,2); var inDay = obj.value.substr(4,2); //var inDT = new Date(inMonth/inDay/inYear); var btYear = curYear - inYear; var btMonth = curMonth - inMonth; if (btMonth < 0 ) { btYear = btYear - 1; btMonth = btMonth + 12; } var btDay = curDay - inDay; if (btDay < 0 ) { btMonth = btMonth - 1; if (btMonth < 0 ) { btYear = btYear - 1; btMonth = btMonth + 12; } btDay = btDay + 30; } //var ins = btYear + "-" + btMonth + "-" + btDay; var cur = curYear + "-" + curMonth + "-" + curDay; //var inf = inYear + "-" + inMonth + "-" + inDay; //alert (cur); if (btYear < 10){ alert( '¸¸10¼¼ÀÌ»ó ÀÎ °æ¿ì¿¡ ȸ¿ø°¡ÀÔÀ»\nÇϽǼö ÀÖ½À´Ï´Ù.'); obj.focus(); obj.select(); return false; } if ( inYear < curYear-70 ) { alert ( ' »ýÀϳ⵵·Î´Â ÀûÇÕÇÏÁö ¾ÊÀº ³âµµÀÔ´Ï´Ù. '); obj.focus(); obj.select(); return false; } if ( inMonth > 12 ) { alert( ' À¯È¿ÇÏÁö ¾ÊÀº ´ÞÀÔ´Ï´Ù. '); obj.focus(); obj.select(); return false; } if ( inDay > 31 ) { alert( ' À¯È¿ÇÏÁö ¾ÊÀº ÀÏÀÔ´Ï´Ù. '); obj.focus(); obj.select(); return false; } /* var DT = new Date(inYear, inMonth, inDay); if ( inDay != DT.getDay() || inDay != DT.getMonth() ) { alert ( ' µ¥ÀÌŸ°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù. \n À±³â, À±´ÞÀ» È®ÀÎÇϼ¼¿ä. '); obj.focus(); obj.select(); return false; } */ } function checkFormSNo2(obj) { result = isSpace(obj); if ( false == result ) { alert( ' Áֹεî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.'); return false; } result = isNumber(obj); if ( false == result ) { alert ( ' ¼ýÀÚ·Î ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ' ); obj.focus(); obj.select(); return false; } result = checkRange(obj, 7, 7); if ( false == result ) { alert ( ' 7 ÀÚ¸®·Î ÀÔ·ÂÇØÁÖ¼¼¿ä. '); obj.focus(); obj.select(); return false; } } function CheckDigitsSNo(formNo1, formNo2) { var socialno; var i; var val0, val1, val2, val3, val4, val5, val6, val7, val8, val9, val10, val11, val12; var sum, checkno; // check-digit °Ë»ç val0 = parseInt(formNo1.value.charAt(0)) * 2; val1 = parseInt(formNo1.value.charAt(1)) * 3; val2 = parseInt(formNo1.value.charAt(2)) * 4; val3 = parseInt(formNo1.value.charAt(3)) * 5; val4 = parseInt(formNo1.value.charAt(4)) * 6; val5 = parseInt(formNo1.value.charAt(5)) * 7; val6 = parseInt(formNo2.value.charAt(0)) * 8; val7 = parseInt(formNo2.value.charAt(1)) * 9; val8 = parseInt(formNo2.value.charAt(2)) * 2; val9 = parseInt(formNo2.value.charAt(3)) * 3; val10 = parseInt(formNo2.value.charAt(4)) * 4; val11 = parseInt(formNo2.value.charAt(5)) * 5; val12 = parseInt(formNo2.value.charAt(6)); sum = val0 + val1 + val2 + val3 + val4 + val5 + val6 + val7 + val8 + val9 + val10 + val11; checkno = (11-(sum % 11)) % 10; if (checkno==val12) { return true; }else{ alert('Áֹεî·Ï¹øÈ£°¡ Ʋ¸³´Ï´Ù.'); formNo2.focus(); formNo2.select(); return false; } } function checkFormZip(obj) { result = isSpace(obj); if ( false == result ) { alert( ' ¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.'); return false; } } function checkFormAddress(obj) { result = isSpace(obj); if ( false == result ) { alert( ' ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ' ); obj.focus(); return false; } } function checkFormTel2(obj) { result = isSpace(obj); if ( false == result ) { alert( ' ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); //obj.select(); return false; } } function checkFormTel(obj) { result = isSpace(obj); if ( false == result ) { alert( ' ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); //obj.select(); return false; } result = isNumber(obj); if ( false == result ) { alert( ' ¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); //obj.select(); return false; } } function checkFormBDay(obj) { result = isNumber(obj); if ( false == result ) { alert( ' ¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); obj.select(); return false; } } function checkFormJyear(obj) { result = isSpace(obj); if ( false == result ) { alert( ' ÀÔÇг⵵¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); //obj.select(); return false; } result = isNumber(obj); if ( false == result ) { alert( ' ¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä. '); obj.focus(); //obj.select(); return false; } } function checkFormBan(obj) { if ( obj.value == '0' ) { alert( ' ¹ÝÀ» ¼±ÅÃÇϼ¼¿ä. '); obj.focus(); return false; } } function checkFormHakyear(obj) { if ( obj.value == '0' ) { alert( ' ÇгâÀ» ¼±ÅÃÇϼ¼¿ä. '); obj.focus(); return false; } } //**************************************************** function btnCheckID(obj, ref, W, H) { var Alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' var Digit = '1234567890' if ( !obj.value ) { alert( ' ID¸¦ ÀÔ·ÂÇϽŠÈÄ¿¡ È®ÀÎÇϼ¼¿ä. '); obj.focus(); return true; } if (Tcheck(obj, 'ȸ¿ø ID', Alpha + Digit, 4, 10)) return true; ref = ref + "?UserID=" + obj.value; title = "checkID"; window.open( ref, 'popup', 'scrollbars=no,resizable=no,copyhistory=no,width=450,height=250' ); //open.Window( ref, title, W, H); } function btnCheckEmail2(obj, ref, W, H) { ref = ref + "?email=" + obj.value; title = "check email"; window.open( ref, 'popup', 'scrollbars=no,resizable=no,copyhistory=no,width=400,height=239' ); } function btnCheckEmail(obj, ref, W, H) { ref = ref + "?obj=" + obj.value; title = "checkEmail"; openWindow2( ref, title, W, H); } function btnCheckZipcode(obj, ref, W, H) { ref = ref + "?obj=" + obj.value; title = "checkZipcode"; window.open( ref, 'popup', 'scrollbars=yes,resizable=no,copyhistory=no,width=470,height=500' ); //openWindow2( ref, title, W, H); } function historyback() { history.back(); }