function select_all(form, field_name, check)
{
  if (check)
  {
    for (i=0; i<form[field_name].length; i++)
      form[field_name][i].checked = true;
  }
  else
  {
    for (i=0; i<form[field_name].length; i++)
      form[field_name][i].checked = false;  
  }
}

