
function initFoldout(strFoldContainerId)
{
	var objFoldContainer = document.getElementById(strFoldContainerId);
	var objCurChild		= null;
	var boolFoundh2		= false;
	
	if(objFoldContainer)
	{
		for(var el=0; el < objFoldContainer.childNodes.length; el++)
		{
			objCurChild = objFoldContainer.childNodes[el];
			
			if(objCurChild)
			{
				strNodeName		= objCurChild.nodeName.toLowerCase();
				
				if(strNodeName=='h2')
				{
					boolFoundh2 = true;
					objCurChild.style.cursor = 'pointer';
					objCurChild.id	= 'foldout' + strFoldContainerId + '_' + el;
					
					objCurChild.className	= 'hidden';
					objCurChild.onclick = new Function("showHideAnswer('"+objCurChild.id+"');");
				}
				
				if(boolFoundh2 && strNodeName!='h2' && strNodeName!='h2' && objCurChild.nodeType==1)
				{
					objCurChild.style.display = 'none';
				}
			}
		}
	}
}

function showHideAnswer(strFoldoutId)
{
	if(strFoldoutId)
	{
		var objFaq		= document.getElementById(strFoldoutId);
		var boolShow	= objFaq.className ? true : false;
		
		if(objFaq && boolShow)
		{
			objFaq.className	= '';
			objNext = objFaq.nextSibling;
			
			while(objNext && objNext.nodeName.toLowerCase() != 'h2' && 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() != 'h2' && objNext.nodeName.toLowerCase() != 'h2') 
			{
				if(objNext.nodeType==1)
					objNext.style.display = 'none';
				objNext = objNext.nextSibling;
			}
		}
	}
}