1/*********************************************** 2* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com) 3* Sliding routine by Roy Whittle (http://www.javascript-fx.com/) 4* This notice must stay intact for legal use. 5* Visit http://www.dynamicdrive.com/ for full source code 6***********************************************/ 7 8 9function iecompattest(){ 10return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body 11} 12 13function get_cookie(Name) { 14var search = Name + "=" 15var returnvalue = ""; 16if (document.cookie.length > 0) { 17offset = document.cookie.indexOf(search) 18if (offset != -1) { 19offset += search.length 20end = document.cookie.indexOf(";", offset); 21if (end == -1) end = document.cookie.length; 22returnvalue=unescape(document.cookie.substring(offset, end)) 23} 24} 25return returnvalue; 26} 27 28function closebar(){ 29if (persistclose) 30document.cookie="remainclosed=1" 31document.getElementById("topbar").style.visibility="hidden" 32} 33 34function staticbar(){ 35 barheight=document.getElementById("topbar").offsetHeight 36 var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera; 37 var d = document; 38 function ml(id){ 39 var el=d.getElementById(id); 40 if (!persistclose || persistclose && get_cookie("remainclosed")=="") 41 el.style.visibility="visible" 42 if(d.layers)el.style=el; 43 el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";}; 44 el.x = startX; 45 if (verticalpos=="fromtop") 46 el.y = startY; 47 else{ 48 el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight; 49 el.y -= startY; 50 } 51 return el; 52 } 53 window.stayTopLeft=function(){ 54 if (verticalpos=="fromtop"){ 55 var pY = ns ? pageYOffset : iecompattest().scrollTop; 56 ftlObj.y += (pY + startY - ftlObj.y)/8; 57 } 58 else{ 59 var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight; 60 ftlObj.y += (pY - startY - ftlObj.y)/8; 61 } 62 ftlObj.sP(ftlObj.x, ftlObj.y); 63 setTimeout("stayTopLeft()", 10); 64 } 65 ftlObj = ml("topbar"); 66 stayTopLeft(); 67} 68 69if (window.addEventListener) 70window.addEventListener("load", staticbar, false) 71else if (window.attachEvent) 72window.attachEvent("onload", staticbar) 73else if (document.getElementById) 74window.onload=staticbar
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.