function checkForm() {
	var myName = document.getElementById('fullname').value;
	var myEmail = document.getElementById('email').value;
	var myUpdate = document.getElementById('update').value;

	if (checkEmpty(myName))
	{
		alert ("You must enter a Name");
		document.getElementById('fullname').focus();
		return false;
	}	
  
	if (myEmail.length > 0) 
	{
    	if (checkEmail(myEmail))
      { 
    		document.getElementById('email').focus();
    		return false;			
     	}
   }
	
	if (checkEmpty(myUpdate))
	{
		alert ("You must enter text in the update box");
		document.getElementById('update').focus();
  	return false;
	}
			
	return true;
}

// ******************************  Check for empty fields ************************

 function checkEmpty(fieldtotest) {
	 var formOK = false;
     if (fieldtotest == "") {
       formOK = true;
     }
     return formOK;
   }

// ************************************  Check Emails ****************************

function checkEmail(emailadd) {
  if (emailadd.length == 0) {
   window.alert("You must provide an e-mail address.");
    return true;
    }
  if (emailadd.indexOf("/") > -1) {
    window.alert("Your email address includes a / [slash] character which is not valid");
    return true;
    }
  if (emailadd.indexOf(":") > -1) {
    window.alert("Your email address includes a : [colon] character which is not valid");
    return true;
    }
  if (emailadd.indexOf(",") > -1) {
    window.alert("Your email address includes a , [comma] character which is not valid");
    return true;
    }
  if (emailadd.indexOf(";") > -1) {
    window.alert("Your email address includes a ; [semi-colon] character which is not valid");
    return true;
    }
  if (emailadd.indexOf("@") < 0) {
    window.alert("Your email address is missing an @ [at] character");
   return true;
    }
  if (emailadd.indexOf("\.") < 0) {
    window.alert("Your email address is missing an . [dot] character");
    return true;
    }

  return false;
  }