    // email validation
    //check for email and email's syntax
    function chk_email(elm) {
        var str = elm.value;
        var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
        if(filter.test(str)) {
            return false;
        } else {
            return true;
        }
    }
    //check for null and for empty field
    function chk_field(elm) {
        if(elm.value != "")
            return false;
        else
            return true;
    }
	
    function sendRegistration() {
        theForm = document.getElementById('ccbdc_registration');
        // send the survey
        bErr = false;
        if(chk_email(theForm.email) != false) {
            bErr = true;
            alert("Please enter a valid email address");
            theForm.email.focus();
        }
        if (bErr == false && chk_field(theForm.contact) != false) {
            bErr = true;
            alert("Please enter your name");
            theForm.contact.focus();
        }
        if (bErr == false && chk_field(theForm.phone) != false) {
            bErr = true;
            alert("Please enter your phone number");
            theForm.phone.focus();
        }
        if (bErr == false) {
            theForm.action = "register.asp";
            theForm.submit();
        } else {
            // create a window as a replacement for the ALERT
            //alert("Please enter a valid email address.");
            //theForm.email.focus();
        }
    }
	
	function sendEmail_ccbdc() {
        theForm = document.getElementById('ccbdc_email');
        // send the survey
        bErr = false;
        if(chk_email(theForm.email) != false) {
            bErr = true;
            alert("Please enter a valid email address");
            theForm.email.focus();
        }
        if (bErr == false && chk_field(theForm.contact) != false) {
            bErr = true;
            alert("Please enter your name");
            theForm.contact.focus();
        }
        if (bErr == false && chk_field(theForm.phone) != false) {
            bErr = true;
            alert("Please enter your phone number");
            theForm.phone.focus();
        }
		if (bErr == false && chk_field(theForm.msg) != false) {
            bErr = true;
            alert("Please write us something!");
            theForm.msg.focus();
        }
        if (bErr == false) {
            theForm.action = "email.asp";
            theForm.submit();
        } else {
            // create a window as a replacement for the ALERT
            //alert("Please enter a valid email address.");
            //theForm.email.focus();
        }
    } 

