// stuff for the registration form

function highlight_form_field(form_field)
{
  if ('undefined' != form_field.className)
  {
    form_field.className += ' highlight';
  }
}

function blur_form_field(form_field)
{
  if ('undefined' != form_field.className)
  {
    if ('highlight' == form_field.className)
    {
      form_field.className = '';
    }
    else
    {
      form_field.className = form_field.className.replace(' highlight', '');
    }
  }
}

function remove_default_input(form_field)
{
  if (form_field.value == form_field.title)
  {
    form_field.value = '';
  }
}

function add_default_input(form_field)
{
  if ('' == form_field.value)
  {
    form_field.value = form_field.title;
  }
}

function disable_submit_buttons(form)
{
  for (i = 0; i < form.elements.length; i++)
  {
    if ('submit' == form.elements[i].type)
    {
      document.getElementById(form.elements[i].id).value = 'Please wait\u2026';
    }
  }

  return true;
}

