// JavaScript Document

var allPanels = new Array();
allPanels[0] = "bigbenefits";
allPanels[1] = "higherdeductible";
allPanels[2] = "lotofoptions";
allPanels[3] = "notsure";


function panelOn(triggerName) {
    clearTimeout ( hideTimerId );
	for (i=0; i<=allPanels.length-1; i++) {
		if ( triggerName == allPanels[i] ) {
			var currentPanel = eval("document.getElementById('" + triggerName + "_panel')");
			currentPanel.style.display = "block";
			document.getElementById(allPanels[i]).style.backgroundPosition="bottom left";
		} else {
			panelName = eval("document.getElementById('" + allPanels[i] + "_panel')");
			panelName.style.display = "none";
			document.getElementById(allPanels[i]).style.backgroundPosition="top left";
		}
	}
}

var hideTimerId;

function allOff() {
    doTheThing = "turnThemAllOff()";
    hideTimerId = setTimeout ( doTheThing, 250 );
}

function turnThemAllOff() {
	for (i=0; i<=allPanels.length-1; i++) {
		panelName = eval("document.getElementById('" + allPanels[i] + "_panel')");
		panelName.style.display = "none";
		document.getElementById(allPanels[i]).style.backgroundPosition="top left";
	}
}
