1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is JavaScript Engine testing utilities.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corp.
19 * Portions created by the Initial Developer are Copyright (C) 2003
20 * the Initial Developer. All Rights Reserved.
23 * brendan@mozilla.org, pschwartau@netscape.com
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
41 * Date: 09 September 2003
42 * SUMMARY: Just seeing we don't crash on this code
43 * See http://bugzilla.mozilla.org/show_bug.cgi?id=216320
46 //-----------------------------------------------------------------------------
47 var gTestfile
= 'regress-216320.js';
48 var BUGNUMBER
= 216320;
49 var summary
= "Just seeing we don't crash on this code";
51 printBugNumber(BUGNUMBER
);
55 /* TESTCASE BEGINS HERE */
61 if(navigator
.appName
!="Netscape"){ if(!window
.navigator
.onLine
){ alert(pbc0430
); return false; } }
64 function vnid(formfield
){
66 if(!nid
.match(/^\s*$/)){
67 nl
=nid
.split('/').length
;
74 function vnull(formfield
){
76 if(text
.match(/^\s*$/)){
84 function vdt(formfield
){
88 year
=date
.substring(0,4);
90 month
=date
.substring(5,7);
92 day
=date
.substring(8,10);
95 tmn
=today
.getMonth()+1;
96 if(today
.getYear()<2000)tyr
=today
.getYear()+1900;
97 else tyr
=today
.getYear();
98 if(date
.match(/^\s*$/)) {return true; }
100 if(hy1
!="/"||hy2
!="/"){
105 if(month
>12||day
>31||month
<=0||day
<=0||(isNaN(month
)==true)||(isNaN(day
)==true)||(isNaN(year
)==true)){
111 if(((month
==1||month
==3||month
==5||month
==7||month
==8||month
==10||month
==12)&&day
>31)||(year
%4==0&&month
==2&&day
>29)||(year
%4!=0&&month
==2&&day
>28)||((month
==4||month
==6||month
==9||month
==11)&&day
>30)){
119 function vkdt(formfield
){
120 date
=formfield
.value
;
121 year
=date
.substring(0,4);
123 month
=date
.substring(5,7);
125 day
=date
.substring(8,10);
128 tmn
=today
.getMonth()+1;
129 if(today
.getYear()<2000)tyr
=today
.getYear()+1900;
130 else tyr
=today
.getYear();
131 if(date
.match(/^\s*$/)){
136 if(hy1
!="/"||hy2
!="/"){
142 if(month
>12||day
>31||month
<=0||day
<=0||(isNaN(month
)==true)||(isNaN(day
)==true)||(isNaN(year
)==true)){
148 if(((month
==1||month
==3||month
==5||month
==7||month
==8||month
==10||month
==12)&&day
>31)||(year
%4==0&&month
==2&&day
>29)||(year
%4!=0&&month
==2&&day
>28)||((month
==4||month
==6||month
==9||month
==11)&&day
>30)){
156 function ddif(month1
,day1
,year1
,month2
,day2
,year2
){
158 start
.setYear(year1
);
159 start
.setMonth(month1
-1);
166 end
.setMonth(month2
-1);
171 current
=(end
.getTime() - start
.getTime());
172 days
= Math
.floor(current
/(1000 * 60 * 60 * 24));
176 function vsub(form
,status
,ism
,action
){
177 if(!vol()){ return false; }
178 if(status
<9||status
==12){
179 band
=form
.BAND
.options
[form
.BAND
.selectedIndex
].value
;
187 if((status
>=0&&status
<5)||(status
==7)||(status
>=5&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
188 if(!vnull(form
.PT
)) { return false; }
193 syr
=stdt
.substring(0,4);
194 start_hy1
=stdt
.charAt(4);
195 smon
=stdt
.substring(5,7);
196 start_hy2
=stdt
.charAt(7);
197 sdy
=stdt
.substring(8,10);
198 eyr
=etdt
.substring(0,4);
199 end_hy1
=etdt
.charAt(4);
200 emon
=etdt
.substring(5,7);
201 end_hy2
=etdt
.charAt(7);
202 edy
=etdt
.substring(8,10);
204 date
=today
.getDate();
205 month
=today
.getMonth()+1;
206 if(today
.getYear()<2000)year
=today
.getYear()+1900; else year
=today
.getYear();
208 if(!vnull(form
.STD
)){ return false; }
209 if(!vnull(form
.END
)){ return false; }
210 if(start_hy1
!="/"||start_hy2
!="/"){
215 if(end_hy1
!="/"||end_hy2
!="/"){
220 if(smon
>12||sdy
>31||smon
<=0||sdy
<=0||(isNaN(smon
)==true)||(isNaN(sdy
)==true)||(isNaN(syr
)==true)){
225 if(emon
>12||edy
>31||emon
<=0||edy
<=0||(isNaN(emon
)==true)||(isNaN(edy
)==true)||(isNaN(eyr
)==true)){
230 if(((smon
==1||smon
==3||smon
==5||smon
==7||smon
==8||smon
==10||smon
==12)&&sdy
>31)||(syr
%4==0&&smon
==2&&sdy
>29)||(syr
%4!=0&&smon
==2&&sdy
>28)||((smon
==4||smon
==6||smon
==9||smon
==11)&&sdy
>30)){
235 if(((emon
==1||emon
==3||emon
==5||emon
==7||emon
==8||emon
==10||emon
==12)&&edy
>31)||(eyr
%4==0&&emon
==2&&edy
>29)||(eyr
%4!=0&&emon
==2&&edy
>28)||((emon
==4||emon
==6||emon
==9||emon
==11)&&edy
>30)){
240 if ((eyr
==nextYear
)&&(syr
==year
)) {
241 if ((emon
>1)||(edy
>31)) {
253 if(smon
>emon
||(smon
==emon
&&sdy
>=edy
)){
258 if((eyr
!=year
)&&(eyr
!=year
-1)){
264 if(ism
=='YES'&&(status
==5||status
==6||status
==12)){
265 if(ddif(month
,date
,year
,emon
,edy
,eyr
)>31){
271 if((status
>2&&status
<5)||(status
==7)||((status
>=5&&status
<9||status
==12)&&ism
=="YES")){
282 ird1
=form
.IRD1
.value
;
283 ird2
=form
.IRD2
.value
;
284 ird3
=form
.IRD3
.value
;
285 if(((ird1
==ird2
)&&(!ird1
.match(/^\s*$/)))||((ird1
==ird3
)&&(!ird1
.match(/^\s*$/)))){
290 else if((ird2
==ird3
)&&(!ird2
.match(/^\s*$/))){
295 if(!vdt(form
.FRD1
)){ return false;}
298 if(!vdt(form
.IRD1
)){return false;}
299 if(!vdt(form
.IRD2
)){return false;}
300 if(!vdt(form
.IRD3
)){return false;}
301 ird1
=form
.IRD1
.value
;
302 ird2
=form
.IRD2
.value
;
303 ird3
=form
.IRD3
.value
;
304 if(((ird1
==ird2
)&&(!ird1
.match(/^\s*$/)))||((ird1
==ird3
)&&(!ird1
.match(/^\s*$/)))){
309 else if((ird2
==ird3
)&&(!ird2
.match(/^\s*$/))){
314 if(!vkdt(form
.FRD1
)){
320 if((status
>=0&&status
<2)||(status
==3)||(status
==7)||(status
>=2&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
331 if((status
==2||status
==4)||(status
>=5&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
332 if(!vnull(form
.WR
)){return false;}
333 if(!vnull(form
.ER
)){return false;}
334 if(!vnull(form
.TR
)){return false;}
336 if((status
==5||status
==6||status
==12)&&ism
=="YES"){
337 if(!vkdt(form
.FRD1
)){return false;}
338 frdt
=form
.FRD1
.value
;
339 fryr
=frdt
.substring(0,4);
340 frmn
=frdt
.substring(5,7);
341 frdy
=frdt
.substring(8,10);
342 if(fryr
<syr
||(fryr
==syr
&&frmn
<smon
)||(fryr
==syr
&&frmn
==smon
&&frdy
<=sdy
)){
347 if((status
==5||status
==6||status
==12)&&ism
=="YES"){
349 for(i
=0; i
<form
.INH
.length
; i
++){
350 if(form
.INH
[i
].checked
==true){ isnh
=form
.INH
[i
].value
; }
359 for(i
=0; i
<form
.NHB
.length
; i
++){
360 if(form
.NHB
[i
].checked
==true){ beh
=form
.NHB
[i
].value
; }
363 for(i
=0; i
<form
.NHS
.length
; i
++){
364 if(form
.NHS
[i
].checked
==true){ skl
=form
.NHS
[i
].value
; }
376 if((beh
=="N"||skl
=="N")&&status
!=12){
377 if(form
.RCD
[3].checked
==false){
378 if(confirm(pbc0455
))srdb(form
.RCD
,"4");
384 if(status
!=12){ for(i
=0; i
<form
.RCD
.length
; i
++){ if(form
.RCD
[i
].checked
==true)rating
=form
.RCD
[i
].value
; } }
385 else if(status
==12){ rating
="4"; }
392 if(!vkdt(form
.SID
)){ return false; }
394 iyr
=idt
.substring(0,4);
395 imon
=idt
.substring(5,7);
396 idy
=idt
.substring(8,10);
397 frdt
=form
.FRD1
.value
;
398 fryr
=frdt
.substring(0,4);
399 frmn
=frdt
.substring(5,7);
400 frdy
=frdt
.substring(8,10);
401 if(iyr
<eyr
||(iyr
==eyr
&&imon
<emon
)||(iyr
==eyr
&&imon
==emon
&&idy
<=edy
)){
406 if(iyr
<fryr
||(iyr
==fryr
&&imon
<frmn
)||(iyr
==fryr
&&imon
==frmn
&&idy
<=frdy
)){
411 if(ddif(emon
,edy
,eyr
,imon
,idy
,iyr
)<30){
416 if(ddif(emon
,edy
,eyr
,imon
,idy
,iyr
)>90){
417 if(!confirm(pbc0439
+" "+pbc0442
)){
421 // MK/06-20-01 = If Rating Not equals to 4 blank out the sustained improve Date
424 if(!vnull(form
.OAT
)){ return false; }
425 if(form
.MSRQ
.checked
==true){
426 if(form
.NEW_SIGN_MGR_ID
.value
.match(/^\s*$/)){
428 form
.NEW_SIGN_MGR_ID
.focus();
431 if(vnid(form
.NEW_SIGN_MGR_ID
)==false){ return false; }
433 if(!form
.NEW_SIGN_MGR_ID
.value
.match(/^\s*$/)){
435 form
.NEW_SIGN_MGR_ID
.focus();
438 if ( (form
.TOC
.value
=="YES") && (form
.RSRQ
.checked
==true) ) {
440 form
.NEW_SEC_LINE_REV_ID
.focus();
444 if(form
.RSRQ
.checked
==true){
445 if(form
.NEW_SEC_LINE_REV_ID
.value
.match(/^\s*$/)){
447 form
.NEW_SEC_LINE_REV_ID
.focus();
450 if(vnid(form
.NEW_SEC_LINE_REV_ID
)==false){ return false; }
452 if(!form
.NEW_SEC_LINE_REV_ID
.value
.match(/^\s*$/)) {
454 form
.NEW_SEC_LINE_REV_ID
.focus();
457 if ( (form
.TOC
.value
=="YES") && (form
.MSRQ
.checked
==true) ) {
459 form
.NEW_SEC_LINE_REV_ID
.focus();
463 /**for returned objectives **/
465 if(conf(pbc0466
) == false) return false;
469 if(status
==0||status
==1||status
==3||status
==7){
470 if(conf(pbc0456
) == false) return false;
473 if(status
==2||status
==4||status
==8){
474 if(conf(pbc0457
) == false) return false;
476 } else if(ism
=='YES'){
477 if(status
==0||status
==1||status
==3||status
==7){
478 if(conf(pbc0458
) == false)return false;
480 if(status
==2||status
==4||status
==8){
481 if(conf(pbc0459
) == false)return false;
483 if(status
==5||status
==6){
484 if(form
.ESRQ
.checked
==false){
485 if(conf(pbc0460
) == false)return false;
487 if(conf(pbc0461
) == false)return false;
491 if(conf(pbc0462
) == false)return false;
492 } else if(ism
=='YES'){
493 if(conf(pbc0463
) == false)return false;
494 } else if(ism
=='REVIEWER'){
495 if(conf(pbc0464
) == false)return false;
498 if(status
>=9&&status
<=11){ snul(); }
503 function vsav(form
,status
,ism
,action
) {
504 if(!vol()){ return false; }
509 syr
=stdt
.substring(0,4);
510 start_hy1
=stdt
.charAt(4);
511 smon
=stdt
.substring(5,7);
512 start_hy2
=stdt
.charAt(7);
513 sdy
=stdt
.substring(8,10);
514 eyr
=etdt
.substring(0,4);
515 end_hy1
=etdt
.charAt(4);
516 emon
=etdt
.substring(5,7);
517 end_hy2
=etdt
.charAt(7);
518 edy
=etdt
.substring(8,10);
520 date
=today
.getDate();
521 month
=today
.getMonth()+1;
522 if(today
.getYear()<2000) year
=today
.getYear()+1900; else year
=today
.getYear();
524 if(!vnull(form
.STD
)) return false;
525 if(!vnull(form
.END
)) return false;
526 if(start_hy1
!="/"||start_hy2
!="/"){
531 if(end_hy1
!="/"||end_hy2
!="/"){
536 if(smon
>12||sdy
>31||smon
<=0||sdy
<=0||(isNaN(smon
)==true)||(isNaN(sdy
)==true)||(isNaN(syr
)==true)){
541 if(emon
>12||edy
>31||emon
<=0||edy
<=0||(isNaN(emon
)==true)||(isNaN(edy
)==true)||(isNaN(eyr
)==true)){
546 if(((smon
==1||smon
==3||smon
==5||smon
==7||smon
==8||smon
==10||smon
==12)&&sdy
>31)||(syr
%4==0&&smon
==2&&sdy
>29)||(syr
%4!=0&&smon
==2&&sdy
>28)||((smon
==4||smon
==6||smon
==9||smon
==11)&&sdy
>30)){
551 if(((emon
==1||emon
==3||emon
==5||emon
==7||emon
==8||emon
==10||emon
==12)&&edy
>31)||(eyr
%4==0&&emon
==2&&edy
>29)||(eyr
%4!=0&&emon
==2&&edy
>28)||((emon
==4||emon
==6||emon
==9||emon
==11)&&edy
>30)){
556 if ((eyr
==nextYear
)&&(syr
==year
)) {
557 if ((emon
>1)||(edy
>31)) {
563 if ((syr
<year
-1) || (syr
>year
)) {
568 if((eyr
!=year
)&&(eyr
!=year
-1)){
573 if(smon
>emon
||(smon
==emon
&&sdy
>=edy
)){
579 if((status
>2&&status
<5)||(status
>=5&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
580 if(!vdt(form
.IRD1
)){return false;}
581 if(!vdt(form
.IRD2
)){return false;}
582 if(!vdt(form
.IRD3
)){ return false; }
583 ird1
=form
.IRD1
.value
;
584 ird2
=form
.IRD2
.value
;
585 ird3
=form
.IRD3
.value
;
586 if(((ird1
==ird2
)&&(!ird1
.match(/^\s*$/)))||((ird1
==ird3
)&&(!ird1
.match(/^\s*$/)))){
591 else if((ird2
==ird3
)&&(!ird2
.match(/^\s*$/))){
596 if(!vdt(form
.FRD1
)){return false;}
598 if(!vdt(form
.FRD1
)){return false;}
601 if((status
==5||status
==6)&&ism
=="YES"){
603 for(i
=0;i
<form
.RCD
.length
;i
++){
604 if(form
.RCD
[i
].checked
==true)rating
=form
.RCD
[i
].value
;
607 for(i
=0; i
<form
.INH
.length
; i
++){
608 if(form
.INH
[i
].checked
==true){
609 isnh
=form
.INH
[i
].value
;
614 for(i
=0; i
<form
.NHB
.length
;i
++){
615 if(form
.NHB
[i
].checked
==true){
616 beh
=form
.NHB
[i
].value
;
620 for(i
=0; i
<form
.NHS
.length
;i
++){
621 if(form
.NHS
[i
].checked
==true){
622 skl
=form
.NHS
[i
].value
;
625 if((beh
=="N"||skl
=="N")&&rating
!=""){
626 if(form
.RCD
[3].checked
==false){
627 if(confirm(pbc0455
))srdb(form
.RCD
,"4");
634 if(!vdt(form
.SID
)){ return false;}
637 if((status
==2||status
==4 || status
==8 || status
==5 || status
==6 || status
==10)&&ism
=='YES')
639 if(!confirm(pbc0436
)){ return false;}
640 if(form
.OBJECTIVE_CHANGED
.value
=='Y') {
641 if(confirm(pbc0452
+" "+pbc0453
+" "+pbc0454
)){form
.MRQ
.value
=4; } else { form
.MRQ
.value
=0; }
642 }else if (( status
==5 || status
==6 || status
==10) && (form
.RESULTS_CHANGED
.value
=='Y')) {
643 if(confirm(pbc0470
+" "+pbc0453
+" "+pbc0454
)){form
.MRQ
.value
=8; } else { form
.MRQ
.value
=0; }
647 if(status
>=9&&status
<=11){
653 function cft(formfield
){
655 if(nid
.match(/^\s*$/)){
660 nl
=nid
.split('/').length
;
668 function dcf(form
,pbcId
,cnum
,sequence
,status
,atyp
,ver
){
670 dflg
=confirm("\n\n<====================== " + pbc0468
+ " ======================>\n\n" + pbc0469
+ "\n\n<==================================================================>");
672 form
.ATYP
.value
=atyp
;
673 form
.PID
.value
=pbcId
;
674 form
.CNUM
.value
=cnum
;
675 form
.SEQ
.value
=sequence
;
676 form
.ST
.value
=status
;
686 //if(confirm(pbc0447+" "+pbc0451)){
696 top
.location
="logoff.jsp";
700 if(csr
==null){ top
.location
="logoff.jsp"; }
701 else if(csr
.charAt(0)==3){ window
.location
="csrlogoff.jsp"; }
702 else{ top
.location
="logoff.jsp"; }
706 top
.location
="pbcmain.jsp";
710 sck("IBM004","1^NONE^1");
711 window
.location
="pbcmain.jsp"
715 if(confirm(pbc0434
)){
716 if(navigator
.appName
!="Netscape"){
717 if(!window
.navigator
.onLine
){
721 window
.location
='pbcmain.jsp';
725 window
.location
='pbcmain.jsp';
730 function crt(form
,action
){
731 if(!vol()){return false;}
732 band
=form
.BAND
.options
[form
.BAND
.selectedIndex
].value
;
738 if(!confirm(pbc0450
)){return false;}
743 function cusat(form
,action
){
744 if(!vol()){return false;}
746 form
.action
="unsatreq.jsp";
750 function cfrt(form
,ism
,action
){
751 if(!vol()){return false;}
754 if(confirm(pbc0449
+" "+pbc0432
)){
761 if(confirm(pbc0449
+" "+pbc0448
)){
768 if(confirm(pbc0440
)){
777 if(form
.ESRQ
.checked
==true){
778 if(!confirm(pbc0435
+" "+pbc0443
))form
.ESRQ
.checked
=false;
779 else {form
.ESRQ
.checked
=true;}
784 if(form
.MSRQ
.checked
==true){
785 if(!confirm(pbc0441
+" "+pbc0438
+" "+pbc0444
+" "+pbc0445
))form
.MSRQ
.checked
=false;
787 form
.MSRQ
.checked
=true;
793 if(form
.RSRQ
.checked
==true){
794 if(!confirm(pbc0441
+" "+pbc0438
+" "+pbc0444
+" "+pbc0446
))form
.RSRQ
.checked
=false;
796 form
.RSRQ
.checked
=true;
802 alert(pbc0412
+" "+pbc0413
+" "+pbc0414
);
804 function cows(form
,action
){
808 if(confirm(pbc0437
)){
815 function srdb(rdb
,value
) {
816 for(i
=0; i
<rdb
.length
;i
++) {
817 if(rdb
[i
].value
== value
) {
818 rdb
[i
].checked
= true;
825 function slop(lbx
,value
) {
826 if(lbx
.options
.length
> 0) {
827 for(i
=0;i
< lbx
.options
.length
;i
++) {
828 if(lbx
.options
[i
].value
== value
) {
829 lbx
.options
[i
].selected
= true;
837 function ourl(URL
,WIN_NAME
){
838 if(!vol()){ return; }
840 if(document
.layers
) {
841 child_screenX
=window
.screenX
+50;
842 child_width
=window
.innerWidth
-75;
843 child_height
=window
.innerHeight
-75;
844 emp_win
=window
.open(URL
,WIN_NAME
,"screenX="+ child_screenX
+",screenY=75,height="+ child_height
+",width="+ child_width
+",resizable,status,scrollbars");
846 child_width
= screen
.width
-160;
847 child_height
= screen
.height
-200;
848 emp_win
=window
.open(URL
,WIN_NAME
,"height="+ child_height
+",width="+ child_width
+",resizable=yes,status=no,scrollbars=yes");
849 //emp_win.moveTo(110,0);
851 //if (URL.indexOf("pbcsitehelp")==-1) { alert("Opened new window."); }
856 form
.NHS
[0].checked
=false;
857 form
.NHS
[1].checked
=false;
858 form
.NHB
[0].checked
=false;
859 form
.NHB
[1].checked
=false;
864 for(i
=0; i
<form
.INH
.length
;i
++)
866 if(form
.INH
[i
].checked
==true){isnh
=form
.INH
[i
].value
; }
869 form
.NHS
[0].checked
=false;
870 form
.NHS
[1].checked
=false;
871 form
.NHB
[0].checked
=false;
872 form
.NHB
[1].checked
=false;
877 //if ((form.NHS[0].checked || form.NHS[1].checked) && (form.NHB[0].checked || form.NHB[1].checked))
878 if (form
.NHS
[1].checked
|| form
.NHB
[1].checked
)
880 form
.RCD
[3].checked
=true;
887 function err(errMsg
) {
888 alert(getEncodedText(errMsg
));
891 function getEncodedText(txtValue
) {
892 if (txtValue
.match(/^\s*$/)) return txtValue
;
893 var txtValue1
= txtValue
.replace((/"/g),'"');
894 var txtValue2
= txtValue1
.replace((/>/g),">");
895 var txtValue3
= txtValue2
.replace((/</g),"<");
899 function encodeText(txtValue
) {
900 if (txtValue
.match(/^\s*$/)) return txtValue
;
901 var txtValue0
= txtValue
.replace((/\r\n/g),'&lf;');
902 var txtValue1
= txtValue0
.replace((/"/g),'"');
903 var txtValue2 = txtValue1.replace((/>/g),'>');
904 var txtValue3 = txtValue2.replace((/</g),'<');
911 mck = " " + document.cookie + ";";
912 srcnm = " " + name + "=";
913 scok = mck.indexOf(srcnm);
915 scok += srcnm.length;
916 eofck = mck.indexOf(";",scok);
917 result = unescape(mck.substring(scok,eofck));
922 function sck(name,value){
923 ckpth="path
=/;domain
=.ibm
.com
";
924 document.cookie = name + "=" + value + ";" + ckpth;
928 function testForCookie(){
929 sck("PBCTest
","test
");
930 if(gck("PBCTest
") == "test
") {
931 // alert("Cookie test is good
");
935 // alert("Cookie test is bad
");
941 function prn(form,l_status,l_ism,l_scf,l_locale){
945 pwin=window.open("printvw
.jsp
?nls
="+l_locale + "ISNEWWIN
=TRUE
","pwin
","resizable
=yes
,width
=560,height
=400,scrollbars
=yes
,toolbar
,screenX
=5,screenY
=5");
949 unum=form.UNUM.value;
951 cnum=unum.substring(0,eofsn);
956 return top.confirm(msg);
959 function sact(action){
960 document.PBC_FORM.ATYP.value=action;
964 document.PBC_FORM.WO.value="";
965 document.PBC_FORM.WR.value="";
966 document.PBC_FORM.EO.value="";
967 document.PBC_FORM.ER.value="";
968 document.PBC_FORM.TO.value="";
969 document.PBC_FORM.TR.value="";
970 document.PBC_FORM.OAT.value="";
974 unum=document.PBC_FORM.UNUM.value;
976 cnum=unum.substring(0,eofsn);
979 function checkForEditPage() {
980 if(true==checkForm()){
981 if(!confirm(pbc0465)) return false;
986 function checkForm() {
987 var frms=document.forms["PBC_FORM
"];
988 if (navigator.appName=="Netscape
") {
989 if (frms==undefined) return false;
990 if (frms.IS_EDIT==undefined) return false;
992 if(frms==null) return false;
993 if (frms.IS_EDIT==null) return false;
1000 function removeAnchor(link){
1002 indx = link.indexOf('#');
1005 link2 = link.substring(0,indx);
1006 indx=link2.indexOf("#");
1013 function gotoHREF(link){
1014 if(document.layers){
1015 var documentURL = removeAnchor(document.URL);
1016 location.href=documentURL+link;
1020 var documentURL = removeAnchor(document.URL);
1021 document.URL=documentURL+link;
1029 function init_resize_event(){
1032 function putVal2ck()
1036 function setValuesFromCookie()
1040 reportCompare('No Crash', 'No Crash', '');