<!--
//Validation for "Membership" form.....
  function validEmailAddress(EmailAddress) {
//----------------------------
     invalidChars = " /:,;"
     if (EmailAddress == "") {                                                // cannot be empty
         return false
     }
     for (i=0; i<invalidChars.length; i++) {        // does it contain any invalid characters?
         badChar = invalidChars.charAt(i)
         if (EmailAddress.indexOf(badChar,0) > -1) {
             return false
             }
     }
     atPos = EmailAddress.indexOf("@",1)                        // there must be one "@" symbol
     if (atPos == -1) {
        return false
     }
     if (EmailAddress.indexOf("@",atPos+1) != -1) {        // and only one "@" symbol
        return false
     }
     periodPos = EmailAddress.indexOf(".",atPos)
     if (periodPos == -1) {                                        // and at least one "." after the "@"
         return false
     }
     if (periodPos+3 > EmailAddress.length)        {                // must be at least 2 characters after the "."
         return false
     }
     return true
}


 function calcTotal1(qty) {
//-------------------------
// Calculate Total1
  document.Form1.Total1.value = document.Form1.Cost1.value * document.Form1.Qty1.value
  calcGTotal()
 }



 function calcTotal2(qty) {
//-------------------------
// Calculate Total1
  document.Form1.Total2.value = document.Form1.Cost2.value * document.Form1.Qty2.value
  calcGTotal()
 }


 function calcTotal3(qty) {
//-------------------------
// Calculate Total12
  document.Form1.Total3.value = document.Form1.Cost3.value * document.Form1.Qty3.value
  calcGTotal()
 }


 function calcTotal4(qty) {
//-------------------------
// Calculate Total1
  document.Form1.Total4.value = document.Form1.Cost4.value * document.Form1.Qty4.value
  calcGTotal()
 }


 function calcTotal5(qty) {
//-------------------------
// Calculate Total1
  document.Form1.Total5.value = document.Form1.Cost5.value * document.Form1.Qty5.value
  calcGTotal()
 }


 function calcTotal6(qty) {
//-------------------------
// Calculate Total1
  document.Form1.Total6.value = document.Form1.Cost6.value * document.Form1.Qty6.value
  calcGTotal()
 }

 function calcTotal7(qty) {
//-------------------------
// Calculate Total1
  document.Form1.Total7.value = document.Form1.Cost7.value * document.Form1.Qty7.value
  calcGTotal()
 }
 function calcTotal8(qty) {
//-------------------------
// Calculate Total1
  calcGTotal()
 }



 function calcGTotal() {
//-------------------------
// Calculate Total1
  document.Form1.GTotal.value = (document.Form1.Total1.value * 1) + (document.Form1.Total2.value * 1) + (document.Form1.Total3.value * 1) + (document.Form1.Total4.value * 1) + (document.Form1.Total5.value * 1) + (document.Form1.Total6.value * 1) + (document.Form1.Total7.value * 1) + (document.Form1.Freight.value * 1)
 }

 
 
 function copyAddress() {
//-------------------------
// Copy Invoice details to Postal details
  if (document.Form1.SameAddress.checked ) {
     document.Form1.PName.value = document.Form1.IName.value
     document.Form1.PBusiness.value = document.Form1.IBusiness.value
     document.Form1.PAddress.value = document.Form1.IAddress.value
     document.Form1.PPhone.value = document.Form1.IPhone.value
  } else {	 
     document.Form1.PName.value = ""
     document.Form1.PBusiness.value = ""
     document.Form1.PAddress.value = ""
     document.Form1.PPhone.value = ""
  }
 }



  function submitIt(Enquiry) {
//-------------------------
// Check that First Name field has been entered
  if (Enquiry.Freight.value == "") {
      alert("Please enter your Freight Amount.")
      Enquiry.Freight.focus()
      Enquiry.Freight.select()
      return false
  }
  if (Enquiry.GTotal.value == "") {
      alert("Please enter Total Purchase.")
      Enquiry.GTotal.focus()
      Enquiry.GTotal.select()
      return false
  }
  if (Enquiry.IName.value == "") {
      alert("Please enter your Name.")
      Enquiry.IName.focus()
      Enquiry.IName.select()
      return false
  }
  if (Enquiry.IAddress.value == "") {
      alert("Please enter your Address.")
      Enquiry.IAddress.focus()
      Enquiry.IAddress.select()
      return false
  }
  if (Enquiry.IPhone.value == "") {
      alert("Please enter your Phone.")
      Enquiry.IPhone.focus()
      Enquiry.IPhone.select()
      return false
  }
// check to see if the EmailAddress's valid
  if (Enquiry.IEmailAddress.value == "") {
      alert("Email Address is not a valid Email address!\nPlease re-enter.")
      Enquiry.IEmailAddress.focus()
      Enquiry.IEmailAddress.select()
      return false
  }
  if (!validEmailAddress(Enquiry.IEmailAddress.value)) {
      alert("Email Address is not a valid Email address!\nPlease re-enter.")
      Enquiry.IEmailAddress.focus()
      Enquiry.IEmailAddress.select()
      return false
  }

// check to see if the EmailAddress's valid
  if (Enquiry.IEmailAddress2.value == "") {
      alert("Email Address is not a valid Email address!\nPlease re-enter.")
      Enquiry.IEmailAddress2.focus()
      Enquiry.IEmailAddress2.select()
      return false
  }
  if (!validEmailAddress(Enquiry.IEmailAddress2.value)) {
      alert("Email Address is not a valid Email address!\nPlease re-enter.")
      Enquiry.IEmailAddress2.focus()
      Enquiry.IEmailAddress2.select()
      return false
  }
    if (Enquiry.IEmailAddress.value != Enquiry.IEmailAddress2.value) {
      alert("Entered Email Address's are not the same!\nPlease check and re-enter.")
      Enquiry.IEmailAddress2.focus()
      Enquiry.IEmailAddress2.select()
      return false
  }
  if (Enquiry.PName.value == "") {
      alert("Please enter your Name.")
      Enquiry.PName.focus()
      Enquiry.PName.select()
      return false
  }
  if (Enquiry.PAddress.value == "") {
      alert("Please enter your Address.")
      Enquiry.PAddress.focus()
      Enquiry.PAddress.select()
      return false
  }
  if (Enquiry.PPhone.value == "") {
      alert("Please enter your Phone.")
      Enquiry.PPhone.focus()
      Enquiry.PPhone.select()
      return false
  }
  if (Enquiry.DateReq.value == "") {
      alert("Please enter Date Required.")
      Enquiry.DateReq.focus()
      Enquiry.DateReq.select()
      return false
  }



 
  
// If we made it to here, everything's valid, so return true
  return true
}

// -->
