var objFaqContainerId = 'i_faqlist';
function initFaq()
{
	var objFaqContainer = document.getElementById(objFaqContainerId);
	var objCurChild		= null;
	var boolFoundH3		= false;
	
	if(objFaqContainer)
	{
		for(var el=0; el < objFaqContainer.childNodes.length; el++)
		{
			objCurChild = objFaqContainer.childNodes[el];
			
			if(objCurChild)
			{
				strNodeName		= objCurChild.nodeName.toLowerCase();
				
				if(strNodeName=='h3')
				{
					boolFoundH3 = true;
					objCurChild.style.cursor = 'pointer';
					objCurChild.id	= 'faq' + el;
					
					objCurChild.className	= 'hidden';
					objCurChild.onclick = new Function("showHideAnswer('"+objCurChild.id+"');");
				}
				
				if(boolFoundH3 && strNodeName!='h3' && strNodeName!='h2' && objCurChild.nodeType==1)
				{
					objCurChild.style.display = 'none';
					
				}
			}
		}
	}
}

function showHideAnswer(strFaqId)
{
	if(strFaqId)
	{
		var objFaq		= document.getElementById(strFaqId);
		var boolShow	= objFaq.className ? true : false;
		
		if(objFaq && boolShow)
		{
			objFaq.className	= '';
			objNext = objFaq.nextSibling;
			
			while(objNext && objNext.nodeName.toLowerCase() != 'h3' && objNext.nodeName.toLowerCase() != 'h2') 
			{
				if(objNext.nodeType==1)
					objNext.style.display = '';
					
				objNext = objNext.nextSibling;
			}
		}
		
		if(objFaq && !boolShow)
		{
			objFaq.className	= 'hidden';
			objNext = objFaq.nextSibling;
			
			while (objNext && objNext.nodeName.toLowerCase() != 'h3' && objNext.nodeName.toLowerCase() != 'h2') 
			{
				if(objNext.nodeType==1)
					objNext.style.display = 'none';
				objNext = objNext.nextSibling;
			}
		}
	}
}
