
var WP1 = false;


function goNext (curr_n, next_n, checkwp1, wp1_s)
{
    var curr = document.getElementById (curr_n);
    var next = document.getElementById (next_n);
    
    var str = curr.value;
    str = str.toLowerCase();
    
    if (checkwp1)
    {
        if (str.length == 3 && str.substr(0,1) == 'w' && str.substr(2,1) == 'f')
        {
            WP1 = true;
            next.focus();
        }
        else
        {
            WP1 = false;
        }
    }
    
    if (wp1_s && WP1 && str.length >= 3)
    {
        next.focus();
    }
    
    if (str.length >= 4)
    {
        next.focus();
    }
}

