smmerz / MMAF3

// ==UserScript==
// @name        MMAF3
// @namespace   Escalations Auto Fill
// @include     http://*.collegehoops.upickem.net/collegebasketball/framed/*
// @include     http://*.collegebasketball.upickem.net/collegebasketball/framed/*
// @version     1.1.2
// @grant       none
// ==/UserScript==

//Copy code on bottom line of screen.








function getCookie(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for(var i=0; i<ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1);
        if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
    }
    return "";
};


//alter element in bracket

window.onload = function Checking(){
    if (document.getElementById('AutoFillReady').innerHTML=='No'){
        setTimeout(Checking, 5000);
    }else if (document.getElementById('AutoFillReady').innerHTML=='Yes'){
        if (getCookie('round_number')=='R64'){
            AutoFill64()
        } else if (getCookie('round_number')=='R16'){
            AutoFill16()
        } else if (getCookie('round_number')=='R4'){
            AutoFill4()
        }
    }
}
  
  
function AutoFill64(){

    alert('starting')
    //alert(document.getElementById('AutoFillReady').innerHTML)
    var Bottom = document.getElementById("MarchMadnessWinnerSpot").innerHTML  
    BottomAdj = Bottom.split(",")
    console.log(BottomAdj)
    AdjSpots=BottomAdj
    //AdjSpots=Spots.split(",")
    var inputs = document.getElementsByTagName('input');
  
    for(var i = 0; i < inputs.length; i++) {
        if(inputs[i].type.toLowerCase() == 'checkbox') {
            if(inputs[i].name == "chkGame1"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[0] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[0] == "B"){
                        inputs[i].click()
                    }
                }
            }
            if(inputs[i].name == "chkGame2"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[1] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[1] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame3"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[2] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[2] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame4"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[3] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[3] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame5"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[4] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[4] == "B"){
                        inputs[i].click()
                    }
                }
            }
            if(inputs[i].name == "chkGame6"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[5] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[5] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame7"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[6] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[6] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame8"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[7] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[7] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame9"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[15] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[15] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame10"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[16] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[16] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame11"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[17] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[17] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame12"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[18] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[18] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame13"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[19] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[19] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame14"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[20] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[20] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame15"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[21] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[21] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame16"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[22] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[22] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame17"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[30] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[30] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame18"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[31] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[31] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame19"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[32] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[32] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame20"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[33] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[33] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame21"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[34] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[34] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame22"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[35] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[35] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame23"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[36] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[36] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame24"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[37] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[37] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame25"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[45] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[45] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame26"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[46] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[46] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame27"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[47] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[47] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame28"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[48] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[48] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame29"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[49] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[49] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame30"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[50] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[50] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame31"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[51] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[51] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame32"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[52] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[52] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame33"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[8] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[8] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame34"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[9] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[9] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame35"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[10] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[10] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame36"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[11] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[11] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame37"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[23] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[23] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame38"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[24] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[24] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame39"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[25] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[25] == "B"){
                        inputs[i].click()
                    }
                }
            }                    
            if(inputs[i].name == "chkGame40"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[26] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[26] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame41"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[38] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[38] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame42"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[39] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[39] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame43"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[40] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[40] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame44"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[41] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[41] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame45"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[53] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[53] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame46"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[54] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[54] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame47"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[55] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[55] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame48"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[56] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[56] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame49"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[12] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[12] == "B"){
                        inputs[i].click()
                    }
                }
            }     
            if(inputs[i].name == "chkGame50"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[13] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[13] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame51"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[27] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[27] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame52"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[28] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[28] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame53"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[42] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[42] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame54"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[43] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[43] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame55"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[57] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[57] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame56"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[58] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[58] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame57"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[14] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[14] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame58"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[29] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[29] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame59"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[44] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[44] == "B"){
                        inputs[i].click()
                    }
                }
            }     
            if(inputs[i].name == "chkGame60"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[59] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[59] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame61"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[60] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[60] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame62"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[61] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[61] == "B"){
                        inputs[i].click()
                    }
                }
            }                    
        }
    }
}
function AutoFill16(){

    alert('starting')
    //alert(document.getElementById('AutoFillReady').innerHTML)
    var Bottom = document.getElementById("MarchMadnessWinnerSpot").innerHTML  
    BottomAdj = Bottom.split(",")
    console.log(BottomAdj)
    AdjSpots=BottomAdj
    //AdjSpots=Spots.split(",")
    var inputs = document.getElementsByTagName('input');
  
    for(var i = 0; i < inputs.length; i++) {
        if(inputs[i].type.toLowerCase() == 'checkbox') {
            if(inputs[i].name == "chkGame49"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[0] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[0] == "B"){
                        inputs[i].click()
                    }
                }
            }     
            if(inputs[i].name == "chkGame50"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[1] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[1] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame51"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[3] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[3] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame52"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[4] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[4] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame53"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[6] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[6] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame54"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[7] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[7] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame55"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[9] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[9] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame56"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[10] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[10] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame57"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[2] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[2] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame58"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[5] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[5] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame59"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[8] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[8] == "B"){
                        inputs[i].click()
                    }
                }
            }     
            if(inputs[i].name == "chkGame60"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[11] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[11] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame61"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[12] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[12] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame62"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[13] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[13] == "B"){
                        inputs[i].click()
                    }
                }
            }                    
        }
    }
}
function AutoFill4(){

    alert('starting4')
    //alert(document.getElementById('AutoFillReady').innerHTML)
    var Bottom = document.getElementById("MarchMadnessWinnerSpot").innerHTML  
    BottomAdj = Bottom.split(",")
    console.log(BottomAdj)
    AdjSpots=BottomAdj
    //AdjSpots=Spots.split(",")
    var inputs = document.getElementsByTagName('input');
  
    for(var i = 0; i < inputs.length; i++) {
        if(inputs[i].type.toLowerCase() == 'checkbox') {          
            if(inputs[i].name == "chkGame61"){
                console.log('found');
                console.log(inputs[i].value)
                if(inputs[i].value == "0"){
                    if(AdjSpots[0] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[0] == "B"){
                        inputs[i].click()
                    }
                }
            }          
            if(inputs[i].name == "chkGame62"){
                if(inputs[i].value == "0"){
                    if(AdjSpots[1] == "T"){
                        inputs[i].click()
                    }
                }
                if(inputs[i].value == "1"){
                    if(AdjSpots[1] == "B"){
                        inputs[i].click()
                    }
                }
            }                    
        }
    }
}
//AutoFillCheckAndGo()