function OnFirmDetails(form, id)
{
  form.action = 'public_register_results_firm_detail.asp?id=' + id;
  form.submit();
}


function OnSearchRegister(form)
{
  var ok;
  
  ok = true;
  
  if(form.search_type.selectedIndex == 0)
  {
    alert('Please select the type of search you would like to make!');
    form.search_type.focus();
    ok = false;
  }
  else if(form.search_type.selectedIndex == 1 || form.search_type.selectedIndex == 2)
  {
    if(form.search_name.value.length == 0)
    {
      alert('You must enter a value to search on!');
      form.search_name.focus();
      ok = false;
    }
  }
  else if(form.search_type.selectedIndex == 3)
  {
    if(form.search_name.value.length == 0)
    {
      alert('You must enter a value to search on!');
      form.search_name.focus();
      ok = false;
    }
  }
  
  if(ok)
    form.submit();
}


function OnSearchType(form, search_type)
{
  form.action += '?search_type=' + search_type;
  form.submit();
}


function OnNextResult(form, start)
{
  form.m_start.value = start;
  
  //alert(form.m_start.value);
  form.submit();
  
  return false;
}


function OnPractitionerDetails(form, id)
{
  form.action = 'public_register_results_practitioner_detail.asp?id=' + id;
  form.submit();
}


function OnSearchAgain(form, search_type)
{
  form.action = 'public_register.asp';
  form.submit();
}