rem: } 
add: */ }  /** * Disables the animated gif to show the search is done * * @author Andreas Gohr <andi@splitbrain.org> */ function hideLoadBar(id){ obj = $(id); if(obj) obj.style.display="none"; }  /** * Adds the toggle switch to the TOC */ function addTocToggle() { if(!document.getElementById) return; var header = $('toc__header'); if(!header) return;  var showimg     = document.createElement('img'); showimg.id      = 'toc__show'; showimg.src     = DOKU_BASE+'lib/images/arrow_down.gif'; showimg.alt     = '+'; showimg.onclick = toggleToc; showimg.style.display = 'none';  var hideimg     = document.createElement('img'); hideimg.id      = 'toc__hide'; hideimg.src     = DOKU_BASE+'lib/images/arrow_up.gif'; hideimg.alt     = '-'; hideimg.onclick = toggleToc;  prependChild(header,showimg); prependChild(header,hideimg); }  /** * This toggles the visibility of the Table of Contents */ function toggleToc() { var toc = $('toc__inside'); var showimg = $('toc__show'); var hideimg = $('toc__hide'); if(toc.style.display == 'none') { toc.style.display      = ''; hideimg.style.display = ''; showimg.style.display = 'none'; } else { toc.style.display      = 'none'; hideimg.style.display = 'none'; showimg.style.display = ''; } }  /* * This enables/disables checkboxes for acl-administration * * @author Frank Schubert <frank@schokilade.de> */ function checkAclLevel(){ if(document.getElementById) { var scope = $('acl_scope').value;   if( (scope.indexOf(":*") > 0) || (scope == "*") ){ document.getElementsByName('acl_checkbox[4]')[0].disabled=false; document.getElementsByName('acl_checkbox[8]')[0].disabled=false; }else{ document.getElementsByName('acl_checkbox[4]')[0].checked=false; document.getElementsByName('acl_checkbox[8]')[0].checked=false;  document.getElementsByName('acl_checkbox[4]')[0].disabled=true; document.getElementsByName('acl_checkbox[8]')[0].disabled=true; } } }  /** * insitu footnote addition * * provide a wrapper for domTT javascript library * this function is placed in the onmouseover event of footnote references in the main page * * @author Chris Smith <chris [at] jalakai [dot] co [dot] uk> */ var currentFootnote = 0; function fnt(id, e, evt) {  if (currentFootnote && id != currentFootnote) { domTT_close($('insitu__fn'+currentFootnote)); }   var fnote = $('insitu__fn'+id); var footnote; if (!fnote) {    var a = $( "fn__"+id ); if (!a){ return; }   footnote = new String (a.parentNode.innerHTML);   footnote = footnote.replace(/<a\s.*?href=\".*\#fnt__\d+\".*?<\/a>/gi, ''); footnote = footnote.replace(/^\s+(,\s+)+/,'');   footnote = footnote.replace(/\bid=\"(.*?)\"/gi,'id="insitu__$1'); } else { footnote = new String(fnt.innerHTML); }   domTT_activate(e, evt, 'content', footnote, 'type', 'velcro', 'id', 'insitu__fn'+id, 'styleClass', 'insitu-footnote JSpopup dokuwiki', 'maxWidth', document.body.offsetWidth*0.4); currentFootnote = id; }   /** * Add the edit window size controls */ function initSizeCtl(ctlid,edid){ if(!document.getElementById){ return; }  var ctl      = $(ctlid); var textarea = $(edid); if(!ctl || !textarea) return;  var hgt = DokuCookie.getValue('sizeCtl'); if(hgt){ textarea.style.height = hgt; }else{ textarea.style.height = '300px'; }  var l = document.createElement('img'); var s = document.createElement('img'); var w = document.createElement('img'); l.src = DOKU_BASE+'lib/images/larger.gif'; s.src = DOKU_BASE+'lib/images/smaller.gif'; w.src = DOKU_BASE+'lib/images/wrap.gif'; addEvent(l,'click',function(){sizeCtl(edid,100);}); addEvent(s,'click',function(){sizeCtl(edid,-100);}); addEvent(w,'click',function(){toggleWrap(edid);}); ctl.appendChild(l); ctl.appendChild(s); ctl.appendChild(w); }  /** * This sets the vertical size of the editbox */ function sizeCtl(edid,val){ var textarea = $(edid); var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2)); height += val; textarea.style.height = height+'px';  DokuCookie.setValue('sizeCtl',textarea.style.height); }  /** * Toggle the wrapping mode of a textarea * * @author Fluffy Convict <fluffyconvict@hotmail.com> * @link   http: * @author <shutdown@flashmail.com> * @link   https: */ function toggleWrap(edid){ var txtarea = $(edid); var wrap = txtarea.getAttribute('wrap'); if(wrap && wrap.toLowerCase() == 'off'){ txtarea.setAttribute('wrap', 'soft'); }else{ txtarea.setAttribute('wrap', 'off'); }  var parNod = txtarea.parentNode; var nxtSib = txtarea.nextSibling; parNod.removeChild(txtarea); parNod.insertBefore(txtarea, nxtSib); }  /** * Handler to close all open Popups */ function closePopups(){ if(!document.getElementById){ return; }  var divs = document.getElementsByTagName('div'); for(var i=0; i < divs.length; i++){ if(divs[i].className.indexOf('JSpopup') != -1){ divs[i].style.display = 'none'; } } }  /** * Looks for an element with the ID scroll__here at scrolls to it */ function scrollToMarker(){ var obj = $('scroll__here'); if(obj) obj.scrollIntoView(); }  /** * Looks for an element with the ID focus__this at sets focus to it */ function focusMarker(){ var obj = $('focus__this'); if(obj) obj.focus(); }  /** * Remove messages */ function cleanMsgArea(){ var elems = getElementsByClass('(success|info|error)',document,'div'); if(elems){ for(var i=0; i<elems.length; i++){ elems[i].style.display = 'none'; } } } 
context: function showLoadBar(id){  obj = $(id);  if(obj){    obj.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" '+                    'width="150" height="12" alt="..." />';    obj.style.display="block";  }}
meta: 4895	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4895/121d5fa681f0f23e3a622f8fb55611e5ad8a83b8/script.js/buggy/lib/scripts/script.js