// JavaScript Document

//
// FUNCTION TO CHECK FOR A VARIABLE AND OPEN CORRECT SECTION ON LOAD
//
function checkForWhatsNewSection(){
	var theWhatsNewSectionFromURL = getValue("theWhatsNewSectionFromURL");
	showWhatsNewSection(theWhatsNewSectionFromURL);
	
}


//
//  FUNCTIONS FOR TOP LINK CLICKS
//

function showWhatsNewSection(theWhatsNewSection){

document.getElementById('whatsnew').style.display = 'none'; 
	document.getElementById('whatsnew0').style.display = 'none';

	document.getElementById('whatsnew1').style.display = 'none'; 
	document.getElementById('whatsnew2').style.display = 'none'; 
	document.getElementById('whatsnew3').style.display = 'none'; 
	document.getElementById('whatsnew4').style.display = 'none'; 
	document.getElementById('whatsnew5').style.display = 'none'; 
	document.getElementById('whatsnew6').style.display = 'none'; 
	document.getElementById('whatsnew7').style.display = 'none'; 


	
	var theElement = document.getElementById(theWhatsNewSection);

	if (theElement == null){
		theElement = document.getElementById('whatsnew')
	}
	else{}
	
	theElement.style.display = 'block'; 
}

//
// RETRIEVES VARIABLE FROM URL
//

function getValue(varname)
{
	
	
  // First, we load the URL into a variable
  var url = window.location.href;

  // Next, split the url by the ?
  var qparts = url.split("?");

  // Check that there is a querystring, return "" if not
  if (qparts.length == 0)
  {
	
    return "";
  }

  // Then find the querystring, everything after the ?
  var query = qparts[1];
	
	
	
  // Return the value
  return query;
  
  
}
