function DisableButton(b) {
  // Disable a button and change it to say 'Submitting...'
  // Note that this button will no longer appear in $_POST[]
  b.disabled = true;
  b.value = 'Submitting...';
  b.form.submit();
}


var LastShowHideElement = null;
function ShowHideOthersElement(elementID) {
  // If a hidden div has been shown, then hide it before showing a new one
  var prop;

  if (LastShowHideElement != null)
    LastShowHideElement.display = 'none';

  if (document.getElementById) 
    prop = document.getElementById(elementID).style;
  else if (document.all)
    prop = document.all[elementID].style;
  else if (document.layers)
    prop = document.layers[elementID];

  prop.display = '';

  LastShowHideElement = prop;
}


function ShowHideElement(elementID) {
  // Show or hide a div
  var prop;
  if (document.getElementById)
    prop=document.getElementById(elementID).style;
  else if (document.all)
    prop=document.all[elementID].style;
  else if (document.layers)
    prop=document.layers[elementID];

  if (prop.display=='none')
    prop.display='';
  else
    prop.display='none';
}
