﻿var FAQ = new function()
{
    this.GetRegularContentContainer = function()
    {
        return document.getElementById('norm');
    }; // GetRegularContentContainer()
    this.GetContainer = function()
    {
        return document.getElementById('faqs');
    }; // GetContainer()
    this.GetItems = function()
    {
        return this.GetContainer().getElementsByTagName('div');
    }; // GetItems()
    this.ShowFAQ = function(id)
    {
        this.HideAll();
        this.GetRegularContentContainer().style.display = 'none';
        
        this.GetContainer().style.display = '';
        this.GetItems()[id].style.display = '';
    }; // ShowFAQ(id)
    this.HideAll = function()
    {
        this.GetRegularContentContainer().style.display = '';
        this.GetContainer().style.display = 'none';
        
        var items = this.GetItems();
        for(var i = 0; i < items.length; i++) { items[i].style.display = 'none'; }
    }; // HideAll()
    
    this.ShowModalFAQ = function (id)
    {
        ModalBox.Show(this.GetItems()[id].innerHTML);
    }; // ShowModalFAQ(id)
};