
//Toggle visibility of Speedmap on homepage
var showDrivingConditions = false;
var showHelpAbout = false;
var showHelpCSC = false;
var showHelpBiz = false;

//When the page finishes loading
window.onload = function() {
    //Hide the Hot Topic overlay graphic if the user is in Edit mode
    //otherwise the edit buttons for the Hot Topic image are unusable.
    HotTopicOverlay = document.getElementById("hot-topic-overlay");
    SplashOverlay = document.getElementById("splash-overlay");

	
    if (document.getElementById("dropDownConsole")) 
	{
        HotTopicOverlay.style.visibility = "hidden"; 
	SplashOverlay.style.visibility = "hidden";
	} 
}


//show/hide speedMap
function toggleSpeedmap() {

	var drivingConditions = document.getElementById("driving-conditions");
	var speedMap = document.getElementById("speedmap");
	
	if (!showDrivingConditions) {
		drivingConditions.style.visibility = "visible";		
		showDrivingConditions = true;
		speedMap.style.backgroundPosition = "left bottom";
	}
	else {
		drivingConditions.style.visibility = "hidden";
		showDrivingConditions = false;
		speedMap.style.backgroundPosition = "left top";		
	}	
}//end toggleSpeedmap


function ShowHide(item) {
	var helpAbout = document.getElementById("help-AboutNTTA");
	var helpCSC = document.getElementById("help-OnlineCSC");
	var helpBiz = document.getElementById("help-WorkingWithUs");

	
	switch (item) {
		//show/hide About NTTA popup help
		case 'helpAbout':
							if (!showHelpAbout) {
								helpAbout.style.visibility = "visible";
								showHelpAbout = true;
							}
							else {
								helpAbout.style.visibility = "hidden";
								showHelpAbout = false;
							}	
							break;

		//show/hide Online CSC popup help
		case 'helpCSC':
							if (!showHelpCSC) {
								helpCSC.style.visibility = "visible";
								showHelpCSC = true;
							}
							else {
								helpCSC.style.visibility = "hidden";
								showHelpCSC = false;
							}	
							break;

		//show/hide Working With Us popup help
		case 'helpBiz':
							if (!showHelpBiz) {
								helpBiz.style.visibility = "visible";
								showHelpBiz = true;
							}
							else {
								helpBiz.style.visibility = "hidden";
								showHelpBiz = false;
							}	
							break;									
	}// end switch

}// end ShowHide

	
