    function filled(field) {
		if (field.value == "" || field.value == null) {
			return false;
		} else {
			return true;
		}
	}
	
    function validate_email(field)
    {
        with (field)
        {
            apos=value.indexOf("@")
            dotpos=value.lastIndexOf(".")
            if (apos<1||dotpos-apos<2){
                return false;
            }
            else {
                return true;
            }
        }
    }
    
    function isNumeric(field){
    	var numericExpression = /^[0-9]+$/;
    	if(field.value.match(numericExpression)){
    		return true;
    	}else{
    		return false;
    	}
    	   
    }    
	    
	function healthCheck(form) 
    {
		if (!filled(form.firstname)) {
			alert("Please enter your First Name before continuing.");
			form.firstname.focus();
			return false;
		}

		if (!filled(form.surname)) {
			alert("Please enter your Surname before continuing.");
			form.surname.focus();
			return false;
		}

		if (!filled(form.jobtitle)) {
			alert("Please enter your Jobtitle before continuing.");
			form.jobtitle.focus();
			return false;
		}

		if (!filled(form.company)) {
			alert("Please enter your Company before continuing.");
			form.company.focus();
			return false;
		}
		
		if (!filled(form.telephone)) {
			alert("Please enter your Telephone before continuing.");
			form.telephone.focus();
			return false;
		}

		if (!isNumeric(form.telephone)) {
			alert("Please enter a valid Telephone number. Numbers only!");
			form.telephone.focus();
			return false;
		}
		
		if (!validate_email(form.email))
        {
            alert("Please enter a valid Email. (e.g - person@company.com)");
            form.email.focus();
            return false;
        }

		if (document.healthcheck.businessactivity.selectedIndex < 1) {
			alert("Please select a Business Activity before continuing.");
			return false;
		}

		if (document.healthcheck.source.selectedIndex < 1) {
			alert("Please select a Source before continuing.");
			return false;
		}

		if (document.healthcheck.datavolume.selectedIndex < 1) {
			alert("Please select a Data Volume before continuing.");
			return false;
		}

		if (document.healthcheck.budget.selectedIndex < 1) {
			alert("Please select a Budget before continuing.");
			return false;
		}

		if (document.healthcheck.mailingfrequency.selectedIndex < 1) {
			alert("Please select a Mailing Frequency before continuing.");
			return false;
		}
            
        return true;
    }
    

		
	function contactForm(form) 
    {
    
		if (!filled(form.firstname)) {
			alert("Please enter your First Name before continuing.");
			form.firstname.focus();
			return false;
		}

		if (!filled(form.surname)) {
			alert("Please enter your Surname before continuing.");
			form.surname.focus();
			return false;
		}

		if (!filled(form.jobtitle)) {
			alert("Please enter your Jobtitle before continuing.");
			form.jobtitle.focus();
			return false;
		}

		if (!filled(form.company)) {
			alert("Please enter your Company before continuing.");
			form.company.focus();
			return false;
		}

		if (!filled(form.telephone)) {
			alert("Please enter your Telephone before continuing.");
			form.telephone.focus();
			return false;
		}

		if (!isNumeric(form.telephone)) {
			alert("Please enter a valid Telephone number. Numbers only!");
			form.telephone.focus();
			return false;
		}
		
		if (!validate_email(form.email))
        {
            alert("Please enter a valid Email. (e.g - person@company.com)");
            form.email.focus();
            return false;
        }

		if (document.contact.businessactivity.selectedIndex < 1) {
			alert("Please select a Business Activity before continuing.");
			return false;
		}
		
		if (document.contact.source.selectedIndex < 1) {
			alert("Please select a Source before continuing.");
			return false;
		}

		if (document.contact.typeofenquiry.selectedIndex < 1) {
			alert("Please select a Type of Enquiry before continuing.");
			return false;
		}

		if (document.contact.budget.selectedIndex < 1) {
			alert("Please select a Budget before continuing.");
			return false;
		}
		
		if (document.contact.datavolume.selectedIndex < 1) {
			alert("Please select a Data Volume before continuing.");
			return false;
		}

		if (document.contact.mailingfrequency.selectedIndex < 1) {
			alert("Please select a Mailing Frequency before continuing.");
			return false;
		}
            
        return true;
    }
