33
44original_field = window . opener . document . itemSynopsis [ field ] . value ;
55
6-
7- // pop() and push() methods for pre5.5 IE browsers
8-
9- function bName ( ) {
10- // test for IE
11- if ( navigator . appName == "Microsoft Internet Explorer" )
12- return 1 ;
13- return 0 ;
14- }
15-
16- function bVer ( ) {
17- // return version number (e.g., 4.03)
18- msieIndex = navigator . appVersion . indexOf ( "MSIE" ) + 5 ;
19- return ( parseFloat ( navigator . appVersion . substr ( msieIndex , 3 ) ) ) ;
20- }
21-
22- function pop ( ) {
23- // make a pop method for old IE browsers
24- var lastElement = this [ this . length - 1 ] ;
25- this . length -- ;
26- return lastElement ;
27- }
28-
29- function push ( ) {
30- // make a pop method for old IE browsers
31- var sub = this . length ;
32- for ( var i = 0 ; i < push . arguments . length ; ++ i ) {
33- this [ sub ] = push . arguments [ i ] ;
34- sub ++ ;
35- }
36- }
37-
38- // add the pop() and push() method to Array if they're not there
39- if ( ! Array . prototype . pop ) {
40- Array . prototype . pop = pop ;
41- }
42- if ( ! Array . prototype . push ) {
43- Array . prototype . push = push ;
44- }
45-
466function trim ( value ) {
477 var temp = value ;
488 var obj = / ^ ( \s * ) ( [ \W \w ] * ) ( \b \s * $ ) / ;
@@ -53,21 +13,21 @@ function trim(value) {
5313}
5414
5515function determineList ( ) {
56- // generate a comma-separated list of the checked items
57- if ( document . frm_help . check == undefined ) { return ; }
58- var list = new Array ( ) ;
59- if ( document . frm_help . check . length == undefined ) {
60- if ( document . frm_help . check . checked ) {
61- list . push ( document . frm_help . check . value ) ;
62- }
63- } else {
64- for ( box = 0 ; box < document . frm_help . check . length ; box ++ ) {
65- if ( document . frm_help . check [ box ] . checked ) {
66- list . push ( document . frm_help . check [ box ] . value ) ;
67- }
68- }
69- }
70- return new String ( list . join ( ',' ) ) ;
16+ // generate a comma-separated list of the checked items
17+ var list = new String ( '' ) ;
18+ for ( box = 0 ; box < document . frm_help . check . length ; box ++ ) {
19+ if ( document . frm_help . check [ box ] . checked ) {
20+ if ( list . length == 0 ) {
21+ separator = '' ;
22+ }
23+ else {
24+ separator = ',' ;
25+ }
26+ // we used to use an Array and push / join, but IE5.0 sux
27+ list = list + separator + document . frm_help . check [ box ] . value ;
28+ }
29+ }
30+ return list ;
7131}
7232
7333function updateList ( ) {
0 commit comments