/**************************************************/
/********** Form Functions ************************/
/**************************************************/
function clearInput(searchBox, defaultValue)
{
   if (searchBox.value == defaultValue)
   {
      searchBox.value = '';
   }
}

function clearInputRecolor(searchBox, defaultValue, recolor)
{
   if (searchBox.value == defaultValue)
   {
      searchBox.value = '';
   }
   
   searchBox.style.color = recolor;
}

function clearTextInputClass(inputID)
{
   var input = document.getElementById(inputID);
   if(input != null)
   {
      input.className = 'text';
   }
}

function getFormElementValue(element) {

  var value;

  if (element == null)
   alert(elementID + " is null");

  /* select box */
  if (element.type == "select-one") {
     var options = element.options;
     value = options[options.selectedIndex];
  }

  /* text or hidden */
  if (element.type == "hidden" ||
       element.type == "text" ||
       element.type == "textarea")
     value = element.value;

}