<!--
// THE FOLLOWING FORM SCRIPT IS (C)2001 WEB ARCHITECTS Quennsland USE BY OTHERS IS AUTHORISED AS LONG AS THIS COPYRIGHT MESSAGE REMAINS WITH IT

// FUNCTION TO DEFINE AN EMPTY FIELD

function isEmpty(s) {
          return ((s==null)||(s.length==0));
}

// FUNCTION TO CHECK FORM IS COMPLETED form 1

function checkComplete1() {  

            form_complete = 1;
            alert_message = "";
		
// CHECK COMPULSORY FIELDS ARE COMPLETED
		
	if (isEmpty(window.document.contact_form.first_name.value)) { 
	    		alert_message = alert_message + "   Christian Name\n";
				form_complete = 0;
	}
	
	 if (isEmpty(window.document.contact_form.last_name.value)) { 
	  		alert_message = alert_message + "   Surname\n";
		form_complete = 0;
	}
	
	 if (isEmpty(window.document.contact_form.first_month.value)) { 
	  		alert_message = alert_message + "   First Month\n";
		form_complete = 0;
	}
	
	 if (isEmpty(window.document.contact_form.first_year.value)) { 
	  		alert_message = alert_message + "   First Year\n";
		form_complete = 0;
	}

	 if (isEmpty(window.document.contact_form.second_month.value)) { 
	  		alert_message = alert_message + "   Second Month\n";
		form_complete = 0;
	}
	
	 if (isEmpty(window.document.contact_form.second_year.value)) { 
	  		alert_message = alert_message + "   Second Year\n";
		form_complete = 0;
	}
		
	 if (isEmpty(window.document.contact_form.bmd.value)) { 
	  		alert_message = alert_message + "   Either Birth, Marriage or Death\n";
		form_complete = 0;
	}
	 if (!validateEmail(window.document.contact_form.email.value)) { 
	  		alert_message = alert_message + "   Valid E-Mail Address\n";
		form_complete = 0;
	}
				
// PRINT ALERT MESSAGE IF ALL IS NOT CORRECT
if (form_complete==0) {
    alert ("Your form is incomplete.\n" +
               "You must supply the following information:\n" +
                       alert_message);
            return false;
    }

// IF ALL IS CORRECT THEN GO AHEAD
    else {
            return true;
    }
}


		
// FUNCTION TO CHECK FOR VALID EMAIL ADDRESS

function validateEmail(input) {
  var atpoint, atpoint2, dotpoint;
  
  // Must be at least 5 caracters long
  if (input.length < 5) return false;
  
  // Must have one and one only "@", but it cannot be the first character
  atpoint = input.indexOf("@",1);
  if (atpoint == -1) return false;
  atpoint2 = input.indexOf("@",(atpoint + 1));
  if (atpoint2 != -1) return false;
  
  // Must have a "." at least one character after the @ but not the last character
  dotpoint = input.indexOf(".",(atpoint + 2)); 
  if (dotpoint == -1) return false;
  if (dotpoint == (input.length - 1)) return false;
  
  return true;
}
//-->
<!--
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
//-->