/* FAQ js implementation */

/* onMouseOver event */
function highlightQuestion( linkObject )
{
    /* Do not highlight if the question is already visible */
    divQuestion = linkObject.parentNode.parentNode;
    if ( divQuestion.className != "question-js-show" )
    {
        //linkObject.style.fontSize='1.2em';
        linkObject.style.textTransform = 'uppercase';
    }
}

/* onMouseOut event */
function disHighlightQuestion( linkObject )
{
    //linkObject.style.fontSize = '1em';
    linkObject.style.textTransform = 'none';
}

/* onClick event */
function showAnswer( linkObject )
{
    /* Change href attribute to prevent reload */
    linkObject.href ="#";

    /* Get the question container, div with class=question,
       and show the question. */
    divQuestion = linkObject.parentNode.parentNode;

    /* Hide all other questions */
    allQuestions = divQuestion.parentNode;
    for ( i=0; i < allQuestions.childNodes.length; i++ )
    {    
	child = allQuestions.childNodes[i]
        if ( child.nodeType != 1)
	{
            continue;
        }
        else if ( child.className == "question-js-show" )
	{
	    child.className = "question";
	}
    }	

    /* Show current question */
    divQuestion.className = "question-js-show";
    paragraph = divQuestion.nextSibling;

}

function hideQuestions( divObject )
{
    document.getElementById( "questions" ).className="questions-js";
}

