//made by Vytautas Ziukas 
    var qNr = -1;
    var myimages = new Array();
    function Init()
    {
       for(i=0; i<questionCount; i++) 
       {
            myimages[i] = new Image();
            myimages[i].src = "images/"+questions[i][0]; 
       }
       qNr = 0        
       Show();
    }
    
    function selected( name )
    {
        qNr = 0;
        for (i=0; i < questionCount; i++)
            if (questions[i][1] == name)
            {
                qNr = i;
                break;
            }  
        Show(); 
    }
    
    function Show()
    {
        qAbcImage = questions[qNr][0];
    
        var questionImg = document.getElementById("questionImg");
        questionImg.style.display = "";
        newImage = "images/"+qAbcImage;
        questionImg.src = newImage;    
    }
    
    function Next()
    {
        qNr++;
        if (qNr == questionCount)
            qNr = 0;
        Show();
    }

    function Back()
    {
        qNr--;
        if (qNr < 0)
            qNr = questionCount-1;
        Show();
    }