
function checkFields2() {
missinginfo = "";
if (document.regis.code_input.value == "") {
missinginfo += "\n - * code";
}
if (document.regis.code_input.value !== document.regis.code_hidden.value) {
missinginfo += "\n - * code error";
}
if (document.regis.title1.value == "Please Select") {
missinginfo += "\n - * Title";
}
if (document.regis.fname.value == "") {
missinginfo += "\n - * First Name";
}
if (document.regis.lname.value == "") {
missinginfo += "\n - * Last Name";
}
if (document.regis.idcard.value == "") {
missinginfo += "\n - * ID Card /  Passport No.";
}
if (document.regis.address.value == "") {
missinginfo += "\n - * Address";
}

if (document.regis.postcode.value == "") {
missinginfo += "\n - * Postcode";
}
if ((document.regis.email.value == "") || 
(document.regis.email.value.indexOf('@') == -1) || 
(document.regis.email.value.indexOf('.') == -1)) {
missinginfo += "\n - * e-mail";
}
if (document.regis.phone.value == "") {
missinginfo += "\n - * Phone Number";
}
if (document.regis.titlep.value == "Please Select") {
missinginfo += "\n - * Title Patient Information";
}
if (document.regis.fnamep.value == "") {
missinginfo += "\n - * First Name Patient Information";
}
if (document.regis.lnamep.value == "") {
missinginfo += "\n - * Last name Patient Information";
}
if (document.regis.nationality.value == "") {
missinginfo += "\n - * Nationality Patient Information";
}
if (document.regis.pay_by.value == "") {
missinginfo += "\n - * Payment By Patient Information";
}
if (document.regis.pay_type.value == "") {
missinginfo += "\n - * Payment Type Patient Information";
}
if (document.regis.AMOUNT.value == "") {
missinginfo += "\n - * AMOUNT Patient Information";
}
if (document.regis.AMOUNT1.value == "") {
missinginfo += "\n - * Enter Numberic or 00";
}
if (document.regis.detail.value == "" && document.regis.pay_type.value == "Deposit"){
missinginfo += "\n - * Deposit for";
}
if (document.regis.detail.value == "" && document.regis.pay_type.value == "Others"){
missinginfo += "\n - * Others for";
}
if ((document.regis.pay_type.value == "Deposit") && (document.regis.month_app.value == "" || document.regis.day_app.value == "" || document.regis.year_app.value == "" )){
missinginfo += "\n - *Specify treatment and appointment date of Deposit ";
}
if ((document.regis.pay_type.value == "Others") && (document.regis.month_app.value == "" || document.regis.day_app.value == "" || document.regis.year_app.value == "" )){
missinginfo += "\n - *Specify treatment and appointment date of Others ";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"Please Enter Data\n" +
missinginfo + "\n_____________________________" +
"\nPlease try again ";
alert(missinginfo);
return false;
}
else return true;
}

