function change(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
}

function changeback(text){
	text.defaultValue==text.value
}

function funcCheckEmail(formname){
	if (formname.Email.value == ""){
		alert("Email address must be filled in");
		formname.Email.focus();
		return false;
	}
	return true;
}

function funcCheck(){
	return confirm("Are you sure?")
	
}

function moreinfopopup(url){
	newwindow=window.open(url,'More Info','height=200,width=600');
	newwindow.focus()
	
}


function validateFormOnSubmit(theForm) {
var reason = "";

  reason += validateEmpty(theForm.FirstName);
  reason += validateEmpty(theForm.LastName);
  reason += validateEmpty(theForm.teleNumber);
  reason += validateEmpty(theForm.email);
      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }

  return true;
}

function validateEmpty(fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow'; 
        error = "The required field has not been filled in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;  
}
