// I think this is probably a horrible way to get the 
// expected results but it's what I came up with in a pinch.

function togglePanel(id)
{
	var mainName = document.getElementById('mainTab');
	var mainPanel = document.getElementById('mainPanel');
	var mainTabText = document.getElementById('mainTabText');
	var compareName = document.getElementById('compareTab');
	var comparePanel = document.getElementById('comparePanel');
	var compareTabText = document.getElementById('compareTabText');
	var learnName = document.getElementById('learnTab');
	var learnPanel = document.getElementById('learnPanel');
	var learnTabText = document.getElementById('learnTabText');

// Product Features

	if(id == "mainPanel")
	{
		document.mainWidget.src="red/images/elements/widgetBlue.gif";
		mainPanel.style.display = "block";
		mainName.style.backgroundColor = "#00468F";
		mainTabText.style.color = "#ffffff";

		if(document.compareWidget)
		{
			document.compareWidget.src="red/images/elements/widgetGrayWithGoldBorder.gif";
			comparePanel.style.display = "none";
			compareName.style.backgroundColor = "#484848";
			compareTabText.style.color = "#F8D108";
		}

		if(document.learnWidget)
		{
			document.learnWidget.src="red/images/elements/widgetGray.gif";
			learnPanel.style.display = "none";
			learnName.style.backgroundColor = "#d6d6d6";
			learnTabText.style.color = "#00468F";
		}
	}


// Compare to Duralast

	if(id == "comparePanel")
	{
		document.compareWidget.src="red/images/elements/widgetGold.gif";
		comparePanel.style.display = "block";
		compareName.style.backgroundColor = "#F8D108";
		compareTabText.style.color = "#000000";

		if(document.mainWidget)
		{
			document.mainWidget.src="red/images/elements/widgetGray.gif";
			mainPanel.style.display = "none";
			mainName.style.backgroundColor = "#d6d6d6";
			mainTabText.style.color = "#00468F";
		}

		if(document.learnWidget)
		{
			document.learnWidget.src="red/images/elements/widgetGray.gif";
			learnPanel.style.display = "none";
			learnName.style.backgroundColor = "#d6d6d6";
			learnTabText.style.color = "#00468F";
		}
	}


// Learn More

	if(id == "learnPanel")
	{
		document.learnWidget.src="red/images/elements/widgetBlue.gif";
		learnPanel.style.display = "block";
		learnName.style.backgroundColor = "#00468F";
		learnTabText.style.color = "#d6d6d6";

		if(document.mainWidget)
		{
			document.mainWidget.src="red/images/elements/widgetGray.gif";
			mainPanel.style.display = "none";
			mainName.style.backgroundColor = "#d6d6d6";
			mainTabText.style.color = "#00468F";
		}

		if(document.compareWidget)
		{
			document.compareWidget.src="red/images/elements/widgetGrayWithGoldBorder.gif";
			comparePanel.style.display = "none";
			compareName.style.backgroundColor = "#484848";
			compareTabText.style.color = "#F8D108";
		}

	}
}