// theForm = document.form
function ValidateDemo(theForm) {
	if (theForm.name.value == '') {
		alert('Please enter your name.');
		theForm.name.focus(); 
		return false;
	} else if (theForm.company.value == '') {
		alert('Please enter your company.');
		theForm.company.focus(); 
		return false;		
	} else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value))){
		alert('Please enter a valid email address.');	
		theForm.email.focus(); 
		return false;
	} else if ( theForm.agree.checked == false ) {
        alert ( "Please check the Terms & Conditions box." );
	   theForm.agree.focus();
	   return false;
	} else {
		return true;
	}
}