function ValidateForm1(){ var flag = true; var message = 'Please fill in all mandatory fields !'; var showcheck = -1;var showcheck = http.responseText; if (showcheck=='0') { message = 'Incorrect verification code!'; flag = false; } if (document.ContactForm1.field1.value.length==0){ flag = false; } if (document.ContactForm1.field2.value.length==0){ flag = false; } if (document.ContactForm1.field4.value.length==0){ flag = false; } if (document.ContactForm1.field5.value.length==0){ flag = false; } if (document.ContactForm1.field6.value.length==0){ flag = false; } if (document.ContactForm1.field7.value.length==0){ flag = false; } if (document.ContactForm1.field8.value.length==0){ flag = false; } if (document.ContactForm1.field9.value.length==0){ flag = false; } if (document.ContactForm1.field12.value.length==0){ flag = false; } if (document.ContactForm1.field13.value.length==0){ flag = false; } if (document.ContactForm1.field14.value.length==0){ flag = false; } if (document.ContactForm1.field15.value.length==0){ flag = false; } if (document.ContactForm1.field16.value.length==0){ flag = false; } if (document.ContactForm1.field17.value.length==0){ flag = false; } if (document.ContactForm1.field18.value.length==0){ flag = false; } if (document.ContactForm1.field19.value.length==0){ flag = false; } if (document.ContactForm1.field21.value.length==0){ flag = false; } if (document.ContactForm1.field22.value.length==0){ flag = false; } if (document.ContactForm1.field23.value.length==0){ flag = false; } if (document.ContactForm1.field24.value.length==0){ flag = false; } if (document.ContactForm1.field25.value.length==0){ flag = false; } if (document.ContactForm1.field28.value.length==0){ flag = false; } if (document.ContactForm1.field29.value.length==0){ flag = false; } var radioBtnChecked = false; for (j=0; j