function indicateProcessing(targetID, state)
{
  if(state)
    document.getElementById("processing_"+targetID).innerHTML = '<img src="/images/spinner.gif"> Processing...';
  else
    document.getElementById("processing_"+targetID).innerHTML = "";
}

function highlightText(element, text)
{
  if($(element))
  {
    $(element).innerHTML = text;
    new Effect.Highlight(element, { startcolor: '#FFD700', endcolor: '#EEEEEE', duration: 3.0});
  }
}

var navOn = 0;

function nav(state,item)
{ 
  switch(state)
  {
    case 'over':
      if(item!=navOn) 
        $('nav'+item).style.backgroundColor="#D9D9D9"; 
      break;
    case 'out':
      if(item!=navOn)
        $('nav'+item).style.backgroundColor="#BACBAD";
      break;
    case 'on':
      $('nav'+item).style.backgroundColor="#D9D9D9";
      navOn = item;
      break;
    case 'go':
      navOn = item;
      $('nav'+item).style.backgroundColor="#FFF";
      switch(item)
      {
        case 1:
          document.location="/products";
          break;
        case 2:
          document.location="/sales_reps";
          break;
        case 3:
          document.location="/contactus";
          break;
        case 4:
          document.location="/overview";
          break;
        case 5:
          document.location="/support";
          break;
      }
  }
}