﻿questionExpandCollapse = function(question)
{
    if ((typeof(question) != "undefined") && (question != null) &&
        (typeof(question.parentNode) != "undefined") && (question.parentNode != null))
    { 
        var item = question.parentNode;
        if (item.className.indexOf("faq-expanded-item") > -1)
        {
            item.className = "faq-item";
        }
        else
        {
            item.className += " faq-expanded-item";
        }
    }
}

expandAllQuestions = function()
{
    var all = document.getElementsByTagName("DIV");
    for (var i=0; i<all.length; i++)
    {
        if (all[i].className == "faq-item")
        {
            all[i].className += " faq-expanded-item";
        }
    }
}

collapseAllQuestions = function()
{
    var all = document.getElementsByTagName("DIV");
    for (var i=0; i<all.length; i++)
    {
        if (all[i].className == "faq-item faq-expanded-item")
        {
            all[i].className = "faq-item";
        }
    }
}

