function navOn(element)
{

   if (!document.getElementById) return;

document.getElementById(element).style.backgroundColor = '#999999';

}

function navOff(element)
{

   if (!document.getElementById) return;

document.getElementById(element).style.backgroundColor = '#CCCCCC';

}





function animateButton(button_id, state)
{

   if (!document.getElementById) return;

   if (document.getElementById(button_id) && document.getElementById(button_id).style)
   {
   var style_ref = document.getElementById(button_id).style;

      if (state == 1)
      {
      style_ref.paddingLeft = '2px';
      style_ref.paddingTop = '2px';
      style_ref.paddingRight = '0px';
      style_ref.paddingBottom = '0px';
      }
      else if (state == 0)
      {
      style_ref.paddingLeft = '0px';
      style_ref.paddingTop = '0px';
      style_ref.paddingRight = '2px';
      style_ref.paddingBottom = '2px';
      }

   }

}





function showDiv(div_id)
{

   if (!document.getElementById) return;

   if (document.getElementById(div_id) && document.getElementById(div_id).style)
   {
   var div_ref = document.getElementById(div_id).style;

      if (div_ref.display == 'none')
      {
      document.getElementById(div_id).style.display = 'block';
      }

   }

}

function hideDiv(div_id)
{

   if (!document.getElementById) return;

   if (document.getElementById(div_id) && document.getElementById(div_id).style)
   {
   var div_ref = document.getElementById(div_id).style;

      if (div_ref.display == 'block' || div_ref.display == '')
      {
      document.getElementById(div_id).style.display = 'none';
      }

   }

}

function toggleDiv(div_id)
{

   if (!document.getElementById) return;

   if (document.getElementById(div_id) && document.getElementById(div_id).style)
   {
   var div_ref = document.getElementById(div_id).style;

      if (div_ref.display == 'none')
      {
      div_ref.display = 'block';
      }
      else if (div_ref.display == 'block' || div_ref.display == '')
      {
      div_ref.display = 'none';
      }

   }

}





function showHelpDiv(context_help_id)
{
populateHelpDiv(context_help_id);
showDiv('form_context_help');
}

function hideHelpDiv()
{
hideDiv('form_context_help');
}

var current_context_help_id = '';

function toggleHelpDiv(context_help_id)
{

var is_open = true;
var div_id = 'form_context_help';

   if (!document.getElementById) return;

   if (document.getElementById(div_id) && document.getElementById(div_id).style)
   {
   var div_ref = document.getElementById(div_id).style;

      if (div_ref.display == 'none' || div_ref.display == '')
      {
      is_open = false;
      }

   }

   if (is_open == true)
   {

      if (context_help_id == current_context_help_id)
      {
      hideHelpDiv();
      }
      else
      {
      showHelpDiv(context_help_id);
      }

   }
   else
   {
   showHelpDiv(context_help_id);
   }

current_context_help_id = context_help_id;

}

function populateHelpDiv(context_help_id)
{

var div_id = 'form_context_help_text';
var context_help_text = context_help_array[context_help_id];

   if (!document.getElementById) return;

   if (document.getElementById(div_id))
   {
   document.getElementById(div_id).innerHTML = context_help_text;
   }

}

function replaceAltMessage(image_id, alt_text)
{

   if (!document.getElementById) return;

   if (document.getElementById(image_id) && document.getElementById(image_id).setAttribute)
   {
   document.getElementById(image_id).setAttribute('title', alt_text);
   }

}





function hideWindowStatus()
{
window.status='';
return true;
}