michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * michael@0: * Date: 09 September 2003 michael@0: * SUMMARY: Just seeing we don't crash on this code michael@0: * See http://bugzilla.mozilla.org/show_bug.cgi?id=216320 michael@0: * michael@0: */ michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 216320; michael@0: var summary = "Just seeing we don't crash on this code"; michael@0: michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus(summary); michael@0: michael@0: michael@0: /* TESTCASE BEGINS HERE */ michael@0: status=0; michael@0: ism='NO'; michael@0: scf='N'; michael@0: michael@0: function vol(){ michael@0: if(navigator.appName!="Netscape"){ if(!window.navigator.onLine){ alert(pbc0430); return false; } } michael@0: return true; } michael@0: michael@0: function vnid(formfield){ michael@0: nid=formfield.value; michael@0: if(!nid.match(/^\s*$/)){ michael@0: nl=nid.split('/').length; michael@0: if(nl!=2&&nl!=3){ michael@0: alert(pbc0420); michael@0: formfield.focus(); michael@0: return false; michael@0: }}} michael@0: michael@0: function vnull(formfield){ michael@0: text=formfield.value; michael@0: if(text.match(/^\s*$/)){ michael@0: alert(pbc0425); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: function vdt(formfield){ michael@0: date=formfield.value; michael@0: //MM/DD/YYYY michael@0: //YYYY/MM/DD michael@0: year=date.substring(0,4); michael@0: hy1=date.charAt(4); michael@0: month=date.substring(5,7); michael@0: hy2=date.charAt(7); michael@0: day=date.substring(8,10); michael@0: today=new Date(); michael@0: tdy=today.getDate(); michael@0: tmn=today.getMonth()+1; michael@0: if(today.getYear()<2000)tyr=today.getYear()+1900; michael@0: else tyr=today.getYear(); michael@0: if(date.match(/^\s*$/)) {return true; } michael@0: michael@0: if(hy1!="/"||hy2!="/"){ michael@0: alert(pbc0409); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: if(month>12||day>31||month<=0||day<=0||(isNaN(month)==true)||(isNaN(day)==true)||(isNaN(year)==true)){ michael@0: alert(pbc0409); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: michael@0: 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)){ michael@0: alert(pbc0409); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: function vkdt(formfield){ michael@0: date=formfield.value; michael@0: year=date.substring(0,4); michael@0: hy1=date.charAt(4); michael@0: month=date.substring(5,7); michael@0: hy2=date.charAt(7); michael@0: day=date.substring(8,10); michael@0: today=new Date(); michael@0: tdy=today.getDate(); michael@0: tmn=today.getMonth()+1; michael@0: if(today.getYear()<2000)tyr=today.getYear()+1900; michael@0: else tyr=today.getYear(); michael@0: if(date.match(/^\s*$/)){ michael@0: alert(pbc0425); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: if(hy1!="/"||hy2!="/"){ michael@0: alert(pbc0409); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: michael@0: if(month>12||day>31||month<=0||day<=0||(isNaN(month)==true)||(isNaN(day)==true)||(isNaN(year)==true)){ michael@0: alert(pbc0409); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: michael@0: 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)){ michael@0: alert(pbc0409); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: function ddif(month1,day1,year1,month2,day2,year2){ michael@0: start = new Date(); michael@0: start.setYear(year1); michael@0: start.setMonth(month1-1); michael@0: start.setDate(day1); michael@0: start.setMinutes(0); michael@0: start.setHours(0); michael@0: start.setSeconds(0); michael@0: end = new Date(); michael@0: end.setYear(year2); michael@0: end.setMonth(month2-1); michael@0: end.setDate(day2); michael@0: end.setMinutes(0); michael@0: end.setHours(0); michael@0: end.setSeconds(0); michael@0: current =(end.getTime() - start.getTime()); michael@0: days = Math.floor(current /(1000 * 60 * 60 * 24)); michael@0: return(days); michael@0: } michael@0: michael@0: function vsub(form,status,ism,action){ michael@0: if(!vol()){ return false; } michael@0: if(status<9||status==12){ michael@0: band=form.BAND.options[form.BAND.selectedIndex].value; michael@0: if(band=="00"){ michael@0: alert(pbc0425); michael@0: form.BAND.focus(); michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: if((status>=0&&status<5)||(status==7)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ michael@0: if(!vnull(form.PT)) { return false; } michael@0: adt1=form.STD; michael@0: adt2=form.END; michael@0: stdt=adt1.value; michael@0: etdt=adt2.value; michael@0: syr=stdt.substring(0,4); michael@0: start_hy1=stdt.charAt(4); michael@0: smon=stdt.substring(5,7); michael@0: start_hy2=stdt.charAt(7); michael@0: sdy=stdt.substring(8,10); michael@0: eyr=etdt.substring(0,4); michael@0: end_hy1=etdt.charAt(4); michael@0: emon=etdt.substring(5,7); michael@0: end_hy2=etdt.charAt(7); michael@0: edy=etdt.substring(8,10); michael@0: today=new Date(); michael@0: date=today.getDate(); michael@0: month=today.getMonth()+1; michael@0: if(today.getYear()<2000)year=today.getYear()+1900; else year=today.getYear(); michael@0: nextYear=year+1; michael@0: if(!vnull(form.STD)){ return false; } michael@0: if(!vnull(form.END)){ return false; } michael@0: if(start_hy1!="/"||start_hy2!="/"){ michael@0: alert(pbc0409); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if(end_hy1!="/"||end_hy2!="/"){ michael@0: alert(pbc0409); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: if(smon>12||sdy>31||smon<=0||sdy<=0||(isNaN(smon)==true)||(isNaN(sdy)==true)||(isNaN(syr)==true)){ michael@0: alert(pbc0409); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if(emon>12||edy>31||emon<=0||edy<=0||(isNaN(emon)==true)||(isNaN(edy)==true)||(isNaN(eyr)==true)){ michael@0: alert(pbc0409); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: 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)){ michael@0: alert(pbc0409); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: 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)){ michael@0: alert(pbc0409); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: if ((eyr==nextYear)&&(syr==year)) { michael@0: if ((emon>1)||(edy >31)) { michael@0: alert(pbc0401); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: } else { michael@0: michael@0: if ((syr!=eyr)){ michael@0: alert(pbc0406); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if(smon>emon||(smon==emon&&sdy>=edy)){ michael@0: alert(pbc0402); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if((eyr!=year)&&(eyr!=year-1)){ michael@0: alert(pbc0405); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: } michael@0: if(ism=='YES'&&(status==5||status==6||status==12)){ michael@0: if(ddif(month,date,year,emon,edy,eyr)>31){ michael@0: alert(pbc0421); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: } michael@0: if((status>2&&status<5)||(status==7)||((status>=5&&status<9||status==12)&&ism=="YES")){ michael@0: if(status!=5){ michael@0: if(!vdt(form.IRD1)){ michael@0: return false; michael@0: } michael@0: if(!vdt(form.IRD2)){ michael@0: return false; michael@0: } michael@0: if(!vdt(form.IRD3)){ michael@0: return false; michael@0: } michael@0: ird1=form.IRD1.value; michael@0: ird2=form.IRD2.value; michael@0: ird3=form.IRD3.value; michael@0: if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){ michael@0: alert(pbc0417); michael@0: form.IRD1.focus(); michael@0: return false; michael@0: } michael@0: else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){ michael@0: alert(pbc0417); michael@0: form.IRD2.focus(); michael@0: return false; michael@0: } michael@0: if(!vdt(form.FRD1)){ return false;} michael@0: } michael@0: if(status==5){ michael@0: if(!vdt(form.IRD1)){return false;} michael@0: if(!vdt(form.IRD2)){return false;} michael@0: if(!vdt(form.IRD3)){return false;} michael@0: ird1=form.IRD1.value; michael@0: ird2=form.IRD2.value; michael@0: ird3=form.IRD3.value; michael@0: if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){ michael@0: alert(pbc0417); michael@0: form.IRD1.focus(); michael@0: return false; michael@0: } michael@0: else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){ michael@0: alert(pbc0417); michael@0: form.IRD2.focus(); michael@0: return false; michael@0: } michael@0: if(!vkdt(form.FRD1)){ michael@0: return false; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: if((status>=0&&status<2)||(status==3)||(status==7)||(status>=2&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ michael@0: if(!vnull(form.WO)){ michael@0: return false; michael@0: } michael@0: if(!vnull(form.EO)){ michael@0: return false; michael@0: } michael@0: if(!vnull(form.TO)){ michael@0: return false; michael@0: } michael@0: } michael@0: if((status==2||status==4)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ michael@0: if(!vnull(form.WR)){return false;} michael@0: if(!vnull(form.ER)){return false;} michael@0: if(!vnull(form.TR)){return false;} michael@0: } michael@0: if((status==5||status==6||status==12)&&ism=="YES"){ michael@0: if(!vkdt(form.FRD1)){return false;} michael@0: frdt=form.FRD1.value; michael@0: fryr=frdt.substring(0,4); michael@0: frmn=frdt.substring(5,7); michael@0: frdy=frdt.substring(8,10); michael@0: if(fryr90){ michael@0: if(!confirm(pbc0439+" "+pbc0442)){ michael@0: form.SID.focus(); michael@0: return false; michael@0: }}} else { michael@0: // MK/06-20-01 = If Rating Not equals to 4 blank out the sustained improve Date michael@0: form.SID.value=""; michael@0: } michael@0: if(!vnull(form.OAT)){ return false; } michael@0: if(form.MSRQ.checked==true){ michael@0: if(form.NEW_SIGN_MGR_ID.value.match(/^\s*$/)){ michael@0: alert(pbc0418); michael@0: form.NEW_SIGN_MGR_ID.focus(); michael@0: return false; michael@0: } michael@0: if(vnid(form.NEW_SIGN_MGR_ID)==false){ return false; } michael@0: } else { michael@0: if(!form.NEW_SIGN_MGR_ID.value.match(/^\s*$/)){ michael@0: alert(pbc0422); michael@0: form.NEW_SIGN_MGR_ID.focus(); michael@0: return false; michael@0: } michael@0: if ( (form.TOC.value=="YES") && (form.RSRQ.checked==true) ) { michael@0: alert(pbc0429); michael@0: form.NEW_SEC_LINE_REV_ID.focus(); michael@0: return false; michael@0: } michael@0: } michael@0: if(form.RSRQ.checked==true){ michael@0: if(form.NEW_SEC_LINE_REV_ID.value.match(/^\s*$/)){ michael@0: alert(pbc0418); michael@0: form.NEW_SEC_LINE_REV_ID.focus(); michael@0: return false; michael@0: } michael@0: if(vnid(form.NEW_SEC_LINE_REV_ID)==false){ return false; } michael@0: } else { michael@0: if(!form.NEW_SEC_LINE_REV_ID.value.match(/^\s*$/)) { michael@0: alert(pbc0423); michael@0: form.NEW_SEC_LINE_REV_ID.focus(); michael@0: return false; michael@0: } michael@0: if ( (form.TOC.value=="YES") && (form.MSRQ.checked==true) ) { michael@0: alert(pbc0431); michael@0: form.NEW_SEC_LINE_REV_ID.focus(); michael@0: return false; michael@0: }}} michael@0: if(status!=9){ michael@0: /**for returned objectives **/ michael@0: if(status==3){ michael@0: if(conf(pbc0466) == false) return false; michael@0: } michael@0: michael@0: if(ism=='NO'){ michael@0: if(status==0||status==1||status==3||status==7){ michael@0: if(conf(pbc0456) == false) return false; michael@0: } michael@0: michael@0: if(status==2||status==4||status==8){ michael@0: if(conf(pbc0457) == false) return false; michael@0: } michael@0: } else if(ism=='YES'){ michael@0: if(status==0||status==1||status==3||status==7){ michael@0: if(conf(pbc0458) == false)return false; michael@0: } michael@0: if(status==2||status==4||status==8){ michael@0: if(conf(pbc0459) == false)return false; michael@0: } michael@0: if(status==5||status==6){ michael@0: if(form.ESRQ.checked==false){ michael@0: if(conf(pbc0460) == false)return false; michael@0: } else { michael@0: if(conf(pbc0461) == false)return false; michael@0: }}}} michael@0: if(status==9){ michael@0: if(ism=='NO'){ michael@0: if(conf(pbc0462) == false)return false; michael@0: } else if(ism=='YES'){ michael@0: if(conf(pbc0463) == false)return false; michael@0: } else if(ism=='REVIEWER'){ michael@0: if(conf(pbc0464) == false)return false; michael@0: }} michael@0: sact(action); michael@0: if(status>=9&&status<=11){ snul(); } michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: michael@0: function vsav(form,status,ism,action) { michael@0: if(!vol()){ return false; } michael@0: adt1=form.STD; michael@0: adt2=form.END; michael@0: stdt=adt1.value; michael@0: etdt=adt2.value; michael@0: syr=stdt.substring(0,4); michael@0: start_hy1=stdt.charAt(4); michael@0: smon=stdt.substring(5,7); michael@0: start_hy2=stdt.charAt(7); michael@0: sdy=stdt.substring(8,10); michael@0: eyr=etdt.substring(0,4); michael@0: end_hy1=etdt.charAt(4); michael@0: emon=etdt.substring(5,7); michael@0: end_hy2=etdt.charAt(7); michael@0: edy=etdt.substring(8,10); michael@0: today=new Date(); michael@0: date=today.getDate(); michael@0: month=today.getMonth()+1; michael@0: if(today.getYear()<2000) year=today.getYear()+1900; else year=today.getYear(); michael@0: nextYear=year+1; michael@0: if(!vnull(form.STD)) return false; michael@0: if(!vnull(form.END)) return false; michael@0: if(start_hy1!="/"||start_hy2!="/"){ michael@0: alert(pbc0409); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if(end_hy1!="/"||end_hy2!="/"){ michael@0: alert(pbc0409); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: if(smon>12||sdy>31||smon<=0||sdy<=0||(isNaN(smon)==true)||(isNaN(sdy)==true)||(isNaN(syr)==true)){ michael@0: alert(pbc0409); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if(emon>12||edy>31||emon<=0||edy<=0||(isNaN(emon)==true)||(isNaN(edy)==true)||(isNaN(eyr)==true)){ michael@0: alert(pbc0409); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: 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)){ michael@0: alert(pbc0409); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: 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)){ michael@0: alert(pbc0409); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: if ((eyr==nextYear)&&(syr==year)) { michael@0: if ((emon>1)||(edy >31)) { michael@0: alert(pbc0401); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: } else { michael@0: if ((syryear)) { michael@0: alert(pbc0407); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: if((eyr!=year)&&(eyr!=year-1)){ michael@0: alert(pbc0405); michael@0: form.END.focus(); michael@0: return false; michael@0: } michael@0: if(smon>emon||(smon==emon&&sdy>=edy)){ michael@0: alert(pbc0403); michael@0: form.STD.focus(); michael@0: return false; michael@0: } michael@0: } michael@0: if((status>2&&status<5)||(status>=5&&status<9&&ism=="YES")||(status==12&&ism=="YES")){ michael@0: if(!vdt(form.IRD1)){return false;} michael@0: if(!vdt(form.IRD2)){return false;} michael@0: if(!vdt(form.IRD3)){ return false; } michael@0: ird1=form.IRD1.value; michael@0: ird2=form.IRD2.value; michael@0: ird3=form.IRD3.value; michael@0: if(((ird1==ird2)&&(!ird1.match(/^\s*$/)))||((ird1==ird3)&&(!ird1.match(/^\s*$/)))){ michael@0: alert(pbc0417); michael@0: form.IRD1.focus(); michael@0: return false; michael@0: } michael@0: else if((ird2==ird3)&&(!ird2.match(/^\s*$/))){ michael@0: alert(pbc0417); michael@0: form.IRD2.focus(); michael@0: return false; michael@0: } michael@0: if(!vdt(form.FRD1)){return false;} michael@0: if(ism=="YES"){ michael@0: if(!vdt(form.FRD1)){return false;} michael@0: } michael@0: } michael@0: if((status==5||status==6)&&ism=="YES"){ michael@0: rating=""; michael@0: for(i=0;i=9&&status<=11){ michael@0: snul(); michael@0: } michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: function cft(formfield){ michael@0: nid=formfield.value; michael@0: if(nid.match(/^\s*$/)){ michael@0: alert(pbc0419); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: nl=nid.split('/').length; michael@0: if(nl!=2&&nl!=3){ michael@0: alert(pbc0420); michael@0: formfield.focus(); michael@0: return false; michael@0: } michael@0: return true; michael@0: } michael@0: function dcf(form,pbcId,cnum,sequence,status,atyp,ver){ michael@0: if(!vol()){} michael@0: dflg=confirm("\n\n<====================== " + pbc0468 + " ======================>\n\n" + pbc0469 + "\n\n<==================================================================>"); michael@0: if(dflg==true) { michael@0: form.ATYP.value=atyp; michael@0: form.PID.value=pbcId; michael@0: form.CNUM.value=cnum; michael@0: form.SEQ.value=sequence; michael@0: form.ST.value=status; michael@0: form.VER.value=ver; michael@0: form.submit(); michael@0: } michael@0: michael@0: } michael@0: michael@0: michael@0: michael@0: function lop(){ michael@0: //if(confirm(pbc0447+" "+pbc0451)){ michael@0: sck("timer",""); michael@0: sck("PBC_AUTH4",""); michael@0: sck("IBM004",""); michael@0: this.close(); michael@0: //} michael@0: michael@0: } michael@0: michael@0: function csrlop(){ michael@0: top.location="logoff.jsp"; michael@0: } michael@0: function lof(){ michael@0: csr=gck("IBM004"); michael@0: if(csr==null){ top.location="logoff.jsp"; } michael@0: else if(csr.charAt(0)==3){ window.location="csrlogoff.jsp"; } michael@0: else{ top.location="logoff.jsp"; } michael@0: } michael@0: michael@0: function goToHome(){ michael@0: top.location="pbcmain.jsp"; michael@0: } michael@0: michael@0: function docsr(){ michael@0: sck("IBM004","1^NONE^1"); michael@0: window.location="pbcmain.jsp" michael@0: } michael@0: michael@0: function ccd(){ michael@0: if(confirm(pbc0434)){ michael@0: if(navigator.appName!="Netscape"){ michael@0: if(!window.navigator.onLine){ michael@0: window.close(); michael@0: } michael@0: else { michael@0: window.location='pbcmain.jsp'; michael@0: } michael@0: } michael@0: else { michael@0: window.location='pbcmain.jsp'; michael@0: } michael@0: } michael@0: } michael@0: michael@0: function crt(form,action){ michael@0: if(!vol()){return false;} michael@0: band=form.BAND.options[form.BAND.selectedIndex].value; michael@0: if(band=="00"){ michael@0: alert(pbc0425); michael@0: form.BAND.focus(); michael@0: return false; michael@0: } michael@0: if(!confirm(pbc0450)){return false;} michael@0: sact(action); michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: function cusat(form,action){ michael@0: if(!vol()){return false;} michael@0: sact(action); michael@0: form.action="unsatreq.jsp"; michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: function cfrt(form,ism,action){ michael@0: if(!vol()){return false;} michael@0: sact(action); michael@0: if(ism=="NO"){ michael@0: if(confirm(pbc0449+" "+pbc0432)){ michael@0: snul(); michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: } michael@0: if(ism=="REVIEWER"){ michael@0: if(confirm(pbc0449+" "+pbc0448)){ michael@0: snul(); michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: } michael@0: if(ism=="YES"){ michael@0: if(confirm(pbc0440)){ michael@0: snul(); michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: } michael@0: } michael@0: michael@0: function cces(form){ michael@0: if(form.ESRQ.checked==true){ michael@0: if(!confirm(pbc0435+" "+pbc0443))form.ESRQ.checked=false; michael@0: else {form.ESRQ.checked=true;} michael@0: } michael@0: } michael@0: michael@0: function ccms(form){ michael@0: if(form.MSRQ.checked==true){ michael@0: if(!confirm(pbc0441+" "+pbc0438+" "+pbc0444+" "+pbc0445))form.MSRQ.checked=false; michael@0: else { michael@0: form.MSRQ.checked=true; michael@0: } michael@0: } michael@0: } michael@0: michael@0: function ccrs(form){ michael@0: if(form.RSRQ.checked==true){ michael@0: if(!confirm(pbc0441+" "+pbc0438+" "+pbc0444+" "+pbc0446))form.RSRQ.checked=false; michael@0: else { michael@0: form.RSRQ.checked=true; michael@0: } michael@0: } michael@0: } michael@0: michael@0: function seo(){ michael@0: alert(pbc0412+" "+pbc0413+" "+pbc0414); michael@0: } michael@0: function cows(form,action){ michael@0: if(!vol()){ michael@0: return false; michael@0: } michael@0: if(confirm(pbc0437)){ michael@0: sact(action); michael@0: form.submit(); michael@0: return true; michael@0: } michael@0: } michael@0: michael@0: function srdb(rdb,value) { michael@0: for(i=0; i 0) { michael@0: for(i=0;i < lbx.options.length;i++) { michael@0: if(lbx.options[i].value == value) { michael@0: lbx.options[i].selected = true; michael@0: return true; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: function ourl(URL,WIN_NAME){ michael@0: if(!vol()){ return; } michael@0: var emp_win; michael@0: if(document.layers) { michael@0: child_screenX=window.screenX+50; michael@0: child_width=window.innerWidth-75; michael@0: child_height=window.innerHeight-75; michael@0: emp_win=window.open(URL,WIN_NAME,"screenX="+ child_screenX +",screenY=75,height="+ child_height +",width="+ child_width +",resizable,status,scrollbars"); michael@0: } else{ michael@0: child_width = screen.width-160; michael@0: child_height = screen.height-200; michael@0: emp_win=window.open(URL,WIN_NAME,"height="+ child_height +",width="+ child_width +",resizable=yes,status=no,scrollbars=yes"); michael@0: //emp_win.moveTo(110,0); michael@0: } michael@0: //if (URL.indexOf("pbcsitehelp")==-1) { alert("Opened new window."); } michael@0: emp_win.focus(); michael@0: } michael@0: michael@0: function dnh(form){ michael@0: form.NHS[0].checked=false; michael@0: form.NHS[1].checked=false; michael@0: form.NHB[0].checked=false; michael@0: form.NHB[1].checked=false; michael@0: } michael@0: michael@0: function cnh(form){ michael@0: isnh=""; michael@0: for(i=0; i"); michael@0: var txtValue3 = txtValue2.replace((/</g),"<"); michael@0: return txtValue3; michael@0: } michael@0: michael@0: function encodeText(txtValue) { michael@0: if (txtValue.match(/^\s*$/)) return txtValue; michael@0: var txtValue0 = txtValue.replace((/\r\n/g),'&lf;'); michael@0: var txtValue1 = txtValue0.replace((/"/g),'"'); michael@0: var txtValue2 = txtValue1.replace((/>/g),'>'); michael@0: var txtValue3 = txtValue2.replace((/