function checkrequired(form)
  {
  for(i=0;i<form.length;i++)
    {
    if (form[i].required)
      {
      if (form[i].type=='checkbox' || form[i].type=='radio')
        {
        radiook=false;
        for(j=i;j<form.length;j++)
          {
          if (form[j].name==form[i].name)
            {
            if (form[j].checked)
              {
              radiook=true;
              break;
              }
            }
          }

        if (radiook==false)
          {
          alert('required field: '+form[i].name);
          form[i].focus();
          return false;   
          break;     
          }
        }
      else if (form[i].value=='')
        {
        alert('required field: '+form[i].name);
        form[i].focus();
        return false;
        }
      }
    }
  }

function checkcaptcha(whatform)
  {
  if (whatform.norobot.value=='')
    {
    alert('Please enter the verificationcode in the box next to it.');
    whatform.norobot.focus();
    return false;
    }
  else
    {
    return true;
    }
  }
