function flip( show, hide ) { show.style.display = ''; hide.style.display = 'none'; } function drawlabel(i) { document.write(""); document.write("" + i + ""); document.write(""); } function drawcheck(game,i,qp) { document.write(""); document.write(""); document.write(""); } function checkReload() { for( var i = 1; i <= 6; i++ ) { for( var j = 1; j <= gamenum[i]; j++ ) { var cb = document.getElementById(''+i+'box'+j); if(cb.checked) addCB('', i, j); } } } function checkTop() { var ok = true; var input = document.getElementById('firstname'); if( input.value == "" ) { input.style.background = "red"; ok = false; } else input.style.background = "white"; input = document.getElementById('lastname'); if( input.value == "" ) { input.style.background = "red"; ok = false; } else input.style.background = "white"; input = document.getElementById('email'); if( input.value == "" ) { input.style.background = "red"; ok = false; } else input.style.background = "white"; input = document.getElementById('address'); if( input.value == "" ) { input.style.background = "red"; ok = false; } else input.style.background = "white"; input = document.getElementById('city'); if( input.value == "" ) { input.style.background = "red"; ok = false; } else input.style.background = "white"; input = document.getElementById('zipcode'); if( input.value == "" ) { input.style.background = "red"; ok = false; } else input.style.background = "white"; if( !ok ) { window.scrollTo(0,0); alert('Some of your required fields are still empty. Please fill them in.'); } return ok; } function checkPIN() { var ok = true; var input = document.getElementById('pin'); if( document.getElementById('hiddenpin').value != input.value ) { input.style.background = "red"; ok = false; } else input.style.background = ""; if( !ok ) { window.scrollTo(0,0); alert('Your pin does not match.'); } return ok; } function checksForGame(game) { return game == 6 ? 7 : 6; } function addCB( cb, game, box ) { var maxchecks = checksForGame(game); if( !games ) games = new Array(); if( !games[game] ) games[game] = new Array(); if( games[game].length >= maxchecks ) { cb.checked = false; alert("You have already chosen all "+maxchecks+" numbers for that game."); return; } games[game].push( box ); } function remCB( cb, game, box ) { if( !games ) return; if( !games[game] ) return; var i = 0; for( ; i