<!-- script start
// check.js
// Link buttons
GIF_Dn_buttons = new Array( "begin2", "interm2", "advan2", "../common/partII2", "../common/partIII2");
SRCbuttons = new Array( "begin", "interm", "advan", "partII", "partIII");

function getRadioValueBeginner()
{
    // BEGINNER: Get user's answers
    //
    var nSumCorrect = 0;
    var strWrongAlt = "";

    with(document.checkform)
    {// nRight => 3 exclusive alternatives (1,2,3) for each task.
        nRight=1;
        if( B1[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("1"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( B2[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("2"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( B3[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("3"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( B4[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("4"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( B5[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("5"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( B6[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("6"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( B7[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("7"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( B8[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("8"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( B9[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("9"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( B10[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("10"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( B11[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("11"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( B12[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("12"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( B13[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("13"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( B14[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("14"+ITL(nRight),strWrongAlt);
    }

    EvalMessage("BEGINNER",nSumCorrect,strWrongAlt,14);
}

function getRadioValueIntermediate()
{
    // INTERMEDIATE: Get user's answers
    //
    var nSumCorrect = 0;
    var strWrongAlt = "";

    with(document.checkform)
    {// nRight => 3 exclusive alternatives (1,2,3) for each task.
        nRight=1;
        if( I1[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("1"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( I2[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("2"+ITL(nRight),strWrongAlt);

        nRight=2
        if( I3[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("3"+ITL(nRight),strWrongAlt);

        nRight=2
        if( I4[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("4"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( I5[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("5"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( I6[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("6"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( I7[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("7"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( I8[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("8"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( I9[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("9"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( I10[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("10"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( I11[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("11"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( I12[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("12"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( I13[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("13"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( I14[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("14"+ITL(nRight),strWrongAlt);
    }

    EvalMessage("INTERMEDIATE",nSumCorrect,strWrongAlt,14);
}

function getRadioValueAdvanced()
{
    // ADVANCED: Get user's answers
    //
    var nSumCorrect = 0;
    var strWrongAlt = "";

    with(document.checkform)
    {// nRight => 3 exclusive alternatives (1,2,3) for each task.
        nRight=2;
        if( A1[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("1"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( A2[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("2"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( A3[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("3"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( A4[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("4"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( A5[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("5"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( A6[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("6"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( A7[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("7"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( A8[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("8"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( A9[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("9"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( A10[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("10"+ITL(nRight),strWrongAlt);

        nRight=2;
        if( A11[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("11"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( A12[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("12"+ITL(nRight),strWrongAlt);

        nRight=1;
        if( A13[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("13"+ITL(nRight),strWrongAlt);

        nRight=3;
        if( A14[nRight-1].checked) nSumCorrect += 1;
        else strWrongAlt = WrongAlt("14"+ITL(nRight),strWrongAlt);
    }

    EvalMessage("ADVANCED",nSumCorrect,strWrongAlt,14);
}

function ITL(nIdx)
{
    // Convert radio-button index to letter
    //
    if( nIdx == 1)      strLetter = "A";
    else if( nIdx == 2) strLetter = "B";
    else if( nIdx == 3) strLetter = "C";

    return strLetter;
}
// script end -->
