//check if all the input in the form are valid
function validateForm(form)
{
	//clear the Error Message
	clearMessages();
//	clearMsg();
//	document.getElementById('success').innerHTML=''; 

        //first_name
        if (form.name.value != "#NA"){
            validateEmpty(form.name.value,"Name");
        }

        if (form.email.value != "#NA"){
            validateEmpty(form.email.value,"Email");
        }

        if (form.cx_mail_box.value != "#NA"){
            validateEmpty(form.cx_mail_box.value,"CX Mail Box");
        }
            

        if (form.cont_no.value != "#NA"){
            validateEmpty(form.cont_no.value,"Contact No"); 
        }

		if(form.email.value != "#NA"){
            validateEmail(form.email.value, "Email");
        }

		if(form.ctry_code.value  != "#NA"){
			validateInteger (form.ctry_code.value, "Country Code of Contact No");
		}
	
		if(form.cont_no.value  != "#NA"){
			validateInteger (form.cont_no.value, "Contact No");				
		}

	//Email alert
        var ret = noError();
	return ret;
}

function clearMessages()
{
	clearMsg();
	hideSuccessMsg();
	
	return true;
}

