function validate_form() {
 if(document.theForm.firstname.value=='') {
   alert("Please provide your firstname before continuing.");
   document.theForm.firstname.focus();
   return false;
 }
 if(document.theForm.lastname.value=='') {
   alert("Please provide your lastname before continuing.");
   document.theForm.lastname.focus();
   return false;
 }
 if(document.theForm.address1.value=='') {
   alert("Please provide an address before continuing.");
   document.theForm.address1.focus();
   return false;
 }
 if(document.theForm.city.value=='') {
   alert("Please provide your suburb or city before continuing.");
   document.theForm.city.focus();
   return false;
 }
 if(document.theForm.state.value==0) {
   alert("Please provide your state before continuing.");
   document.theForm.state.focus();
   return false;
 }
 if(document.theForm.postcode.value=='') {
   alert("Please provide your postcode before continuing.");
   document.theForm.postcode.focus();
   return false;
 }
  if(document.theForm.phone.value=='') {
   alert("Please provide your phone before continuing.");
   document.theForm.phone.focus();
   return false;
 }
 if(document.theForm.email.value=='') {
   alert("Please provide your email before continuing.");
   document.theForm.email.focus();
   return false;
 }
 if(!document.theForm.agree.checked) {
    alert("Please read and agree to our terms and conditions and returns statement before proceeding.");
   document.theForm.agree.focus();
   return false;
 }
 return true;
}