function isNum(s) { if (parseInt(s) > 0) { return true; } return false; } function checkNum(finput,msg) { if(isNum(finput.value)) { return true; } else { if(msg) { window.alert(msg); } finput.focus(); return false; } } function checkDate(finput) { var check = true; var myDate = finput.value.replace(/-/g,""); myDate = myDate.replace(/\s/g,""); myDate = myDate.replace(/\//g,""); if(myDate.length != 8) { check = false; } var year = parseInt(myDate.substr(0,4)); var month = parseInt(myDate.substr(4,2)); var day = parseInt(myDate.substr(6,2)); var today = new Date(); if(year<0 || year> today.getFullYear()) { check = false; } if(month<0 || month>12) { check = false; } if(day<0 || day>31) { check = false; } var pub_date = new Date(year,month,day); if(pub_date > today) { check = false; } if(!check) { window.alert("À߸øµÈ ³¯Â¥Çü½ÄÀÔ´Ï´Ù."); finput.focus(); } return check; } function checkLen(finput, minLen, maxLen, inputName) { len=0; // String ±æÀ̸¦ ±¸ÇÏ´Â ºÎºÐ.. for(i=0;i < finput.value.length; i++) { if(finput.value.charCodeAt(i) > 255) { len = len + 2; } else { len = len + 1; } } // ±æÀÌ È®ÀÎ. if (minLen > len) { if(minLen == maxLen) { msg = inputName + "Àº(´Â) " + minLen + "ÀÚ·Î ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù(ÇѱÛÀº ±ÛÀÚ´ç 2ÀÚ·Î °è»êµË´Ï´Ù.)"; } else { msg = inputName + "Àº(´Â) " + minLen + "ÀÚ¸¦ ÀÌ»ó ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù(ÇѱÛÀº ±ÛÀÚ´ç 2ÀÚ·Î °è»êµË´Ï´Ù.)"; } window.alert(msg); finput.focus(); return false; } if (maxLen < len) { window.alert(inputName + "Àº(´Â) " + maxLen + "ÀÚ¸¦ ³ÑÀ» ¼ö ¾ø½À´Ï´Ù(ÇѱÛÀº ±ÛÀÚ´ç 2ÀÚ·Î °è»êµË´Ï´Ù.)"); finput.focus(); return false; } return true; } function checkEmpty(finput,msg) { if(finput.value) { return true; } else { if(msg) { window.alert("\"" + msg + "\"¸¦(À») ÀÔ·ÂÇØÁֽʽÿÀ."); finput.focus(); } return false; } } function checkSelection(finput,msg) { //window.alert(finput.name); var i = finput.selectedIndex; if(finput.options[i].value == 0 || finput.options[i].value == "") { if(msg) { window.alert("\"" + msg + "\"ÀÌ(°¡) ¼±ÅõÇÁö ¾Ê¾Ò½À´Ï´Ù."); finput.focus(); } return false; } else { return true; } } function checkRadio(finput,msg) { for( i = 0; i < finput.length; i++ ) { if(finput[i].checked == true) { return true; } } if(msg) { window.alert("\"" + msg + "\"ÀÌ(°¡) üũµÇÁö ¾Ê¾Ò½À´Ï´Ù."); } return false; } function setSelect(sel, value) { //window.alert(sel.name + ":" + value); if(value != "") { len = sel.length; for( i = 0; i < len; i++ ) { o = sel.options[i]; //window.alert(o.value); if(o.value == value) { o.selected = true; break; } } } } function setRadio(rad, value) { if(value != "") { for( i = 0; i < rad.length; i++ ) { if( rad[i].value == value ) { rad[i].checked = true; break; } } } } function setCheck(chk, value) { if(value != "") { chk.checked = true; } } function hanCheck(finput, msg) { for(i=0;i 128) { alert( msg + '¿¡´Â ÇѱÛÀ» ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.'); finput.value=""; finput.focus(); return false; } } return true; } function onlyNumber() { if (event.keyCode < 45 || event.keyCode > 57) { window.alert("¼ýÀÚ¸¸ ÀԷ°¡´ÉÇÕ´Ï´Ù"); event.keyCode = 0; } } function pl(str) { document.write("Javascript Debug: "); document.write(str + "
\n"); } function popMsg(msg) { window.alert(msg); } function popUp( url,name,toolbar,location,status,menubar,scrollbars,resizable,width,height) { features = "toolbar=" + toolbar + ",location=" + location + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",width=" + width + ",height=" + height; window.open( url, name, features); } function link( url ) { if(url.length > 0) { url = "http://" + url; popUp(url,"link","yes","yes","yes","yes","yes","yes",800,600); } } function goTo(url) { if(url != "") { document.location.href = url; } } function go(target) { var url = ""; switch(target) { case"home": url = "/index.php"; break; case "login" : url = "/user/login.php"; break; case "logout" : url = "/user/logout.php"; break; case "reg" : url = "/pages2.php?page=user/register"; break; case "findpass" : url = "/user/find_idpass.php"; break; case "mypage" : url = "/mypage/mypage_list.php"; break; case "customer" : //url = "/user/customer_center.php"; break; case "sitemap" : //url = "/sitemap.html"; break; case "intro" : //url = "/intro.html"; break; case "usage" : url = "/pages2.php?page=etc/guest_use"; break; case "priv" : url = "/pages2.php?page=user/priv_protect"; break; case "invest" : url = "/invest/invest_list.php"; break; case "search" : url = "/pages2.php?page=etc/refer_service_bank"; break; default : //window.alert(target + " ¸Þ´º´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù."); break; } goTo(url); } function go_cat( cid ) { if(cid > 0) { document.location.href = "/company/select_area.php?cid=" + cid; } } function admin() { document.location.href = "/admin/index.php"; } function goApprove() { document.location.href = "/admin/sales/sales_list.php"; } function hideMsg() { window.status=''; document.MM_returnValue = true; //setTimeout("hideMsg()",1); } //hideMsg(); function hidestatus() { window.status=''; return true //setTimeout("hidestatus()", 1000); } if (document.layers) document.captureEvents(Event.mouseover | Event.mouseout) document.onmouseover=hidestatus document.onmouseout=hidestatus document.onmousedown=hidestatus