function loadStyleSheet(servletPath)
{
	var browser = navigator.appName;
	var isIE = (browser.indexOf("Internet Explorer") >= 0);
	
	document.styleSheets.href = (servletPath + isIE);
}/*
		<script type="text/javascript">
			loadStyleSheet("<%= RequestUtil.mapPath("ProcessGetStyleSheet?" + ProcessGetStyleSheet.PARAM_ISIE, request) %>");
		</script>
*/
function findLeftOffset(obj)
{
    var offset = obj.offsetLeft;
    
    while ((obj = obj.offsetParent) != null)
        offset += obj.offsetLeft;
    
    return offset;
}

function findTopOffset(obj)
{
    var offset = obj.offsetTop;
    
    while ((obj = obj.offsetParent) != null)
        offset += obj.offsetTop;
    
    return offset;
}

function toggleAnswer(num)
{
	var question = getQuestion(num);
	var answer = getAnswer(num);
	var wasExpanded = question.expanded;
	
	hideAnswers();
	
	toggleQuestionAndAnswer(question, answer, !wasExpanded);
}

function getQuestion(num)
{
	var question = document.getElementById("question_" + num);
	
	return question;
}

function getAnswer(num)
{
	var answer = document.getElementById("answer_" + num);
	
	return answer;
}

function hideAnswers()
{
	 var num = 1;
	 var thisQuestion = null;
	 var thisAnswer = null;
	 
	 do
	 {
	 	thisQuestion = getQuestion(num);
	 	thisAnswer = getAnswer(num);
	 	
	 	toggleQuestionAndAnswer(thisQuestion, thisAnswer, false)
	 		
	 	num++;
	 } while (thisAnswer != null);
}

function toggleQuestionAndAnswer(question, answer, expanded)
{
	if (question != null && answer != null)
	{
		question.expanded = expanded;
		question.className = "faqQuestion expandable " + (expanded ? "expanded" : "collapsed");
		answer.style.display = (expanded ? "" : "none");
	}
}