1//------------------------------------------ 2// Invision Power Board v1.3 3// Forums JS File 4// (c) 2005 Invision Power Services, Inc. 5//------------------------------------------ 6 7/*--------------------------------------------*/ 8// INIT 9/*--------------------------------------------*/ 10 11var newtext; 12var text_html = new Array; 13var _desc_clicked = 0; 14var topic_links_init = 0; 15var ie = (document.all) ? 1 : 0; 16var uagent = navigator.userAgent.toLowerCase(); 17var is_safari = ( (uagent.indexOf('safari') != -1) || (navigator.vendor == "Apple Computer, Inc.") ); 18var is_opera = (uagent.indexOf('opera') != -1); 19var is_webtv = (uagent.indexOf('webtv') != -1); 20var is_ie = ( (uagent.indexOf('msie') != -1) && (!is_opera) && (!is_safari) && (!is_webtv) ); 21var is_ie4 = ( (is_ie) && (uagent.indexOf("msie 4.") != -1) ); 22var is_moz = ( (navigator.product == 'Gecko') && (!is_opera) && (!is_webtv) && (!is_safari) ); 23var is_ns = ( (uagent.indexOf('compatible') == -1) && (uagent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_safari) ); 24var is_ns4 = ( (is_ns) && (parseInt(navigator.appVersion) == 4) ); 25var is_kon = (uagent.indexOf('konqueror') != -1); 26var is_win = ( (uagent.indexOf("win") != -1) || (uagent.indexOf("16bit") !=- 1) ); 27var is_mac = ( (uagent.indexOf("mac") != -1) || (navigator.vendor == "Apple Computer, Inc.") ); 28var ua_vers = parseInt(navigator.appVersion); 29var sess = ( ipb_var_s != "" ) ? '&s='+ipb_var_s : ''; 30var selection = ''; 31var ipb_pages_shown = 0; 32var ipb_pages_array = new Array(); 33var ipb_cookieid = ""; 34var ipb_cookie_domain = ""; 35var ipb_cookie_path = "/"; 36 37var MGDQ8874 = document.getElementById('MarketGidComposite8874') ? document.getElementById('MarketGidComposite8874') : document; 38var MGDQ8875 = document.getElementById('MarketGidComposite8875') ? document.getElementById('MarketGidComposite8875') : document; 39var MGDQ8876 = document.getElementById('MarketGidComposite8876') ? document.getElementById('MarketGidComposite8876') : document; 40 41if(MGDQ8874.getElementsByClassName || MGDQ8875.getElementsByClassName || MGDQ8876.getElementsByClassName) { 42 getElementsByClass = function(classList, node) { 43 return (node || document).getElementsByClassName(classList); 44 } 45} else { 46 getElementsByClass = function(classList, node) { 47 var node = node || document; 48 list = node.getElementsByTagName('*'); 49 length = list.length; 50 classArray = classList.split(/\s+/); 51 classes = classArray.length; 52 result = []; 53 var i; 54 var j; 55 for(i = 0; i < length; i++) { 56 for(j = 0; j < classes; j++) { 57 if(list[i].className.search('\\b' + classArray[j] + '\\b') != -1) { 58 result.push(list[i]); 59 break; 60 } 61 } 62 } 63 return result 64 } 65} 66 67function getDocument(str1) { 68 return document.compatMode != 'CSS1Compat' ? document.body.str1 : document.documentElement.str1; 69} 70 71function getDocumentHeight() { 72 return Math.max(document.compatMode != 'CSS1Compat' ? (document.body.scrollHeight, document.body.offsetHeight) : (document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.documentElement.clientHeight)); 73} 74 75function getDocumentclientHeight() { 76 return Math.max(document.compatMode != 'CSS1Compat' ? (window.innerHeight, document.body.clientHeight) : (window.innerHeight, document.documentElement.clientHeight)); 77} 78 79function getDocumentWidth() { 80 return Math.max(document.compatMode != 'CSS1Compat' ? (document.body.scrollWidth, document.body.offsetWidth) : (document.documentElement.scrollWidth, document.documentElement.offsetWidth, document.documentElement.clientWidth)); 81} 82 83function getDocumentclientWidth() { 84 return Math.max(document.compatMode != 'CSS1Compat' ? (window.innerWidth, document.body.clientWidth) : (window.innerWidth, document.documentElement.clientWidth)); 85} 86 87function trimLeft(t) { 88 return t.replace(/^\s+/, ''); 89} 90 91function trimRight(t) { 92 return t.replace(/\s+$/, ''); 93} 94 95function trim(t) { 96 return trimRight(trimLeft(t)); 97} 98 99function trimSpaces(t) { 100 return t.replace(/\s{2,}/g, ' '); 101} 102 103function Insert(text) 104{ 105 if (text!="") paste("[quote]"+text+"[/quote]\n", 0); 106} 107 108function Insertcomm(text) 109{ 110 if (text!="") paste("[quote]"+text+"[/quote]\n", 0); 111} 112 113function ins(name) 114{ 115 if (name!="") paste('[b]'+name+'[/b], '); 116} 117 118function paste(text) 119{ 120 if (!text) return; 121 my_show_div(my_getbyid('qr_open')); 122 t = document.forms['REPLIER'].Post; 123 t.focus(); 124 if (document.selection && document.selection.createRange) 125 { 126 document.selection.createRange().text = text; 127 } 128 else if (t.setSelectionRange) 129 { 130 var start = t.selectionStart; 131 var end = t.selectionEnd; 132 var sel1 = t.value.substr(0,start); 133 var sel2 = t.value.substr(end); 134 t.value = sel1 + text + sel2; 135 t.setSelectionRange(start+text.length, start+text.length); 136 } 137 else t.value += text; 138 139 setTimeout(function(){t.focus();},100); 140} 141 142function get_selection() 143{ 144 var theSelection = ''; 145 if (window.getSelection) theSelection = window.getSelection(); 146 if (document.getSelection) theSelection = document.getSelection(); 147 if (document.selection && document.selection.createRange) theSelection = document.selection.createRange().text; 148 selection = theSelection; 149 return theSelection; 150} 151 152function PopUp(url, name, width,height,center,resize,scroll,posleft,postop) 153{ 154 if (posleft != 0) { x = posleft } 155 if (postop != 0) { y = postop } 156 157 if (!scroll) { scroll = 1 } 158 if (!resize) { resize = 1 } 159 160 if ((parseInt (navigator.appVersion) >= 4 ) && (center)) 161 { 162 X = (screen.width - width ) / 2; 163 Y = (screen.height - height) / 2; 164 } 165 if (scroll != 0) { scroll = 1 } 166 167 var Win = window.open( url, name, 'width='+width+',height='+height+',top='+Y+',left='+X+',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no'); 168} 169 170function std_window_resize( box, pix ) 171{ 172 var cur_height = parseInt( box.rows ) ? parseInt( box.rows ) : 20; 173 var new_height = cur_height + pix; 174 if ( new_height > 0 ) box.rows = new_height; 175 VKI_position(); 176} 177 178function viewtopic(list) 179{
180 var topic_div = 'distribution_topic'; 181 var tracking_div = 'add_tracking'; 182 var topicobj; 183 var html = ''; 184 var value = list; 185 if (value=='15') 186 { 187 html += "<input type='text' id='" + topic_div + "' name='" + topic_div + "' size='35' class='forminput' value='Ââåäèòå ëèíê íà ðàçäà÷ó' onfocus=\"this.value = ''\" /> "; 188 } 189 if (value=='12') 190 { 191 html += "<input type='checkbox' class='checklabel' id='" + tracking_div + "' name='" + tracking_div + "' value='1' checked='checked' /><label class='check_label' for='" + tracking_div + "'></label> Ïðîñëåäèòü çà ïèñüìàìè? "; 192 } 193 topicobj = document.getElementById( topic_div ); 194 topicobj.innerHTML = html; 195} 196 197function validatesubmit(list) 198{ 199 var value = list; 200 if (value != 'no') 201 { 202 document.getElementById('move').disabled = false; 203 document.getElementById('delete').disabled = true; 204 } 205 else 206 { 207 document.getElementById('move').disabled = true; 208 document.getElementById('delete').disabled = false; 209 } 210} 211 212function changeflag(list) 213{ 214 var html = ''; 215 var value = list; 216 if (value) 217 { 218 html += img_dir + "/" + value + ".gif"; 219 } 220 document.images.flagpreview.src = html; 221} 222 223function RootOpsf(id, ids) 224{ 225 var obj = new String(ids); 226 var arr = obj.split(","); 227 for( var e in arr ) { expMenu("forum_plus_"+arr[e]); } 228 ShowHide("forum_plus_"+id, "forum_minus_"+id); 229} 230 231function ShowHide(id1, id2) 232{ 233 if (id1 != '') expMenu(id1); 234 if (id2 != '') expMenu(id2); 235} 236 237function expMenu(id) 238{ 239 if ( ! id ) return; 240 if ( itm = my_getbyid(id) ) 241 { 242 if (itm.style.display == "none") my_show_div(itm); 243 else my_hide_div(itm); 244 } 245} 246 247function delete_post_ajax(pid, key) 248{ 249 var text = 'Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòî ñîîáùåíèå?'; 250 if( isNaN( pid ) ) return; 251 if( ! key ) return; 252 if ( confirm( text ) ) ajax_request( 'act=delpost&p='+pid+'&auth_key='+key+sess ); 253 else alert ('Íå õîòèòå - êàê õîòèòå :)'); 254} 255 256function delete_post(theURL, type) 257{ 258 var text = ( type == 1 ) ? 'Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòó êàðòèíêó?' : 'Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòî ñîîáùåíèå?'; 259 if (confirm(text)) window.location.href=theURL; 260 else alert ('Íå õîòèòå - êàê õîòèòå :)'); 261} 262 263function confirmdecline(theURL) 264{ 265 var text = 'Ïîäòâåðäèòå Âàø îòêàç îò ñêà÷èâàíèÿ.'; 266 if (confirm(text)) window.location.href=theURL; 267 else alert (' ñëåäóþùèé ðàç íå îøèáàéòåñü. :)'); 268} 269 270function confirmdone(theURL1, theURL2) 271{ 272 var text = 'Õîòèòå ñðàçó ïîáëàãîäàðèòü àâòîðà ðàçäà÷è?'; 273 if (confirm(text)) window.location.href=theURL1; 274 else window.location.href=theURL2; 275} 276 277function my_getbyid(id) 278{ 279 var itm = null; 280 if (document.getElementById) itm = document.getElementById(id); 281 else if (document.all) itm = document.all[id]; 282 else if (document.layers) itm = document.layers[id]; 283 return itm; 284} 285 286function my_show_div(itm) 287{ 288 if ( ! itm ) return; 289 itm.style.display = ""; 290} 291 292function my_hide_div(itm) 293{ 294 if ( ! itm ) return; 295 itm.style.display = "none"; 296} 297 298function do_pay_user(mid, pid, lock_trans, credit, lock_recept, name) 299{ 300 if( ! mid ) return; 301 if( ! pid ) return; 302 reason = my_getbyid('reason').value; 303 admin_opts = my_getbyid('checklabel_admin_opts') ? my_getbyid('checklabel_admin_opts').checked ? 1 : 0 : 0; 304 size = parseInt(my_getbyid('size').value); 305 credit = parseInt(my_getbyid('credit').value); 306 if( ( lock_trans == 1 ) && ( admin_opts == 0 ) ) 307 { 308 alert ('Âû íå ìîæåòå ïåðåäàâàòü ñâîè àêòèâíîñòè.'); 309 return; 310 } 311 if( ( mid == pid ) && ( admin_opts == 0 ) ) 312 { 313 alert ('Âû íå ìîæåòå ñàìè ñåáå ïåðåäàòü àêòèâíîñòè.'); 314 return; 315 } 316 if( ( lock_recept == 1 ) && ( admin_opts == 0 ) ) 317 { 318 alert ('Âû íå ìîæåòå ïåðåäàòü àêòèâíîñòè ýòîìó ïîëüçîâàòåëþ.'); 319 return; 320 } 321 if( ( isNaN( size ) ) || ( size == 0 ) ) 322 { 323 alert ('Âû íå ââåëè êîëè÷åñòâî, ëèáî íåïðàâèëüíî çàïîëíèëè ïîëå ïåðåäàâàåìûõ Âàìè àêòèâíîñòåé.\nÂâåäèòå â ýòî ïîëå ê
323îëè÷åñòâî àêòèâíîñòåé â öåëîì öèôðîâîì çíà÷åíèè, îòëè÷íîì îò íóëÿ.'); 324 return; 325 } 326 ajax_request('act=payuser&user_name='+escape(name)+'&pay_user='+pid+'&lock_trans='+lock_trans+'&lock_recept='+lock_recept+'&size='+size+'&credit='+credit+'&admin_opts='+admin_opts+sess+'&reason='+escape(reason)); 327} 328 329function span_to_input( type, itm, tid ) 330{ 331 var html_value = ''; 332 tid = tid ? tid : 0; 333 334 //---------------------------------- 335 // Prevent double click when desc open 336 //---------------------------------- 337 338 if( isNaN( itm ) ) 339 { 340 return false; 341 } 342 343 if( isNaN( tid ) ) 344 { 345 return false; 346 } 347 348 if ( _desc_clicked ) 349 { 350 return false; 351 } 352 353 _desc_clicked = 1; 354 355 text_html[ itm ] = document.getElementById( type + '-' + itm ).innerHTML; 356 357 //---------------------------------- 358 // Topic title 359 //---------------------------------- 360 361 if ( type == 'priority' ) 362 { 363 perm_max_length = 1; 364 max_size = 1; 365 } 366 else if ( type == 'paysize' ) 367 { 368 perm_max_length = 4; 369 max_size = 4; 370 } 371 else 372 { 373 perm_max_length = 250; 374 max_size = 40; 375 } 376 377 if ( type == 'reason' ) 378 { 379 ajax_request('act=edititem&CODE=02&itm='+itm+'&type='+type+sess); 380 } 381 else if ( type == 'content' ) 382 { 383 ajax_request('act=edititem&CODE=03&itm='+itm+'&type='+type+sess); 384 } 385 else 386 { 387 html_value += text_html[ itm ].replace( '"/g', '"'); 388 document.getElementById( type + '-' + itm ).innerHTML = '<input id="edit-'+itm+'" class="forminput" maxlength="'+perm_max_length+'" type="text" size="'+max_size+'" onblur="itm_blur(\''+itm+'\', \''+type+'\', \''+tid+'\')" onkeypress="itm_keypress(event, \''+itm+'\', \''+type+'\', \''+tid+'\')" />'; 389 document.getElementById( 'edit-' + itm ).focus(); 390 document.getElementById( 'edit-' + itm ).value += html_value; 391 } 392 return false; 393} 394 395itm_blur = function( itm, type, tid ) 396{ 397 newtext = document.getElementById( 'edit-' + itm ).value; 398 newtext = ( newtext != "" ) ? newtext : ( ( type == 'priority' ) ? 0 : text_html[ itm ] ); 399 tid = tid ? tid : 0; 400 401 if( type == 'priority' || type == 'paysize' ) 402 { 403 if( ! isNaN( newtext ) ) 404 { 405 itm_save( itm, newtext, type, tid ); 406 } 407 } 408 else 409 { 410 itm_save( itm, newtext, type, tid ); 411 } 412} 413 414itm_keypress = function( evt, itm, type, tid ) 415{ 416 if ( is_safari ) 417 { 418 return false; 419 } 420 evt = evt ? evt : window.event; 421 newtext = document.getElementById( 'edit-' + itm ).value; 422 newtext = ( newtext != "" ) ? newtext : ( ( type == 'priority' ) ? 0 : text_html[ itm ] ); 423 tid = tid ? tid : 0; 424 if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && newtext != "" ) 425 { 426 if( type == 'priority' || type == 'paysize' ) 427 { 428 if( type == 'priority' ) document.queue.submit = false; 429 if( ! isNaN( newtext ) ) 430 { 431 itm_save( itm, newtext, type, tid ); 432 } 433 } 434 else 435 { 436 itm_save( itm, newtext, type, tid ); 437 } 438 } 439} 440 441itm_save = function( itm, newtext, type, tid ) 442{ 443 var donotedit = 0; 444 445 if ( newtext == text_html[ itm ] ) 446 { 447 donotedit = 1; 448 } 449 _desc_clicked = 0; 450 451 document.getElementById( type + '-' + itm ).innerHTML = newtext; 452 if ( donotedit ) 453 { 454 return false; 455 } 456 457 if ( type == 'priority' ) 458 { 459 ajax_request('act=edititem&CODE=00&mid='+itm+'&tid='+tid+sess+'&text='+escape(newtext)); 460 } 461 else if ( type == 'paysize' ) 462 { 463 ajax_request('act=edititem&CODE=05&pay='+itm+sess+'&text='+escape(newtext)); 464 } 465 466 return false; 467} 468 469function fixLocat( tid, fix ) 470{ 471 if( ! tid ) return; 472 ajax_request('act=fixloc'+sess+'&tid='+tid+'&fix='+fix); 473 474 return false; 475} 476 477/*function refixLocat( tid ) 478{ 479 if( ! tid ) return; 480 ajax_request('act=fixloc'+sess+'&tid='+tid+'&fix=2'); 481}*/ 482 483function ajax_request(query_string) 484{ 485 if (query_string.length<2000) 486 { 487 var t=document.createElement('script'); 488 t.type="text/javascript"; 489 t.src='ajax.php?'+query_string+"&__=" +Math.random(); 490 var d=document.getElementById('appendajax'); 491 d.appendChild(t); 492 } 493 else 494 { 495 var http = get_http(); 496 http.open('POST', 'ajax.php?__=' +Math.random(), true); 497 http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 498 //http.setRequestHeader('Content-Type', 'application/octet-stream'); 499 http.send(query_string); 500 http.onreadystatechange = function() 501 { 502 if (http.readyState == 4) ajax_ev(http.responseText); 503 } 504 } 505} 506 507function get_http() 508{ 509 var xmlhttp; 510 if (!xmlhttp && typeof (XMLHttpRequest) != undefined) 511 { 512 try 513 { 514 xmlhttp = new XMLHttpRequest(); 515 } 516 catch (e) 517 { 518 try 519 { 520 xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); 521 } 522 catch (E) 523 { 524 xmlhttp = false; 525 } 526 } 527 } 528 return xmlhttp; 529} 530 531function ajax_ev(a) 532{ 533 eval(a); 534} 535 536function encodeurl( url ) 537{ 538 return escape(url).replace(/\+/g, "%2B"); 539} 540 541function dialog_show(authdialog, fleidfocusneeded, width) 542{ 543 var offset = parseInt($(document).scrollTop(), 10); 544 var oTop = parseInt(getDocumentclientHeight(), 10); 545 var oTopt = parseInt(my_getbyid( authdialog ).clientHeight, 10); 546 var centerh = offset + (oTop/4) - (oTopt/4) - (oTopt/2); 547 my_getbyid( 'auth' ).style.display = "block"; 548 document.documentElement.style.overflow = "hidden"; 549 if (width != 0) my_getbyid( authdialog ).style.width = width + 'px'; 550 my_getbyid( authdialog ).style.left = '50%'; 551 my_getbyid( authdialog ).style.top = parseInt(centerh, 10) + 'px'; 552} 553 554function dialog_hide(id) 555{ 556 if ( my_getbyid('logindialog') ) 557 { 558 my_getbyid('logindialog').style.position = 'absolute'; 559 my_getbyid('logindialog').style.left = '-2000px'; 560 my_getbyid('auth').style.display = "none"; 561 document.documentElement.style.overflow = 'auto'; 562 } 563 else if ( my_getbyid('imgfull') ) 564 { 565 my_getbyid('imgfull').style.position = 'absolute'; 566 my_getbyid('imgfull').style.left = '-2000px'; 567 my_getbyid('imgfull').innerHTML = ''; 568 my_getbyid('auth').style.display = "none"; 569 document.documentElement.style.overflow = 'auto'; 570 } 571 else if ( id && my_getbyid('imgdeldialog-' + id) ) 572 { 573 my_getbyid('imgdeldialog-' + id).style.position = 'absolute'; 574 my_getbyid('imgdeldialog-' + id).style.left = '-2000px'; 575 my_getbyid('auth').style.display = "none"; 576 document.documentElement.style.overflow = 'auto'; 577 } 578} 579document.documentElement.onkeydown = function(e) 580{ 581 if (!e) e = event; 582 if( e.keyCode == 27 ) dialog_hide(''); 583} 584 585itm_scroll = function(e) 586{ 587 if (!e) e = window.event; 588 /*if( e.preventDefault ) 589 e.preventDefault(); 590 else*/ 591 e.returnValue = false; 592} 593function CPoint(x, y) { this.x = this.y = null; this.reshape(x, y); } 594CPoint.prototype.reshape = function(x, y) { this.x = x; this.y = y; };
595CPoint.prototype.toString = function() { return "CPoint [x = " + this.x + ", y = " + this.y + "]"; }; 596function ieheight() 597{ 598 var bg = document.getElementById('body').offsetHeight; 599 if ( document.getElementById('bg') ) document.getElementById('bg').style.height = bg + 'px'; 600} 601window.onload = ieheight; 602 603function isUrl(text) 604{ 605 return ((text.indexOf('.') > 7) && 606 ((text.substring(0,7) == 'http://') || 607 (text.substring(0,7) == 'news://') || 608 (text.substring(0,8) == 'https://') || 609 (text.substring(0,6) == 'aim://') || 610 (text.substring(0,6) == 'ftp://') || 611 (text.substring(0,7) == 'ed2k://'))); 612} 613 614function lock_advertisement(id) 615{ 616 saved = new Array(); 617 clean = new Array(); 618 if ( tmp = ipb_getcookie('advertisement') ) 619 { 620 saved = tmp.split(","); 621 } 622 for( i = 0 ; i < saved.length; i++ ) 623 { 624 if ( saved[i] != id && saved[i] != "" ) 625 { 626 clean[clean.length] = saved[i]; 627 } 628 } 629 clean[ clean.length ] = id; 630 my_hide_div( my_getbyid( 'md_'+id ) ); 631 ipb_setcookie( 'advertisement', clean.join(','), 1 ); 632} 633 634function init_lock_text(ids) 635{ 636 var text = 'Íàäîåëî ñìîòðåòü íà ðåêëàìó? Êëèêíè ïî áàííåðó - è îí èñ÷åçíåò íà ñóòêè.'; 637 //var text = ''; 638 var maxid = 0; 639 saved = new Array(); 640 saved = ids.split(","); 641 for( i = 0 ; i < saved.length; i++ ) 642 { 643 maxid = parseInt(saved[i]); 644 if ( my_getbyid( 'm_d__'+maxid ) ) my_getbyid( 'm_d_'+maxid ).innerHTML = text; 645 } 646} 647 648function ipb_getcookie( name ) 649{ 650 cname = ipb_cookieid + name + '='; 651 cpos = document.cookie.indexOf( cname ); 652 653 if ( cpos != -1 ) 654 { 655 cstart = cpos + cname.length; 656 cend = document.cookie.indexOf(";", cstart); 657 658 if (cend == -1) 659 { 660 cend = document.cookie.length; 661 } 662 663 return unescape( document.cookie.substring(cstart, cend) ); 664 } 665 666 return null; 667} 668 669function ipb_setcookie( name, value, sticky ) 670{ 671 expire = ""; 672 domain = ""; 673 path = "/"; 674 675 var today = new Date(); 676 today.setTime( today.getTime() ); 677 expires = 1000 * 60 * 60 * 24; 678 var expires_date = new Date( today.getTime() + (expires) ); 679 680 if ( sticky ) 681 { 682 expire = "; expires=" + expires_date.toGMTString(); 683 } 684 685 if ( ipb_cookie_domain != "" ) 686 { 687 domain = '; domain=' + ipb_cookie_domain; 688 } 689 690 if ( ipb_cookie_path != "" ) 691 { 692 path = ipb_cookie_path; 693 } 694 695 document.cookie = ipb_cookieid + name + "=" + value + "; path=" + path + expire + domain + ';'; 696 697} 698 699function refrClock() 700{ 701 var d = new Date(); 702 var s = d.getSeconds(); 703 var m = d.getMinutes(); 704 var h = d.getHours(); 705 var day = d.getDay(); 706 var date = d.getDate(); 707 var month = d.getMonth(); 708 var year = d.getFullYear(); 709 if (s<10) {s = "0" + s} 710 if (m<10) {m = "0" + m} 711 if (h<10) {h = "0" + h} 712 my_getbyid("clock").innerHTML = h + ":" + m + ":" + s; 713 setTimeout("refrClock()",1000); 714} 715 716function getending(number, titles=[]) 717{ 718 var cases = titles.length > 2 ? [2, 0, 1, 1, 1, 2] : [1, 0, 1, 1, 1, 1]; 719 720 return titles[(number % 100 > 4 && number % 100 < 20) ? cases[0] : cases[Math.min(number % 10, 5)]]; 721} 722 723function get_build_menu(id, base_link, per_page, total_poss, lang_page_jump, jmp_go) 724{ 725 ipb_pages_shown++; 726 var pgjmp = my_getbyid( id ); 727 pgjmp.id = id+'-'+ipb_pages_shown; 728 ipb_pages_array[ ipb_pages_shown ] = new Array( base_link, per_page, total_poss ); 729 menu_build_menu( 730 pgjmp.id, 731 new Array( "--NODIV--<div onmouseover='pages_st_focus("+ipb_pages_shown+")' class='popupmenu-category' align='center'>"+lang_page_jump+"</div>", 732 "<input type='text' class='textinput' size='5' name='st' id='st-"+ipb_pages_shown+"' /> <input type='button' class='button' onclick='do_multi_page_jump("+ipb_pages_shown+");' value='"+jmp_go+"' />" ) ); 733} 734 735function my_getcookie( name ) 736{ 737 cname = ipb_cookieid + name + '='; 738 cpos = document.cookie.indexOf( cname ); 739 740 if ( cpos != -1 ) 741 { 742 cstart = cpos + cname.length; 743 cend = document.cookie.indexOf(";", cstart); 744 745 if (cend == -1) 746 { 747 cend = document.cookie.length; 748 } 749 750 return unescape( document.cookie.substring(cstart, cend) ); 751 } 752 753 return null; 754} 755 756function my_setcookie( name, value, sticky ) 757{ 758 expire = ""; 759 domain = ""; 760 path = "/"; 761 762 if ( sticky ) 763 { 764 expire = "; expires=Wed, 1 Jan 2050 00:00:00 GMT"; 765 } 766 767 if ( ipb_cookie_domain != "" ) 768 { 769 domain = '; domain=' + ipb_cookie_domain; 770 } 771 772 if ( ipb_cookie_path != "" ) 773 { 774 path = ipb_cookie_path; 775 } 776 777 document.cookie = ipb_cookieid + name + "=" + value + "; path=" + path + expire + domain + ';'; 778} 779
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.