]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/js1_5/Regress/regress-216320.js
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: NPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Netscape Public License
5 * Version 1.1 (the "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/NPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is JavaScript Engine testing utilities.
16 * The Initial Developer of the Original Code is Netscape Communications Corp.
17 * Portions created by the Initial Developer are Copyright (C) 2003
18 * the Initial Developer. All Rights Reserved.
20 * Contributor(s): brendan@mozilla.org, pschwartau@netscape.com
22 * Alternatively, the contents of this file may be used under the terms of
23 * either the GNU General Public License Version 2 or later (the "GPL"), or
24 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
25 * in which case the provisions of the GPL or the LGPL are applicable instead
26 * of those above. If you wish to allow use of your version of this file only
27 * under the terms of either the GPL or the LGPL, and not to allow others to
28 * use your version of this file under the terms of the NPL, indicate your
29 * decision by deleting the provisions above and replace them with the notice
30 * and other provisions required by the GPL or the LGPL. If you do not delete
31 * the provisions above, a recipient may use your version of this file under
32 * the terms of any one of the NPL, the GPL or the LGPL.
34 * ***** END LICENSE BLOCK *****
37 * Date: 09 September 2003
38 * SUMMARY: Just seeing we don't crash on this code
39 * See http://bugzilla.mozilla.org/show_bug.cgi?id=216320
42 //-----------------------------------------------------------------------------
44 var summary
= "Just seeing we don't crash on this code";
50 /* TESTCASE BEGINS HERE */
56 if(navigator
.appName
!="Netscape"){ if(!window
.navigator
.onLine
){ alert(pbc0430
); return false; } }
59 function vnid(formfield
){
61 if(!nid
.match(/^\s*$/)){
62 nl
=nid
.split('/').length
;
69 function vnull(formfield
){
71 if(text
.match(/^\s*$/)){
79 function vdt(formfield
){
83 year
=date
.substring(0,4);
85 month
=date
.substring(5,7);
87 day
=date
.substring(8,10);
90 tmn
=today
.getMonth()+1;
91 if(today
.getYear()<2000)tyr
=today
.getYear()+1900;
92 else tyr
=today
.getYear();
93 if(date
.match(/^\s*$/)) {return true; }
95 if(hy1
!="/"||hy2
!="/"){
100 if(month
>12||day
>31||month
<=0||day
<=0||(isNaN(month
)==true)||(isNaN(day
)==true)||(isNaN(year
)==true)){
106 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)){
114 function vkdt(formfield
){
115 date
=formfield
.value
;
116 year
=date
.substring(0,4);
118 month
=date
.substring(5,7);
120 day
=date
.substring(8,10);
123 tmn
=today
.getMonth()+1;
124 if(today
.getYear()<2000)tyr
=today
.getYear()+1900;
125 else tyr
=today
.getYear();
126 if(date
.match(/^\s*$/)){
131 if(hy1
!="/"||hy2
!="/"){
137 if(month
>12||day
>31||month
<=0||day
<=0||(isNaN(month
)==true)||(isNaN(day
)==true)||(isNaN(year
)==true)){
143 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)){
151 function ddif(month1
,day1
,year1
,month2
,day2
,year2
){
153 start
.setYear(year1
);
154 start
.setMonth(month1
-1);
161 end
.setMonth(month2
-1);
166 current
=(end
.getTime() - start
.getTime());
167 days
= Math
.floor(current
/(1000 * 60 * 60 * 24));
171 function vsub(form
,status
,ism
,action
){
172 if(!vol()){ return false; }
173 if(status
<9||status
==12){
174 band
=form
.BAND
.options
[form
.BAND
.selectedIndex
].value
;
182 if((status
>=0&&status
<5)||(status
==7)||(status
>=5&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
183 if(!vnull(form
.PT
)) { return false; }
188 syr
=stdt
.substring(0,4);
189 start_hy1
=stdt
.charAt(4);
190 smon
=stdt
.substring(5,7);
191 start_hy2
=stdt
.charAt(7);
192 sdy
=stdt
.substring(8,10);
193 eyr
=etdt
.substring(0,4);
194 end_hy1
=etdt
.charAt(4);
195 emon
=etdt
.substring(5,7);
196 end_hy2
=etdt
.charAt(7);
197 edy
=etdt
.substring(8,10);
199 date
=today
.getDate();
200 month
=today
.getMonth()+1;
201 if(today
.getYear()<2000)year
=today
.getYear()+1900; else year
=today
.getYear();
203 if(!vnull(form
.STD
)){ return false; }
204 if(!vnull(form
.END
)){ return false; }
205 if(start_hy1
!="/"||start_hy2
!="/"){
210 if(end_hy1
!="/"||end_hy2
!="/"){
215 if(smon
>12||sdy
>31||smon
<=0||sdy
<=0||(isNaN(smon
)==true)||(isNaN(sdy
)==true)||(isNaN(syr
)==true)){
220 if(emon
>12||edy
>31||emon
<=0||edy
<=0||(isNaN(emon
)==true)||(isNaN(edy
)==true)||(isNaN(eyr
)==true)){
225 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)){
230 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)){
235 if ((eyr
==nextYear
)&&(syr
==year
)) {
236 if ((emon
>1)||(edy
>31)) {
248 if(smon
>emon
||(smon
==emon
&&sdy
>=edy
)){
253 if((eyr
!=year
)&&(eyr
!=year
-1)){
259 if(ism
=='YES'&&(status
==5||status
==6||status
==12)){
260 if(ddif(month
,date
,year
,emon
,edy
,eyr
)>31){
266 if((status
>2&&status
<5)||(status
==7)||((status
>=5&&status
<9||status
==12)&&ism
=="YES")){
277 ird1
=form
.IRD1
.value
;
278 ird2
=form
.IRD2
.value
;
279 ird3
=form
.IRD3
.value
;
280 if(((ird1
==ird2
)&&(!ird1
.match(/^\s*$/)))||((ird1
==ird3
)&&(!ird1
.match(/^\s*$/)))){
285 else if((ird2
==ird3
)&&(!ird2
.match(/^\s*$/))){
290 if(!vdt(form
.FRD1
)){ return false;}
293 if(!vdt(form
.IRD1
)){return false;}
294 if(!vdt(form
.IRD2
)){return false;}
295 if(!vdt(form
.IRD3
)){return false;}
296 ird1
=form
.IRD1
.value
;
297 ird2
=form
.IRD2
.value
;
298 ird3
=form
.IRD3
.value
;
299 if(((ird1
==ird2
)&&(!ird1
.match(/^\s*$/)))||((ird1
==ird3
)&&(!ird1
.match(/^\s*$/)))){
304 else if((ird2
==ird3
)&&(!ird2
.match(/^\s*$/))){
309 if(!vkdt(form
.FRD1
)){
315 if((status
>=0&&status
<2)||(status
==3)||(status
==7)||(status
>=2&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
326 if((status
==2||status
==4)||(status
>=5&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
327 if(!vnull(form
.WR
)){return false;}
328 if(!vnull(form
.ER
)){return false;}
329 if(!vnull(form
.TR
)){return false;}
331 if((status
==5||status
==6||status
==12)&&ism
=="YES"){
332 if(!vkdt(form
.FRD1
)){return false;}
333 frdt
=form
.FRD1
.value
;
334 fryr
=frdt
.substring(0,4);
335 frmn
=frdt
.substring(5,7);
336 frdy
=frdt
.substring(8,10);
337 if(fryr
<syr
||(fryr
==syr
&&frmn
<smon
)||(fryr
==syr
&&frmn
==smon
&&frdy
<=sdy
)){
342 if((status
==5||status
==6||status
==12)&&ism
=="YES"){
344 for(i
=0; i
<form
.INH
.length
; i
++){
345 if(form
.INH
[i
].checked
==true){ isnh
=form
.INH
[i
].value
; }
354 for(i
=0; i
<form
.NHB
.length
; i
++){
355 if(form
.NHB
[i
].checked
==true){ beh
=form
.NHB
[i
].value
; }
358 for(i
=0; i
<form
.NHS
.length
; i
++){
359 if(form
.NHS
[i
].checked
==true){ skl
=form
.NHS
[i
].value
; }
371 if((beh
=="N"||skl
=="N")&&status
!=12){
372 if(form
.RCD
[3].checked
==false){
373 if(confirm(pbc0455
))srdb(form
.RCD
,"4");
379 if(status
!=12){ for(i
=0; i
<form
.RCD
.length
; i
++){ if(form
.RCD
[i
].checked
==true)rating
=form
.RCD
[i
].value
; } }
380 else if(status
==12){ rating
="4"; }
387 if(!vkdt(form
.SID
)){ return false; }
389 iyr
=idt
.substring(0,4);
390 imon
=idt
.substring(5,7);
391 idy
=idt
.substring(8,10);
392 frdt
=form
.FRD1
.value
;
393 fryr
=frdt
.substring(0,4);
394 frmn
=frdt
.substring(5,7);
395 frdy
=frdt
.substring(8,10);
396 if(iyr
<eyr
||(iyr
==eyr
&&imon
<emon
)||(iyr
==eyr
&&imon
==emon
&&idy
<=edy
)){
401 if(iyr
<fryr
||(iyr
==fryr
&&imon
<frmn
)||(iyr
==fryr
&&imon
==frmn
&&idy
<=frdy
)){
406 if(ddif(emon
,edy
,eyr
,imon
,idy
,iyr
)<30){
411 if(ddif(emon
,edy
,eyr
,imon
,idy
,iyr
)>90){
412 if(!confirm(pbc0439
+" "+pbc0442
)){
416 // MK/06-20-01 = If Rating Not equals to 4 blank out the sustained improve Date
419 if(!vnull(form
.OAT
)){ return false; }
420 if(form
.MSRQ
.checked
==true){
421 if(form
.NEW_SIGN_MGR_ID
.value
.match(/^\s*$/)){
423 form
.NEW_SIGN_MGR_ID
.focus();
426 if(vnid(form
.NEW_SIGN_MGR_ID
)==false){ return false; }
428 if(!form
.NEW_SIGN_MGR_ID
.value
.match(/^\s*$/)){
430 form
.NEW_SIGN_MGR_ID
.focus();
433 if ( (form
.TOC
.value
=="YES") && (form
.RSRQ
.checked
==true) ) {
435 form
.NEW_SEC_LINE_REV_ID
.focus();
439 if(form
.RSRQ
.checked
==true){
440 if(form
.NEW_SEC_LINE_REV_ID
.value
.match(/^\s*$/)){
442 form
.NEW_SEC_LINE_REV_ID
.focus();
445 if(vnid(form
.NEW_SEC_LINE_REV_ID
)==false){ return false; }
447 if(!form
.NEW_SEC_LINE_REV_ID
.value
.match(/^\s*$/)) {
449 form
.NEW_SEC_LINE_REV_ID
.focus();
452 if ( (form
.TOC
.value
=="YES") && (form
.MSRQ
.checked
==true) ) {
454 form
.NEW_SEC_LINE_REV_ID
.focus();
458 /**for returned objectives **/
460 if(conf(pbc0466
) == false) return false;
464 if(status
==0||status
==1||status
==3||status
==7){
465 if(conf(pbc0456
) == false) return false;
468 if(status
==2||status
==4||status
==8){
469 if(conf(pbc0457
) == false) return false;
471 } else if(ism
=='YES'){
472 if(status
==0||status
==1||status
==3||status
==7){
473 if(conf(pbc0458
) == false)return false;
475 if(status
==2||status
==4||status
==8){
476 if(conf(pbc0459
) == false)return false;
478 if(status
==5||status
==6){
479 if(form
.ESRQ
.checked
==false){
480 if(conf(pbc0460
) == false)return false;
482 if(conf(pbc0461
) == false)return false;
486 if(conf(pbc0462
) == false)return false;
487 } else if(ism
=='YES'){
488 if(conf(pbc0463
) == false)return false;
489 } else if(ism
=='REVIEWER'){
490 if(conf(pbc0464
) == false)return false;
493 if(status
>=9&&status
<=11){ snul(); }
498 function vsav(form
,status
,ism
,action
) {
499 if(!vol()){ return false; }
504 syr
=stdt
.substring(0,4);
505 start_hy1
=stdt
.charAt(4);
506 smon
=stdt
.substring(5,7);
507 start_hy2
=stdt
.charAt(7);
508 sdy
=stdt
.substring(8,10);
509 eyr
=etdt
.substring(0,4);
510 end_hy1
=etdt
.charAt(4);
511 emon
=etdt
.substring(5,7);
512 end_hy2
=etdt
.charAt(7);
513 edy
=etdt
.substring(8,10);
515 date
=today
.getDate();
516 month
=today
.getMonth()+1;
517 if(today
.getYear()<2000) year
=today
.getYear()+1900; else year
=today
.getYear();
519 if(!vnull(form
.STD
)) return false;
520 if(!vnull(form
.END
)) return false;
521 if(start_hy1
!="/"||start_hy2
!="/"){
526 if(end_hy1
!="/"||end_hy2
!="/"){
531 if(smon
>12||sdy
>31||smon
<=0||sdy
<=0||(isNaN(smon
)==true)||(isNaN(sdy
)==true)||(isNaN(syr
)==true)){
536 if(emon
>12||edy
>31||emon
<=0||edy
<=0||(isNaN(emon
)==true)||(isNaN(edy
)==true)||(isNaN(eyr
)==true)){
541 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)){
546 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)){
551 if ((eyr
==nextYear
)&&(syr
==year
)) {
552 if ((emon
>1)||(edy
>31)) {
558 if ((syr
<year
-1) || (syr
>year
)) {
563 if((eyr
!=year
)&&(eyr
!=year
-1)){
568 if(smon
>emon
||(smon
==emon
&&sdy
>=edy
)){
574 if((status
>2&&status
<5)||(status
>=5&&status
<9&&ism
=="YES")||(status
==12&&ism
=="YES")){
575 if(!vdt(form
.IRD1
)){return false;}
576 if(!vdt(form
.IRD2
)){return false;}
577 if(!vdt(form
.IRD3
)){ return false; }
578 ird1
=form
.IRD1
.value
;
579 ird2
=form
.IRD2
.value
;
580 ird3
=form
.IRD3
.value
;
581 if(((ird1
==ird2
)&&(!ird1
.match(/^\s*$/)))||((ird1
==ird3
)&&(!ird1
.match(/^\s*$/)))){
586 else if((ird2
==ird3
)&&(!ird2
.match(/^\s*$/))){
591 if(!vdt(form
.FRD1
)){return false;}
593 if(!vdt(form
.FRD1
)){return false;}
596 if((status
==5||status
==6)&&ism
=="YES"){
598 for(i
=0;i
<form
.RCD
.length
;i
++){
599 if(form
.RCD
[i
].checked
==true)rating
=form
.RCD
[i
].value
;
602 for(i
=0; i
<form
.INH
.length
; i
++){
603 if(form
.INH
[i
].checked
==true){
604 isnh
=form
.INH
[i
].value
;
609 for(i
=0; i
<form
.NHB
.length
;i
++){
610 if(form
.NHB
[i
].checked
==true){
611 beh
=form
.NHB
[i
].value
;
615 for(i
=0; i
<form
.NHS
.length
;i
++){
616 if(form
.NHS
[i
].checked
==true){
617 skl
=form
.NHS
[i
].value
;
620 if((beh
=="N"||skl
=="N")&&rating
!=""){
621 if(form
.RCD
[3].checked
==false){
622 if(confirm(pbc0455
))srdb(form
.RCD
,"4");
629 if(!vdt(form
.SID
)){ return false;}
632 if((status
==2||status
==4 || status
==8 || status
==5 || status
==6 || status
==10)&&ism
=='YES')
634 if(!confirm(pbc0436
)){ return false;}
635 if(form
.OBJECTIVE_CHANGED
.value
=='Y') {
636 if(confirm(pbc0452
+" "+pbc0453
+" "+pbc0454
)){form
.MRQ
.value
=4; } else { form
.MRQ
.value
=0; }
637 }else if (( status
==5 || status
==6 || status
==10) && (form
.RESULTS_CHANGED
.value
=='Y')) {
638 if(confirm(pbc0470
+" "+pbc0453
+" "+pbc0454
)){form
.MRQ
.value
=8; } else { form
.MRQ
.value
=0; }
642 if(status
>=9&&status
<=11){
648 function cft(formfield
){
650 if(nid
.match(/^\s*$/)){
655 nl
=nid
.split('/').length
;
663 function dcf(form
,pbcId
,cnum
,sequence
,status
,atyp
,ver
){
665 dflg
=confirm("\n\n<====================== " + pbc0468
+ " ======================>\n\n" + pbc0469
+ "\n\n<==================================================================>");
667 form
.ATYP
.value
=atyp
;
668 form
.PID
.value
=pbcId
;
669 form
.CNUM
.value
=cnum
;
670 form
.SEQ
.value
=sequence
;
671 form
.ST
.value
=status
;
681 //if(confirm(pbc0447+" "+pbc0451)){
691 top
.location
="logoff.jsp";
695 if(csr
==null){ top
.location
="logoff.jsp"; }
696 else if(csr
.charAt(0)==3){ window
.location
="csrlogoff.jsp"; }
697 else{ top
.location
="logoff.jsp"; }
701 top
.location
="pbcmain.jsp";
705 sck("IBM004","1^NONE^1");
706 window
.location
="pbcmain.jsp"
710 if(confirm(pbc0434
)){
711 if(navigator
.appName
!="Netscape"){
712 if(!window
.navigator
.onLine
){
716 window
.location
='pbcmain.jsp';
720 window
.location
='pbcmain.jsp';
725 function crt(form
,action
){
726 if(!vol()){return false;}
727 band
=form
.BAND
.options
[form
.BAND
.selectedIndex
].value
;
733 if(!confirm(pbc0450
)){return false;}
738 function cusat(form
,action
){
739 if(!vol()){return false;}
741 form
.action
="unsatreq.jsp";
745 function cfrt(form
,ism
,action
){
746 if(!vol()){return false;}
749 if(confirm(pbc0449
+" "+pbc0432
)){
756 if(confirm(pbc0449
+" "+pbc0448
)){
763 if(confirm(pbc0440
)){
772 if(form
.ESRQ
.checked
==true){
773 if(!confirm(pbc0435
+" "+pbc0443
))form
.ESRQ
.checked
=false;
774 else {form
.ESRQ
.checked
=true;}
779 if(form
.MSRQ
.checked
==true){
780 if(!confirm(pbc0441
+" "+pbc0438
+" "+pbc0444
+" "+pbc0445
))form
.MSRQ
.checked
=false;
782 form
.MSRQ
.checked
=true;
788 if(form
.RSRQ
.checked
==true){
789 if(!confirm(pbc0441
+" "+pbc0438
+" "+pbc0444
+" "+pbc0446
))form
.RSRQ
.checked
=false;
791 form
.RSRQ
.checked
=true;
797 alert(pbc0412
+" "+pbc0413
+" "+pbc0414
);
799 function cows(form
,action
){
803 if(confirm(pbc0437
)){
810 function srdb(rdb
,value
) {
811 for(i
=0; i
<rdb
.length
;i
++) {
812 if(rdb
[i
].value
== value
) {
813 rdb
[i
].checked
= true;
820 function slop(lbx
,value
) {
821 if(lbx
.options
.length
> 0) {
822 for(i
=0;i
< lbx
.options
.length
;i
++) {
823 if(lbx
.options
[i
].value
== value
) {
824 lbx
.options
[i
].selected
= true;
832 function ourl(URL
,WIN_NAME
){
833 if(!vol()){ return; }
835 if(document
.layers
) {
836 child_screenX
=window
.screenX
+50;
837 child_width
=window
.innerWidth
-75;
838 child_height
=window
.innerHeight
-75;
839 emp_win
=window
.open(URL
,WIN_NAME
,"screenX="+ child_screenX
+",screenY=75,height="+ child_height
+",width="+ child_width
+",resizable,status,scrollbars");
841 child_width
= screen
.width
-160;
842 child_height
= screen
.height
-200;
843 emp_win
=window
.open(URL
,WIN_NAME
,"height="+ child_height
+",width="+ child_width
+",resizable=yes,status=no,scrollbars=yes");
844 //emp_win.moveTo(110,0);
846 //if (URL.indexOf("pbcsitehelp")==-1) { alert("Opened new window."); }
851 form
.NHS
[0].checked
=false;
852 form
.NHS
[1].checked
=false;
853 form
.NHB
[0].checked
=false;
854 form
.NHB
[1].checked
=false;
859 for(i
=0; i
<form
.INH
.length
;i
++)
861 if(form
.INH
[i
].checked
==true){isnh
=form
.INH
[i
].value
; }
864 form
.NHS
[0].checked
=false;
865 form
.NHS
[1].checked
=false;
866 form
.NHB
[0].checked
=false;
867 form
.NHB
[1].checked
=false;
872 //if ((form.NHS[0].checked || form.NHS[1].checked) && (form.NHB[0].checked || form.NHB[1].checked))
873 if (form
.NHS
[1].checked
|| form
.NHB
[1].checked
)
875 form
.RCD
[3].checked
=true;
882 function err(errMsg
) {
883 alert(getEncodedText(errMsg
));
886 function getEncodedText(txtValue
) {
887 if (txtValue
.match(/^\s*$/)) return txtValue
;
888 var txtValue1
= txtValue
.replace((/"/g),'"');
889 var txtValue2
= txtValue1
.replace((/>/g),">");
890 var txtValue3
= txtValue2
.replace((/</g),"<");
894 function encodeText(txtValue
) {
895 if (txtValue
.match(/^\s*$/)) return txtValue
;
896 var txtValue0
= txtValue
.replace((/\r\n/g),'&lf;');
897 var txtValue1
= txtValue0
.replace((/"/g),'"');
898 var txtValue2 = txtValue1.replace((/>/g),'>');
899 var txtValue3 = txtValue2.replace((/</g),'<');
906 mck = " " + document.cookie + ";";
907 srcnm = " " + name + "=";
908 scok = mck.indexOf(srcnm);
910 scok += srcnm.length;
911 eofck = mck.indexOf(";",scok);
912 result = unescape(mck.substring(scok,eofck));
917 function sck(name,value){
918 ckpth="path
=/;domain
=.ibm
.com
";
919 document.cookie = name + "=" + value + ";" + ckpth;
923 function testForCookie(){
924 sck("PBCTest
","test
");
925 if(gck("PBCTest
") == "test
") {
926 // alert("Cookie test is good
");
930 // alert("Cookie test is bad
");
936 function prn(form,l_status,l_ism,l_scf,l_locale){
940 pwin=window.open("printvw
.jsp
?nls
="+l_locale + "ISNEWWIN
=TRUE
","pwin
","resizable
=yes
,width
=560,height
=400,scrollbars
=yes
,toolbar
,screenX
=5,screenY
=5");
944 unum=form.UNUM.value;
946 cnum=unum.substring(0,eofsn);
951 return top.confirm(msg);
954 function sact(action){
955 document.PBC_FORM.ATYP.value=action;
959 document.PBC_FORM.WO.value="";
960 document.PBC_FORM.WR.value="";
961 document.PBC_FORM.EO.value="";
962 document.PBC_FORM.ER.value="";
963 document.PBC_FORM.TO.value="";
964 document.PBC_FORM.TR.value="";
965 document.PBC_FORM.OAT.value="";
969 unum=document.PBC_FORM.UNUM.value;
971 cnum=unum.substring(0,eofsn);
974 function checkForEditPage() {
975 if(true==checkForm()){
976 if(!confirm(pbc0465)) return false;
981 function checkForm() {
982 var frms=document.forms["PBC_FORM
"];
983 if (navigator.appName=="Netscape
") {
984 if (frms==undefined) return false;
985 if (frms.IS_EDIT==undefined) return false;
987 if(frms==null) return false;
988 if (frms.IS_EDIT==null) return false;
995 function removeAnchor(link){
997 indx = link.indexOf('#');
1000 link2 = link.substring(0,indx);
1001 indx=link2.indexOf("#");
1008 function gotoHREF(link){
1009 if(document.layers){
1010 var documentURL = removeAnchor(document.URL);
1011 location.href=documentURL+link;
1015 var documentURL = removeAnchor(document.URL);
1016 document.URL=documentURL+link;
1024 function init_resize_event(){
1027 function putVal2ck()
1031 function setValuesFromCookie()