1 var DDSPEED = 10; 2 var DDTIMER = 15; 3 4 // main function to handle the mouse events // 5 function ddMenu(id,d){ 6 var h = document.getElementById(id + '-ddheader'); 7 var c = document.getElementById(id + '-ddcontent'); 8 clearInterval(c.timer); 9 if(d == 1){ 10 clearTimeout(h.timer); 11 if(c.maxh && c.maxh <= c.offsetHeight){return} 12 else if(!c.maxh){ 13 c.style.display = 'block'; 14 c.style.height = 'auto'; 15 c.maxh = c.offsetHeight; 16 c.style.height = '0px'; 17 } 18 c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); 19 }else{ 20 h.timer = setTimeout(function(){ddCollapse(c)},50); 21 } 22 } 23 24 // collapse the menu // 25 function ddCollapse(c){ 26 c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER); 27 } 28 29 // cancel the collapse if a user rolls over the dropdown // 30 function cancelHide(id){ 31 var h = document.getElementById(id + '-ddheader'); 32 var c = document.getElementById(id + '-ddcontent'); 33 clearTimeout(h.timer); 34 clearInterval(c.timer); 35 if(c.offsetHeight < c.maxh){ 36 c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); 37 } 38 } 39 40 // incrementally expand/contract the dropdown and change the opacity // 41 function ddSlide(c,d){ 42 var currh = c.offsetHeight; 43 var dist; 44 if(d == 1){ 45 dist = (Math.round((c.maxh - currh) / DDSPEED)); 46 }else{ 47 dist = (Math.round(currh / DDSPEED)); 48 } 49 if(dist <= 1 && d == 1){ 50 dist = 1; 51 } 52 c.style.height = currh + (dist * d) + 'px'; 53 c.style.opacity = currh / c.maxh; 54 c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')'; 55 if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){ 56 clearInterval(c.timer); 57 } 58 }
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.