function checkEmail(email) {
    chars = " /:,;"

    for (i = 0; i<chars.length; i++) {
      nonChar = chars.charAt(i)
      if (email.indexOf(nonChar,0) > -1) {
        return false
      }
    }
    atMark = email.indexOf("@",1)
    if (atMark == -1) {
      return false
    }
    if (email.indexOf("@",atMark+1) != -1) {	
      return false
    }
    periodP = email.indexOf(".",atMark)
    if (periodP == -1) {
      return false
    }
    if (periodP+3 > email.length) {
      return false
    }
    return true
  }

 function checkForm(form) {
 
  if(form.name.value==""){
  alert("\nPlease type in your name.")
 form.name.value="";
  form.name.focus()
  form.name.select()
  return false
  }

  if(form.office_school.value==""){
  alert("\nPlease type in your company or institute")
 form.office_school.value="";
  form.office_school.focus()
  form.office_school.select()
  return false
  }

  
  if(form.dept.value==""){
  alert("\nPlease type in your division or office.")
 form.dept.value="";
  form.dept.focus()
  form.dept.select()
  return false
  }

  
  if(form.address.value==""){
  alert("\nPlease type in your address.")
 form.address.value="";
  form.address.focus()
  form.address.select()
  return false
  }

  
  if(form.zipcode.value==""){
  alert("\nPlease type in your postal code.")
 form.zipcode.value="";
  form.zipcode.focus()
  form.zipcode.select()
  return false
  }
  

  
  if(form.country.value==""){
  alert("\nPlease type in your country.")
 form.country.value="";
  form.country.focus()
  form.country.select()
  return false
  }

  
  if(form.tel.value==""){
  alert("\nPlease type in your telephone Number.")
 form.tel.value="";
  form.tel.focus()
  form.tel.select()
  return false
  }

  
  if(!checkEmail(form.email.value)) {
  alert("\n---（ex）your@provider.ne.jp---")
  form.email.focus()
  form.email.select()
  return false
  }

return true
}
