﻿// JScript File
function ToggleQuestion(pos)
{
    var index = 1;

    var answer = document.getElementById("answer" + index);
    var arrow = document.getElementById("arrow" + index);
       
    while ((answer != null) && (arrow != null))
    {             
        
        if ((index == pos) && (answer.style.display == "none"))
        {     
            answer.style.display = "block";
            arrow.style.backgroundPosition = "0 -5px";
        }
        else
        {       
            answer.style.display = "none";
            arrow.style.backgroundPosition = "0 0";
        }

        index++;

        answer = document.getElementById("answer" + index);
        arrow = document.getElementById("arrow" + index);
    }
}

