//Navigation********************************************************************************** var baseind="pvbindex.php"; function MCHOIY() { alert("ZZZxxxxxx"); } function mijntaalck(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { var c = parseInt(document.getElementById('xchg').value); document.getElementById('xderr').value=0; var g = 0; var a = ""; var e = parseInt(document.getElementById('xderr').value); var errorcolor = "#ff9966"; var errorcolor01 = "#ffffe6"; if(document.getElementById('vlng_var').value=="REQNEW" || document.getElementById('vlng_var').value==""){document.getElementById('vlng_var').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vlng_var').style.backgroundColor = errorcolor01;}; if(document.getElementById('vPT').value==""){document.getElementById('vPT').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vPT').style.backgroundColor = errorcolor01;}; if(document.getElementById('vUK').value==""){document.getElementById('vUK').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vUK').style.backgroundColor = errorcolor01;}; if(document.getElementById('xchg').value < 1){ g = g + 1; a = a + " * No changes made * "; } if(document.getElementById('xderr').value > 0){ g = g + 1; a = a + " * Errors Found * "; } if(g>0){ alert(a); }else{ // alert(M2); document.mijntaal.M01.value=M1; document.mijntaal.M02.value=M2; document.mijntaal.M03.value=M3; document.mijntaal.M04.value=M4; document.mijntaal.M05.value=M5; document.mijntaal.M06.value=M6; document.mijntaal.M07.value=M7; document.mijntaal.M08.value=M8; document.mijntaal.M09.value=M9; document.mijntaal.M10.value=M10; document.mijntaal.M11.value=M11; document.mijntaal.M12.value=M12; document.mijntaal.M13.value=M13; document.mijntaal.M14.value=M14; document.mijntaal.M15.value=M15; document.mijntaal.M16.value=M16; document.mijntaal.MLNG.value=MLNG; document.mijntaal.MTA.value=MTA; document.mijntaal.MPG.value=MPG; document.mijntaal.MLO.value=MLO; document.mijntaal.action=MTA; document.mijntaal.submit(); // alert("all done"); } } function MCHOIJ(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { document.MCHOI.M01.value=M1; document.MCHOI.M02.value=M2; document.MCHOI.M03.value=M3; document.MCHOI.M04.value=M4; document.MCHOI.M05.value=M5; document.MCHOI.M06.value=M6; document.MCHOI.M07.value=M7; document.MCHOI.M08.value=M8; document.MCHOI.M09.value=M9; document.MCHOI.M10.value=M10; document.MCHOI.M11.value=M11; document.MCHOI.M12.value=M12; document.MCHOI.M13.value=M13; document.MCHOI.M14.value=M14; document.MCHOI.M15.value=M15; document.MCHOI.M16.value=M16; document.MCHOI.MLNG.value=MLNG; document.MCHOI.MTA.value=MTA; document.MCHOI.MPG.value=MPG; document.MCHOI.MLO.value=MLO; document.MCHOI.action=MTA; document.MCHOI.submit() } function MCHOI01() { alert("xxxxxx"); } function submitnewwindow(v1,v2,v3,MTA) { document.nwind.v1.value = v1; document.nwind.v2.value = v2; document.nwind.v3.value = v3; document.nwind.target = "myNewWin"; document.nwind.action=MTA; //window.open("","myNewWin","width=500,height=300,toolbar=0"); //window.open("","myNewWin","width=1000,height=800,toolbar=0"); document.nwind.submit(); } function isValidEmail(email) { var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); } function mijlonerr(x) { var x=x; if(x=="up"){ document.getElementById('USRP').style.background="#ffffff"; document.getElementById('tempwarnpw').style.visibility="hidden"; } if(x=="un"){ document.getElementById('USRN').style.background="#ffffff"; document.getElementById('tempwarnus').style.visibility="hidden"; } } function mijlon() { var errchk=0; var un=document.getElementById('USRN').value; var up=document.getElementById('USRP').value; if(un.length<1){ errchk++; document.getElementById('tempwarnus').style.visibility="visible"; document.getElementById('USRN').style.background="#ff0000"; }else{ document.getElementById('USRN').style.background="#ffffff"; document.getElementById('tempwarnus').style.visibility="hidden"; } if(up.length<1){ errchk++; document.getElementById('tempwarnpw').style.visibility="visible"; document.getElementById('USRP').style.background="#ff0000"; }else{ document.getElementById('USRP').style.background="#ffffff"; document.getElementById('tempwarnpw').style.visibility="hidden"; } if(errchk>0){ //alert('error'); }else{ //alert('all good'); document.XLOG.submit(); } } function mylcase(a) { var x = document.getElementById(a); x.value = x.value.toLowerCase(); } //************** Password checker *************************** function Mijnwwchk(x){ var mijnpwch01=document.getElementById('usr_pw').value; var mijnpwch02=document.getElementById('usr_pw1').value; document.getElementById('xderr').value=0; var xe = document.getElementById('xderr').value; var e = parseInt(document.getElementById('xderr').value); var chg = document.getElementById('xchg').value = 1; var mynchk = 0; var mynchk1 = 0; //======== var rules = [{ exp: /[0-9]/, msg: 'must contain at least one digit' }, { exp: /[a-z]/, msg: 'must contain at least one lowercase' }, { exp: /[A-Z]/, msg: 'must contain at least one uppercase' }, { exp: /[!%&_*$@]/, msg: 'must contain at least one special character !, %, &, _, *' }, { exp: /^.{5,10}$/, msg: 'must be 5-10 characters long' }]; //alert("ya02"); //var input = "Something1!"; var pass = true; for (var i = 0; i < rules.length; i++) { var rule = rules[i]; if (!rule.exp.test(mijnpwch01)) { pass = false; mijnerrmsg = rule.msg; document.getElementById('xderr').value = e + 1; mynchk = mynchk + 1 break; } } if(/\s/.test(document.getElementById('usr_pw').value)){ mynchk = mynchk + 1 mijnerrmsg = "No blank spaces"; } //======== //if(document.getElementById('usr_pw').value.length<(4)|| /\s/.test(document.getElementById('usr_pw').value)){document.getElementById('usr_pw').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_pw').style.backgroundColor = "#ffffff";}; if(document.getElementById('usr_pw').value!=document.getElementById('usr_pw1').value){ mynchk1 = mynchk1 + 1 mijnerrmsg = "Passwords are not the same"; }; if(mynchk > 0 || mynchk1 > 0){ document.getElementById('xderr').value = e + 1; if(mynchk > 0){ document.getElementById('usr_pw').style.backgroundColor = "#ff9966"; document.getElementById('usr_pw1').style.backgroundColor = "#ffffff"; }else{ document.getElementById('usr_pw1').style.backgroundColor = "#ff9966"; document.getElementById('usr_pw').style.backgroundColor = "#ffffff"; } }else{ document.getElementById('xderr').value = 0; document.getElementById('usr_pw').style.backgroundColor = "#ffffff"; document.getElementById('usr_pw1').style.backgroundColor = "#ffffff"; } } //**************ENTITY change check UNIVERSAL*************************** function EntChgChkUN(v1,v2,v3,v4,mytyp,mydid,xmydid,hist){ //alert(v1); var mt = mytyp; var v1 = v1; var x = document.getElementById(mydid); var j = document.getElementById(xmydid); var y = document.getElementById(xmydid).value; var z = document.getElementById(mydid).value; var ch = document.getElementById('xchg'); var chg = document.getElementById('xchg').value; var c = parseInt(document.getElementById('xchg').value); var e = parseInt(document.getElementById('xderr').value); var h = document.getElementById('v_hist'); var histp = hist; var tmpx = parseInt(y); var tmpxplus= tmpx + 1; var cplus = c + 1; if(tmpx > 0){}else{j.value = tmpxplus;document.getElementById('xchg').value = cplus;h.value = h.value + histp;} if(v4=="reclock"){ }else{ EntErrorChkingUN(v1,v2,v3,v4,mydid,mt); } } //**************ENTITY error check UNIVERSAL*************************** function EntErrorChkingUN(v1,v2,v3,v4,mydid,mytyp) { var mt = mytyp; var v1 = v1; var v2 = v2; var v3 = v3; document.getElementById('xderr').value=0; var xe = document.getElementById('xderr').value; var e = parseInt(document.getElementById('xderr').value); var errorcolor = "#ff9966"; var errorcolor01 = "#ffffe6"; if(v1=="colab"){ //alert("colab start"); var c1CV = document.getElementById('vfun_fname').value; var c2CV = document.getElementById('vfun_lname').value; var c3CV = document.getElementById('vfun_pname').value; var c4CV = document.getElementById('vfun_dob').value; var c5CV = document.getElementById('vfun_birthplace').value; var c6CV = document.getElementById('vfun_adress').value; var c7CV = document.getElementById('vfun_postcode').value; var c8CV = document.getElementById('vfun_locality').value; var c9CV = document.getElementById('vfun_council').value; var c10CV = document.getElementById('vfun_district').value; var c11CV = document.getElementById('vfun_tel01').value; var c12CV = document.getElementById('vfun_tel02').value; var c13CV = document.getElementById('vfun_email').value; var c14CV = document.getElementById('vfun_estadocivil').value; var c17CV = document.getElementById('vfun_taxno').value; var c18CV = document.getElementById('vfun_socseno').value; var c19CV = document.getElementById('vfun_healthno').value; var c20CV = document.getElementById('vfun_iban').value; var c21CV = document.getElementById('vfun_bityp').value; var c22CV = document.getElementById('vfun_bi').value; var c23CV = document.getElementById('vfun_bivalidto').value; var c24CV = document.getElementById('vfun_note').value; var c26CV = document.getElementById('vfun_act').value; var c27CV = document.getElementById('vfun_sex').value; var c28CV = document.getElementById('vfun_edu').value; var c29CV = document.getElementById('vfun_kids').value; var cmyndate = document.getElementById('myndchk').value; if ( isValidEmail(document.getElementById('vfun_email').value) ) { document.getElementById('vfun_email').style.backgroundColor = errorcolor01; } else { document.getElementById('xderr').value = e + 1; document.getElementById('vfun_email').style.backgroundColor = errorcolor; } if(c1CV.length < (3)){document.getElementById('vfun_fname').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_fname').style.backgroundColor = errorcolor01;}; if(c2CV.length < (3)){document.getElementById('vfun_lname').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_lname').style.backgroundColor = errorcolor01;}; if(c3CV.length < (2)){document.getElementById('vfun_pname').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_pname').style.backgroundColor = errorcolor01;}; if(c4CV>=cmyndate){document.getElementById('vfun_dob').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_dob').style.backgroundColor = errorcolor01;}; if(c5CV.length < (3)){document.getElementById('vfun_birthplace').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_birthplace').style.backgroundColor = errorcolor01;}; if(c6CV.length < (3)){document.getElementById('vfun_adress').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_adress').style.backgroundColor = errorcolor01;}; if(c7CV.length < (3)){document.getElementById('vfun_postcode').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_postcode').style.backgroundColor = errorcolor01;}; if(c8CV.length < (3)){document.getElementById('vfun_locality').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_locality').style.backgroundColor = errorcolor01;}; if(c9CV.length < (3)){document.getElementById('vfun_council').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_council').style.backgroundColor = errorcolor01;}; if(c10CV.length < (3)){document.getElementById('vfun_district').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_district').style.backgroundColor = errorcolor01;}; if(c11CV.length < (9)||isNaN(c11CV)){document.getElementById('vfun_tel01').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_tel01').style.backgroundColor = errorcolor01;}; //if(){document.getElementById('vfun_tel02').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_tel02').style.backgroundColor = errorcolor01;}; if(c13CV.length<(1)|| /\s/.test(c13CV)){document.getElementById('vfun_email').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_email').style.backgroundColor = errorcolor01;}; if(c14CV=="xxx"){document.getElementById('vfun_estadocivil').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_estadocivil').style.backgroundColor = errorcolor01;}; if(c17CV.length < (9)||isNaN(c17CV)){document.getElementById('vfun_taxno').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_taxno').style.backgroundColor = errorcolor01;}; if(c18CV.length < (9)||isNaN(c18CV)){document.getElementById('vfun_socseno').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_socseno').style.backgroundColor = errorcolor01;}; if(c19CV.length < (9)||isNaN(c19CV)){document.getElementById('vfun_healthno').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_healthno').style.backgroundColor = errorcolor01;}; if(c20CV.length < (12)){document.getElementById('vfun_iban').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_iban').style.backgroundColor = errorcolor01;}; if(c21CV=="xxx"){document.getElementById('vfun_bityp').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_bityp').style.backgroundColor = errorcolor01;}; if(c22CV.length < (3)){document.getElementById('vfun_bi').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_bi').style.backgroundColor = errorcolor01;}; if(c23CV<=cmyndate){document.getElementById('vfun_bivalidto').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_bivalidto').style.backgroundColor = errorcolor01;}; if(c26CV=="xxx"){document.getElementById('vfun_act').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_act').style.backgroundColor = errorcolor01;}; if(c27CV=="xxx"){document.getElementById('vfun_sex').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_sex').style.backgroundColor = errorcolor01;}; if(c28CV=="xxx"){document.getElementById('vfun_edu').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_edu').style.backgroundColor = errorcolor01;}; if(c29CV.length < (1)||isNaN(c29CV)){document.getElementById('vfun_kids').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vfun_kids').style.backgroundColor = errorcolor01;}; } if(v1=="mylic"){ var cmyndate = document.getElementById('myndchk').value; if(document.getElementById('lic_nummer').value.length < (5)){document.getElementById('lic_nummer').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('lic_nummer').style.backgroundColor = errorcolor01;}; if(document.getElementById('lic_date').value<=cmyndate){document.getElementById('lic_date').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('lic_date').style.backgroundColor = errorcolor01;}; } if(v1=="mxusr"){ var cmyndate = document.getElementById('myndchk').value; if ( isValidEmail(document.getElementById('usr_email').value) ) { document.getElementById('usr_email').style.backgroundColor = errorcolor01; } else { document.getElementById('xderr').value = e + 1; document.getElementById('usr_email').style.backgroundColor = errorcolor; } if(document.getElementById('usr_nm').value.length<(4)|| /\s/.test(document.getElementById('usr_nm').value)){document.getElementById('usr_nm').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_nm').style.backgroundColor = errorcolor01;}; if(document.getElementById('usr_name').value.length<(4)){document.getElementById('usr_name').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_name').style.backgroundColor = errorcolor01;}; if(document.getElementById('usr_valid').value<=cmyndate){document.getElementById('usr_valid').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_valid').style.backgroundColor = errorcolor01;}; if(document.getElementById('usr_act').value=="xxx"){document.getElementById('usr_act').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_act').style.backgroundColor = errorcolor01;}; if(mydid=="usr_act"){;genWW();}; } if(v1=="mxusr1"){ var cmyndate = document.getElementById('myndchk').value; var mytstxt = document.getElementById('usr_nm').value; var mytst = mynuna.includes(document.getElementById('usr_nm').value); if ( isValidEmail(document.getElementById('usr_email').value) ) { document.getElementById('usr_email').style.backgroundColor = errorcolor01; } else { document.getElementById('xderr').value = e + 1; document.getElementById('usr_email').style.backgroundColor = errorcolor; } if(v2=="nupt"){ if(document.getElementById('usr_nm').value.length<(4)|| /\s/.test(document.getElementById('usr_nm').value)){document.getElementById('usr_nm').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_nm').style.backgroundColor = errorcolor01;}; }else{ if(document.getElementById('usr_nm').value.length<(4)|| /\s/.test(document.getElementById('usr_nm').value)||mytst==true){document.getElementById('usr_nm').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_nm').style.backgroundColor = errorcolor01;}; } if(document.getElementById('usr_name').value.length<(4)){document.getElementById('usr_name').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_name').style.backgroundColor = errorcolor01;}; if(document.getElementById('usr_valid').value<=cmyndate){document.getElementById('usr_valid').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_valid').style.backgroundColor = errorcolor01;}; if(document.getElementById('usr_act').value=="xxx"){document.getElementById('usr_act').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('usr_act').style.backgroundColor = errorcolor01;}; if(mydid=="usr_act"){;genWW();}; } if(v1=="client"){ //xxxxxxxxxxxx // status if //xxxxxxxxxxxx if(document.getElementById('veen_act').value==1){ document.getElementById('alocked').style.display="none"; document.getElementById('veen_name').readOnly = false; document.getElementById('veen_taxno').readOnly = false; document.getElementById('veen_email').readOnly = false; document.getElementById('veen_address').readOnly = false; document.getElementById('veen_voornaam').readOnly = false; document.getElementById('veen_achternaam').readOnly = false; document.getElementById('veen_postcode').readOnly = false; document.getElementById('veen_locality').readOnly = false; document.getElementById('veen_council').readOnly = false; document.getElementById('veen_district').readOnly = false; document.getElementById('veen_tel01').readOnly = false; document.getElementById('veen_tel02').readOnly = false; //document.getElementById("MyElement").classList.add('MyClass'); document.getElementById('veen_codefin').readOnly = false; document.getElementById('veen_note').readOnly = false; if(document.getElementById('veen_name').value.length <(5)){document.getElementById('veen_name').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_name').style.backgroundColor = errorcolor01;} if(isNaN(document.getElementById('veen_taxno').value)||document.getElementById('veen_taxno').value.length < (9)){document.getElementById('veen_taxno').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_taxno').style.backgroundColor = errorcolor01;} if ( isValidEmail(document.getElementById('veen_email').value) ) { document.getElementById('veen_email').style.backgroundColor = errorcolor01; } else { document.getElementById('xderr').value = e + 1; document.getElementById('veen_email').style.backgroundColor = errorcolor; } if(document.getElementById('veen_address').value.length < (3) || document.getElementById('veen_address').value == " "){document.getElementById('veen_address').style.backgroundColor = errorcolor;}else{document.getElementById('veen_address').style.backgroundColor = errorcolor01;} if(document.getElementById('veen_voornaam').value.length < (3)){document.getElementById('veen_voornaam').style.backgroundColor = errorcolor;xe = e + 1;}else{document.getElementById('veen_voornaam').style.backgroundColor = errorcolor01;}; if(document.getElementById('veen_achternaam').value.length < (3)){document.getElementById('veen_achternaam').style.backgroundColor = errorcolor;xe = e + 1;}else{document.getElementById('veen_achternaam').style.backgroundColor = errorcolor01;}; if(document.getElementById('veen_postcode').value.length < (5)){document.getElementById('veen_postcode').style.backgroundColor = errorcolor;xe = e + 1;}else{document.getElementById('veen_postcode').style.backgroundColor = errorcolor01;}; if(document.getElementById('veen_locality').value.length < (3)){document.getElementById('veen_locality').style.backgroundColor = errorcolor;xe = e + 1;}else{document.getElementById('veen_locality').style.backgroundColor = errorcolor01;}; if(document.getElementById('veen_council').value.length < (3)){document.getElementById('veen_council').style.backgroundColor = errorcolor;xe = e + 1;}else{document.getElementById('veen_council').style.backgroundColor = errorcolor01;}; if(document.getElementById('veen_district').value.length < (3)){document.getElementById('veen_district').style.backgroundColor = errorcolor;xe = e + 1;}else{document.getElementById('veen_district').style.backgroundColor = errorcolor01;}; if(isNaN(document.getElementById('veen_tel01').value)||document.getElementById('veen_tel01').value.length < (9)){document.getElementById('veen_tel01').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_tel01').style.backgroundColor = errorcolor01;} if(isNaN(document.getElementById('veen_tel02').value) || (document.getElementById('veen_tel02').value.length >(0) && document.getElementById('veen_tel02').value.length < (9))){document.getElementById('veen_tel02').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_tel02').style.backgroundColor = errorcolor01;} if(document.getElementById('veen_startdate').value >= document.getElementById('veen_end').value){document.getElementById('veen_end').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_end').style.backgroundColor = errorcolor01;} //xxxxxxxxxxxx // status if //xxxxxxxxxxxx }else{ document.getElementById('alocked').style.display="block"; document.getElementById('veen_name').readOnly = true; document.getElementById('veen_taxno').readOnly = true; document.getElementById('veen_email').readOnly = true; document.getElementById('veen_address').readOnly = true; document.getElementById('veen_voornaam').readOnly = true; document.getElementById('veen_achternaam').readOnly = true; document.getElementById('veen_postcode').readOnly = true; document.getElementById('veen_locality').readOnly = true; document.getElementById('veen_council').readOnly = true; document.getElementById('veen_district').readOnly = true; document.getElementById('veen_tel01').readOnly = true; document.getElementById('veen_tel02').readOnly = true; document.getElementById('veen_codefin').readOnly = true; document.getElementById('veen_note').readOnly = true; } //xxxxxxxxxxxx // status if //xxxxxxxxxxxx } if(v1=="clicont"){ //alert("hallo"); if(document.getElementById('vcli_name').value.length <(3)){document.getElementById('vcli_name').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_name').style.backgroundColor = errorcolor01;} //if(document.getElementById('vcli_name').value.length <(5)){document.getElementById('vcli_name').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_name').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_contact').value.length <(5)){document.getElementById('vcli_contact').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_contact').style.backgroundColor = errorcolor01;} if(isNaN(document.getElementById('vcli_contact_tel').value)||document.getElementById('vcli_contact_tel').value.length <(9)){document.getElementById('vcli_contact_tel').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_contact_tel').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_contstart').value >= document.getElementById('vcli_contend').value){document.getElementById('vcli_contend').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_contend').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_local').value.length <(3)){document.getElementById('vcli_local').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_local').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_lat').value.length <(3)){document.getElementById('vcli_lat').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_lat').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_long').value.length <(3)){document.getElementById('vcli_long').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_long').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_sw_bounds').value.length <(3)){document.getElementById('vcli_sw_bounds').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_sw_bounds').style.backgroundColor = errorcolor01;} if(document.getElementById('vcli_ne_bounds').value.length <(3)){document.getElementById('vcli_ne_bounds').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcli_ne_bounds').style.backgroundColor = errorcolor01;} } if(v1=="functcontract"){ //alert("hallo"); if(document.getElementById('vcol_contracttyp').value == "xxx"){document.getElementById('vcol_contracttyp').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_contracttyp').style.backgroundColor = errorcolor01;} if(document.getElementById('vcol_months').value == "xxx"){document.getElementById('vcol_months').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_months').style.backgroundColor = errorcolor01;} if(document.getElementById('vcol_horario').value.length <(5)){document.getElementById('vcol_horario').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_horario').style.backgroundColor = errorcolor01;} if(document.getElementById('vcol_remote').value == "xxx"){document.getElementById('vcol_remote').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_remote').style.backgroundColor = errorcolor01;} if(document.getElementById('vcol_horassemana').value < (1)||isNaN(document.getElementById('vcol_horassemana').value)){document.getElementById('vcol_horassemana').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_horassemana').style.backgroundColor = errorcolor01;}; if(document.getElementById('vcol_dayspweek').value < (1)||isNaN(document.getElementById('vcol_dayspweek').value)){document.getElementById('vcol_dayspweek').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_dayspweek').style.backgroundColor = errorcolor01;}; //alert(document.getElementById('vcol_months').value); if(document.getElementById('vcol_months').value < (99) && document.getElementById('vcol_reason').value.length <(5)){document.getElementById('vcol_reason').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_reason').style.backgroundColor = errorcolor01;} //if(document.getElementById('vcol_salary').value <= 1){document.getElementById('vcol_salary').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_salary').style.backgroundColor = errorcolor01;} if(document.getElementById('vcol_contractstart').value >= document.getElementById('vcol_contractend').value){document.getElementById('vcol_contractend').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('vcol_contractend').style.backgroundColor = errorcolor01;} } if(v1=="mijnsectores"){ //alert("xxxx"); if(document.getElementById('sect_name').value.length <(3)){document.getElementById('sect_name').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('sect_name').style.backgroundColor = errorcolor01;} if(document.getElementById('sect_coords').value.length <(5)){document.getElementById('sect_coords').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('sect_coords').style.backgroundColor = errorcolor01;} } if(v1=="equipa"){ //if(document.getElementById('equipa_desc').value.length <(4)){document.getElementById('equipa_desc').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('equipa_desc').style.backgroundColor = errorcolor01;} } if(v1=="rota"){ if(document.getElementById('rota_desc').value.length <(4)){document.getElementById('rota_desc').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('rota_desc').style.backgroundColor = errorcolor01;} } if(v1=="plan"){ if(document.getElementById('ws_equip').value==0){document.getElementById('ws_equip').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ws_equip').style.backgroundColor = errorcolor01;} if(document.getElementById('ws_planneddate').value < 1){document.getElementById('ws_planneddate').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ws_planneddate').style.backgroundColor = errorcolor01;} } if(v1=="wsht01"){ if(document.getElementById('herby').value == "N" && v2=="H"){ }else{ if(document.getElementById('ws_tin').value == "0"){document.getElementById('ws_tin').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ws_tin').style.backgroundColor = errorcolor01;} if(document.getElementById('ws_tout').value == "0"){document.getElementById('ws_tout').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ws_tout').style.backgroundColor = errorcolor01;} var hin= document.getElementById('ws_tin').value; var hout= document.getElementById('ws_tout').value; var hpaus= document.getElementById('ws_pausa').value; if(document.getElementById('ws_tin').value == "0" && document.getElementById('ws_tout').value == "0"){}else{document.getElementById('ws_hours').value = (hout-hin)-hpaus;} if(document.getElementById('ws_hours').value <=0){document.getElementById('ws_hours').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ws_hours').style.backgroundColor = errorcolor01;} if(document.getElementById('ws_numworkers').value == "0"){document.getElementById('ws_numworkers').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ws_numworkers').style.backgroundColor = errorcolor01;} if(document.getElementById('ws_rega_ver').checked==false && document.getElementById('ws_rega_prog').checked==false && document.getElementById('ws_rega_pilhas').checked==false && document.getElementById('ws_rega_sprink').checked==false && document.getElementById('ws_relv_corte').checked==false && document.getElementById('ws_relv_monda').checked==false && document.getElementById('ws_relv_are').checked==false && document.getElementById('ws_relv_esar').checked==false && document.getElementById('ws_relv_seed').checked==false && document.getElementById('ws_relv_terra').checked==false && document.getElementById('ws_relv_herbselect').checked==false && document.getElementById('ws_relv_herbtotal').checked==false && document.getElementById('ws_relv_fert').checked==false && document.getElementById('ws_arbust_podlimp').checked==false && document.getElementById('ws_arvore_podlimp').checked==false && document.getElementById('ws_arbustarvore_fert').checked==false && document.getElementById('ws_pavi_rocar').checked==false && document.getElementById('ws_pavi_herb').checked==false && document.getElementById('ws_folhas').checked==false && document.getElementById('ws_frutas').checked==false && document.getElementById('ws_observ').value==""){document.getElementById('xderr').value = e + 1;}else{}; if(v2=="H"){ if(document.getElementById('herb_loc').value.length <(3)){document.getElementById('herb_loc').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_loc').style.backgroundColor = errorcolor01;} if(document.getElementById('herb_farma').value.length <(3)){document.getElementById('herb_farma').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_farma').style.backgroundColor = errorcolor01;} if(document.getElementById('herb_pulv').value.length <(3)){document.getElementById('herb_pulv').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_pulv').style.backgroundColor = errorcolor01;} if(document.getElementById('herb_nota').value.length <(3)){document.getElementById('herb_nota').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_nota').style.backgroundColor = errorcolor01;} if(document.getElementById('herb_intensidade').value==0){document.getElementById('herb_intensidade').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_intensidade').style.backgroundColor = errorcolor01;} if(document.getElementById('herb_praga').value.length <(3)){document.getElementById('herb_praga').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_praga').style.backgroundColor = errorcolor01;} if(document.getElementById('herb_sol').value.length <(3)){document.getElementById('herb_sol').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('herb_sol').style.backgroundColor = errorcolor01;} } } } if(v1=="xass"){ if(document.getElementById('ass_idcode').value.length <(3)){document.getElementById('ass_idcode').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ass_idcode').style.backgroundColor = errorcolor01;} if(document.getElementById('ass_desc').value.length <(3)){document.getElementById('ass_desc').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ass_desc').style.backgroundColor = errorcolor01;} if(document.getElementById('ass_make').value.length <(3)){document.getElementById('ass_make').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ass_make').style.backgroundColor = errorcolor01;} if(document.getElementById('ass_pass').value.length <(1)){document.getElementById('ass_pass').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('ass_pass').style.backgroundColor = errorcolor01;}; } if(v1=="xfuel"){ if(document.getElementById('assf_km').value<100){document.getElementById('assf_km').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assf_km').style.backgroundColor = errorcolor01;} if(document.getElementById('assf_litres').value.length <(3)){document.getElementById('assf_litres100').style.backgroundColor = errorcolor;document.getElementById('assf_litres01').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assf_litres100').style.backgroundColor = errorcolor01;document.getElementById('assf_litres01').style.backgroundColor = errorcolor01;} if(document.getElementById('assf_cost').value.length <(3)){document.getElementById('assf_cost100').style.backgroundColor = errorcolor;document.getElementById('assf_cost01').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assf_cost100').style.backgroundColor = errorcolor01;document.getElementById('assf_cost01').style.backgroundColor = errorcolor01;} } if(v1=="xfaultnew"){ if(document.getElementById('assa_typ').value.length <(3)){document.getElementById('assa_typ').style.backgroundColor = errorcolor;document.getElementById('assa_typ').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assa_typ').style.backgroundColor = errorcolor01;document.getElementById('assa_typ').style.backgroundColor = errorcolor01;} if(document.getElementById('assa_desc').value.length <(3)){document.getElementById('assa_desc').style.backgroundColor = errorcolor;document.getElementById('assa_desc').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assa_desc').style.backgroundColor = errorcolor01;document.getElementById('assa_desc').style.backgroundColor = errorcolor01;} } if(v1=="xfaultedt"){ if(document.getElementById('assa_typ').value.length <(3)){document.getElementById('assa_typ').style.backgroundColor = errorcolor;document.getElementById('assa_typ').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assa_typ').style.backgroundColor = errorcolor01;document.getElementById('assa_typ').style.backgroundColor = errorcolor01;} if(document.getElementById('assa_desc').value.length <(3)){document.getElementById('assa_desc').style.backgroundColor = errorcolor;document.getElementById('assa_desc').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assa_desc').style.backgroundColor = errorcolor01;document.getElementById('assa_desc').style.backgroundColor = errorcolor01;} if(document.getElementById('assa_resol').value.length <(3)){document.getElementById('assa_resol').style.backgroundColor = errorcolor;document.getElementById('assa_resol').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('assa_resol').style.backgroundColor = errorcolor01;document.getElementById('assa_resol').style.backgroundColor = errorcolor01;} } if(v1=="msgb"){ if(document.getElementById('msgb_header').value.length <(3)){document.getElementById('msgb_header').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('msgb_header').style.backgroundColor = errorcolor01;} if(document.getElementById('msgb_content').value.length <(5)){document.getElementById('msgb_content').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('msgb_content').style.backgroundColor = errorcolor01;} } } function MyResetUN(v1,v2,v3,v4,mydid,mytyp) { var mt = mytyp; var v01 = v1; var v02 = v2; var v03 = v3; var v04 = v4; EntErrorChkingUN(v1,v2,v3,v4,mydid,mt); } //**************Record update Universal*************************** function EntUdptUN(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { var c = parseInt(document.getElementById('xchg').value); var x = parseInt(document.getElementById('xderr').value); var g = 0; var a = ""; //alert(c); if(M4=="xmtestres"){ if(document.getElementById('assa_act').value == 1){ var qst = document.getElementById('quest').value; if (confirm(qst)) { //alert("yes"); }else{ //alert("no"); g = g + 1; a = a + " * No changes made * "; document.getElementById('assa_act').value = 0; } } } if(document.getElementById('xchg').value < 1){ g = g + 1; a = a + " * No changes made * "; } if(document.getElementById('xderr').value > 0){ g = g + 1; a = a + " * Errors Found * "; } if(g>0){ alert(a); }else{ var h1 =document.getElementById('v_hist1').value; var h2 =document.getElementById('v_hist').value; document.getElementById('rec_hist').value = h1 + ">>" + h2 ; document.recupdt.M01.value=M1; document.recupdt.M02.value=M2; document.recupdt.M03.value=M3; document.recupdt.M04.value=M4; document.recupdt.M05.value=M5; document.recupdt.M06.value=M6; document.recupdt.M07.value=M7; document.recupdt.M08.value=M8; document.recupdt.M09.value=M9; document.recupdt.M10.value=M10; document.recupdt.M11.value=M11; document.recupdt.M12.value=M12; document.recupdt.M13.value=M13; document.recupdt.M14.value=M14; document.recupdt.M15.value=M15; document.recupdt.M16.value=M16; document.recupdt.MLNG.value=MLNG; document.recupdt.MTA.value=MTA; document.recupdt.MPG.value=MPG; document.recupdt.MLO.value=MLO; document.recupdt.action=MTA; document.recupdt.submit() } } //**************Record update Universal*************************** //**************Record delete Universal*************************** function EntDelxUN(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { var qst = "Tem certeza de que deseja excluir este registro. Isso não pode ser recuperado!"; if (confirm(qst)) { //alert("yes"); document.recupdt.M01.value=M1; document.recupdt.M02.value=M2; document.recupdt.M03.value=M3; document.recupdt.M04.value=M4; document.recupdt.M05.value=M5; document.recupdt.M06.value=M6; document.recupdt.M07.value=M7; document.recupdt.M08.value=M8; document.recupdt.M09.value=M9; document.recupdt.M10.value=M10; document.recupdt.M11.value=M11; document.recupdt.M12.value=M12; document.recupdt.M13.value=M13; document.recupdt.M14.value=M14; document.recupdt.M15.value=M15; document.recupdt.M16.value=M16; document.recupdt.MLNG.value=MLNG; document.recupdt.MTA.value=MTA; document.recupdt.MPG.value=MPG; document.recupdt.MLO.value=MLO; document.recupdt.action=MTA; document.recupdt.submit() }else{ alert(" * No changes made * "); } } //**************Record delete Universal*************************** function genWW() { var chars = "0123456789abcdefghijklmnopqrstuvwxyz_!@#%^*ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var wwLength = 12; var mww = ""; for (var i = 0; i <= wwLength; i++) { var randomNumber = Math.floor(Math.random() * chars.length); mww += chars.substring(randomNumber, randomNumber +1); } document.getElementById("vmwwn").value = mww; } function Usrgrpupdate(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { document.recupdt.M01.value=M1; document.recupdt.M02.value=M2; document.recupdt.M03.value=M3; document.recupdt.M04.value=M4; document.recupdt.M05.value=M5; document.recupdt.M06.value=M6; document.recupdt.M07.value=M7; document.recupdt.M08.value=M8; document.recupdt.M09.value=M9; document.recupdt.M10.value=M10; document.recupdt.M11.value=M11; document.recupdt.M12.value=M12; document.recupdt.M13.value=M13; document.recupdt.M14.value=M14; document.recupdt.M15.value=M15; document.recupdt.M16.value=M16; document.recupdt.MLNG.value=MLNG; document.recupdt.MTA.value=MTA; document.recupdt.MPG.value=MPG; document.recupdt.MLO.value=MLO; document.recupdt.action=MTA; document.recupdt.submit() } function linkingUn(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { var select = document.getElementById(M4); var y = select.options[select.selectedIndex].value; var x = document.getElementById(M1).value; document.recupdt.M01.value=x; document.recupdt.M02.value=M2; document.recupdt.M03.value=M3; document.recupdt.M04.value=y; document.recupdt.M05.value=M5; document.recupdt.M06.value=M6; document.recupdt.M07.value=M7; document.recupdt.M08.value=M8; document.recupdt.M09.value=M9; document.recupdt.M10.value=M10; document.recupdt.M11.value=M11; document.recupdt.M12.value=M12; document.recupdt.M13.value=M13; document.recupdt.M14.value=M14; document.recupdt.M15.value=M15; document.recupdt.M16.value=M16; document.recupdt.MLNG.value=MLNG; document.recupdt.MTA.value=MTA; document.recupdt.MPG.value=MPG; document.recupdt.MLO.value=MLO; document.recupdt.action=MTA; document.recupdt.submit() } function EntResetUN(v1,v2,v3,v4,mydid,mt) { document.getElementById('recupdt').reset(); EntErrorChkingUN(v1,v2,v3,v4,mydid,mt); } function downloadToCSV(csv, filename) { var csvFile; var downloadLink; // CSV file csvFile = new Blob(["\uFEFF"+csv], {type: "text/csv;charset=utf-8"}); // Download link downloadLink = document.createElement("a"); // File name downloadLink.download = filename; // Create a link to the file downloadLink.href = window.URL.createObjectURL(csvFile); // Hide download link downloadLink.style.display = "none"; // Add the link to DOM document.body.appendChild(downloadLink); // Click download link downloadLink.click(); } function exportTbToCSVformat(filename) { var csv = []; var rows = document.querySelectorAll("table tr"); for (var i = 0; i < rows.length; i++) { var row = [], cols = rows[i].querySelectorAll("td, th"); //csv.push("'"); for (var j = 0; j < cols.length; j++) // row.push("'"); // row.push(cols[j].innerText); row.push('"' + cols[j].innerText + '"'); // Anglo format csv.push(row.join(",")); csv.push(row.join(";")); } // Download CSV file downloadToCSV(csv.join("\n"), filename); } function mijnnumformat(mijnnum) { var formatter = new Intl.NumberFormat('pt-BR'); var mijnnumPT = formatter.format(mijnnum); document.write(mijnnumPT); } //**************ENTITY change check*************************** function EntChgChk(mytyp,mydid,xmydid,hist){ var mt = mytyp; alert("OBSOLETE change chk"); //const isValidEmail = vfun_email.checkValidity(); var x = document.getElementById(mydid); var j = document.getElementById(xmydid); var y = document.getElementById(xmydid).value; var z = document.getElementById(mydid).value; var ch = document.getElementById('xchg'); var chg = document.getElementById('xchg').value; var c = parseInt(document.getElementById('xchg').value); var e = parseInt(document.getElementById('xderr').value); var h = document.getElementById('v_hist'); var histp = hist; var tmpx = parseInt(y); var tmpxplus= tmpx + 1; var cplus = c + 1; if(tmpx > 0){}else{j.value = tmpxplus;ch.value = cplus;h.value = h.value + histp;} EntErrorChking(mt); } //**************ENTITY error check*************************** function EntErrorChking(mytyp) { alert("OBSOLETE error check"); var mt = mytyp; //alert(mt); //const isValidEmail = veen_email.checkValidity(); document.getElementById('xderr').value=0; var e = parseInt(document.getElementById('xderr').value); if(mt=="EMP"){ if((document.getElementById('veen_socseno').value != "" && isNaN(document.getElementById('veen_socseno').value))||document.getElementById('veen_socseno').value != "" && document.getElementById('veen_socseno').value.length < (11)){document.getElementById('veen_socseno').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_socseno').style.backgroundColor = errorcolor01;} if((document.getElementById('veen_healthno').value != "" && isNaN(document.getElementById('veen_healthno').value))||document.getElementById('veen_healthno').value != "" && document.getElementById('veen_healthno').value.length < (9)){document.getElementById('veen_healthno').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_healthno').style.backgroundColor = errorcolor01;} if((document.getElementById('veen_iban').value != "" && document.getElementById('veen_iban').value.length < (25))||(/\s/.test(document.getElementById('veen_iban').value))){document.getElementById('veen_iban').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_iban').style.backgroundColor = errorcolor01;} if(document.getElementById('veen_dob').value.length<(1)){document.getElementById('veen_dob').style.backgroundColor = errorcolor;document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_dob').style.backgroundColor = errorcolor01;} } if(document.getElementById('veen_name').value.length <(2)){document.getElementById('veen_name').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_name').style.backgroundColor = errorcolor01;} if(isNaN(document.getElementById('veen_taxno').value)||document.getElementById('veen_taxno').value.length < (9)){document.getElementById('veen_taxno').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_taxno').style.backgroundColor = errorcolor01;} if(document.getElementById('veen_email').value.length<(1)|| /\s/.test(document.getElementById('veen_email').value)){document.getElementById('veen_email').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_email').style.backgroundColor = errorcolor01;} //if ( isValidEmail ) { if ( isValidEmail(document.getElementById('veen_email').value) ) { document.getElementById('veen_email').style.backgroundColor = errorcolor01; } else { document.getElementById('xderr').value = e + 1; document.getElementById('veen_email').style.backgroundColor = "#ff9966"; } if(document.getElementById('veen_address').value.length < (3) || document.getElementById('veen_address').value == " "){document.getElementById('veen_address').style.backgroundColor = "#ff9966";}else{document.getElementById('veen_address').style.backgroundColor = errorcolor01;} if(isNaN(document.getElementById('veen_tel01').value)||document.getElementById('veen_tel01').value.length < (9)){document.getElementById('veen_tel01').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_tel01').style.backgroundColor = errorcolor01;} if(document.getElementById('veen_tel02').value != "" && document.getElementById('veen_tel01').value.length < (9)){document.getElementById('veen_tel02').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_tel02').style.backgroundColor = "#ffffff";} if(document.getElementById('veen_startdate').value >= document.getElementById('veen_end').value){document.getElementById('veen_end').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_end').style.backgroundColor = "#ffffff";} } //**************ENTITY reset*************************** //function Mclientuptreset(mytyp) { function EntReset(mytyp) { alert("OBSOLETE reset"); var mt = mytyp; EntErrorChking(mt); } //**************ENTITY update*************************** function EntUdpt(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { alert("OBSOLETE update"); var c = parseInt(document.getElementById('xchg').value); var x = parseInt(document.getElementById('xderr').value); var g = 0; var a = ""; if(c < 1){ g = g + 1; a = a + " * No changes made * "; } if(x > 0){ g = g + 1; a = a + " * Errors Found * "; } if(g>0){ alert(a); }else{ var h1 =document.getElementById('veen_hist1').value; var h2 =document.getElementById('veen_hist').value; document.getElementById('veen_hist').value = h1 + ">>" + h2 ; document.contractupdt.M01.value=M1; document.contractupdt.M02.value=M2; document.contractupdt.M03.value=M3; document.contractupdt.M04.value=M4; document.contractupdt.M05.value=M5; document.contractupdt.M06.value=M6; document.contractupdt.M07.value=M7; document.contractupdt.M08.value=M8; document.contractupdt.M09.value=M9; document.contractupdt.M10.value=M10; document.contractupdt.M11.value=M11; document.contractupdt.M12.value=M12; document.contractupdt.M13.value=M13; document.contractupdt.M14.value=M14; document.contractupdt.M15.value=M15; document.contractupdt.M16.value=M16; document.contractupdt.MLNG.value=MLNG; document.contractupdt.MTA.value=MTA; document.contractupdt.MPG.value=MPG; document.contractupdt.MLO.value=MLO; document.contractupdt.action=MTA; // document.contractupdt.submit() } } function mijddcont(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO){ var ddid=M1; var dderr01=document.getElementById('tmperr01').value; var ddid1=document.getElementById(M1); var ddid2=ddid1.options[ddid1.selectedIndex].value; //entities if(ddid=="mijnent"){ if(ddid2=="xxx"){ alert(dderr01); }else{ if(ddid2=="TCL"){ // alert("new client"); MCHOIJ('','','','TCL','','','','','','','','','','','','CLI',MLNG,baseind,'nclientedt',''); }else{ if(ddid2=="TCF"){ MCHOIJ('','','','TCF','','','','','','','','','','','','CLI',MLNG,baseind,'nclientedt',''); }else{ if(ddid2=="TFO"){ MCHOIJ('','','','TFO','','','','','','','','','','','','CLI',MLNG,baseind,'nclientedt',''); }else{ MCHOIJ(ddid2,'pupt','','','','','','','','','','','','','','CLI',MLNG,baseind,'nclientlk',''); } } } } } //entities //employees if(ddid=="mijnemp"){ //alert(ddid); if(ddid2=="TEM"){ // alert("new client"); MCHOIJ('','','','TEM','','','','','','','','','','','','EMP',MLNG,baseind,'nfunctedt',''); }else{ MCHOIJ(ddid2,'pupt','','','','','','','','','','','','','','EMP',MLNG,baseind,'nfunctlk',''); } } //employees if(ddid=="ass_id"){ //alert(M2); MCHOIJ(ddid2,M2,'','','','','','','','','','','','','','','','',MPG,''); } if(ddid=="ass_idf"){ //alert(M2); MCHOIJ(ddid2,M2,'','','','','','','','','','','','','','','','','nfueledt',''); } if(ddid=="mijcontractcli"){ //alert(M2); MCHOIJ(ddid2,ddid2,'','','','','','','','','','','','','','CLI',MLNG,baseind,'ncontractclientlk',''); } if(ddid=="mijnsectores"){ //alert(M2); MCHOIJ(ddid2,M2,'',M4,'','','','','','','','','','',M15,M16,MLNG,baseind,'nclicontractsectores',''); } } //**************Client change check*************************** function Mclientupterrchk(mydid,xmydid,hist){ alert("OBSOLETE update Mclientupterrchk"); var x = document.getElementById(mydid); var j = document.getElementById(xmydid); var y = document.getElementById(xmydid).value; var z = document.getElementById(mydid).value; var ch = document.getElementById('xchg'); var chg = document.getElementById('xchg').value; var c = parseInt(document.getElementById('xchg').value); var e = parseInt(document.getElementById('xderr').value); var h = document.getElementById('veen_hist'); var histp = hist; const isValidEmail = veen_email.checkValidity(); var tmpx = parseInt(y); var tmpxplus= tmpx + 1; var cplus = c + 1; if(tmpx > 0){}else{j.value = tmpxplus;ch.value = cplus;h.value = h.value + histp;} Mclientuptchking(); } //**************Client error check*************************** function Mclientuptchking() { alert("OBSOLETE update Mclientuptchking"); const isValidEmail = veen_email.checkValidity(); document.getElementById('xderr').value=0; var e = parseInt(document.getElementById('xderr').value); if(document.getElementById('veen_name').value.length <(2)){document.getElementById('veen_name').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_name').style.backgroundColor = "#ffffff";} if(isNaN(document.getElementById('veen_taxno').value)||document.getElementById('veen_taxno').value.length < (9)){document.getElementById('veen_taxno').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_taxno').style.backgroundColor = "#ffffff";} if((document.getElementById('veen_socseno').value != "" && isNaN(document.getElementById('veen_socseno').value))||document.getElementById('veen_socseno').value != "" && document.getElementById('veen_socseno').value.length < (11)){document.getElementById('veen_socseno').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_socseno').style.backgroundColor = "#ffffff";} if((document.getElementById('veen_healthno').value != "" && isNaN(document.getElementById('veen_healthno').value))||document.getElementById('veen_healthno').value != "" && document.getElementById('veen_healthno').value.length < (9)){document.getElementById('veen_healthno').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_healthno').style.backgroundColor = "#ffffff";} if((document.getElementById('veen_iban').value != "" && document.getElementById('veen_iban').value.length < (25))||(/\s/.test(document.getElementById('veen_iban').value))){document.getElementById('veen_iban').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_iban').style.backgroundColor = "#ffffff";} if(document.getElementById('veen_dob').value.length<(1)){document.getElementById('veen_dob').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_dob').style.backgroundColor = "#ffffff";} if(document.getElementById('veen_email').value.length<(1)|| /\s/.test(document.getElementById('veen_email').value)){document.getElementById('veen_email').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_email').style.backgroundColor = "#ffffff";} if ( isValidEmail ) { document.getElementById('veen_email').style.backgroundColor = "#ffffff"; } else { document.getElementById('xderr').value = e + 1; document.getElementById('veen_email').style.backgroundColor = "#ff9966"; } if(document.getElementById('veen_address').value.length < (3) || document.getElementById('veen_address').value == " "){document.getElementById('veen_address').style.backgroundColor = "#ff9966";}else{document.getElementById('veen_address').style.backgroundColor = "#ffffff";} if(isNaN(document.getElementById('veen_tel01').value)||document.getElementById('veen_tel01').value.length < (9)){document.getElementById('veen_tel01').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_tel01').style.backgroundColor = "#ffffff";} if(document.getElementById('veen_tel02').value != "" && document.getElementById('veen_tel01').value.length < (9)){document.getElementById('veen_tel02').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_tel02').style.backgroundColor = "#ffffff";} if(document.getElementById('veen_startdate').value >= document.getElementById('veen_end').value){document.getElementById('veen_end').style.backgroundColor = "#ff9966";document.getElementById('xderr').value = e + 1;}else{document.getElementById('veen_end').style.backgroundColor = "#ffffff";} } //**************Client reset*************************** function Mclientuptreset() { alert("OBSOLETE update Mclientuptreset"); Mclientuptchking(); } //**************Client update*************************** function Mclientupt(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { var c = parseInt(document.getElementById('xchg').value); var x = parseInt(document.getElementById('xderr').value); var g = 0; var a = ""; if(c < 1){ g = g + 1; a = a + " * No changes made * "; } if(x > 0){ g = g + 1; a = a + " * Errors Found * "; } if(g>0){ alert(a); }else{ var h1 =document.getElementById('veen_hist1').value; var h2 =document.getElementById('veen_hist').value; document.getElementById('veen_hist').value = h1 + ">>" + h2 ; document.contractupdt.M01.value=M1; document.contractupdt.M02.value=M2; document.contractupdt.M03.value=M3; document.contractupdt.M04.value=M4; document.contractupdt.M05.value=M5; document.contractupdt.M06.value=M6; document.contractupdt.M07.value=M7; document.contractupdt.M08.value=M8; document.contractupdt.M09.value=M9; document.contractupdt.M10.value=M10; document.contractupdt.M11.value=M11; document.contractupdt.M12.value=M12; document.contractupdt.M13.value=M13; document.contractupdt.M14.value=M14; document.contractupdt.M15.value=M15; document.contractupdt.M16.value=M16; document.contractupdt.MLNG.value=MLNG; document.contractupdt.MTA.value=MTA; document.contractupdt.MPG.value=MPG; document.contractupdt.MLO.value=MLO; document.contractupdt.action=MTA; document.contractupdt.submit() } } //**************Client Contract change check*************************** function Mempcontupterr(mydid,xmydid,hist){ alert("OBSOLETE Mempcontupterr"); var x = document.getElementById(mydid); var j = document.getElementById(xmydid); var y = document.getElementById(xmydid).value; var z = document.getElementById(mydid).value; var ch = document.getElementById('xchg'); var chg = document.getElementById('xchg').value; var c = parseInt(document.getElementById('xchg').value); var e = parseInt(document.getElementById('xderr').value); var h = document.getElementById('vcol_hist'); var histp = hist; //const isValidEmail = veen_email.checkValidity(); var tmpx = parseInt(y); var tmpxplus= tmpx + 1; var cplus = c + 1; if(tmpx > 0){}else{j.value = tmpxplus;ch.value = cplus;h.value = h.value + histp;} Mempcontuptchking(); } //**************Client Contract error check*************************** function Mempcontuptchking() { alert("OBSOLETE Mempcontuptchking"); } //**************Client Contract update*************************** function Mempcontupt(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,MLNG,MTA,MPG,MLO) { alert("OBSOLETE Mempcontup"); var c = parseInt(document.getElementById('xchg').value); var x = parseInt(document.getElementById('xderr').value); var g = 0; var a = ""; if(c < 1){ g = g + 1; a = a + " * No changes made * "; } if(x > 0){ g = g + 1; a = a + " * Errors Found * "; } if(g>0){ alert(a); }else{ var h1 =document.getElementById('vcol_hist1').value; var h2 =document.getElementById('vcol_hist').value; document.getElementById('vcol_hist').value = h1 + ">>" + h2 ; // alert("good to go"); document.empcontractupdt.M01.value=M1; document.empcontractupdt.M02.value=M2; document.empcontractupdt.M03.value=M3; document.empcontractupdt.M04.value=M4; document.empcontractupdt.M05.value=M5; document.empcontractupdt.M06.value=M6; document.empcontractupdt.M07.value=M7; document.empcontractupdt.M08.value=M8; document.empcontractupdt.M09.value=M9; document.empcontractupdt.M10.value=M10; document.empcontractupdt.M11.value=M11; document.empcontractupdt.M12.value=M12; document.empcontractupdt.M13.value=M13; document.empcontractupdt.M14.value=M14; document.empcontractupdt.M15.value=M15; document.empcontractupdt.M16.value=M16; document.empcontractupdt.MLNG.value=MLNG; document.empcontractupdt.MTA.value=MTA; document.empcontractupdt.MPG.value=MPG; document.empcontractupdt.MLO.value=MLO; document.empcontractupdt.action=MTA; document.empcontractupdt.submit() } } function swapStyleSheet(sheet) { document.getElementById("pagestyle").setAttribute("href", sheet); } function menuicon() { var x = document.getElementById("flexmenucontainertext"); if (x.style.width >"0px") { x.style.overflow ="hidden"; x.style.width ="0px"; x.style.height ="0px"; } else { x.style.overflow ="visible"; x.style.overflow ="auto"; x.style.width ="80%"; x.style.height ="auto"; } } function menulngtog(mydiv) { var x = document.getElementById(mydiv); if (x.style.width >"0px") { x.style.overflow ="hidden"; x.style.width ="0px"; x.style.height ="0px"; } else { x.style.overflow ="visible"; x.style.overflow ="auto"; x.style.width ="100%"; x.style.height ="auto"; } } function bloking(mydiv) { var x = document.getElementById(mydiv); if (x.style.display === "inline") { x.style.display ="none"; } else { x.style.display ="inline"; } } function divtoggle(mydiv) { var x = document.getElementById(mydiv); if (x.style.overflow ==="hidden") { x.style.overflow ="auto"; x.style.width ="80%"; x.style.height ="auto"; } else { x.style.overflow ="hidden"; x.style.width ="0px"; x.style.height ="0px"; } } function mijnphotoshow(mydiv) { var x = document.getElementById(mydiv); x.style.display ="inline"; } function mijnphotohide(mydiv) { var x = document.getElementById(mydiv); x.style.display ="none"; } function noletters(x) { let str = document.getElementById(x).value; let res = str.replace(/[^\d,]/g, []); // let res1 = res.replace(chr(0), 0); //let res1 = res.replace(Null, 0); // console.log(res) document.getElementById(x).value = res; } function mijcurency(x,y,z) { let n10 = parseInt(document.getElementById(x).value); let n01 = parseInt(document.getElementById(y).value); if(isNaN(n10)){n10=0;}; if(isNaN(n01)){n01=0;}; //alert(n10); //if(n10<1){n10=0;}; //if(n01==""){n01=0;}; let mijtot = (n10 * 100) + n01; //alert (n10); document.getElementById(z).value = mijtot; } //CCCCCCCCCCCCCCCCC Collapsible CCCCCCCCCCCCCCCCCCCCCCC function colap(x,y,z,v1) { if(y=="opn"){ document.getElementById(x).style.display = "Block"; document.getElementById(z).style.display = "None"; } if(y=="cls"){ document.getElementById(x).style.display = "Block"; document.getElementById(z).style.display = "None"; } //alert("Open "+x +" - "+ y+" - close "+z); if(v1=="cancelherb"){document.getElementById('herby').value = "N";}else{document.getElementById('herby').value = "Y";}; }