var currentTableIndex = -1

function MenuClick(sectionName,tableIndex)
 {

     //alert(sectionName + " - " + tableIndex);
	//Add the Banner and Content to the Page Content Section
	var x=document.getElementById('pageContents').rows[0].cells
	var HTMLCode="<div id=oDiv>"
	HTMLCode += document.getElementById(sectionName + 'Banner').innerHTML //Add Banner
	HTMLCode += document.getElementById(sectionName).innerHTML //Add Content
	HTMLCode += "</div>"
	x[0].innerHTML=""
	x[0].innerHTML=HTMLCode //Put Banner and Content on the Page

	
	
	//Change the Color of the Clicked menu
	var y=document.getElementById('PSPEMenu').rows[0].cells
	var moreHTMLCode = "<div class='menuActive'>"
	moreHTMLCode += y[tableIndex].innerHTML
	moreHTMLCode += "</div>"
	y[tableIndex].innerHTML = ""
	y[tableIndex].innerHTML = moreHTMLCode
	
	if (currentTableIndex != -1)
	{
	    //Change back Color of previous menu
	    var z=document.getElementById('PSPEMenu').rows[0].cells
	    var yetMoreHTMLCode = z[currentTableIndex].innerHTML
	    yetMoreHTMLCode = yetMoreHTMLCode.slice(22) //22 = the number of characters in "<DIV class='menuActive'>"
	    if (yetMoreHTMLCode.substr(0,2) == "\">") //For whatever reason IE doesn't see the " or ' characters so we need to check to make sure we got the whole string
	    {
	        yetMoreHTMLCode = yetMoreHTMLCode.slice(2)
	    }
	    
	    yetMoreHTMLCode = yetMoreHTMLCode.slice(0, yetMoreHTMLCode.length - 6) //6 = the Number of characters to remove from the back end of the string "</DIV>"
	    z[currentTableIndex].innerHTML = ""
	    z[currentTableIndex].innerHTML = yetMoreHTMLCode
    }
	currentTableIndex = tableIndex //Set the New Page as the current page
}