function setHeaderText() {
	if( document.getElementById ){
		if( document.getElementById( 'headerText' ) && document.getElementById( 'headerTextContainer' ) ){

			var textContent = document.getElementById( 'headerText' ).innerHTML;
			
			if (!isWhitespace(textContent)) {
			// Create div to hold and style content 
			var textDiv = document.createElement( 'div' );
			textDiv.className = 'inner'
			textDiv.innerHTML = textContent;

			// Insert new div into container div & set height to auto (for benefit of IE)
			var container = document.getElementById( 'headerTextContainer' );
			container.style.height = 'auto';
			container.innerHTML = '';
			container.appendChild( textDiv );
			}
		}
	}
}


function isWhitespace(string_value) {

  // These are the whitespace characters
  var whitespace = " \n\r\t"

  // Run through each character in the string
  for (var counter = 0; counter < string_value.length; counter++) {
    
    // Get the current character
    current_char = string_value.charAt(counter)
    
    // If it's not in the whitespace characters string,
    // return false because we found a non-whitespace character
    if (whitespace.indexOf(current_char) == -1) {
      return false
    }
  }
  
  // Otherwise, the string has nothing but
  // whitespace characters, so return true
  return true
}

function highlightNav(linkText) {
	if ( document.getElementById ) {
		if( document.getElementById( 'menu' ) ){
			
			// Get set of anchors that are children of the menu div	
			var anchors = document.getElementById( 'menu' ).getElementsByTagName( 'A' );
			
			// Run through anchors, checking whether innerHTML contains linkText
			// If so, highlight link
			for (var i=0;i<anchors.length;i++) {
				
				if (anchors[i].innerHTML.toLowerCase().indexOf(linkText.toLowerCase())!=-1) {
					anchors[i].className = 'selected'
				}
			}
		}
	}
}