diff --git a/js/common.js b/js/common.js index 92f5e331e..2585b29ab 100644 --- a/js/common.js +++ b/js/common.js @@ -3,9 +3,9 @@ var errmsg = ""; var errfld = null; // 필드 검사 -function check_field(fld, msg) +function check_field(fld, msg) { - if ((fld.value = trim(fld.value)) == "") + if ((fld.value = trim(fld.value)) == "") error_field(fld, msg); else clear_field(fld); @@ -13,7 +13,7 @@ function check_field(fld, msg) } // 필드 오류 표시 -function error_field(fld, msg) +function error_field(fld, msg) { if (msg != "") errmsg += msg + "\n"; @@ -22,7 +22,7 @@ function error_field(fld, msg) } // 필드를 깨끗하게 -function clear_field(fld) +function clear_field(fld) { fld.style.background = "#FFFFFF"; } @@ -36,7 +36,7 @@ function trim(s) { if (s.charAt(i) == ' ') continue; - else + else { from_pos = i; break; @@ -47,12 +47,12 @@ function trim(s) { if (s.charAt(i-1) == ' ') continue; - else + else { to_pos = i; break; } - } + } t = s.substring(from_pos, to_pos); // alert(from_pos + ',' + to_pos + ',' + t+'.'); @@ -61,26 +61,26 @@ function trim(s) // 자바스크립트로 PHP의 number_format 흉내를 냄 // 숫자에 , 를 출력 -function number_format(data) +function number_format(data) { - + var tmp = ''; var number = ''; var cutlen = 3; var comma = ','; var i; - + len = data.length; mod = (len % cutlen); k = cutlen - mod; - for (i=0; i= screen.width) { - winl = 0; - h = (parseInt)(w * (h / w)); - } + if (w >= screen.width) { + winl = 0; + h = (parseInt)(w * (h / w)); + } - if (h >= screen.height) { - wint = 0; - w = (parseInt)(h * (w / h)); - } + if (h >= screen.height) { + wint = 0; + w = (parseInt)(h * (w / h)); + } - var js_url = "