1 2var type = "IE"; // Variable used to hold the browser name 3 4detectBrowser(); 5 6function detectBrowser() { 7 if (window.opera && document.readyState) { 8 type="OP"; // The surfer is using Opera of some version 9 } else if (document.all) { 10 type="IE"; // The surfer is using IE 4+ 11 } else if (document.layers) { 12 type="NN"; // The surfer is using NS 4 13 } else if (!document.all && document.getElementById) { 14 type="MO"; // The surfer is using NS6+ or Firefox 15 } else { 16 type="IE"; // I assume it will not get here 17 } 18} 19 20document.onkeydown = function(e) { 21 if (!e) { 22 // If the browser did not pass the event information to the 23 // function, we will have to obtain it from the event register. 24 if(window.event) { 25 e = window.event; // IE 4+ 26 } else { 27 return; 28 } 29 } 30 if (typeof(e.keyCode) == 'number') { 31 e = e.keyCode; // DOM 32 } else if (typeof(e.which) == 'number') { 33 e = e.which; // NS 4 34 } else if(typeof(e.charCode) == 'number') { 35 e = e.charCode; // NS 6+, Mozilla 0.9+ 36 } else { 37 return; 38 } 39 if ((e==39 || e==63235) && document.getElementById("next")) { 40 location.href = document.getElementById("next").href; 41 } else if ((e==37 || e==63234) && document.getElementById("prev")) { 42 location.href = document.getElementById("prev").href; 43 } 44} 45 46/*****************************************************************************/ 47 48function MM_findObj(n, d) { //v4.01 49 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 50 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 51 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 52 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 53 if(!x && d.getElementById) x=d.getElementById(n); return x; 54} 55 56function MM_showHideLayers() { //v6.0 57 var i,p,v,obj,args=MM_showHideLayers.arguments; 58 for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; 59 if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; } 60 obj.visibility=v; } 61} 62 63/*****************************************************************************/ 64 65var leftmost = -190; 66var rightmost = 10; 67var interval = null; 68var sidebarVisible = false; 69var DOMCapable; 70 71document.getElementById ? DOMCapable=true : DOMCapable=false; 72 73function scrollRight(menuId) { 74 var leftPosition; 75 if (DOMCapable) { 76 leftPosition = parseInt(document.getElementById(menuId).style.left); 77 if (leftPosition >= rightmost) { 78 clearInterval(interval); 79 return; 80 } else { 81 leftPosition += 10; 82 document.getElementById(menuId).style.left = leftPosition+"px"; 83 } 84 } 85} 86 87function scrollLeft(menuId) { 88 if (DOMCapable) { 89 leftPosition = parseInt(document.getElementById(menuId).style.left); 90 if (leftPosition <= leftmost) { 91 clearInterval(interval); 92 return; 93 } else { 94 leftPosition -= 10; 95 document.getElementById(menuId).style.left = leftPosition+"px"; 96 } 97 } 98} 99 100function slideIn(menuId) { 101 if (document.getElementById(menuId)) { 102 clearInterval(interval); 103 interval = setInterval('scrollRight("'+menuId+'")', 5); 104 } 105 sidebarVisible = true; 106} 107 108function slideOut(menuId) { 109 if (document.getElementById(menuId)) { 110 clearInterval(interval); 111 interval = setInterval('scrollLeft("'+menuId+'")', 5); 112 } 113 sidebarVisible = false; 114} 115 116function toggleSidebar(menuId) { 117 if (!sidebarVisible) { 118 slideIn(menuId); 119 } else { 120 slideOut(menuId); 121 } 122} 123 124/*****************************************************************************/ 125 126function popImage(img, title) { 127 picfile = new Image(); 128 picfile.src = img; 129 picfile.imageTitle = title; 130 fileCheck(100); 131} 132 133function fileCheck(i) { 134 if ((picfile.width != 0 && picfile.height != 0) || i == 0) { 135 makeWindow(); 136 } else { 137 setTimeout("fileCheck(" + (i-1) + ")", 50); 138 } 139} 140 141function makeWindow() { 142 var img = picfile.src, wd = picfile.width, ht = picfile.height, title = picfile.imageTitle; 143 var args = "resizable=yes"; 144 if (wd == 0) { 145 // Default window size if image load is slow 146 wd = 800; 147 ht = 600; 148 args += ",scrollbars=yes"; 149 } 150 151 if (window.screen) { 152 var isIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
153 var avwd = screen.availWidth, avht = screen.availHeight; 154 155 if (avwd < wd || avht < ht) { args += ",scrollbars=yes"; } 156 157 var xcen = (avwd > wd) ? (avwd - wd) / 2 : 0; 158 var ycen = (avht > ht) ? (avht - ht) / 2 : 0; 159 args += ",left=" + xcen + ",screenX=" + xcen; 160 args += ",top=" + ycen + ",screenY=" + ycen; 161 162 if (avwd < wd) { 163 wd = avwd; 164 if (isIE) wd -= 12; 165 } 166 if (avht < ht) { 167 ht = avht; 168 if (isIE) ht -= 32; 169 } 170 } 171 args += ",width=" + wd + ",innerWidth=" + wd; 172 args += ",height=" + ht + ",innerHeight=" + ht; 173 174 popwin = window.open(img, 'fullSize', args); 175 popwin.document.open(); 176 popwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'); 177 popwin.document.write('<html>'); 178 popwin.document.write('<head>'); 179 popwin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>'); 180 popwin.document.write('<title>'+title+'</title>'); 181 popwin.document.write('
181</head>'); 182 popwin.document.write('<body style="margin:0px"><a href="javascript:window.close()"><img src="'+img+'" border="0" alt="'+title+'"/></a></body>'); 183 popwin.document.write('</html>'); 184 popwin.document.close(); 185} 186 187/*****************************************************************************/ 188 189var exifVisible = false; 190 191function setLayer(obj,lyr) { 192 var newX = findPosX(obj)+5; 193 var newY = findPosY(obj)+5; 194 var x = new getObj(lyr); 195 x.style.top = newY + 'px'; 196 x.style.left = newX + 'px'; 197} 198 199function findPosX(obj) { 200 var curleft = 0; 201 202 if (!obj) { return curleft; } 203 if (obj.offsetParent) { 204 while (obj.offsetParent) { 205 curleft += obj.offsetLeft 206 obj = obj.offsetParent; 207 } 208 } else if (obj.x) { 209 curleft += obj.x; 210 } 211 return curleft; 212} 213 214function findPosY(obj) { 215 var curtop = 0; 216 217 if (!obj) { return curtop; } 218 if (obj.offsetParent) { 219 while (obj.offsetParent) { 220 curtop += obj.offsetTop 221 obj = obj.offsetParent; 222 } 223 } else if (obj.y) { 224 curtop += obj.y; 225 } 226 return curtop; 227} 228 229function getObj(id) { 230 if (type=="IE") { 231 this.obj = document.all[id]; 232 this.style = document.all[id].style; 233 } else if (type=="MO" || type=="OP") { 234 this.obj = document.getElementById(id); 235 this.style = document.getElementById(id).style; 236 } else if (type=="NN") { 237 if (document.layers[id]) { 238 this.obj = document.layers[id]; 239 this.style = document.layers[id]; 240 } 241 } 242} 243 244function toggleExif(parentId, id) { 245 var parent = document.getElementById(parentId); 246 247 MM_showHideLayers(id,'',(exifVisible) ? 'hide' : 'show'); 248 setLayer(parent,id); 249 250 exifVisible = !exifVisible; 251}
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.