PageSourceSearch

https://www.brighton-best.com.tw/script/java/library.js

js brighton-best.com.tw collected 2026-10-05 18:59:52 UTC 38,742 bytes, 961 lines download raw bytes

1// main frames page frame border colors
2
3var LO_MainFrameBorderColor	= '#34487E';
4
5// BODY Selector
6var LO_BodyBGColor			= 'Window';
7var LO_BodyFont				= 'tahoma';
8var LO_FontSize				= '8pt';
9var LO_FontColor			= '#000000';
10var LO_TextOverFlow			= 'ellipsis';
11
12// Menu Body
13var LO_MenuBorder			= '2px outset';
14var LO_MenuBGColor			= '#D4D0C8';
15var LO_MenuFont				= 'tahoma';
16var LO_MenuFontSize			= '8pt';
17var LO_MenuFontColor		= '#000000';
18
19// menu attributes
20var LO_MenuButtonBorderOn	= '1px outset';
21var LO_MenuButtonBorderOff	= '1px solid lightsteelblue';
22
23var LO_MenuImgBackgroundColor = 'lightsteelblue';
24var LO_MenuImgFilter = "progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#99FFFFFF', EndColorStr='#00FFFFFF')";
25
26var LO_MenuCheckBorder = '2px inset';
27var LO_MenuCheckBGColor = 'lightsteelblue';
28
29// menu mouseover
30var LO_MO_MenuBGColor		= 'navy';
31var LO_MO_MenuFont			= 'tahoma';
32var LO_MO_MenuFontSize		= '8pt';
33var LO_MO_MenuFontColor		= '#ffffff';
34
35// menu divider
36var LO_MenuDivBGColor		= 'lightslategray';
37var LO_MenuDivBorder		= '1pt inset';
38var LO_MenuDivWidth			= '100%';
39var LO_MenuDivHeight		= '1px';
40
41// list highlighting colors
42var LO_ListHighlightBackgroundColor	=	'lightsteelblue';
43var LO_ListHighlightColor	=	'#000000';
44var LO_ListUnHighlightBackgroundColor	=	'#F1F5FA';
45var LO_ListUnHighlightColor	=	'#000000';
46
47var LO_MenuCheckBorder = '2px inset';
48var LO_MenuCheckBGColor = '#6600FF';
49
50var refreshInteval = 20;
51var refreshValue = refreshInteval;
52var timerID = null;
53var timerRunning = false;
54var SHours = eval(getCookie("serverhour"));
55var SMinutes = eval(getCookie("serverminute"));
56var SSeconds = eval(getCookie("serversecond"));
57var SMonths = eval(getCookie("servermonth"));
58
59if (!window.createPopup) 
60{  
61    var __createPopup = function() 
62	{  
63        var SetElementStyles = function( element, styleDict ) 
64		{  
65            var style = element.style ;  
66            for ( var styleName in styleDict )style[ styleName ] = styleDict[ styleName ] ;   
67        }  
68        var eDiv = document.createElement( 'div' );   
69        SetElementStyles( eDiv, { 'position': 'absolute', 'top': 0 + 'px', 'left': 0 + 'px', 'width': 0 + 'px', 'height': 0 + 'px', 'zIndex': 1000, 'display' : 'none', 'overflow' : 'hidden' } ) ;  
70        eDiv.body = eDiv ;  
71        var opened = false ;  
72        var setOpened = function( b ) 
73		{  
74            opened = b;   
75        }  
76        var getOpened = function() 
77		{  
78            return opened ;   
79        }  
80        var getCoordinates = function( oElement ) 
81		{  
82            var coordinates = {x:0,y:0} ;   
83            while( oElement ) {  
84                coordinates.x += oElement.offsetLeft ;  
85                coordinates.y += oElement.offsetTop ;  
86                oElement = oElement.offsetParent ;  
87            }  
88            return coordinates ;  
89        }  
90        return {htmlTxt : '', document : eDiv, isOpen : getOpened(), isShow : false, hide : function() { SetElementStyles( eDiv, { 'top': 0 + 'px', 'left': 0 + 'px', 'width': 0 + 'px', 'height': 0 + 'px', 'display' : 'none' } ) ; eDiv.innerHTML = '' ; this.isShow = false ; }, show : function( iX, iY, iWidth, iHeight, oElement ) { if (!getOpened()) { document.body.appendChild( eDiv ) ; setOpened( true ) ; } ; this.htmlTxt = eDiv.innerHTML ; if (this.isShow) { this.hide() ; } ; eDiv.innerHTML = this.htmlTxt ; var coordinates = getCoordinates ( oElement ) ; eDiv.style.top = ( iX + coordinates.x ) + 'px' ; eDiv.style.left = ( iY + coordinates.y ) + 'px' ; eDiv.style.width = iWidth + 'px' ; eDiv.style.height = iHeight + 'px' ; eDiv.style.display = 'block' ; this.isShow = true ; } }  
91    }  
92    window.createPopup = function() 
93	{  
94        return __createPopup();   
95    }  
96}  
97
98var oPopup = window.createPopup();
99	oPopup.document.body.style.border = LO_MenuBorder;
100	oPopup.document.body.style.backgroundColor = LO_MenuBGColor;
101	
102
103function progress(x,y) {  
104   refreshValue = refreshInteval;
105   if(window.self.dialogTop) {
106      vtop = parseInt(Replace(window.self.dialogTop,"px",""))+(parseInt(Replace(window.self.dialogHeight,"px",""))-389)/2;
107      vleft = parseInt(Replace(window.self.dialogLeft,"px",""))+(parseInt(Replace(window.self.dialogWidth,"px",""))-512)/2;
108   }
109   else {
110      vtop = (top.screen.availHeight-100)/2;
111      vleft = (top.screen.availWidth-300)/2;
112   }
113   if(x) {
114      vtop = x;
115      vleft = y;
116      alert(vtop +","+ vleft);
117   }
118   s="<table border=0 cellPadding=0 cellSpacing=0 width=300 height=90>"+
119     "<tr>"+
120     "<td  width=20% height=100% valign=middle align=right>"+
121     "<img src='/images/gif/search1.gif' border=0 align=absmiddle>&nbsp;"+
122     "</td>"+
123     "<td  width=80% height=100% valign=middle align=center>"+
124     "<font face='Arial' size=2><b><span id=msgbox>Searching...</span></b></font><font face='Tahoma' size=2><b><span id=elapse></span></b></font>
124"+
125     "</td>"+
126     "</tr>"+
127     "</table>";
128	oPopup.document.body.innerHTML = s; 
129	oPopup.show(vleft, vtop, 300, 90, document.getElementById("helpDiv") );
130}
131	
132function processing(x,y) {  
133   refreshValue = refreshInteval;
134   if(window.self.dialogTop) {
135      vtop = parseInt(Replace(window.self.dialogTop,"px",""))+(parseInt(Replace(window.self.dialogHeight,"px",""))-389)/2;
136      vleft = parseInt(Replace(window.self.dialogLeft,"px",""))+(parseInt(Replace(window.self.dialogWidth,"px",""))-512)/2;
137   }
138   else {
139      vtop = (top.screen.availHeight-100)/2;
140      vleft = (top.screen.availWidth-300)/2;
141   }
142   if(x) {
143      vtop = x;
144      vleft = y;
145      alert(vtop +","+ vleft);
146   }
147   s="<table border=0 cellPadding=0 cellSpacing=0 width=300 height=90>"+
148     "<tr>"+
149     "<td  width=20% height=100% valign=middle align=right>"+
150     "<img src='/images/gif/search1.gif' border=0 align=absmiddle>&nbsp;"+
151     "</td>"+
152     "<td  width=80% height=100% valign=middle align=center>"+
153     "<font face='Arial' size=2><b><span id=msgbox>Searching...</span></b></font><font face='Tahoma' size=2><b><span id=elapse></span></b></font>
153"+
154     "</td>"+
155     "</tr>"+
156     "</table>";
157	oPopup.document.body.innerHTML = s; 
158    startclock();
159	oPopup.show(vleft, vtop, 300, 90, document.getElementById("helpDiv") );
160}
161
162
163var tmpnow = new Date();
164var ohours = SHours;
165var ominutes = SMinutes;
166
167if(tmpnow.getHours() - SHours < 0){
168   houroffset = tmpnow.getHours() - SHours + 24;
169}   
170else {
171   houroffset = tmpnow.getHours() - SHours;
172}   
173
174if(tmpnow.getMinutes() - SMinutes < 0){
175   minoffset = tmpnow.getMinutes() - SMinutes + 60;
176   houroffset = houroffset - 1;
177}   
178else {
179   minoffset = tmpnow.getMinutes() - SMinutes;
180}   
181
182if(tmpnow.getSeconds() - SSeconds < 0){
183   secondoffset = tmpnow.getSeconds() - SSeconds + 60;
184   minoffset = minoffset - 1;
185}   
186else {
187   secondoffset = tmpnow.getSeconds() - SSeconds;
188}   
189
190function stopclock(){
191   if(timerRunning)
192      clearTimeout(timerID);
193      timerRunning = false;
194} 
195
196function startclock(){
197   stopclock();
198   showtime();
199}
200
201function showtime(){
202  var now = new Date();
203  if(now.getSeconds() - secondoffset < 0) {
204      seconds = (60 - secondoffset) + now.getSeconds();
205      if (seconds == 60) seconds = 0;
206  }
207  else
208  {       
209    seconds = now.getSeconds() - secondoffset;
210    if (seconds == 60) seconds = 0;
211  }
212  if (seconds==0)
213  {
214    if  (now.getMinutes() - minoffset < 0)
215    {
216       minutes = (60 - minoffset) + now.getMinutes();
217       if (minutes == 60) minutes = 0;
218       ominutes = minutes;
219    }
220    else
221    {       
222       minutes = now.getMinutes() - minoffset;
223       if (minutes == 60) minutes = 0;
224       ominutes = minutes;
225    }
226  }
227  else
228  {
229    minutes = ominutes;
230    ominutes = minutes;
231  }
232
233  if (minutes==0)
234  {
235    if  (now.getHours() - houroffset < 0)
236    {
237       Webhours = (24 - houroffset) + now.getHours();
238       if (Webhours == 24) Webhours = 0;
239       ohours = Webhours;
240    }
241    else
242    {       
243       Webhours = now.getHours() - houroffset;
244       if (Webhours == 24) Webhours = 0;
245       ohours = Webhours;
246    }
247  }
248  else
249  {
250    Webhours = ohours;
251    ohours = Webhours;
252  }
253  var elaphour
254  elaphour = (SMonths>=4 && SMonths<=10) ? 15 : 16;
255 
256  refreshValue = refreshValue - 1;
257  mm = parseInt(refreshValue / 60) ;
258  mm = ((mm < 10) ? "0" : "") + mm ;
259  ss = refreshValue - (mm*60);
260  ss = ((ss < 10) ? "0" : "") + ss ;
261  if(document.getElementById("refreshSpan")!=null){
262     var refreshObj = document.getElementById("refreshSpan");   	
263  }
264  else if(oPopup.document.getElementById("elapse")!=null){
265     var refreshObj = oPopup.document.getElementById("elapse");   	
266  }
267
268  if(refreshObj)
269     refreshObj.innerHTML = mm+":"+ss;   	
270  
271  if(refreshValue == 0) {
272     stopclock();
273     if(refreshObj)
274        refreshObj.innerHTML = "Busy!";   
275  }
276  else {
277     timerID = setTimeout("showtime()",1000);
278     timerRunning = true;
279  }
280}
281
282function chknum(obj,  isInt) {
283   pcsstr = Replace(obj.value,",","");
284   
285   if(pcsstr.length > 0) {
286       flag = isNaN(pcsstr);
287       if(flag == true) {
288          obj.focus();
289          alert("This field must be numeric value!");          
290          return(false);
291       }
292       if(isInt==true) {
293            if(pcsstr.indexOf(".")>-1) {
294            obj.value = pcsstr.substr(0,pcsstr.indexOf("."));
295                  obj.focus();
296              alert("This field must be integer value!");          
297              return(false);
298         }
299       }
300   }
301   else {
302        obj.value = "0";
303   }
304   return(true);
305}
306
307function pickDate(sender,fullyear) {
308     strDate = alltrim(sender.value);
309    if(fullyear==true)
310       window.showModalDialog("/fullcalendar.asp?date="+strDate,sender,"status:no;scroll:no;dialogWidth:220px;dialogHeight:240px;center:yes")   
311    else
312       window.showModalDialog("/calendar.asp?date="+strDate,sender,"status:no;scroll:no;dialogWidth:220px;dialogHeight:240px;center:yes");                              
313}
314
315function USAdate(vdate,DateCode) 
316{
317   try
318   {
319      var aryDate = vdate.split("/");
320      if(Datecode==13) {
321         vdate = aryDate[1]+"/"+aryDate[0]+"/"+aryDate[2];
322      }
323      return(vdate);
324   }
325   catch(errorObject)
326   {
327      var msg = "Error number: " + (errorObject.number & 0xffff) + "\n"+
328                'Source: <%=Request.ServerVariables("URL")%>\n' +
329                "Name: " + errorObject.name + "\n"+
330                "Message: " + errorObject.message + "\n"+
331                "Description: " + errorObject.description + "\n";
332      alert(msg);      
333   }              
334}
335
336function Replace(sstr,ostr,nstr) {
337    if(sstr) {
338       vpos = sstr.indexOf(ostr);
339       vit = sstr;
340       while(vpos>=0) {
341          vit = vit.replace(ostr ,nstr);        
342          vpos = vit.indexOf(ostr);          
343       }
344       return(vit);
345    }
346    else
347       return("");
348} 
349 
350function round(number,X) {
351    X = (!X ? 2 : X);              
352    return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
353}
354
355function formatnumber(pnumber,decimals) 
356{  
357  //var vnumber = Replace(pnumber,",","");
358  var vnumber = pnumber;
359  var flag = isNaN(vnumber);
360  if(flag == false) {
361     if(vnumber.length>0) {
362        vnumber = round(parseFloat(vnumber),decimals).toString();
363        if(vnumber.lastIndexOf(".")==-1) vnumber = vnumber + ".";
364        dot = vnumber.lastIndexOf(".");
365        adot = (vnumber.length - 1 - dot);
366        for(k=decimals;k>adot;k--) vnumber = vnumber + "0";
367     }
368  }
369  return vnumber;  
370} 
371 
372function FormatNumber(num,decimalNum,bolLeadingZero,bolParens,bolCommas)
373/**********************************************************************
374	IN:
375		NUM - the number to format
376		decimalNum - the number of decimal places to format the number to
377		bolLeadingZero - true / false - display a leading zero for
378										numbers between -1 and 1
379		bolParens - true / false - use parenthesis around negative numbers
380		bolCommas - put commas as number separators.
381 
382	RETVAL:
383		The formatted number!
384 **********************************************************************/
385{ 
386        if (isNaN(parseInt(num))) return "NaN";
387
388	var tmpNum = num;
389	var iSign = num < 0 ? -1 : 1;		// Get sign of number
390	
391	// Adjust number so only the specified number of numbers after
392	// the decimal point are shown.
393	tmpNum *= Math.pow(10,decimalNum);
394	tmpNum = Math.round(Math.abs(tmpNum))
395	tmpNum /= Math.pow(10,decimalNum);
396	tmpNum *= iSign;					// Readjust for sign
397	
398	
399	// Create a string object to do our formatting on
400	var tmpNumStr = new String(tmpNum);
401
402	// See if we need to strip out the leading zero or not.
403	if (!bolLeadingZero && num < 1 && num > -1 && num != 0)
404		if (num > 0)
405			tmpNumStr = tmpNumStr.substring(1,tmpNumStr.length);
406		else
407			tmpNumStr = "-" + tmpNumStr.substring(2,tmpNumStr.length);
408		
409	// See if we need to put in the commas
410	if (bolCommas && (num >= 1000 || num <= -1000)) {
411		var iStart = tmpNumStr.indexOf(".");
412		if (iStart < 0)
413			iStart = tmpNumStr.length;
414
415		iStart -= 3;
416		while (iStart >= 1) {
417			tmpNumStr = tmpNumStr.substring(0,iStart) + "," + tmpNumStr.substring(iStart,tmpNumStr.length)
418			iStart -= 3;
419		}		
420	}
421	
422    if(tmpNumStr.lastIndexOf(".")==-1 && decimalNum>0) tmpNumStr= tmpNumStr+ ".";
423    if(decimalNum>0) {
424       dot = tmpNumStr.lastIndexOf(".");
425       adot = (tmpNumStr.length - 1 - dot);
426       for(k=decimalNum;k>adot;k--) {
427           tmpNumStr += "0";
428       }
429    }
430
431	// See if we need to use parenthesis
432	if (bolParens && num < 0)
433		tmpNumStr = "(" + tmpNumStr.substring(1,tmpNumStr.length) + ")";
434
435	return tmpNumStr;		// Return our formatted string!
436}
437
438function alltrim(inputString) 
439{
440   if(typeof inputString != "string") { return inputString; }
441   
442   var retValue = inputString; 
443      
444   var ch = retValue.substr(retValue.length-1, 1);   
445   
446   while (escape(ch) == "%A0" || escape(ch) == "%20") {        
447      retValue = retValue.substr(0,retValue.length-1);
448      ch = retValue.substr(retValue.length-1, 1);      
449   }
450   ch = retValue.substr(0,1);   
451   while (escape(ch) == "%A0" || escape(ch) == "%20") {        
452      retValue = retValue.substr(1,retValue.length-1);
453      ch = retValue.substr(0, 1);      
454   }
455   return retValue;
456} 
457
458String.prototype.trim = function () {return this.replace(/^\s+|\s+$/g, "");}
459
460function focusNum(numObj){
461   if((numObj.value).length>0) {
462      if(parseFloat(numObj.value)==0) {
463         numObj.value="";
464      }
465   }
466}
467
468function StrReplace(sstr,ostr,nstr) {
469    vpos = sstr.indexOf(ostr);
470    vit = sstr;
471    do {
472       vit = vit.replace(ostr,nstr);        
473       vpos = vit.indexOf(ostr);
474    } while(vpos >= 0);
475    dstr = vit;
476    return dstr;
477} 
478
479function setCookie(theName,theValue,theDay)
480{
481	if ((theName != null) && (theValue != null))
482	{
483		expDay = "Wed, 01 Jan 2020 18:56:35 GMT";	
484		//if (theDay != null)
485		//{
486		//	theDay = eval(theDay);	
487		//	setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
488			setDay = new Date();
489			setDay.setTime(setDay.getTime()+(1*1000*60*60*24));
490			expDay = setDay.toGMTString();
491		//}
492		document.cookie = theName + "="+escape(theValue)+";expires="+expDay;
493		return true;
494	}
495	return false;
496}
497
498function deleteCookie(theName)
499{
500	document.cookie = theName + "=;expires=Thu,01-Jan-70 00:00:01 GMT";
501	return true;
502}
503
504function getCookie(theName)
505{
506	theName += "=";	
507	theCookie = document.cookie+";";	
508	start = theCookie.indexOf(theName);	
509	if (start != -1)
510	{
511		end = theCookie.indexOf(";",start);
512		return unescape(theCookie.substring(start+theName.length,end));
513	}
514	return false;
515}
516
517function viewCookie(CookieName)
518{
519	getValue = getCookie(CookieName);
520	alert(CookieName+"="+getValue);
521}
522
523// GLOBAL view variables
524var MESSAGELISTING = 0;
525var CALENDARWEEKVIEW = 1
526var CALENDARMONTHVIEW = 2;
527var ADDRESSBOOK = 3;
528var OPTIONS = 4;
529
530var agt=navigator.userAgent.toLowerCase();
531var is_major = parseInt(navigator.appVersion);
532var is_minor = parseFloat(navigator.appVersion);
533var is_opera = (agt.indexOf("opera") != -1);
534var is_nav  = ((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1));
535var is_nav2 = (is_nav&&(is_major == 2));
536var is_nav3 = (is_nav&&(is_major == 3));
537var is_nav4 = (is_nav&& (is_major == 4));
538var is_nav4up = (is_nav&&(is_major >= 4));
539var is_navonly = (is_nav&&((agt.indexOf(";nav") != -1)||(agt.indexOf("; nav") != -1)));
540var is_nav6 = (is_nav&&(is_major == 5));
541var is_nav6up = (is_nav&&(is_major >= 5));
542// use is_ie5up to detect IE5
543var is_ie   = (agt.indexOf("msie") != -1 && !is_opera && !is_nav);
544var is_ie3  = (is_ie && (is_major < 4));
545var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) && (agt.indexOf("msie 5.5")==-1)&& (agt.indexOf("msie 6.0")==-1) && (agt.indexOf("msie 6.5")==-1));
546var is_ie4up  = (is_ie  && (is_major >= 4));
547var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
548var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4);
549var is_ie55 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5")!=-1) );
550var is_ie55up  = (is_ie  && !is_ie3 && !is_ie4 && !is_ie5);
551var is_ie6  = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0")!=-1) );
552
553function check_escape(sFolderName){if(sFolderName.indexOf('%23')!=-1){return sFolderName;}return escape(sFolderName);}
554
555function Mesg(Msg){
556StatusMsg();
557if (Msg.length == 0){return;}
558alert(Msg);
559}
560
561function StatusMsg(){try{if(document.getElementById('StatusMesg').innerHTML.length > 0){window.status = document.getElementById('StatusMesg').innerHTML;}}catch(Exception){}}
562
563function Post(field, value){
564	document.forms[0].action += '&' + field + '=' + (value != null ? value : 'Yes');
565	if (typeof(Validate) == 'undefined' || Validate()){document.forms[0].submit();}
566}
567
568function Get(field, value){
569	var url = document.forms[0].action += '&' + field + '=' + (value != null ? value : 'Yes');
570	document.location = url;
571}
572
573function SetOption(name, value){
574	var i = 0;
575	var docForm = document.forms[0];
576	var formLength = i = docForm.length;
577	while(i--){if (docForm.elements[i].name == name){var element = docForm.elements[i];break;}}
578	if (element == null){return;}
579	switch(element.type){
580	case 'checkbox': element.checked = (element.value == value);break;
581	case 'radio': i = formLength;while(i--){if (docForm.elements[i].name == name && docForm.elements[i].value == value){	docForm.elements[i].checked = true;}}break;
582	case 'select-one': i = element.length;while(i--){if(element.options[i].value.toLowerCase() == value.toLowerCase()){element.selectedIndex = i;}}break;
583	case 'select-multiple':	i = element.length;while(i--){if(element.options[i].value.toLowerCase() == value.toLowerCase()){element.options[i].selected = true;}}break;
584	case 'text': element.value = value;break;
585	case 'hidden':element.value = value;break;
586	}
587}
588var DIVIDER = 0; var TOGGLE = 1; var TRASH = 2; var IMAGED_BUTTON = 3; var DEFAULT = 4;
589function buildMenu(menuID,arrayOfMenuItems){
590	var output = [];
591		output.push('<table id="'+menuID+'" style="width:100%;height:100%;background-color:'+LO_MenuBGColor+';" cellspacing="0" cellpadding="0">');
592	var arMenuLength = arrayOfMenuItems.length;
593	var aEl = null;
594	for(var i = 0;i<arMenuLength;i++){
595		aEl = arrayOfMenuItems[i];
596		switch(aEl[0]){
597		case "divider": output.push('<tr><td colspan="2"><div style="border-top:'+LO_MenuDivBorder+';width:'+LO_MenuDivWidth+';height:'+LO_MenuDivHeight+';background-color:'+LO_MenuDivBGColor+';height:1px;"><img src="'+theme+'/spacer.gif" width="1" height="1" alt=""></div></td></tr>');break;
598		case "toggleSwitch": output.push('<tr><td style="background-color:'+LO_MenuImgBackgroundColor +';filter:'+LO_MenuImgFilter+';width:20;height:20;text-align: center;" onclick="'+aEl[2]+'"><img id="'+aEl[1]+'Check" '+'src="'+theme+'/checkmark.gif" style="display:none;"></td>'+'<td style="font-family:'+LO_MenuFont+';font-size:'+LO_MenuFontSize +';color:'+LO_MenuFontColor+';padding-right:2px;padding-left:2px;" nowrap onmouseover="this.style.cursor=\'default\';'+'this.style.background=\''+LO_MO_MenuBGColor+'\';this.style.color = \''+LO_MO_MenuFontColor+'\';" onmouseout="this.style.background=\''+LO_MenuBGColor+'\';this.style.color = \''+LO_MenuFontColor+'\';" onclick="' + aEl[2]+'">'+ aEl[3] +'&nbsp;</td></tr>');break;
599		case "trash": output.push('<tr><td id="emptyTrashIcon" style="background-color:'+LO_MenuImgBackgroundColor +	';filter:'+LO_MenuImgFilter +';font-size:'+LO_MenuFontSize +';font-family:'+LO_MenuFont +';height:20px;"><img style="margin:2px;" src="' + aEl[1] + '" onclick="' + aEl[2] + '" /></td><td id="emptyTrash" style="font-family:' + LO_MenuFont +';font-size:' + LO_MenuFontSize +';color:' + LO_MenuFontColor +';padding-right:2px;padding-left:2px;" nowrap onmouseover="this.style.cursor=\'default\'' +';this.style.background=\'' + LO_MO_MenuBGColor +'\';this.style.color = \'' + LO_MO_MenuFontColor +'\';" onmouseout="this.style.background=\'' + LO_MenuBGColor +'\';this.style.color = \'' + LO_MenuFontColor + '\';" onclick="' + aEl[2] +'">'+ aEl[3] +'&nbsp;</td></tr>');break;
600		//case "imaged_button": output.push('<tr>
600<td style="background-color:'+LO_MenuImgBackgroundColor +';filter:' + LO_MenuImgFilter +';font-size:' + LO_MenuFontSize +';font-family:'+LO_MenuFont +';height:20px;width:20px;" id="'+aEl[4] +'Icon"><img style="margin:2px;" src="' + aEl[1] + '" onclick=' + aEl[2] + ' /></td><td style="font-family:' + LO_MenuFont +';font-size:'+LO_MenuFontSize +';color:'+LO_MenuFontColor +';height:20px;padding-right:2px;padding-left:2px;" nowrap onmouseover="this.style.cursor=\'default\'' +';this.style.background=\''+ LO_MO_MenuBGColor +'\';this.style.color = \''+LO_MO_MenuFontColor +'\';"  onmouseout="this.style.background=\''+LO_MenuBGColor +'\';this.style.color = \''+LO_MenuFontColor +'\';" onclick=' + aEl[2] +' ID="'+aEl[4] +'">'+ aEl[3] +'&nbsp;</td></tr>');break;
601		case "imaged_button": output.push('<tr><td style="background-color:'+LO_MenuImgBackgroundColor +';filter:' + LO_MenuImgFilter +';font-size:' + LO_MenuFontSize +';font-family:'+LO_MenuFont +';height:20px;width:20px;" id="'+aEl[4] +'Icon"><img style="margin:2px;height:16px;width:16px" src="' + aEl[1] + '" onclick="' + aEl[2] + '" /></td><td style="font-family:' + LO_MenuFont +';font-size:'+LO_MenuFontSize +';color:'+LO_MenuFontColor +';height:20px;padding-right:2px;padding-left:2px;" nowrap onmouseover="this.style.cursor=\'default\'' +';this.style.background=\''+ LO_MO_MenuBGColor +'\';this.style.color = \''+LO_MO_MenuFontColor +'\';"  onmouseout="this.style.background=\''+LO_MenuBGColor +'\';this.style.color = \''+LO_MenuFontColor +'\';" onclick="' + aEl[2] +'" ID="'+aEl[4] +'">'+ aEl[3] +'&nbsp;</td></tr>');break;
602		//case "imaged_button": alert('<tr><td style="background-color:'+LO_MenuImgBackgroundColor +';filter:' + LO_MenuImgFilter +';font-size:' + LO_MenuFontSize +';font-family:'+LO_MenuFont +';height:20px;width:20px;" id="'+aEl[4] +'Icon"><img style="margin:2px;" src="' + aEl[1] + '" onclick="' + aEl[2] + '" /></td><td style="font-family:' + LO_MenuFont +';font-size:'+LO_MenuFontSize +';color:'+LO_MenuFontColor +';height:20px;padding-right:2px;padding-left:2px;" nowrap onmouseover="this.style.cursor=\'default\'' +';this.style.background=\''+ LO_MO_MenuBGColor +'\';this.style.color = \''+LO_MO_MenuFontColor +'\';"  onmouseout="this.style.background=\''+LO_MenuBGColor +'\';this.style.color = \''+LO_MenuFontColor +'\';" onclick=' + aEl[2] +' ID="'+aEl[4] +'">'+ aEl[3] +'&nbsp;</td></tr>');break;
603		default: output.push('<tr><td style="background-color:'+LO_MenuImgBackgroundColor +';filter:' + LO_MenuImgFilter +';font-size:' + LO_MenuFontSize +';font-family:'+LO_MenuFont +';height:20px;width:20px;">&nbsp;</td><td style="font-family:' + LO_MenuFont +';font-size:'+LO_MenuFontSize +';color:'+LO_MenuFontColor +';height:20px;padding-right:2px;padding-left:2px;" nowrap="nowrap" onmouseover="this.style.cursor=\'default\'' +';this.style.background=\''+ LO_MO_MenuBGColor +'\';this.style.color = \''+LO_MO_MenuFontColor +'\';"  onmouseout="this.style.background=\''+LO_MenuBGColor +'\';this.style.color = \''+LO_MenuFontColor +'\';" onclick=' + aEl[2] +'  ID="'+aEl[3] +'">'+ aEl[2] +'&nbsp;</td></tr>');break;
604		}
605	}
606	output.push('</table>');
607	return output.join('');
608}
609function getControlPrefix() {
610   if (getControlPrefix.prefix){return getControlPrefix.prefix;}
611   var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
612   var o, o2, i;
613	i = 4;
614   while(i--){
615      try {
616         // try to create the objects
617         o = new ActiveXObject(prefixes[i] + ".ajaxHttp");
618         o2 = new ActiveXObject(prefixes[i] + ".XmlDom");
619         return getControlPrefix.prefix = prefixes[i];
620      }catch (ex) {};
621   }
622	throw new Error("Could not find an installed XML parser");
623}
624function SelectAll() {
625	MsgSelected.length = 0;
626	var docForm = document.forms[0];
627	var formLength = i = document.forms[0].elements.length;
628	var e = null;
629	while(i--){e=docForm.elements[i];if(e.name == 'Number'){e.checked=true;highlight(e.value);MsgSelected.push(e.value);}}
630}
631function SetCookie(cookieName, cookieValue){document.cookie = cookieName + "=" + cookieValue +";expires=" + new Date(2020,12,31);}
632function GetCookie(cookieName){var aCookie = document.cookie.split("; ");var i = aCookie.length;while(i--){var aFolderOpen = aCookie[i].split("=");if (cookieName == aFolderOpen[0]){return (aFolderOpen[1]);}}return null;}
633function setFocus(field){document.forms[0][field].focus();}
634function Print(url) {window.open(url,'Print','height=400,width=600,scrollbars=yes,status=yes,resizable=1,toolbar=yes,menubar=yes');}
635function Source(url) {window.open(url,'Source','height=400,width=600,scrollbars=yes,status=yes,resizable=1,toolbar=yes,menubar=yes');}
636function openWin(url, winName, width, height, features){
637	var w = top.document.body.clientWidth;
638	var h = top.document.body.clientHeight;
639	var popW = width, popH = height;
640	var leftPos = (w>800?(w-popW)/1.48:0);
641	var topPos = (h>
641640?(h-popH)/1.42:0);
642	var hWin = window.open(url, winName+(features=='compose' ? top.composeWindowCount++ : ''),'directories=no,location=no,menubar=no,status=no,scrollbars='+(features=='yes'||features=='compose'?'yes':'no')+',resizable='+(features=='yes'||features=='compose'?'yes':'no')+',titlebars=no,toolbar=no,width=' + width + ',height=' + height+ ',screenX=' + topPos + ',screenY=' + leftPos+',top=' + topPos + ',left=' + leftPos);
643		hWin.focus();
644	if(!hWin.opener){hWin.opener = window;}
645}
646if(is_ie55up && (typeof(detectKeyStrokes) != 'undefined' && detectKeyStrokes))
647{
648try{top.writeToDebugLog('LOGGING KEY STROKES');}catch(exception){}
649document.onkeydown=microsoftKeyDown;
650document.onkeyup=microsoftKeyUp;
651document.onhelp=openHelp;
652}
653var prefix = '';
654function microsoftKeyDown() {
655	var we = window.event;
656	prefix = (we.shiftKey?'s':'')+(we.ctrlKey?'c':'')+(we.altKey?'a':'');
657	var pk = prefix+we.keyCode;
658	document.selection.empty();
659	switch(pk){
660	case 'c85': top.keyStroke(top.UNREAD);break;
661	case 'c78': top.keyStroke(top.COMPOSE);break;
662	case '38': top.keyStroke(top.PREVIOUS_MSG);break;
663	case '188': top.keyStroke(top.PREVIOUS_MSG);break;
664	case '40': top.keyStroke(top.NEXT_MSG);break;
665	case '190': top.keyStroke(top.NEXT_MSG);break;
666	case '46': top.keyStroke(top.DELETE);break;
667	case 'c65': window.event.returnValue = top.keyStroke(top.SELECT_ALL);return false;break;
668	case 'c81': top.keyStroke(top.MARK_AS_READ);break;
669	default: window.event.returnValue=true;break;
670	}
671	window.event.returnValue=true;
672}
673function microsoftKeyUp(){
674var we = window.event;
675prefix = (we.shiftKey?'s':'')+(we.ctrlKey?'c':'')+(we.altKey?'a':'');
676var pk = prefix+we.keyCode;
677document.selection.empty();
678try{top.writeToDebugLog('KEYUP > ' + pk);}catch(exception){}
679prefix = '';
680}
681function openHelp(){if(opener){return;}else{top.openHelp();}return false;}
682
683var menu = new Array();
684
685var iWidth = screen.availWidth;
686var menuWidth = 300;
687var menuHeight = 16;
688function menuIcon(itemWidth, itemName, itemClass, itemUrl, urlTarget, imageUrl, imageWidth, imageHeight, imageHSpace, imageVSpace, itemText, hasSubMenu, subMenuName){
689	this.name = itemName;
690	this.itemClass = itemClass;
691	this.url = itemUrl;
692	this.target = urlTarget || null;
693	this.imageUrl = imageUrl;
694	this.imageWidth = imageWidth;
695	this.imageHeight = imageHeight;
696	this.imageHSpace = imageHSpace;
697	this.imageVSpace = imageVSpace;
698	this.itemText = itemText;
699	this.hasSubMenu = hasSubMenu;
700	this.subMenuName = subMenuName;
701	this.createItem = function(){
702  	     return '<table id="' + this.name +'" width="'+itemWidth+'" height="100%" cellpadding="0" cellspacing="0" border="0"><tr>'+ 
703	            '<td width="'+itemWidth+'" height="100%" valign="middle" align=center onclick="if(!'+ this.name +'.disabled) {' + this.url + 
704  	            '} else {alert(&quot;Access Denied!&quot;)} " class="menuButton" style="behavior:url(../css/NormalButtonBehavior.htc);" id="' + this.name +'Table">' + 
705		        '<span align="absmiddle"><img id="'+ this.name +'Image" align="absmiddle" SRC="' + this.imageUrl + '" border="0" alt="' + this.itemText + '" lowsrc="../images/spacer.gif">&nbsp;</span>'+
706	            '<span align="absmiddle"><b>'+this.itemText+'</b></span>' + 
707	            (this.hasSubMenu ? '</td>'+			       		             
708	            '<td width="12" height="100%" class="menuButton" id="' + this.name +'TableArrow" onclick="' + 
709	            this.subMenuName + 
710	            'Function()" style="behavior:url(../css/NormalButtonBehavior.htc);width:12px;margin:0px;padding:0px;overflow:hidden;">'+
711	            '<img src="/images/MinArrow.gif" border="0" alt="" />' : '') + '</td>'+
712	            '<td width="10">&nbsp;</td>' + 	            
713	            '</tr></table>';	            
714	}
715	menu.push(this);
716}
717var iDividers=0;
718function divider(){
719	this.dividerID = iDividers++;
720	this.name = "div"
721	this.createItem = function(){return '<div id="Divider'+this.dividerID+'" style="display:inline;border:1px inset;height:100%;width:2px;"></div>&nbsp;';}
722	menu.push(this);
723}
724
725function doPickCustno(qryObj) {
726   var now = new Date();
727   vtime='y'+now.getFullYear()+now.getMonth()+now.getDate()+now.getHours()+now.getSeconds();
728   window.showModalDialog("../ProjectPub/picker/pickCustno.asp?time="+vtime,qryObj,"status:no;scroll:no;dialogWidth:800px;dialogHeight:480px;center:yes");               
729}
730 
731function getCountryDate(dateStr, cocode) {
732    try {
733        if (dateStr.length == 0) return (new Date());
734        dateAry = dateStr.split("/");
735//        if (cocode == "BBIAU" || cocode == "BBIUK" || cocode == "BBINZ") {
736//            yy = dateAry[2];
737//            var yyyy = "20" + yy;
738//            var mm = dateAry[1];
739//            mm = parseInt(mm) - 1;
740//            var dd = dateAry[0];
741//            alert(cocode+"  D/M/Y = " + dd + "/" + mm + "/" + yyyy);
742//        }
743//        else {
744            yy = dateAry[2];
745            var yyyy = "20" + yy;
746            var mm = dateAry[0];
747            mm = parseInt(mm) - 1;
748            var dd = dateAry[1];
749            //alert(cocode+"  M/D/Y = " + mm + "/" + dd + "/" + yyyy);
750//        }
751         return (new Date(yyyy, mm, dd));
752    }
753    catch (errorObject) {
754        var msg = "Error number: " + (errorObject.number & 0xffff) + "\n" +
755                'Source: <%=Request.ServerVariables("URL")%>\n' +
756                "Name: " + errorObject.name + "\n" +
757                "Message: " + errorObject.message + "\n" +
758                "Description: " + errorObject.description + "\n";
759        alert(msg);
760    }
761}
762
763function ValidateDate(DateFrom, DateTo, DiffDays, dbname) {
764    try {
765        var FromDate = getCountryDate(DateFrom, dbname);
766        var ToDate = getCountryDate(DateTo, dbname);
767        //alert(FromDate + " " + ToDate);
768
769        var one_day = 1000 * 60 * 60 * 24;
770        var days = Math.ceil((ToDate.getTime() - FromDate.getTime()) / (one_day));
771        if (days > DiffDays) {
772            return (false);
773        }
774        return (true);
775    }
776    catch (errorObject) {
777        var msg = "Error number: " + (errorObject.number & 0xffff) + "\n" +
778                'Source: <%=Request.ServerVariables("URL")%>\n' +
779                "Name: " + errorObject.name + "\n" +
780                "Message: " + errorObject.message + "\n" +
781                "Description: " + errorObject.description + "\n";
782        alert(msg);
783        return (false);
784    }
785}
786
787//myAjaxObject---------- 
788//Created by Kevin Huang, 2010/09/06
789//Usage:
790    //var url = "testFindItem.asp";
791    //var params = "TransType=" + TransType + "&row=" + row + "&item=" + item;
792    //var myAjax = new myAjaxObject(url, myAjaxCallBack);
793    //myAjax.WaitUntilFinish = true;
794    //myAjax.callback = function (responseTxt, responseStat) {
795    //    if (searchform.debug.checked) alert(responseTxt);
796    //    eval(responseTxt);
797    //    myAjax = null;
798    //}
799    //myAjax.update(params, 'GET');
800//0: (Uninitialized) the send( ) method has not yet been invoked.
801//1: (Loading) the send( ) method has been invoked, request in progress.
802//2: (Loaded) the send( ) method has completed, entire response received.
803//3: (Interactive) the response is being parsed.
804//4: (Completed) the response has been parsed, is ready for harvesting. 
805function myAjaxObject(urlCall, callbackFunction) 
806{
807    try 
808	{
809        this.updating = false;
810        this.WaitUntilFinish = false;
811        this.FormName = "";
812		this.ContentType = "application/x-www-form-urlencoded";
813
814        this.callback = callbackFunction || function () { };
815        var that = this;
816        that.AJAX = null;
817
818        this.abort = function () 
819		{
820            if (that.updating) 
821			{
822                that.updating = false;
823                that.AJAX.abort();
824                that.AJAX = null;
825            }
826        }
827        this.update = function (passData, postMethod) 
828		{
829            if (that.updating) { return false; }
830
831            try 
832			{
833                that.AJAX = new XMLHttpRequest();
834            }
835            catch (e) 
836			{
837                try {
838                    that.AJAX = new ActiveXObject("Msxml2.XMLHTTP");
839                }
840                catch (e) {
841                    that.AJAX = new ActiveXObject("Microsoft.XMLHTTP");
842                }
843            }
844
845            if (that.AJAX == null) 
846			{
847                alert("that.AJAX == null");
848                return false;
849            } 
850			else 
851			{
852                that.AJAX.onreadystatechange = function () 
853				{
854                    if (that.AJAX.readyState == 4) {
855                        that.updating = false;
856                        that.callback(that.AJAX.responseText, that.AJAX.status, that.AJAX.responseXML);
857                        that.AJAX = null;
858                    }
859                }
860                that.updating = new Date();
861                if (/post/i.test(postMethod)) 
862				{					
863                    var uri = urlCall + '?' + that.updating.getTime();
864                    that.AJAX.open("POST", uri, !that.WaitUntilFinis
864h);
865                    //that.AJAX.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
866                    that.AJAX.setRequestHeader("Content-Type", that.ContentType);
867					if(String(that.FormName).trim().length>0)
868					   passData=GetQueryString(that.FormName, "")+"&"+passData; 
869					//alert(passData);
870                    that.AJAX.send(passData);					
871                } 
872				else 
873				{
874                    var uri = urlCall + '?' + passData + '&timestamp=' + (that.updating.getTime());
875                    that.AJAX.open("GET", uri, !this.WaitUntilFinish);
876                    that.AJAX.send(null);
877                }
878                return true;
879            }
880        }
881
882    }
883    catch (err) 
884	{
885        alert("myAjaxObject:\n"+ err.name + "\n" + err.message);
886    }
887}
888
889function GetQueryString(_formname, _format) 
890{
891    var form = document.forms[_formname];
892	var qstr = "";
893    function GetElemValue(name, value)  
894	{
895		if(_format=="XML")
896           qstr += (qstr.length > 0 ? "~" : "~") + escape(name).replace(/\+/g, "%2B") + '="' + escape(value ? value : "").replace(/\+/g, "%2B") + '"';
897		else
898           qstr += (qstr.length > 0 ? "&" : "") + escape(name).replace(/\+/g, "%2B") + "=" + escape(value ? value : "").replace(/\+/g, "%2B");// + escape(value ? value : "").replace(/\n/g, "%0D");
899    }
900	var elemArray = form.elements;
901    for (var i = 0; i < elemArray.length; i++) 
902	{
903        var element = elemArray[i];
904		if(element.type)
905		{
906			var elemType = element.type.toUpperCase();
907			var elemName = element.name;
908			if (elemName) 
909			{
910				if (elemType == "TEXT" || elemType == "TEXTAREA" || elemType == "PASSWORD" || elemType == "BUTTON" || elemType == "RESET" ||
911					elemType == "SUBMIT" || elemType == "FILE" || elemType == "IMAGE"	|| elemType == "HIDDEN")
912					GetElemValue(elemName, element.value);
913				else if (elemType == "CHECKBOX" && element.checked)
914					GetElemValue(elemName, element.value ? element.value : "On");
915				else if (elemType == "RADIO" && element.checked)
916					GetElemValue(elemName, element.value);
917				else if (elemType.indexOf("SELECT") != -1)
918				{
919					for (var j = 0; j < element.options.length; j++) 
920					{
921						var option = element.options[j];
922						if (option.selected)
923							//GetElemValue(elemName, option.value ? option.value : option.text);
924							GetElemValue(elemName, option.value);
925					}
926				}
927			}
928		} 
929    }
930    return qstr;
931} 
932
933function GetFormXMLString(_formname) 
934{
935    var ParamsXML = '<Parameters '+GetQueryString(_formname, "XML")+'></Parameters>'; 
936
937    return ParamsXML;
938}
939
940String.prototype.format = function()
941{
942    var args = arguments;
943    return this.replace(/\{(\d+)\}/g,             
944        function(m,i){
945            return args[i];
946        });
947}
948
949String.format = function() {
950    if( arguments.length == 0 )
951        return null; 
952
953    var str = arguments[0]; 
954    for(var i=1;i<arguments.length;i++) {
955        var re = new RegExp('\\{' + (i-1) + '\\}','gm');
956        str = str.replace(re, arguments[i]);
957    }
958    return str;
959} 
960
961

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.