1// JavaScript Document 2function switchFontSize (ckname,val){ 3 var bd = document.getElementsByTagName('body'); 4 if (!bd || !bd.length) return; 5 bd = bd[0]; 6 var oldclass = 'fs'+CurrentFontSize; 7 switch (val) { 8 case 'inc': 9 if (CurrentFontSize+1 < 7) { 10 CurrentFontSize++; 11 } 12 break; 13 case 'dec': 14 if (CurrentFontSize-1 > 0) { 15 CurrentFontSize--; 16 } 17 break; 18 case 'reset': 19 default: 20 CurrentFontSize = DefaultFontSize; 21 } 22 var newclass = 'fs'+CurrentFontSize; 23 bd.className = bd.className.replace(new RegExp('fs.?', 'g'), ''); 24 bd.className = trim(bd.className); 25 bd.className += (bd.className?' ':'') + newclass; 26 createCookie(ckname, CurrentFontSize, 365); 27} 28function trim(str, chars) { 29 chars = chars || "\\s"; 30 str = str.replace(new RegExp("^[" + chars + "]+", "g"), ""); 31 str = str.replace(new RegExp("^[" + chars + "]+", "g"), ""); 32 return str; 33} 34 35function switchTool (ckname, val) { 36 createCookie(ckname, val, 365); 37 window.location.reload(); 38} 39function createCookie(name,value,days) { 40 if (days) { 41 var date = new Date(); 42 date.setTime(date.getTime()+(days*24*60*60*1000)); 43 var expires = "; expires="+date.toGMTString(); 44 } 45 else expires = ""; 46 document.cookie = name+"="+value+expires+"; path=/"; 47} 48function getCookie(c_name, defaultvalue){ //alert(document.cookie); 49 var i,x,y,arrcookies=document.cookie.split(";"); 50 for (i=0;i<arrcookies.length;i++){ 51 x=arrcookies[i].substr(0,arrcookies[i].indexOf("=")); 52 y=arrcookies[i].substr(arrcookies[i].indexOf("=")+1); 53 x=x.replace(/^\s+|\s+$/g,""); 54 if (x==c_name){ 55 return unescape(y); 56 } 57 } 58 return defaultvalue; 59} 60 61
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.