// MNB
// 9/30/08
// expand and collapse functionality for faq and ashrae pages of ventilation systems

/*
Example: <div style="float:left; vertical-align:middle;">
			<img id="expand_1" src="../images/expand_text.gif" alt="expand" onclick="expandText('expand_1','answer_1')" />						
		</div> 
		<div id="question_1" onclick="expandText('expand_1','answer_1')">
			HOW CAN I PROVIDE BETTER INDOOR AIR QUALITY TO CONSUMERS?
		</div>
		<div id="answer_1" style="display:none;">well alright</div>
*/
function expandText(expandImageDiv,answerDiv)
{
	var expandImage = document.getElementById(expandImageDiv);
	var answer = document.getElementById(answerDiv);

	// expand
	if (expandImage.alt == "expand")
	{
		expandImage.src = "/business/images/faqs/collapse_text.gif";
		expandImage.alt = 'collapse';
		answer.style.display = 'block';
	}
	//collapse
	else
	{
		expandImage.src = "/business/images/faqs/expand_text.gif";
		expandImage.alt = 'expand';
		answer.style.display = 'none';
	}
}
