        arGael = new makeArray(maint); 
        anghywir = new makeArray(maint);     
        maintArGael = maint;                
        maintAnghywir = 0;                   
        pethYma=maint;             
        eto = false;                
        gorffen = true;                     
                                         
                                         
        dalIFynd = false;



function gwneudArGael()
        {
        for (var i=1;i<=maint;i++)
                {
                arGael[i] = i;       
                }
        maintArGael = maint;              
        maintAnghywir = 0;
        pethYma = maint;
        eto = false;
        gorffen = false;                  

        document.forms[0].question.value = ""; 
        document.forms[0].answer.value = "";
        document.forms[0].response.value = "";

        caelGair();                  
        }

function geiriau()
        {
        for (var i=1;i<=maint;i++)
                {
                document.write(PT[i] + ' is ' + BF[i] + '<BR>');
                }
        }

function random(max)
        {
        var now = new Date();
        var hour = now.getHours();
        var min = now.getMinutes();
        var sec = now.getSeconds();
        return ((((hour +1)*(min +1)*(sec))%max) + 1);
        }



function caelGair()
        {
        if (!eto)  {  
        pethYma = random(maintArGael);    
        document.forms[0].question.value = BF[(arGael[pethYma])];
                }
        else    {                                      
                pethYma = random(maintAnghywir);    
                document.forms[0].question.value = BF[(anghywir[pethYma])];
                }
        }


function arafuGair(ysgrifenu)
        {
        if (gorffen);                             
        else if (!eto)
                {
                if (ysgrifenu == PT[(arGael[pethYma])])
                        document.forms[0].response.value = "C'est correct";
                else 
                        {
                        document.forms[0].response.value = "Non, voici la reponse correcte:     " + PT[(arGael[pethYma])];
                        anghywir[maintAnghywir + 1] = arGael[pethYma];
                        maintAnghywir++;
                        }
                for (var i=pethYma;i<maintArGael;i++)
                        arGael[i] = arGael[i+1];  
                maintArGael--;                   
                }
        else if (eto && dalIFynd);    
                                               
        else                                    
                {                               
                if (ysgrifenu == PT[(anghywir[pethYma])])
                        document.forms[0].response.value = "C'est correct!";
                else
                        document.forms[0].response.value = "Non, c'était " + PT[(anghywir[pethYma])];
                for (var i=pethYma;i<maintAnghywir;i++)      
                        anghywir[i] = anghywir[i+1];                                 		maintAnghywir--;                                   
                }
        }


function mwy()
        {
        document.forms[0].question.value = "";  
        document.forms[0].answer.value = "";
        document.forms[0].response.value = "";
        if (gorffen)                               
        document.forms[0].response.value = "Cliquez COMMENCER pour refaire le quiz.";
        else if (maintArGael == 0 && maintAnghywir == 0)      
                {
                document.forms[0].response.value = "C'est tout pour aujourd'hui - bien travaillé!";
                gorffen = true;                    
                }
        else if (maintArGael == 0 && maintAnghywir != 0 && (!eto))       
                {
                eto = true;               
                document.forms[0].response.value = "Cliquez CONTINUE pour voir vos erreurs ou cliquez VOIR LES ERREURS.";
                dalIFynd = true;           
                }
        else    {
                dalIFynd = false;          
                caelGair();                       
                }
        }


function listem()
{

dangosAtebionCywir = '<HTML><TITLE>Corrections</TITLE><BODY  bgcolor="#ffffcc">';
if (maintArGael>=1) { 
     dangosAtebionCywir +='<font size=+3 color=blue>Finissez d abord le test.</font>';}



else if(maintAnghywir==0) { 
     dangosAtebionCywir +='<font size=+3 color=blue>Vous avez un score parfait. Felicitation!</font>';}


else { 
  
        for (var i = 0; i < maintAnghywir; i++) {
              dangosAtebionCywir +='<table cellpadding=5><tr><th>'+(i+1) + '.</th><th>  ' + BF[(anghywir[i+1])] + ':</th><th>' + PT[(anghywir[i+1])] + '</b></th></tr></table>';



            }
        }

 
dangosAtebionCywir += '</BODY></HTML>';
ffenestcywir = window.open ('', '');
    if (ffenestcywir.opener == null) ffenestcywir.opener = window;
ffenestcywir.location = 'javascript:opener.dangosAtebionCywir';
}

