function setLink( div, anchor ) {
  Effect.BlindDown( div );

  if ( ! anchor ) {
    return;
  }

  anchor.style.fontFamily = 'Arial, Helvetica, sans-serif';
  anchor.style.color = '#FAEB00';
  anchor.style.fontSize = '10px';
  anchor.style.backgroundImage = 'images/arrowOver.gif';
  anchor.style.backgroundRepeat = 'no-repeat';
  anchor.style.textDecoration = 'none';
  anchor.style.textAlign = 'center';
  anchor.style.paddingLeft = '20pt';
  anchor.style.paddingRight = '0pt';
  anchor.style.paddingBottom = '0pt';
  anchor.style.paddingTop = '0pt';
}

function highlightCurrentPage() {
  var parents = new Array( 'solutions', 'services', 'products', 'technology', 'company' );

  for ( var i = 0; i < parents.length; i++ ) {
    var div = document.getElementById( parents[ i ] );
    var anchors;

    if ( ! div ) {
      alert( "Navigational misconfiguration!" );
      return;
    }

    /*
     * mmm, hacky
     */
    var expando = false;
    var x = window.location.href;
    switch ( parents[ i ] ) {
    case 'solutions':
      if ( x.match( /solutions.htm$/ ) ) {
	expando = true;
      }

      break;
    case 'services':
      if ( x.match( /services.htm$/ ) ) {
	expando = true;
      }

      break;
    case 'products':
      if ( x.match( /products.htm$/i ) ) {
	expando = true;
      }
	  break;
	case 'technology':
      if ( x.match( /technology.htm$/i ) ) {
	expando = true;
      }
      
	  break;
    case 'company':
      if ( x.match( /company.htm$/i ) ) {
	expando = true;
      }
      
	  break;
    }

    if ( expando ) {
      setLink( div, null );
      return;
    }

    anchors = div.getElementsByTagName( 'a' );

    for ( var x = 0; x < anchors.length; x++ ) {
      var anchor = anchors[ x ];

      if ( anchor.href == window.location ) {
	setLink( div, anchor );
	return;
      }
    }
  }

  /*
   * no matches? expand solutions
   */
  {
    var div = document.getElementById( 'solutions' );

    Effect.BlindDown( div );
  }
}
