1/************************************ 2 Common javascripts for the site 3************************************/ 4 5/* Auto re-direct the page back to the index page */ 6/* default redirect is true */ 7var booRedirect 8if (self==parent && booRedirect==null){ 9 document.write('<B>LOADING ...</B><br>') 10 document.write('This page will be refreshed in a moment<br> ') 11 document.write('<META HTTP-EQUIV="refresh" CONTENT="1; URL=index.html">') 12} 13 14/* Open a second browser window */ 15/* NOTE : DO NOT use Base target when using this script */ 16function OpenWin2(urlString,windowName,w,h,scroll,popup) 17{ 18 var temp2str 19 var tempstr 20 if (popup==1) {tempstr='height='+h+',width='+w+',toolbar=no,menubar=no,resizable=yes,status=no,location=no'} 21 else {tempstr='height='+h+',width='+w+',toolbar=yes,menubar=yes,resizable=yes,status=yes,location=yes'} 22 if (scroll==1) {temp2str=',scrollbars=yes' } else {temp2str=',scrollbars=no'} 23 24 QWin = window.open( urlString, windowName, config=tempstr + temp2str ); 25 if (window.focus) {QWin.focus()}; 26} 27 28/* Refresh an image in the page every specific seconds */ 29/* name - name of the image */ 30/* source - url of the image */ 31/* sec - refresh interval */ 32function imgRefresh (name, sec, source) 33{ 34 var tempstr 35 if (!document.images) return; 36 source=(!source)?'':source; 37 if (source=='') { 38 document.images[name].src = document.images[name].src; 39 } else { 40 document.images[name].src = source; } 41 tempstr="imgRefresh('" + name + "'," + sec + ((source=='')?")":",'" + source + "')"); 42 setTimeout(tempstr, sec*1000); 43} 44 45/****************************** 46Find frame 47modified to return a status of success 48******************************/ 49function comFindFrame(frameName){ 50 obj=top; var frameObj=0; 51 for(i=0;i<obj.frames.length;i++){ 52 if(obj.frames[i].name==frameName){frameObj=obj.frames[i]; break;}; ln=obj.frames[i].frames.length 53 for(j=0;j<ln;j++){ 54 if(obj.frames[i].frames[j].name==frameName){frameObj=obj.frames[i].frames[j]; break}; ln2=obj.frames[i].frames[j].frames.length 55 for(a=0;a<ln2;a++){ 56 if(obj.frames[i].frames[j].frames[a].name==frameName){frameObj=obj.frames[i].frames[j].frames[a]; break;} 57 } 58 } 59 } 60 return frameObj; 61} 62 63/****************************** 64Set the html code for displaying an image 65aspect is "p"-portrait "l"-landscape 66******************************/ 67function DisplayImg(fileName,aspect,tnlength,winlength){ 68 var tempstr 69 var tnstr 70 var winstr 71 var anum 72 anum=winlength / 4 * 3; 73 if(aspect=='p' | aspect=='P'){ 74 tnstr='height=' + tnlength; 75 winstr=anum + ',' + winlength; 76 } else { 77 tnstr='width=' + tnlength; 78 winstr=winlength + ',' + anum; 79 } 80 tempstr='<a class="LinkTxt" href="javascript:OpenWin2(' + "'" + fileName + "','Photo'," + winstr + ",1,1)"+ '"><img SRC="' + fileName + '" NOSAVE ' + tnstr + '></a>' 81 document.write(tempstr) 82} 83 84/************* END ******************/
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.