1// Àü¿ª º¯¼ö 2var errmsg = ""; 3var errfld; 4 5// ÇÊµå °Ë»ç 6function check_field(fld, msg) 7{ 8 if ((fld.value = trim(fld.value)) == "") 9 error_field(fld, msg); 10 else 11 clear_field(fld); 12 return; 13} 14 15// ÇÊµå ¿À·ù Ç¥½Ã 16function error_field(fld, msg) 17{ 18 if (msg != "") 19 errmsg += msg + "\n"; 20 if (!errfld) errfld = fld; 21 fld.style.background = "#BDDEF7"; 22} 23 24// Çʵ带 ±ú²ýÇÏ°Ô 25function clear_field(fld) 26{ 27 fld.style.background = "#FFFFFF"; 28} 29 30function trim(s) 31{ 32 var t = ""; 33 var from_pos = to_pos = 0; 34 35 for (i=0; i<s.length; i++) 36 { 37 if (s.charAt(i) == ' ') 38 continue; 39 else 40 { 41 from_pos = i; 42 break; 43 } 44 } 45 46 for (i=s.length; i>=0; i--) 47 { 48 if (s.charAt(i-1) == ' ') 49 continue; 50 else 51 { 52 to_pos = i; 53 break; 54 } 55 } 56 57 t = s.substring(from_pos, to_pos); 58 // alert(from_pos + ',' + to_pos + ',' + t+'.'); 59 return t; 60} 61 62// ÀÚ¹Ù½ºÅ©¸³Æ®·Î PHPÀÇ number_format Èä³»¸¦ ³¿ 63// ¼ýÀÚ¿¡ , ¸¦ Ãâ·Â 64function number_format(data) 65{ 66 var tmp = ''; 67 var number = ''; 68 var cutlen = 3; 69 var comma = ','; 70 var i; 71 var data = String(data); 72 len = data.length; 73 74 mod = (len % cutlen);
75 k = cutlen - mod; 76 for (i=0; i<data.length; i++) 77 { 78 number = number + data.charAt(i); 79 80 if (i < data.length - 1) 81 { 82 k++; 83 if ((k % cutlen) == 0) 84 { 85 number = number + comma; 86 k = 0; 87 } 88 } 89 } 90 91 return number; 92} 93 94 95 96 97// »õ â 98function popup_window(url, winname, opt) 99{ 100 window.open(url, winname, opt); 101} 102 103 104// Æû¸ÞÀÏ Ã¢ 105function popup_formmail(url) 106{ 107 opt = 'scrollbars=yes,width=417,height=385,top=10,left=20'; 108 popup_window(url, "wformmail", opt); 109} 110 111// , ¸¦ ¾ø¾Ø´Ù. 112function no_comma(data) 113{ 114 var tmp = ''; 115 var comma = ','; 116 var i; 117 118 for (i=0; i<data.length; i++) 119 { 120 if (data.charAt(i) != comma) 121 tmp += data.charAt(i); 122 } 123 return tmp; 124} 125 126// »èÁ¦ °Ë»ç È®ÀÎ 127function del(href) 128{ 129 if(confirm("Çѹø »èÁ¦ÇÑ ÀÚ·á´Â º¹±¸ÇÒ ¹æ¹ýÀÌ ¾ø½À´Ï´Ù.\n\nÁ¤¸» »èÁ¦ÇϽðڽÀ´Ï±î?")) 130 document.location.href = href; 131} 132 133// ÄíŰ ÀÔ·Â 134function set_cookie(name, value, expirehours) 135{ 136 var today = new Date(); 137 today.setTime(today.getTime() + (60*60*1000*expirehours)); 138 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"; 139} 140 141// ÄíŰ ¾òÀ½ 142function get_cookie(name) 143{ 144 var find_sw = false; 145 var start, end; 146 var i = 0; 147 148 for (i=0; i<= document.cookie.length; i++) 149 { 150 start = i; 151 end = start + name.length; 152 153 if(document.cookie.substring(start, end) == name) 154 { 155 find_sw = true 156 break 157 } 158 } 159 160 if (find_sw == true) 161 { 162 start = end + 1; 163 end = document.cookie.indexOf(";", start); 164 165 if(end < start) 166 end = document.cookie.length; 167 168 return document.cookie.substring(start, end); 169 } 170 return ""; 171} 172 173// ÄíŰ Áö¿ò 174function delete_cookie(name) 175{ 176 var today = new Date(); 177 178 today.setTime(today.getTime() - 1); 179 var value = getCookie(name); 180 if(value != "") 181 document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString(); 182} 183 184// a ű׿¡¼ onclick À̺¥Æ®¸¦ »ç¿ëÇÏÁö ¾Ê±â À§ÇØ 185function winopen(url, name, option) 186{ 187 window.open(url, name, option); 188 return ; 189} 190 191// TEXTAREA »çÀÌÁî º¯°æ 192function textarea_size(fld, size) 193{ 194 var rows = parseInt(fld.rows); 195 196 rows += parseInt(size); 197 if (rows > 0) { 198 fld.rows = rows; 199 } 200} 201 202var old=''; 203function menu(name){ 204 205 submenu=eval(name+".style"); 206 207 if (old!=submenu) 208 { 209 if(old!='') 210 { 211 old.display='none'; 212 } 213 submenu.display='block'; 214 old=submenu; 215 } 216 else 217 { 218 submenu.display='none'; 219 old=''; 220 } 221} 222 223// 3.36 224function image_window(img, w, h) 225{ 226 var tmp_w = w; 227 var tmp_h = h; 228 winl = (screen.width-w)/2; 229 wint = (screen.height-h)/3; 230 231 if (w >= screen.width) { 232 winl = 0; 233 w = screen.width - 10; 234 h = (parseInt)(w * (h / w)); 235 } 236 237 if (h >= screen.height) { 238 wint = 0; 239 h = screen.height - 80; 240 w = (parseInt)(h * (w / h)); 241 } 242 243 var settings ='width='+w+','; 244 settings +='height='+h+','; 245 settings +='top='+wint+','; 246 settings +='left='+winl+','; 247 settings +='scrollbars=no,'; 248 settings +='resizable=no,'; 249 settings +='status=no'; 250 251 win=window.open("","newWindow",settings); 252 win.document.open(); 253 win.document.write ("<html><head><meta http-equiv='content-type' content='text/html; charset=euc-kr'>"); 254 win.document.write ("<title>À̹ÌÁö º¸±â</title></head>"); 255 win.document.write ("<body leftmargin=0 topmargin=0>"); 256 //win.document.write ("<img src='"+img+"' width='"+w+"' height='"+h+"'border=0 onclick='window.close();' style='cursor:hand' title='ÇØ»óµµ ("+tmp_w+"x"+tmp_h+")\nŬ¸¯ÇÏ¸é ´ÝÇô¿ä'>"); 257 win.document.write ("<img src='"+img+"' width='"+w+"' height='"+h+"'border=0 onclick='window.close();' style='cursor:hand'>"); 258 win.document.write ("</body></html>"); 259 win.document.close(); 260 261 if(parseInt(navigator.appVersion) >= 4){win.window.focus();} 262} 263 264////////////////////////////// ÆäÀÌÁö¿±â ///////////////////////////////// 265function Win_Open(page,value,style){ 266 window.open(page+value,"OpenWin",style).focus(); 267} 268 269/// ¼±ÅÃÇü À̸ÞÀÏ ÀÔ·ÂÆû ½ºÅ©¸³Æ® 270 function Email_Select(OBJC,form) { 271 if(OBJC.options[OBJC.selectedIndex].value=="") { 272 form.email_url.value="ÀÔ·ÂÇϼ¼¿ä"; 273 form.email_url.disabled=false; 274 } else { 275 form.email_url.value=OBJC.options[OBJC.selectedIndex].value; 276 form.email_url.disabled=true; 277 } 278 } 279 280//Áö¿ª¼±Åà ÆË¾÷ 281function SAddress(form,target){ 282 window.open("/member/pop_area.php?form="+form+"&target="+target,"SAddress","width=500,height=180").focus(); 283} 284 285///ÅýºÆ® Çʵ忡¼ ¼ýÀÚ¿Í ,¸¸ »ç¿ë°¡´ÉÇÏ°Ô ÇÔ 286function numOnly(obj,isCash) { 287 //»ç¿ë¿¹ : <input type="text" name="text" onKeyUp="javascript:numOnly(this,true);">
288 //¼¼ÀÚ¸® ÄÞ¸¶ »ç¿ë½Ã true , ¼ýÀÚ¸¸ ÀÔ·Â ½Ã false 289 if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return; 290 var returnValue = ""; 291 for (var i = 0; i < obj.value.length; i++){ 292 if (obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9") returnValue += obj.value.charAt(i); 293 else returnValue += ""; 294 } 295 296 if (isCash){ 297 obj.value = cashReturn(returnValue); 298 return; 299 } 300 301 obj.focus(); 302 obj.value = returnValue; 303} 304 305function cashReturn(numValue){ 306 //numOnlyÇÔ¼ö¿¡ ¸¶Áö¸· ÆÄ¶ó¹ÌÅ͸¦ true·Î ÁÖ°í numOnly¸¦ ºÎ¸¥´Ù. 307 var cashReturn = ""; 308 for (var i = numValue.length-1; i >= 0; i--){ 309 cashReturn = numValue.charAt(i) + cashReturn; 310 if (i != 0 && i%3 == numValue.length%3) cashReturn = "," + cashReturn; 311 } 312 return cashReturn; 313} 314 315 316///ÅýºÆ® Çʵ忡 ÇÑ±Û ÀԷ ó¸® 317function ketKorean(msg) { 318 if((event.keyCode < 12592) || (event.keyCode > 12687)) 319 alert("Çѱ۸¸ ÀÔ·Â µË´Ï´Ù") 320 event.returnValue = false 321} 322 323///ÅýºÆ® Çʵ忡 ÇÑ±Û Ã³¸® 324function isKorean(field){ 325 var chk; 326 var chk2 = 0; 327 var strLength = field.value.length 328 for(i = 0 ; i < strLength ; i++){ 329 chk = field.value.charCodeAt(i) 330 if((chk >= 44032 && chk <= 55203)){ } 331 else { 332 alert('Çѱ۸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.'); 333 return false; 334 } 335 } 336} 337 338//ÅýºÆ® Çʵ忡 ¿µ¾î¿Í ¼ýÀÚ¸¸ Çã¿ë 339function isEnglish(field){ 340 var chk; 341 var chk2 = 0; 342 var strLength = field.value.length 343 for(i = 0 ; i < strLength ; i++){ 344 chk = field.value.charCodeAt(i) 345 if((chk >= 97 && chk <= 122) || (chk >= 48 && chk <= 57) || chk == 95){ } 346 else { 347 alert('a~z , 0~9 ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.'); 348 return false; 349 } 350 } 351} 352 353///±æÀÌ Ã¼Å© 354function strLen(field,min,max,text) { 355 // 201503 ¹ö±× ¼öÁ¤ - mj text ÀÎÀÚ¸¦ ³ÖÁö ¾Ê¾ÒÀ»¶§ÀÇ Ã³¸®°¡ ¾ø¾î Ãâ·Â´Ü¿¡ 356 // "NanÀÚ ÀÌ»ó ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù" ¶ó´Â ¹®±¸°¡ Ãâ·ÂµÇ´Â ¹®Á¦ 357 /* ±âÁ¸ ÄÚµå 358 if(field.value.length < min) { 359 alert(text+min + "ÀÚ ÀÌ»ó ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù."); 360 field.focus(); 361 return false; 362 } 363 */ 364 if (text) { 365 if(field.value.length < min) { 366 alert(text + min + "ÀÚ ÀÌ»ó ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù."); 367 field.focus(); 368 return false; 369 } 370 } else { 371 if(field.value.length < min) { 372 alert(min + "ÀÚ ÀÌ»ó ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù."); 373 field.focus(); 374 return false; 375 } 376 } 377 378 379 if(max != '') { 380 if(field.value.length > max) { 381 alert(min + "ÀÚ ÀÌ»ó " + max + "ÀÚ ÀÌÇÏ ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù."); 382 field.focus(); 383 return false; 384 } 385 } 386 387 return; 388} 389 390 391///½ºÅ©¸³Æ® Çʵå üũ 392function chkStr(field,msg) { 393 if(field.value =="") { 394 alert(msg); 395 field.focus(); 396 return false; 397 } 398 return true; 399} 400 401// ½ºÅ©¸³Æ® ¶óµð¿À üũ 402function ridiaChk(v,meg){ 403 for (i=0;i<v.length;i++){if(v[i].checked==true){return true}}; 404 alert(meg);v[0].focus();return false; 405} 406 407///½ºÅ©¸³Æ® ¹è¿ üũ 408function chkArr(field,msg) { 409 var cnt = 0; 410 for(var i=0;i<field.length;i++) if(field[i].checked == true) cnt++; 411 412 if(cnt == 0) { 413 alert(msg); 414 field[0].focus(); 415 return false; 416 } 417 return true; 418} 419 420///Email üũ 421function chkMail(email) { 422 if (!email.value){ 423 alert("Email ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä."); 424 email.value = ""; 425 email.focus(); 426 return false; 427 } 428 429 if (email.value.indexOf("http") >= 0 ) { 430 alert ('http://´Â ¿Ã¹Ù¸¥ ÀüÀÚ¿ìÆí ÁÖ¼Ò°¡ ¾Æ´Õ´Ï´Ù.'); 431 email.focus(); 432 return false; 433 } 434 if (email.value.indexOf("@") <= 0 ) { 435 alert ('Email ÁÖ¼Ò¿¡ @(°ñ¹ðÀÌ)°¡ ºüÁ³½À´Ï´Ù.'); 436 email.focus(); 437 return false; 438 } 439 if (email.value.indexOf(".") <= 0 ) { 440 alert ('¿Ã¹Ù¸¥ ÀüÀÚ¿ìÆí ÁÖ¼Ò°¡ ¾Æ´Õ´Ï´Ù.'); 441 email.focus(); 442 return false; 443 } 444 return true; 445} 446 447function chkDel(url) { 448 yes_no = confirm('»èÁ¦ÇϽðڽÀ´Ï°¡?'); 449 if(yes_no == true) { // È®ÀÎ ¼±ÅÃÇØ ÇßÀ»¶§ 450 location.href=url; 451 } 452} 453 454//ENTER ¾È¸Ô°Ô ÇÏ´Â°Í 455function captureReturnKey(e) { 456 if(e.keyCode==13 && e.srcElement.type != 'textarea') 457 return false; 458} 459 460//¿ìÆí¹øÈ£ °Ë»ö 461function autoAddress(target1,target2,target3,form){ 462 window.open("/member/pop_address.php?form="+form+"&target1="+target1+"&target2="+target2+"&target3="+target3,"autoAddress","width=500,height=280").focus(); 463} 464 465 466//À̹ÌÁö ·Ñ ¿À¹ö 467// À̺κÐÀº ¼öÁ¤ÇÒ ÇÊ¿ä¾ø½À´Ï´Ù. 468var cnj_str=new Array(); 469function Rollover(imgName, imgSrc){ 470 cnj_str[imgName] = new Image(); 471 cnj_str[imgName].src = imgSrc; 472} 473function turnOn(imgName) { 474 document.images[imgName].offSrc = document.images[imgName].src; 475 document.images[imgName].src = cnj_str[imgName].src; 476} 477function turnOff(imgName){ 478 document.images[imgName].src = document.images[imgName].offSrc; 479 } 480// À̺κбîÁö ¼öÁ¤ÇÒ ÇÊ¿ä¾ø½À´Ï´Ù. 481 482// »çÁø¹Ì¸®º¸±â 483function PhotoView(form) 484{ 485 if (form.photo.value) { 486 form.myphoto.src = form.photo.value; 487 } 488} 489
490////////////////////////////// Ç÷¡½¬ ¶óÀÎÀ» ¾ø¾Ö±â À§ÇØ ///////////////////////////////// 491function cfShowEmbedObject(elementId){ 492 document.write(elementId.text); 493 494 // µ¿ÀÏÇÑ ID¸¦ »ç¿ëÇϱâ À§ÇØ ´Ù½Ã elementID ¸¦ ÃʱâÈ 495 elementId.id = ""; 496} 497 498function TextBoxObject(id) { 499 document.write(document.getElementById(id).value); 500} 501 502////////////////////////////// ¸®½ºÆ® üũ ///////////////////////////////// 503function List_Checked_Box(form,sw) { 504 505 for (var i=0; i<form.length; i++) { 506 if (form.elements[i].name == "list_ck[]") 507 form.elements[i].checked = sw; 508 } 509} 510function List_Checked_Sel(form,box) { 511 if (box.checked) { 512 List_Checked_Box(form,true); 513 } else { 514 List_Checked_Box(form,false); 515 } 516} 517 518 519////////////////////////////// ¼¼±Ý°è»ê¼ ÆË¾÷ ///////////////////////////////// 520function TaxPaper_Print(value,type){ 521 window.open("/bill/bill_print.php?type="+type+"&id="+value,"Bill_Print","width=405,height=380, scrollbars=1").focus(); 522} 523 524////////////////////////////// ¼³¹®Á¶»ç ÆË¾÷ ///////////////////////////////// 525function Open_Poll(url) 526{ 527 if (!url) 528 url = ""; 529 window.open(url, "OpenPoll", "left=50, top=50, width=616, height=500, scrollbars=1"); 530} 531 532////////////////////////////// ÂÊÁö ÆË¾÷ ///////////////////////////////// 533function My_memo(id) { 534 var window_left = (screen.width-510)/2; 535 var window_top = (screen.height-450)/2; 536 if(id) { 537 window.open('/member/memo_form.php?id='+id,'memo',"width=500,height=500,status=no,top=" + window_top + ",left=" + window_left); 538 } else { 539 window.open('/member/memo.php','memo',"width=500,height=500,status=no,top=" + window_top + ",left=" + window_left); 540 } 541} 542 543////////////////////////////// ij½¬°áÁ¦Ã¢ ÆË¾÷ ///////////////////////////////// 544function cash_save(value){ 545 window.open("/cash/mycash_save.php?pay_type="+value,"cash_save","width=405,height=380").focus(); 546} 547 548////////////////////////////// ¾ÆÀ̵ð/ºñ¹ø °Ë»ö ÆË¾÷ ///////////////////////////////// 549function id_search(val) { 550 var window_left = (screen.width-510)/2; 551 var window_top = (screen.height-220)/2; 552 553 if(!val) val=""; 554 window.open(val+'/member/pop_search.php','ID_PW_SEARCH',"width=470,height=320,status=no,top=" + window_top + ",left=" + window_left); 555} 556////////////////////////////// ȸ¿øÁ¤º¸ Àü¿ë ½ºÅ©¸³Æ® ///////////////////////////////// 557function Break_member(){ 558 yes_no = confirm('Å»ÅðÇÏ½Ã¸é °°Àº ¾ÆÀ̵ð·Î´Â ´Ù½Ã °¡ÀÔÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n\nÅ»Åð ÇϽðڽÀ´Ï±î?'); 559 if(yes_no == true) { // È®ÀÎ ¼±ÅÃÇØ ÇßÀ»¶§ 560 window.open("/member/pop_pass.php","autoAddress","width=420,height=200,status=yes").focus(); 561 } 562} 563 564function autoSearch(target1,form,type){ 565window.open("./pop_check.php?type="+type+"&form="+form+"&target1="+target1,"autoAddress","width=420,height=200").focus(); 566} 567 568//Áֹεî·Ï¹øÈ£ üũ 569function chkSsn(ssn1,ssn2) { 570 //ÁֹιøÈ£ üũ 571 if (chkStr(ssn1,"ÁֹιøÈ£ ¾ÕÀÚ¸® 6ÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.") ==false) return false; 572 if(strLen(ssn1,6,'') == false) return false; 573 if (chkStr(ssn2,"ÁֹιøÈ£ ¾ÕÀÚ¸® 7ÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.") ==false) return false; 574 if(strLen(ssn2,7,'') == false) return false; 575 576 var reginum = ssn1.value.concat(ssn2.value); 577 var weight = '234567892345'; // ÀÚ¸®¼ö weight ÁöÁ¤ 578 var len = reginum.length; 579 var sum = 0; 580 581 if (len != 13) { 582 ssn1.value=''; 583 ssn2.value=''; 584 ssn1.focus(); 585 return false; 586 } 587 588 for (var i = 0; i < 12; i++) sum = sum + (reginum.substr(i,1)*weight.substr(i,1)); 589 590 var rst = sum%11; 591 var result = 11 - rst; 592 593 if (result == 10) result = 0; 594 else if (result == 11) result = 1; 595 596 var jumin = reginum.substr(12,1); 597 598 if (result != jumin) { 599 ssn1.value=''; 600 ssn2.value=''; 601 ssn1.focus(); 602 return false; 603 } else { 604 return true; 605 } 606} 607 608// ·Î±×ÀÎ Çʵå üũ 609function login_chk(form) 610{ 611 if(!form.mb_id.value) { 612 alert('¾ÆÀ̵𸦠ÀÔ·ÂÇØÁÖ¼¼¿ä.'); 613 form.mb_id.focus(); 614 return false; 615 } 616 617 if(!form.mb_pass.value) { 618 alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.'); 619 form.mb_pass.focus(); 620 return false; 621 } 622 623 if(strLen(form.mb_pass,0,10) == false) { 624 form.mb_pass.value=''; 625 form.mb_pass.focus(); 626 return false; 627 } 628 629 form.action = "/member/login.php"; 630 form.submit(); 631} 632 633////////////////////////////// ÆäÀÌÁö ÀϺΠÇÁ¸°Æ® ½ºÅ©¸³Æ® ¿©±âºÎÅÍ //////
633/////////////////////////// 634function printDiv () { 635 if (document.all && window.print) { 636 window.onbeforeprint = beforeDivs; 637 window.onafterprint = afterDivs; 638 window.print(); 639 } 640} 641 642function beforeDivs () { 643 if (document.all) { 644 objContents.style.display = 'none'; 645 objSelection.innerHTML = document.all['d1'].innerHTML; 646 } 647} 648 649function afterDivs () { 650 if (document.all) { 651 objContents.style.display = 'block'; 652 objSelection.innerHTML = ""; 653 } 654} 655 656function doPrint(frame){ 657 printDiv('d1'); 658// factory.printing.Print(false, frame); 659} 660////////////////////////////// ÆäÀÌÁö ÀϺΠÇÁ¸°Æ® ½ºÅ©¸³Æ® ¿©±â±îÁö ///////////////////////////////// 661 662// request °´Ã¼ »ý¼º 663var AJ_Value = null; 664 665function Get_Request() { 666 if(window.ActiveXObject) { 667 try 668 { 669 return new ActiveXObject("Msxml2.XMLHTTP"); 670 } 671 catch (e) 672 { 673 try 674 { 675 return new ActiveXObject("Microsoft.XMLHTTP"); 676 } 677 catch (e1) 678 { 679 return null; 680 } 681 } 682 } else if(window.XMLHttpRequest) { 683 return new XMLHttpRequest(); 684 } else { 685 return null; 686 } 687} 688 689 690function nextFocus(sFormName,sNow,sNext){ 691 var sForm = 'document.'+ sFormName +'.' 692 var oNow = eval(sForm + sNow); 693 if (typeof oNow == 'object'){ 694 if ( oNow.value.length == oNow.maxLength){ 695 var oNext = eval(sForm + sNext); 696 if ((typeof oNext) == 'object') oNext.focus(); 697 } 698 } 699} 700 701//2009.3.24 Ki-hong Park 702 703function iframe_autoresize(arg) { 704arg.height = 705eval(arg.name+".document.body.scrollHeight"); 706} 707 708//byteüŷ 709function updateChar(FieldName, contentName, textlimitName){ 710 var strCount = 0; 711 var tempStr, tempStr2; 712 //var frm = document.getElementById(contentName); 713 var frm = contentName; 714 var size = frm.value.length; 715 for(i = 0;i < size;i++) 716 { 717 tempStr = frm.value.charAt(i); 718 if(escape(tempStr).length > 4) strCount += 2; 719 else strCount += 1 ; 720 } 721 if (strCount > FieldName){ 722 alert("ÃÖ´ë " + FieldName + "byteÀ̹ǷΠÃʰúµÈ ±ÛÀÚ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù."); 723 strCount = 0; 724 tempStr2 = ""; 725 for(i = 0; i < size; i++) 726 { 727 tempStr = frm.value.charAt(i); 728 if(escape(tempStr).length > 4) strCount += 2; 729 else strCount += 1 ; 730 if (strCount > FieldName) 731 { 732 if(escape(tempStr).length > 4) strCount -= 2; 733 else strCount -= 1 ; 734 break; 735 } 736 else tempStr2 += tempStr; 737 } 738 frm.value = tempStr2; 739 } 740 document.getElementById(textlimitName).innerHTML = strCount; 741} 742 743function MM_openBrWindow(theURL,winName,features) { 744 //v2.0 745 window.open(theURL,winName,features); 746} 747 748 749//ÆË¾÷½Ã ¿øº»Å©±â·Î 750function imgResize(img2){ 751 poto=new Image(); 752 poto.src=(img2); 753 Controlla(img2); 754} 755function Controlla(img2){ 756 if((poto.width!=0)&&(poto.height!=0)){ 757 winopen(img2,poto.width,poto.height); 758 } 759 else{ 760 funzione="Controll('"+img2+"')"; 761 intervallo=setTimeout(funzione,20); 762 } 763} 764function winopen(img_view,Width,Height){ 765 var winHandle=window.open("","windowName","toolbar=no,scrollbars=auto,resizable=no,top=200,left=200,width="+Width+",height="+Height); 766 if (winHandle !=null) { 767 var htmlString="<html><head><title>À̹ÌÁö ¹Ì¸®º¸±â</title></head>" 768 htmlString+="<body topmargin=0 leftmargin=0>" 769 htmlString+="<a href=javascript:window.close()><img src="+img_view+" border=0 alt=À̹ÌÁöŬ¸¯:ȸé´Ý±â></a>" 770 htmlString+="</body></html>"; 771 winHandle.document.open() 772 winHandle.document.write(htmlString) 773 winHandle.document.close() 774 } 775 if(winHandle!=null) winHandle.focus() 776 return winHandle 777} 778function bluring(){ // À̹ÌÁö or ¸µÅ© Ŭ¸¯½Ã ÁÖÀ§¿¡ ... ¾È»ý±â°Ô~ 779 if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 780} 781document.onfocusin=bluring; 782 783 784// À¥Ç¥ÁØ¿ë ½ºÅ©¸³Æ® 2009-11-17 785function getObject(objectId) { 786 if(document.getElementById && document.getElementById(objectId)) { 787 return document.getElementById(objectId); 788 } 789 else if (document.all && document.all(objectId)) { 790 return document.all(objectId); 791 } 792 else if (document.layers && document.layers[objectId]) { 793 return document.layers[objectId]; 794 } else { 795 return false; 796 } 797} 798 799// À¥Ç¥ÁØ¿ë ½ºÅ©¸³Æ® 2009-11-17 800function getObjectNm(objectNm) { 801 if(document.getElementsByName && document.getElementsByName(objectNm)) { 802 return document.getElementsByName(objectNm); 803 } 804 else { 805 return false;
806 } 807} 808 809 810function log(str){ 811 if(window.console){ 812 console.log("log:"+str); 813 } 814} 815//°ø¹éÁ¦°Å 816function trim(str){ 817 str = str.replace(/(^\s*)|(\s*$)/g,""); 818 return str; 819} 820 821function win_open(url, name, option) 822{ 823 var popup = window.open(url, name, option); 824 popup.focus(); 825} 826function win_zip(frm_name, frm_zip1, frm_addr1, frm_addr2) 827{ 828 url = "/addr_zip/zip.php?mode=p2&frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2; 829 win_open(url, "winZip", "left=50,top=50,width=650,height=550,scrollbars=0"); 830} 831 832/*Gn_Board ¾÷µ¥ÀÌÆ®ÈÄ Ãß°¡µÈ ½ºÅ©¸³*/ 833//üũ¹Ú½º Àüü¼±Åà 834function AllChk() { 835 if($("#chk").prop("checked") == true) { 836 $(".chk_box").prop("checked", true); 837 }else { 838 $(".chk_box").prop("checked", false); 839 } 840} 841 842// Æû¿¡ ÇØ´çÇÏ´Â ÄÁÆ®·ÑµéÀÇ ±âº»°ª ½±°Ô ¼ÂÆÃÇØ ÁÖ±â 843function initForm(f){ 844 var nLen; // form ¿ä¼ÒÀÇ °¹¼ö 845 var ival; // °¢ ¿ä¼ÒÀÇ default value °ª Áï! ÃʱâÈÇϰíÀÚ Çϴ°ª 846 var fTyp; // form ¿ä¼ÒÀÇ Å¸ÀÔ(select, radio, checkbox...) 847 848 for(var i = 0; i < f.elements.length; i++){ 849 fTyp = toUpperCase(f.elements[i].type); 850 ival = f.elements[i].ival; 851 852 if(ival && fTyp == "SELECT-ONE"){ 853 nLen = f.elements[i].options.length; 854 for(var j = 0; j < nLen; j++){ 855 if(f.elements[i].options[j].value == ival) 856 f.elements[i].options[j].selected = true; 857 } 858 } 859 if(fTyp == "SELECT-MULTIPLE"){ 860 nLen = f.elements[i].options.length; 861 for(var j = 0; j < nLen; j++){ 862 if(f.elements[i].options[j].value == f.elements[i].options[j].ival) 863 f.elements[i].options[j].selected = true; 864 } 865 } 866 if(ival &&(fTyp == "RADIO" || fTyp == "CHECKBOX")){ 867 if(f.elements[i].value == ival) 868 f.elements[i].checked = true; 869 } 870 } 871 return true; 872} 873/**/ 874 875 876/**/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.