1if (typeof(COMMON_JS) == 'undefined') { // íë²ë§ ì¤í 2 var COMMON_JS = true; 3 4 // ì ì ë³ì 5 var errmsg = ""; 6 var errfld; 7 8 // íë ê²ì¬ 9 function check_field(fld, msg) 10 { 11 if ((fld.value = trim(fld.value)) == "") 12 error_field(fld, msg); 13 else 14 clear_field(fld); 15 return; 16 } 17 18 // íë ì¤ë¥ íì 19 function error_field(fld, msg) 20 { 21 if (msg != "") 22 errmsg += msg + "\n"; 23 if (!errfld) errfld = fld; 24 fld.style.background = "#BDDEF7"; 25 } 26 27 // íë를 깨ëíê² 28 function clear_field(fld) 29 { 30 fld.style.background = "#FFFFFF"; 31 } 32 33 function trim(s) 34 { 35 var t = ""; 36 var from_pos = to_pos = 0; 37 38 for (i=0; i<s.length; i++) 39 { 40 if (s.charAt(i) == ' ') 41 continue; 42 else 43 { 44 from_pos = i; 45 break; 46 } 47 } 48 49 for (i=s.length; i>=0; i--) 50 { 51 if (s.charAt(i-1) == ' ') 52 continue; 53 else 54 { 55 to_pos = i; 56 break; 57 } 58 } 59 60 t = s.substring(from_pos, to_pos); 61 // alert(from_pos + ',' + to_pos + ',' + t+'.'); 62 return t; 63 } 64 65 // ìë°ì¤í¬ë¦½í¸ë¡ PHPì number_format íë´ë¥¼ ë 66 // ì«ìì , 를 ì¶ë ¥ 67 function number_format(data) 68 { 69 70 var tmp = ''; 71 var number = ''; 72 var cutlen = 3; 73 var comma = ','; 74 var i; 75 76 len = data.length; 77 mod = (len % cutlen); 78 k = cutlen - mod; 79 for (i=0; i<data.length; i++) 80 { 81 number = number + data.charAt(i); 82 83 if (i < data.length - 1) 84 { 85 k++; 86 if ((k % cutlen) == 0) 87 { 88 number = number + comma; 89 k = 0; 90 } 91 } 92 } 93 94 return number; 95 } 96 97 // ì ì°½ 98 function popup_window(url, winname, opt) 99 { 100 window.open(url, winname, opt); 101 } 102 103 // ì ì°½ 104 function popup_cache(url) 105 { 106 opt = 'scrollbars=yes,resizable=yes,width=990,top=20,left=20'; 107 popup_window(url, "미리보기", opt); 108 } 109 110 // í¼ë©ì¼ ì°½ 111 function popup_formmail(url) 112 { 113 opt = 'scrollbars=yes,width=417,height=385,top=10,left=20'; 114 popup_window(url, "wformmail", opt); 115 } 116 117 // , 를 ìì¤ë¤. 118 function no_comma(data) 119 { 120 var tmp = ''; 121 var comma = ','; 122 var i; 123 124 for (i=0; i<data.length; i++) 125 { 126 if (data.charAt(i) != comma) 127 tmp += data.charAt(i); 128 } 129 return tmp; 130 } 131 132 // ìì ê²ì¬ íì¸ 133 function del(href) 134 { 135 if(confirm("íë² ìì í ìë£ë 복구í ë°©ë²ì´ ììµëë¤.\n\nì ë§ ìì íìê² ìµëê¹?")) { 136 if (g4_charset.toUpperCase() == 'EUC-KR') 137 document.location.href = href; 138 else 139 document.location.href = encodeURI(href); 140 } 141 } 142 143 // ì¿ í¤ ì ë ¥ 144 function set_cookie(name, value, expirehours, domain) 145 { 146 var today = new Date(); 147 today.setTime(today.getTime() + (60*60*1000*expirehours)); 148 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"; 149 if (domain) { 150 document.cookie += "domain=" + domain + ";"; 151 } 152 } 153 154 // ì¿ í¤ ì»ì 155 function get_cookie(name) 156 { 157 var find_sw = false; 158 var start, end; 159 var i = 0; 160 161 for (i=0; i<= document.cookie.length; i++) 162 { 163 start = i; 164 end = start + name.length; 165 166 if(document.cookie.substring(start, end) == name) 167 { 168 find_sw = true 169 break 170 } 171 } 172 173 if (find_sw == true) 174 { 175 start = end + 1; 176 end = document.cookie.indexOf(";", start); 177 178 if(end < start) 179 end = document.cookie.length; 180 181 return document.cookie.substring(start, end); 182 } 183 return ""; 184 } 185 186 // ì¿ í¤ ì§ì 187 function delete_cookie(name) 188 { 189 var today = new Date(); 190 191 today.setTime(today.getTime() - 1); 192 var value = get_cookie(name); 193 if(value != "") 194 document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString(); 195 } 196 197 // ì´ë¯¸ì§ì í¬ê¸°ì ë°ë¼ ìì°½ì í¬ê¸°ê° ë³ê²½ë©ëë¤. 198 // zzzzëê»ì ìë ¤ì£¼ì ¨ìµëë¤. 2005/04/12 199 function image_window(img) 200 { 201 var w = img.tmp_width; 202 var h = img.tmp_height; 203 var winl = (screen.width-w)/2; 204 var wint = (screen.height-h)/3; 205 206 if (w >= screen.width) { 207 winl = 0; 208 h = (parseInt)(w * (h / w)); 209 } 210 211 if (h >= screen.height) { 212 wint = 0; 213 w = (parseInt)(h * (w / h)); 214 } 215 216 var js_url = "<script type='text/javascript'> \n"; 217 js_url += "<!-- \n"; 218 js_url += "var ie=document.all; \n"; 219 js_url += "var nn6=document.getElementById&&!document.all; \n"; 220 js_url += "var isdrag=false;
220 \n"; 221 js_url += "var x,y; \n"; 222 js_url += "var dobj; \n"; 223 js_url += "function movemouse(e) \n"; 224 js_url += "{ \n"; 225 js_url += " if (isdrag) \n"; 226 js_url += " { \n"; 227 js_url += " dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n"; 228 js_url += " dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n"; 229 js_url += " return false; \n"; 230 js_url += " } \n"; 231 js_url += "} \n"; 232 js_url += "function selectmouse(e) \n"; 233 js_url += "{ \n"; 234 js_url += " var fobj = nn6 ? e.target : event.srcElement; \n"; 235 js_url += " var topelement = nn6 ? 'HTML' : 'BODY'; \n"; 236 js_url += " while (fobj.tagName != topelement && fobj.className != 'dragme') \n"; 237 js_url += " { \n"; 238 js_url += " fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n"; 239 js_url += " } \n"; 240 js_url += " if (fobj.className=='dragme') \n"; 241 js_url += " { \n"; 242 js_url += " isdrag = true; \n"; 243 js_url += " dobj = fobj; \n"; 244 js_url += " tx = parseInt(dobj.style.left+0); \n"; 245 js_url += " ty = parseInt(dobj.style.top+0); \n"; 246 js_url += " x = nn6 ? e.clientX : event.clientX; \n"; 247 js_url += " y = nn6 ? e.clientY : event.clientY; \n"; 248 js_url += " document.onmousemove=movemouse; \n"; 249 js_url += " return false; \n"; 250 js_url += " } \n"; 251 js_url += "} \n"; 252 js_url += "document.onmousedown=selectmouse; \n"; 253 js_url += "document.onmouseup=new Function('isdrag=false'); \n"; 254 js_url += "//--> \n"; 255 js_url += "</"+"script> \n"; 256 257 var settings; 258 259 if (g4_is_gecko) { 260 settings ='width='+(w+10)+','; 261 settings +='height='+(h+10)+','; 262 } else { 263 settings ='width='+w+','; 264 settings +='height='+h+','; 265 } 266 settings +='top='+wint+','; 267 settings +='left='+winl+','; 268 settings +='scrollbars=no,'; 269 settings +='resizable=yes,'; 270 settings +='status=no'; 271 272 273 win=window.open("","image_window",settings); 274 win.document.open(); 275 win.document.write ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n"); 276 var size = "ì´ë¯¸ì§ ì¬ì´ì¦ : "+w+" x "+h; 277 win.document.write ("<title>"+size+"</title> \n"); 278 if(w >= screen.width || h >= screen.height) { 279 win.document.write (js_url); 280 var click = "ondblclick='window.close();
280' style='cursor:move' title=' "+size+" \n\n ì´ë¯¸ì§ ì¬ì´ì¦ê° íë©´ë³´ë¤ í½ëë¤. \n ì¼ìª½ ë²í¼ì í´ë¦í í ë§ì°ì¤ë¥¼ ìì§ì¬ì ë³´ì¸ì. \n\n ëë¸ í´ë¦íë©´ ë«íì. '"; 281 } 282 else 283 var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n í´ë¦íë©´ ë«íì. '"; 284 win.document.write ("<style>.dragme{position:relative;}</style> \n"); 285 win.document.write ("</head> \n\n"); 286 win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n"); 287 win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>"); 288 win.document.write ("</body></html>"); 289 win.document.close(); 290 291 if(parseInt(navigator.appVersion) >= 4){win.window.focus();} 292 } 293 294 // a íê·¸ìì onclick ì´ë²¤í¸ë¥¼ ì¬ì©íì§ ì기 ìí´ 295 function win_open(url, name, option) 296 { 297 var popup = window.open(url, name, option); 298 popup.focus(); 299 } 300 301 // ëë¡ëª ì°í¸ë²í¸ ì°½ 302 function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) 303 { 304 url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2+"&frm_addr3="+frm_addr3+"&frm_jibeon="+frm_jibeon; 305 win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1"); 306 } 307 308 /* 309 // ì°í¸ë²í¸ ì°½ 310 function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2) 311 { 312 url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2; 313 win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1"); 314 } 315 */ 316 317 // ìª½ì§ ì°½ 318 function win_memo(url) 319 { 320 if (!url) 321 url = g4_path + "/" + g4_bbs + "/memo.php"; 322 win_open(url, "winMemo", "left=50,top=50,width=620,height=460,scrollbars=1"); 323 } 324 325 // í¬ì¸í¸ ì°½ 326 function win_point(url) 327 { 328 win_open(g4_path + "/" + g4_bbs + "/point.php", "winPoint", "left=20, top=20, width=616, height=635, scrollbars=1"); 329 } 330 331 // ì¤í¬ë© ì°½ 332 function win_scrap(url) 333 { 334 if (!url) 335 url = g4_path + "/" + g4_bbs + "/scrap.php"; 336 win_open(url, "scrap", "left=20, top=20, width=616, height=500, scrollbars=1"); 337 } 338 339 // ìë¡ì´ í¨ì¤ìë ë¶ì¤ ì°½ : 100902 340 function win_password_lost() 341 { 342 win_open(g4_path + "/" + g4_bbs + "/password_lost.php", 'winPasswordLost', 'left=50, top=50, width=617, height=330, scrollbars=1'); 343 } 344 345 // í¨ì¤ìë ë¶ì¤ ì°½ 346 function win_password_forget() 347 { 348 win_open(g4_path + "/" + g4_bbs + "/password_forget.php", 'winPasswordForget', 'left=50, top=50, width=616, height=500, scrollbars=1'); 349 } 350 351 // ì½ë©í¸ ì°½ 352 function win_comment(url) 353 { 354 win_open(url, "winComment", "left=50, top=50, width=800, height=600, scrollbars=1"); 355 } 356 357 // í¼ë©ì¼ ì°½ 358 function win_formmail(mb_id, name, email) 359 { 360 if (g4_charset.toLowerCase() == 'euc-kr') 361 win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=500, scrollbars=0"); 362 else 363 win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0"); 364 } 365 366 // ë¬ë ¥ ì°½ 367 function win_calendar(fld, cur_date, delimiter, opt) 368 { 369 if (!opt) 370 opt = "left=50, top=50, width=240, height=230, scrollbars=0,status=0,resizable=0"; 371 win_open(g4_path+"/" + g4_bbs + "/calendar.php?fld="+fld+"&cur_date="+cur_date+"&delimiter="+delimiter, "winCalendar", opt); 372 } 373 374 // ì¤ë¬¸ì¡°ì¬ ì°½ 375 function win_poll(url) 376 { 377 if (!url) 378 url = ""; 379 win_open(url, "winPoll", "left=50, top=50, width=616, height=500, scrollbars=1"); 380 } 381 382 // ì기ìê° ì°½ 383 function win_profile(mb_id) 384 { 385 win_open(g4_path+"/" + g4_bbs + "/profile.php?mb_id="+mb_id, 'winProfile', 'left=50,top=50,width=620,height=510,scrollbars=1'); 386 } 387 388 var last_id = null; 389 function menu(id) 390 { 391 if (id != last_id) 392 { 393 if (last_id != null) 394 document.getElementById(last_id).style.display = "none"; 395 document.getElementById(id).style.display = "block"; 396 last_id = id; 397 } 398 else 399 { 400 document.getElementById(id).style.display = "none"; 401 last_id = null; 402 } 403 } 404 405 function textarea_decrease(id, row) 406 { 407 if (document.getElementById(id).rows - row > 0) 408 document.getElementById(id).rows -= row; 409 } 410 411 function textarea_original(id, row) 412 { 413 document.getElementById(id).rows = row; 414 } 415 416 function textarea_increase(id, row) 417 { 418 document.getElementById(id).rows += row; 419 } 420 421 // ê¸ì«ì ê²ì¬ 422 function check_byte(content, target) 423 { 424 var i = 0; 425 var cnt = 0; 426 var ch = ''; 427 var cont = document.getElementById(content).value; 428 429 for (i=0; i<cont.length; i++) { 430 ch = cont.charAt(i); 431 if (escape(ch).length > 4) { 432 cnt += 2; 433 } else { 434 cnt += 1; 435 } 436 } 437 // ì«ì를 ì¶ë ¥ 438 document.getElementById(target).innerHTML = cnt; 439 440 return cnt; 441 } 442 443 // ë¸ë¼ì°ì ìì ì¤ë¸ì í¸ì ì¼ìª½ ì¢í 444 function get_left_pos(obj) 445 { 446 var parentObj = null; 447 var clientObj = obj;
448 //var left = obj.offsetLeft + document.body.clientLeft; 449 var left = obj.offsetLeft; 450 451 while((parentObj=clientObj.offsetParent) != null) 452 { 453 left = left + parentObj.offsetLeft; 454 clientObj = parentObj; 455 } 456 457 return left; 458 } 459 460 // ë¸ë¼ì°ì ìì ì¤ë¸ì í¸ì ìë¨ ì¢í 461 function get_top_pos(obj) 462 { 463 var parentObj = null; 464 var clientObj = obj; 465 //var top = obj.offsetTop + document.body.clientTop; 466 var top = obj.offsetTop; 467 468 while((parentObj=clientObj.offsetParent) != null) 469 { 470 top = top + parentObj.offsetTop; 471 clientObj = parentObj; 472 } 473 474 return top; 475 } 476 477 function flash_movie(src, ids, width, height, wmode) 478 { 479 var wh = ""; 480 if (parseInt(width) && parseInt(height)) 481 wh = " width='"+width+"' height='"+height+"' "; 482 return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>"; 483 } 484 485 function obj_movie(src, ids, width, height, autostart) 486 { 487 var wh = ""; 488 if (parseInt(width) && parseInt(height)) 489 wh = " width='"+width+"' height='"+height+"' "; 490 if (!autostart) autostart = false; 491 return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>"; 492 } 493 494 function doc_write(cont) 495 { 496 document.write(cont); 497 } 498} 499 500function setCookie(cname, cvalue, exdays) { 501 var exdays = exdays || 0; 502 var d = new Date(); 503 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 504 var expires = "expires="+ d.toUTCString(); 505 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 506} 507 508function getCookie(cname) { 509 var name = cname + "="; 510 var decodedCookie = decodeURIComponent(document.cookie); 511 var ca = decodedCookie.split(';'); 512 for (var i = 0; i <ca.length; i++) { 513 var c = ca[i]; 514 while (c.charAt(0) == ' ') { 515 c = c.substring(1); 516 } 517 if (c.indexOf(name) == 0) { 518 return c.substring(name.length, c.length); 519 } 520 } 521 return ""; 522} 523 524function deleteCookie (cname) { 525 document.cookie = cname + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; 526} 527 528// parse url 529function getLocation(href) { 530 var l = document.createElement("a"); 531 l.href = href; 532 return l; 533}; 534 535//ë¡ê³ ê°ë¡í¬ê¸° 536(function($){ 537 $(document).ready(function(){ 538 /* 539 var topLogoWidth = $(".topLogo img").outerWidth(); 540 $(".topLogo").css({ 541 "width" : topLogoWidth + "px" 542 }) 543 544 $(".topLogoWrap01 .srchInput").css({ 545 "left" : topLogoWidth + 20 + "px" 546 }) 547 548 $("#headline").css({"border-bottom" : "none"}); 549 */ 550 }) 551})(jQuery); 552 553 554//SNS ê³µì 555function goFacebook(msg,url){ 556 var href ='http://www.facebook.com/sharer.php?u=' + encodeURIComponent(url); 557 var open = window.open(href,'facebook',''); 558} 559function goTwitter(msg,url){ 560 var href ='http://twitter.com/intent/tweet?url=' + encodeURIComponent(url)+ '&text=' + encodeURIComponent(msg) ; 561 var open = window.open(href,'twitter',''); 562} 563function goGoogleplus(msg,url){ 564 var href ='https://plus.google.com/share?url=' + encodeURIComponent(url); 565 var open = window.open(href,'',''); 566} 567function goCyworld(msg,url){ 568 var href ='http://csp.cyworld.com/bi/bi_recommend_pop.php?url=' + encodeURIComponent(url); 569 var open = window.open(href,'',''); 570} 571function goNaverBookmark(msg,url){ 572 var href ='http://bookmark.naver.com/post?title=' + encodeURIComponent(msg) + '&url=' + encodeURIComponent(url); 573 var open = window.open(href,'',''); 574}
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.