if(!vol()){ return false; } if(status<9||status==12){ band=form.BAND.options[form.BAND.selectedIndex].value; if(band=="00"){ alert(pbc0425); form.BAND.focus(); return false; 
if(!vol()){ return false; } if(status<9||status==12){ band=form.BAND.options[form.BAND.selectedIndex].value; if(band=="00"){ alert(pbc0425); form.BAND.focus(); return false; } }  if((status>=0&&status<5)||(status==7)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ if(!vnull(form.PT))	{	return false;	} adt1=form.STD; adt2=form.END; stdt=adt1.value; etdt=adt2.value; syr=stdt.substring(0,4); start_hy1=stdt.charAt(4); smon=stdt.substring(5,7); start_hy2=stdt.charAt(7); sdy=stdt.substring(8,10); eyr=etdt.substring(0,4); end_hy1=etdt.charAt(4); emon=etdt.substring(5,7); end_hy2=etdt.charAt(7); edy=etdt.substring(8,10); today=new Date(); date=today.getDate(); month=today.getMonth()+1; if(today.getYear()<2000)year=today.getYear()+1900;	else year=today.getYear(); nextYear=year+1; if(!vnull(form.STD)){	return false;	} if(!vnull(form.END)){	return false;	} if(start_hy1!="/"||start_hy2!="/"){ alert(pbc0409); form.STD.focus(); return false; } if(end_hy1!="/"||end_hy2!="/"){ alert(pbc0409); form.END.focus(); return false; } if(smon>12||sdy>31||smon<=0||sdy<=0||(isNaN(smon)==true)||(isNaN(sdy)==true)||(isNaN(syr)==true)){ alert(pbc0409); form.STD.focus(); return false; } if(emon>12||edy>31||emon<=0||edy<=0||(isNaN(emon)==true)||(isNaN(edy)==true)||(isNaN(eyr)==true)){ alert(pbc0409); form.END.focus(); return false; } 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)){ alert(pbc0409); form.STD.focus(); return false; } 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)){ alert(pbc0409); form.END.focus(); return false; } if ((eyr==nextYear)&&(syr==year)) { if ((emon>1)||(edy >31)) { alert(pbc0401); form.END.focus(); return false; } } else {  if ((syr!=eyr)){ alert(pbc0406); form.STD.focus(); return false; } if(smon>emon||(smon==emon&&sdy>=edy)){ alert(pbc0402); form.STD.focus(); return false; } if((eyr!=year)&&(eyr!=year-1)){ alert(pbc0405); form.END.focus(); return false; } } if(ism=='YES'&&(status==5||status==6||status==12)){ if(ddif(month,date,year,emon,edy,eyr)>31){ alert(pbc0421); form.END.focus(); return false; } } if((status>2&&status<5)||(status==7)||((status>=5&&status<9||status==12)&&ism=="YES")){ if(status!=5){ if(!vdt(form.IRD1)){ return false; } if(!vdt(form.IRD2)){ return false; } if(!vdt(form.IRD3)){ return false; } ird1=form.IRD1.value; ird2=form.IRD2.value; ird3=form.IRD3.value; if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){ alert(pbc0417); form.IRD1.focus(); return false; } else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){ alert(pbc0417); form.IRD2.focus(); return false; } if(!vdt(form.FRD1)){ return false;} } if(status==5){ if(!vdt(form.IRD1)){return false;} if(!vdt(form.IRD2)){return false;} if(!vdt(form.IRD3)){return false;} ird1=form.IRD1.value; ird2=form.IRD2.value; ird3=form.IRD3.value; if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){ alert(pbc0417); form.IRD1.focus(); return false; } else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){ alert(pbc0417); form.IRD2.focus(); return false; } if(!vkdt(form.FRD1)){ return false; } } } } if((status>=0&&status<2)||(status==3)||(status==7)||(status>=2&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ if(!vnull(form.WO)){ return false; } if(!vnull(form.EO)){ return false; } if(!vnull(form.TO)){ return false; } } if((status==2||status==4)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ if(!vnull(form.WR)){return false;} if(!vnull(form.ER)){return false;} if(!vnull(form.TR)){return false;} } if((status==5||status==6||status==12)&&ism=="YES"){ if(!vkdt(form.FRD1)){return false;} frdt=form.FRD1.value; fryr=frdt.substring(0,4); frmn=frdt.substring(5,7); frdy=frdt.substring(8,10); if(fryr<syr||(fryr==syr&&frmn<smon)||(fryr==syr&&frmn==smon&&frdy<=sdy)){ alert(pbc0410); form.FRD1.focus(); return false; } if((status==5||status==6||status==12)&&ism=="YES"){ isnh=""; for(i=0; i<form.INH.length; i++){ if(form.INH[i].checked==true){ isnh=form.INH[i].value; } } if(isnh==""){ alert(pbc0424); form.INH[1].focus(); return false; } if(isnh=="Y"){ beh=""; for(i=0; i<form.NHB.length; i++){ if(form.NHB[i].checked==true){ beh=form.NHB[i].value; } } skl=""; for(i=0; i<form.NHS.length; i++){ if(form.NHS[i].checked==true){ skl=form.NHS[i].value; } } if(beh==""){ alert(pbc0408); form.NHB[0].focus(); return false; } if(skl==""){ alert(pbc0426); form.NHS[0].focus(); return false; } if((beh=="N"||skl=="N")&&status!=12){ if(form.RCD[3].checked==false){ if(confirm(pbc0455))srdb(form.RCD,"4"); else { form.NHB[0].focus(); return false; }}}}} rating=""; if(status!=12){ for(i=0; i<form.RCD.length; i++){ if(form.RCD[i].checked==true)rating=form.RCD[i].value; } } else if(status==12){ rating="4"; } if(rating==""){ alert(pbc0428); form.RCD[0].focus(); return false; } if(rating=="4"){ if(!vkdt(form.SID)){ return false; } idt=form.SID.value; iyr=idt.substring(0,4); imon=idt.substring(5,7); idy=idt.substring(8,10); frdt=form.FRD1.value; fryr=frdt.substring(0,4); frmn=frdt.substring(5,7); frdy=frdt.substring(8,10); if(iyr<eyr||(iyr==eyr&&imon<emon)||(iyr==eyr&&imon==emon&&idy<=edy)){ alert(pbc0415); form.SID.focus(); return false; } if(iyr<fryr||(iyr==fryr&&imon<frmn)||(iyr==fryr&&imon==frmn&&idy<=frdy)){ alert(pbc0427); form.SID.focus(); return false; } if(ddif(emon,edy,eyr,imon,idy,iyr)<30){ alert(pbc0416); form.SID.focus(); return false; } if(ddif(emon,edy,eyr,imon,idy,iyr)>90){ if(!confirm(pbc0439+" "+pbc0442)){ form.SID.focus(); return false; }}} else {  form.SID.value=""; } if(!vnull(form.OAT)){ return false; } if(form.MSRQ.checked==true){ if(form.NEW_SIGN_MGR_ID.value.match(/^\s*$/)){ alert(pbc0418); form.NEW_SIGN_MGR_ID.focus(); return false; } if(vnid(form.NEW_SIGN_MGR_ID)==false){	return false; } } else { if(!form.NEW_SIGN_MGR_ID.value.match(/^\s*$/)){ alert(pbc0422); form.NEW_SIGN_MGR_ID.focus(); return false; } if ( (form.TOC.value=="YES") && (form.RSRQ.checked==true) ) { alert(pbc0429); form.NEW_SEC_LINE_REV_ID.focus(); return false; } } if(form.RSRQ.checked==true){ if(form.NEW_SEC_LINE_REV_ID.value.match(/^\s*$/)){ alert(pbc0418); form.NEW_SEC_LINE_REV_ID.focus(); return false; } if(vnid(form.NEW_SEC_LINE_REV_ID)==false){	return false; } } else { if(!form.NEW_SEC_LINE_REV_ID.value.match(/^\s*$/)) { alert(pbc0423); form.NEW_SEC_LINE_REV_ID.focus(); return false; } if ( (form.TOC.value=="YES") && (form.MSRQ.checked==true) ) { alert(pbc0431); form.NEW_SEC_LINE_REV_ID.focus(); return false; }}} if(status!=9){ /**for returned objectives **/ if(status==3){ if(conf(pbc0466) == false) return false; }  if(ism=='NO'){ if(status==0||status==1||status==3||status==7){ if(conf(pbc0456) == false) return false; }  if(status==2||status==4||status==8){ if(conf(pbc0457) == false) return false; } } else if(ism=='YES'){ if(status==0||status==1||status==3||status==7){ if(conf(pbc0458) == false)return false; } if(status==2||status==4||status==8){ if(conf(pbc0459) == false)return false; } if(status==5||status==6){ if(form.ESRQ.checked==false){ if(conf(pbc0460) == false)return false; } else { if(conf(pbc0461) == false)return false; }}}} if(status==9){ if(ism=='NO'){ if(conf(pbc0462) == false)return false; } else if(ism=='YES'){ if(conf(pbc0463) == false)return false; } else if(ism=='REVIEWER'){ if(conf(pbc0464) == false)return false; }} sact(action); if(status>=9&&status<=11){ snul(); } form.submit(); return true; 
function vsub(form,status,ism,action){if(!vol()){ return false; }if(status<9||status==12){band=form.BAND.options[form.BAND.selectedIndex].value;if(band=="00"){alert(pbc0425);form.BAND.focus();return false;}}if((status>=0&&status<5)||(status==7)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){if(!vnull(form.PT))	{	return false;	}adt1=form.STD;adt2=form.END;stdt=adt1.value;etdt=adt2.value;syr=stdt.substring(0,4);start_hy1=stdt.charAt(4);smon=stdt.substring(5,7);start_hy2=stdt.charAt(7);sdy=stdt.substring(8,10);eyr=etdt.substring(0,4);end_hy1=etdt.charAt(4);emon=etdt.substring(5,7);end_hy2=etdt.charAt(7);edy=etdt.substring(8,10);today=new Date();date=today.getDate();month=today.getMonth()+1;if(today.getYear()<2000)year=today.getYear()+1900;	else year=today.getYear();nextYear=year+1;if(!vnull(form.STD)){	return false;	}if(!vnull(form.END)){	return false;	}if(start_hy1!="/"||start_hy2!="/"){alert(pbc0409);form.STD.focus();return false;}if(end_hy1!="/"||end_hy2!="/"){alert(pbc0409);form.END.focus();return false;}if(smon>12||sdy>31||smon<=0||sdy<=0||(isNaN(smon)==true)||(isNaN(sdy)==true)||(isNaN(syr)==true)){alert(pbc0409);form.STD.focus();return false;}if(emon>12||edy>31||emon<=0||edy<=0||(isNaN(emon)==true)||(isNaN(edy)==true)||(isNaN(eyr)==true)){alert(pbc0409);form.END.focus();return false;}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)){alert(pbc0409);form.STD.focus();return false;}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)){alert(pbc0409);form.END.focus();return false;}if ((eyr==nextYear)&&(syr==year)) {if ((emon>1)||(edy >31)) {alert(pbc0401);form.END.focus();return false;}} else {if ((syr!=eyr)){alert(pbc0406);form.STD.focus();return false;}if(smon>emon||(smon==emon&&sdy>=edy)){alert(pbc0402);form.STD.focus();return false;}if((eyr!=year)&&(eyr!=year-1)){alert(pbc0405);form.END.focus();return false;}}if(ism=='YES'&&(status==5||status==6||status==12)){if(ddif(month,date,year,emon,edy,eyr)>31){alert(pbc0421);form.END.focus();return false;}}if((status>2&&status<5)||(status==7)||((status>=5&&status<9||status==12)&&ism=="YES")){if(status!=5){if(!vdt(form.IRD1)){return false;}if(!vdt(form.IRD2)){return false;}if(!vdt(form.IRD3)){return false;}ird1=form.IRD1.value;ird2=form.IRD2.value;ird3=form.IRD3.value;if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){alert(pbc0417);form.IRD1.focus();return false;}else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){alert(pbc0417);form.IRD2.focus();return false;}if(!vdt(form.FRD1)){ return false;}}if(status==5){if(!vdt(form.IRD1)){return false;}if(!vdt(form.IRD2)){return false;}if(!vdt(form.IRD3)){return false;}ird1=form.IRD1.value;ird2=form.IRD2.value;ird3=form.IRD3.value;if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){alert(pbc0417);form.IRD1.focus();return false;}else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){alert(pbc0417);form.IRD2.focus();return false;}if(!vkdt(form.FRD1)){return false;}}}}if((status>=0&&status<2)||(status==3)||(status==7)||(status>=2&&status<9&&ism=="YES")||(status==12&&ism=="YES")){if(!vnull(form.WO)){return false;}if(!vnull(form.EO)){return false;}if(!vnull(form.TO)){return false;}}if((status==2||status==4)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){if(!vnull(form.WR)){return false;}if(!vnull(form.ER)){return false;}if(!vnull(form.TR)){return false;}}if((status==5||status==6||status==12)&&ism=="YES"){if(!vkdt(form.FRD1)){return false;}frdt=form.FRD1.value;fryr=frdt.substring(0,4);frmn=frdt.substring(5,7);frdy=frdt.substring(8,10);if(fryr<syr||(fryr==syr&&frmn<smon)||(fryr==syr&&frmn==smon&&frdy<=sdy)){alert(pbc0410);form.FRD1.focus();return false;}if((status==5||status==6||status==12)&&ism=="YES"){isnh="";for(i=0; i<form.INH.length; i++){if(form.INH[i].checked==true){ isnh=form.INH[i].value; }}if(isnh==""){alert(pbc0424);form.INH[1].focus();return false;}if(isnh=="Y"){beh="";for(i=0; i<form.NHB.length; i++){if(form.NHB[i].checked==true){ beh=form.NHB[i].value; }}skl="";for(i=0; i<form.NHS.length; i++){if(form.NHS[i].checked==true){ skl=form.NHS[i].value; }}if(beh==""){alert(pbc0408);form.NHB[0].focus();return false;}if(skl==""){alert(pbc0426);form.NHS[0].focus();return false;}if((beh=="N"||skl=="N")&&status!=12){if(form.RCD[3].checked==false){if(confirm(pbc0455))srdb(form.RCD,"4");else {form.NHB[0].focus();return false;}}}}}rating="";if(status!=12){ for(i=0; i<form.RCD.length; i++){ if(form.RCD[i].checked==true)rating=form.RCD[i].value; } }else if(status==12){ rating="4"; }if(rating==""){alert(pbc0428);form.RCD[0].focus();return false;}if(rating=="4"){if(!vkdt(form.SID)){ return false; }idt=form.SID.value;iyr=idt.substring(0,4);imon=idt.substring(5,7);idy=idt.substring(8,10);frdt=form.FRD1.value;fryr=frdt.substring(0,4);frmn=frdt.substring(5,7);frdy=frdt.substring(8,10);if(iyr<eyr||(iyr==eyr&&imon<emon)||(iyr==eyr&&imon==emon&&idy<=edy)){alert(pbc0415);form.SID.focus();return false;}if(iyr<fryr||(iyr==fryr&&imon<frmn)||(iyr==fryr&&imon==frmn&&idy<=frdy)){alert(pbc0427);form.SID.focus();return false;}if(ddif(emon,edy,eyr,imon,idy,iyr)<30){alert(pbc0416);form.SID.focus();return false;}if(ddif(emon,edy,eyr,imon,idy,iyr)>90){if(!confirm(pbc0439+" "+pbc0442)){form.SID.focus();return false;}}} else {// MK/06-20-01 = If Rating Not equals to 4 blank out the sustained improve Dateform.SID.value="";}if(!vnull(form.OAT)){ return false; }if(form.MSRQ.checked==true){if(form.NEW_SIGN_MGR_ID.value.match(/^\s*$/)){alert(pbc0418);form.NEW_SIGN_MGR_ID.focus();return false;}if(vnid(form.NEW_SIGN_MGR_ID)==false){	return false; }} else {if(!form.NEW_SIGN_MGR_ID.value.match(/^\s*$/)){alert(pbc0422);form.NEW_SIGN_MGR_ID.focus();return false;}if ( (form.TOC.value=="YES") && (form.RSRQ.checked==true) ) {alert(pbc0429);form.NEW_SEC_LINE_REV_ID.focus();return false;}}if(form.RSRQ.checked==true){if(form.NEW_SEC_LINE_REV_ID.value.match(/^\s*$/)){alert(pbc0418);form.NEW_SEC_LINE_REV_ID.focus();return false;}if(vnid(form.NEW_SEC_LINE_REV_ID)==false){	return false; }} else {if(!form.NEW_SEC_LINE_REV_ID.value.match(/^\s*$/)) {alert(pbc0423);form.NEW_SEC_LINE_REV_ID.focus();return false;}if ( (form.TOC.value=="YES") && (form.MSRQ.checked==true) ) {alert(pbc0431);form.NEW_SEC_LINE_REV_ID.focus();return false;}}}if(status!=9){/**for returned objectives **/if(status==3){if(conf(pbc0466) == false) return false;}if(ism=='NO'){if(status==0||status==1||status==3||status==7){if(conf(pbc0456) == false) return false;}if(status==2||status==4||status==8){if(conf(pbc0457) == false) return false;}} else if(ism=='YES'){if(status==0||status==1||status==3||status==7){if(conf(pbc0458) == false)return false;}if(status==2||status==4||status==8){if(conf(pbc0459) == false)return false;}if(status==5||status==6){if(form.ESRQ.checked==false){if(conf(pbc0460) == false)return false;} else {if(conf(pbc0461) == false)return false;}}}}if(status==9){if(ism=='NO'){if(conf(pbc0462) == false)return false;} else if(ism=='YES'){if(conf(pbc0463) == false)return false;} else if(ism=='REVIEWER'){if(conf(pbc0464) == false)return false;}}sact(action);if(status>=9&&status<=11){ snul(); }form.submit();return true;}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/3703c3c05f398a63e55992f7687ef65273b26d6a/regress-216320.js/buggy/js/tests/js1_5/Regress/regress-216320.js