makes it more difficult, for no reason !
Week 2: Sep 19-21
<script type="text/javascript"> <!-- var flights = new Array(97666,97667,97668,97669,97670,97671,97672,97673,97674,97675,97676,97677,97678,97679,97881,97882,97883,97884,97885,97886,97887,97888,97889,97890,97891,97892,97893,97894,97895,97896) var Dom = YAHOO.util.Dom var Event = YAHOO.util.Event; // Event handler to scroll the pick counter with the page function f() { var top = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); var vpH = Dom.getViewportHeight(); var vpW = Dom.getViewportWidth(); var y = Dom.getY('picks_count'); var x = Dom.getX('picks_count'); var enterpicks = Dom.get('enterpicks'); var rightEdge = Dom.getX(enterpicks); var tableTop = Dom.getY(enterpicks); // var tiebTop = Dom.getY('tiebreakers'); var tiebTop = enterpicks.offsetHeight; var newY = top+50; var enterWidth = enterpicks.offsetWidth; if( tableTop > top ) newY = tableTop+30; if( top > tiebTop-90 ) newY = tiebTop-90; // window.status = top + ' ' + tableTop + ' ' + tiebTop + ' ' + y + ' ' +enterWidth; Dom.setY('picks_count',newY); Dom.setX('picks_count',rightEdge+enterWidth+20); } Event.on(window, 'scroll', f); Event.on(window, 'resize', f); Event.on(window, 'load', f); Numpicks = { display: function() { var made = Dom.get("picks_made"); made.innerHTML = Numpicks.total_flights-Numpicks.unpicked; var rem = Dom.get("picks_remaining"); rem.innerHTML = Numpicks.num_picks_required-(Numpicks.total_flights-Numpicks.unpicked); }, update: function() { Numpicks.unpicked = 0; for (i=0; i<flights.length; i++) { var input = Dom.get("nopick_" + flights); if( input.checked ) { Numpicks.unpicked++; } } }, pick: function(pick_type, flightID) { Numpicks.update(); switch( pick_type ){ case "favorite": case "underdog": if( Numpicks.total_flights-(Numpicks.unpicked+1) == Numpicks.num_picks_required ) { alert("Oops, You have already picked "+Numpicks.num_picks_required+" games"); var nopick = Dom.get("nopick_"+flightID); nopick.checked = true; Numpicks.unpicked++; } break; case "nopick": break; } Numpicks.display(); }, check: function() { if( Numpicks.total_flights-(Numpicks.unpicked) > Numpicks.num_picks_required ) { alert("You have picked more than "+Numpicks.num_picks_required+" games"); return false; } else if( Numpicks.total_flights-(Numpicks.unpicked) < Numpicks.num_picks_required ) { alert("You have picked less than "+Numpicks.num_picks_required+" games"); return false; } return true; }, random: function() { Numpicks.blank(); }, blank: function() { for(i=0;i<flights.length;i++) { input = Dom.get("nopick_" + flights); input.checked = false; } } } Numpicks.total_flights = 30; Numpicks.num_picks_required = 15; // --> </script> <table id="enterpicks" class="data"> <thead> <tr> <th class="right">Favorite</th> <th class="center">Spread</th> <th class="left">Underdog</th> <th class="center">Don't Use</th> </tr> </thead> <tbody> <tr class="odd"> <td class="right col0"> <label> Michigan
<input value="29208" name="flight_97666" onclick="Numpicks.pick('favorite','97666')" id="favorite_97666" type="radio"> </label></td> <td class="center col1">24.5</td> <td class="col2"><label> <input value="47942" name="flight_97666" onclick="Numpicks.pick('underdog','97666')" id="underdog_97666" type="radio"> Eastern Michigan </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97666" onclick="Numpicks.pick('nopick','97666')" id="nopick_97666" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Penn State
<input value="28784" name="flight_97667" onclick="Numpicks.pick('favorite','97667')" id="favorite_97667" type="radio"> </label></td> <td class="center col1">29.5</td> <td class="col2"><label> <input value="47943" name="flight_97667" onclick="Numpicks.pick('underdog','97667')" id="underdog_97667" type="radio"> Temple </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97667" onclick="Numpicks.pick('nopick','97667')" id="nopick_97667" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Alabama
<input value="30162" name="flight_97668" onclick="Numpicks.pick('favorite','97668')" id="favorite_97668" type="radio"> </label></td> <td class="center col1">34.5</td> <td class="col2"><label> <input value="47944" name="flight_97668" onclick="Numpicks.pick('underdog','97668')" id="underdog_97668" type="radio"> North Texas </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97668" onclick="Numpicks.pick('nopick','97668')" id="nopick_97668" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Kansas
<input value="30161" name="flight_97669" onclick="Numpicks.pick('favorite','97669')" id="favorite_97669" type="radio"> </label></td> <td class="center col1">22.5</td> <td class="col2"><label> <input value="30037" name="flight_97669" onclick="Numpicks.pick('underdog','97669')" id="underdog_97669" type="radio"> Duke </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97669" onclick="Numpicks.pick('nopick','97669')" id="nopick_97669" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Cincinnati <input value="29205" name="flight_97670" onclick="Numpicks.pick('favorite','97670')" id="favorite_97670" type="radio"> </label></td> <td class="center col1">0.5</td> <td class="col2"><label> <input value="30167" name="flight_97670" onclick="Numpicks.pick('underdog','97670')" id="underdog_97670" type="radio">
Oregon State </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97670" onclick="Numpicks.pick('nopick','97670')" id="nopick_97670" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Texas
<input value="28791" name="flight_97671" onclick="Numpicks.pick('favorite','97671')" id="favorite_97671" type="radio"> </label></td> <td class="center col1">17.5</td> <td class="col2"><label> <input value="30032" name="flight_97671" onclick="Numpicks.pick('underdog','97671')" id="underdog_97671" type="radio"> Texas Tech </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97671" onclick="Numpicks.pick('nopick','97671')" id="nopick_97671" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Iowa
<input value="30168" name="flight_97672" onclick="Numpicks.pick('favorite','97672')" id="favorite_97672" type="radio"> </label></td> <td class="center col1">5.5</td> <td class="col2"><label> <input value="28785" name="flight_97672" onclick="Numpicks.pick('underdog','97672')" id="underdog_97672" type="radio"> Arizona </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97672" onclick="Numpicks.pick('nopick','97672')" id="nopick_97672" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Notre Dame
<input value="28773" name="flight_97673" onclick="Numpicks.pick('favorite','97673')" id="favorite_97673" type="radio"> </label></td> <td class="center col1">10.5</td> <td class="col2"><label> <input value="30033" name="flight_97673" onclick="Numpicks.pick('underdog','97673')" id="underdog_97673" type="radio"> Michigan State </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97673" onclick="Numpicks.pick('nopick','97673')" id="nopick_97673" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Brigham Young
<input value="47945" name="flight_97674" onclick="Numpicks.pick('favorite','97674')" id="favorite_97674" type="radio"> </label></td> <td class="center col1">7.5</td> <td class="col2"><label> <input value="29212" name="flight_97674" onclick="Numpicks.pick('underdog','97674')" id="underdog_97674" type="radio"> Florida State </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97674" onclick="Numpicks.pick('nopick','97674')" id="nopick_97674" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Florida
<input value="29213" name="flight_97675" onclick="Numpicks.pick('favorite','97675')" id="favorite_97675" type="radio"> </label></td> <td class="center col1">29.5</td> <td class="col2"><label> <input value="28775" name="flight_97675" onclick="Numpicks.pick('underdog','97675')" id="underdog_97675" type="radio"> Tennessee </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97675" onclick="Numpicks.pick('nopick','97675')" id="nopick_97675" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Oregon
<input value="28792" name="flight_97676" onclick="Numpicks.pick('favorite','97676')" id="favorite_97676" type="radio"> </label></td> <td class="center col1">4.5</td> <td class="col2"><label> <input value="31625" name="flight_97676" onclick="Numpicks.pick('underdog','97676')" id="underdog_97676" type="radio"> Utah </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97676" onclick="Numpicks.pick('nopick','97676')" id="nopick_97676" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Virginia Tech
<input value="28771" name="flight_97677" onclick="Numpicks.pick('favorite','97677')" id="favorite_97677" type="radio"> </label></td> <td class="center col1">4.5</td> <td class="col2"><label> <input value="29214" name="flight_97677" onclick="Numpicks.pick('underdog','97677')" id="underdog_97677" type="radio"> Nebraska </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97677" onclick="Numpicks.pick('nopick','97677')" id="nopick_97677" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Ohio State <input value="28790" name="flight_97678" onclick="Numpicks.pick('favorite','97678')" id="favorite_97678" type="radio"> </label></td> <td class="center col1">20.5</td> <td class="col2"><label> <input value="42053" name="flight_97678" onclick="Numpicks.pick('underdog','97678')" id="underdog_97678" type="radio">
Toledo </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97678" onclick="Numpicks.pick('nopick','97678')" id="nopick_97678" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> UNLV
<input value="29216" name="flight_97679" onclick="Numpicks.pick('favorite','97679')" id="favorite_97679" type="radio"> </label></td> <td class="center col1">7.5</td> <td class="col2"><label> <input value="31500" name="flight_97679" onclick="Numpicks.pick('underdog','97679')" id="underdog_97679" type="radio"> Hawaii </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97679" onclick="Numpicks.pick('nopick','97679')" id="nopick_97679" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Atlanta
<input value="3989" name="flight_97881" onclick="Numpicks.pick('favorite','97881')" id="favorite_97881" type="radio"> </label></td> <td class="center col1">6.5</td> <td class="col2"><label> <input value="3992" name="flight_97881" onclick="Numpicks.pick('underdog','97881')" id="underdog_97881" type="radio"> Carolina </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97881" onclick="Numpicks.pick('nopick','97881')" id="nopick_97881" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Minnesota <input value="4004" name="flight_97882" onclick="Numpicks.pick('favorite','97882')" id="favorite_97882" type="radio"> </label></td> <td class="center col1">9.5</td> <td class="col2"><label> <input value="3998" name="flight_97882" onclick="Numpicks.pick('underdog','97882')" id="underdog_97882" type="radio">
Detroit </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97882" onclick="Numpicks.pick('nopick','97882')" id="nopick_97882" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Washington
<input value="4018" name="flight_97883" onclick="Numpicks.pick('favorite','97883')" id="favorite_97883" type="radio"> </label></td> <td class="center col1">10.5</td> <td class="col2"><label> <input value="4015" name="flight_97883" onclick="Numpicks.pick('underdog','97883')" id="underdog_97883" type="radio"> St. Louis </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97883" onclick="Numpicks.pick('nopick','97883')" id="nopick_97883" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Tennessee
<input value="4017" name="flight_97884" onclick="Numpicks.pick('favorite','97884')" id="favorite_97884" type="radio"> </label></td> <td class="center col1">6.5</td> <td class="col2"><label> <input value="5118" name="flight_97884" onclick="Numpicks.pick('underdog','97884')" id="underdog_97884" type="radio"> Houston </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97884" onclick="Numpicks.pick('nopick','97884')" id="nopick_97884" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Philadelphia
<input value="4010" name="flight_97885" onclick="Numpicks.pick('favorite','97885')" id="favorite_97885" type="radio"> </label></td> <td class="center col1">0.5</td> <td class="col2"><label> <input value="4006" name="flight_97885" onclick="Numpicks.pick('underdog','97885')" id="underdog_97885" type="radio"> New Orleans </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97885" onclick="Numpicks.pick('nopick','97885')" id="nopick_97885" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> New England <input value="4005" name="flight_97886" onclick="Numpicks.pick('favorite','97886')" id="favorite_97886" type="radio"> </label></td> <td class="center col1">5.5</td> <td class="col2"><label> <input value="4008" name="flight_97886" onclick="Numpicks.pick('underdog','97886')" id="underdog_97886" type="radio">
New York J. </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97886" onclick="Numpicks.pick('nopick','97886')" id="nopick_97886" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Kansas City
<input value="4002" name="flight_97887" onclick="Numpicks.pick('favorite','97887')" id="favorite_97887" type="radio"> </label></td> <td class="center col1">3.5</td> <td class="col2"><label> <input value="4009" name="flight_97887" onclick="Numpicks.pick('underdog','97887')" id="underdog_97887" type="radio"> Oakland </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97887" onclick="Numpicks.pick('nopick','97887')" id="nopick_97887" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Jacksonville
<input value="4001" name="flight_97888" onclick="Numpicks.pick('favorite','97888')" id="favorite_97888" type="radio"> </label></td> <td class="center col1">3.5</td> <td class="col2"><label> <input value="3988" name="flight_97888" onclick="Numpicks.pick('underdog','97888')" id="underdog_97888" type="radio"> Arizona </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97888" onclick="Numpicks.pick('nopick','97888')" id="nopick_97888" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Green Bay
<input value="3999" name="flight_97889" onclick="Numpicks.pick('favorite','97889')" id="favorite_97889" type="radio"> </label></td> <td class="center col1">9.5</td> <td class="col2"><label> <input value="3994" name="flight_97889" onclick="Numpicks.pick('underdog','97889')" id="underdog_97889" type="radio"> Cincinnati </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97889" onclick="Numpicks.pick('nopick','97889')" id="nopick_97889" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> San Francisco
<input value="4013" name="flight_97890" onclick="Numpicks.pick('favorite','97890')" id="favorite_97890" type="radio"> </label></td> <td class="center col1">1.5</td> <td class="col2"><label> <input value="4014" name="flight_97890" onclick="Numpicks.pick('underdog','97890')" id="underdog_97890" type="radio"> Seattle </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97890" onclick="Numpicks.pick('nopick','97890')" id="nopick_97890" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Buffalo
<input value="3991" name="flight_97891" onclick="Numpicks.pick('favorite','97891')" id="favorite_97891" type="radio"> </label></td> <td class="center col1">4.5</td> <td class="col2"><label> <input value="4016" name="flight_97891" onclick="Numpicks.pick('underdog','97891')" id="underdog_97891" type="radio"> Tampa Bay </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97891" onclick="Numpicks.pick('nopick','97891')" id="nopick_97891" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> San Diego
<input value="4012" name="flight_97892" onclick="Numpicks.pick('favorite','97892')" id="favorite_97892" type="radio"> </label></td> <td class="center col1">3.5</td> <td class="col2"><label> <input value="3990" name="flight_97892" onclick="Numpicks.pick('underdog','97892')" id="underdog_97892" type="radio"> Baltimore </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97892" onclick="Numpicks.pick('nopick','97892')" id="nopick_97892" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Denver
<input value="3997" name="flight_97893" onclick="Numpicks.pick('favorite','97893')" id="favorite_97893" type="radio"> </label></td> <td class="center col1">3.5</td> <td class="col2"><label> <input value="3995" name="flight_97893" onclick="Numpicks.pick('underdog','97893')" id="underdog_97893" type="radio"> Cleveland </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97893" onclick="Numpicks.pick('nopick','97893')" id="nopick_97893" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Pittsburgh <input value="4011" name="flight_97894" onclick="Numpicks.pick('favorite','97894')" id="favorite_97894" type="radio"> </label></td> <td class="center col1">2.5</td> <td class="col2"><label> <input value="3993" name="flight_97894" onclick="Numpicks.pick('underdog','97894')" id="underdog_97894" type="radio">
Chicago </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97894" onclick="Numpicks.pick('nopick','97894')" id="nopick_97894" type="radio"> </td> </tr> <tr class="odd"> <td class="right col0"> <label> Dallas
<input value="3996" name="flight_97895" onclick="Numpicks.pick('favorite','97895')" id="favorite_97895" type="radio"> </label></td> <td class="center col1">2.5</td> <td class="col2"><label> <input value="4007" name="flight_97895" onclick="Numpicks.pick('underdog','97895')" id="underdog_97895" type="radio"> New York G. </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97895" onclick="Numpicks.pick('nopick','97895')" id="nopick_97895" type="radio"> </td> </tr> <tr class="even"> <td class="right col0"> <label> Indianapolis <input value="4000" name="flight_97896" onclick="Numpicks.pick('favorite','97896')" id="favorite_97896" type="radio"> </label></td> <td class="center col1">3.5</td> <td class="col2"><label> <input value="4003" name="flight_97896" onclick="Numpicks.pick('underdog','97896')" id="underdog_97896" type="radio">
Miami </label> </td> <td class="center col3"> <input checked="checked" value="14934" name="flight_97896" onclick="Numpicks.pick('nopick','97896')" id="nopick_97896" type="radio"> </td> </tr> </tbody> </table> <table style="position: relative; top: -459.5px; left: 554px;" id="picks_count" class="data"><thead> <tr> <th>Made</th> <th>Remaining</th> </tr> </thead> <tbody> <tr class="odd"> <td id="picks_made" class="center col0">
</td></tr></tbody></table>
Week 2: Sep 19-21
<script type="text/javascript"> <!-- var flights = new Array(97666,97667,97668,97669,97670,97671,97672,97673,97674,97675,97676,97677,97678,97679,97881,97882,97883,97884,97885,97886,97887,97888,97889,97890,97891,97892,97893,97894,97895,97896) var Dom = YAHOO.util.Dom var Event = YAHOO.util.Event; // Event handler to scroll the pick counter with the page function f() { var top = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); var vpH = Dom.getViewportHeight(); var vpW = Dom.getViewportWidth(); var y = Dom.getY('picks_count'); var x = Dom.getX('picks_count'); var enterpicks = Dom.get('enterpicks'); var rightEdge = Dom.getX(enterpicks); var tableTop = Dom.getY(enterpicks); // var tiebTop = Dom.getY('tiebreakers'); var tiebTop = enterpicks.offsetHeight; var newY = top+50; var enterWidth = enterpicks.offsetWidth; if( tableTop > top ) newY = tableTop+30; if( top > tiebTop-90 ) newY = tiebTop-90; // window.status = top + ' ' + tableTop + ' ' + tiebTop + ' ' + y + ' ' +enterWidth; Dom.setY('picks_count',newY); Dom.setX('picks_count',rightEdge+enterWidth+20); } Event.on(window, 'scroll', f); Event.on(window, 'resize', f); Event.on(window, 'load', f); Numpicks = { display: function() { var made = Dom.get("picks_made"); made.innerHTML = Numpicks.total_flights-Numpicks.unpicked; var rem = Dom.get("picks_remaining"); rem.innerHTML = Numpicks.num_picks_required-(Numpicks.total_flights-Numpicks.unpicked); }, update: function() { Numpicks.unpicked = 0; for (i=0; i<flights.length; i++) { var input = Dom.get("nopick_" + flights); if( input.checked ) { Numpicks.unpicked++; } } }, pick: function(pick_type, flightID) { Numpicks.update(); switch( pick_type ){ case "favorite": case "underdog": if( Numpicks.total_flights-(Numpicks.unpicked+1) == Numpicks.num_picks_required ) { alert("Oops, You have already picked "+Numpicks.num_picks_required+" games"); var nopick = Dom.get("nopick_"+flightID); nopick.checked = true; Numpicks.unpicked++; } break; case "nopick": break; } Numpicks.display(); }, check: function() { if( Numpicks.total_flights-(Numpicks.unpicked) > Numpicks.num_picks_required ) { alert("You have picked more than "+Numpicks.num_picks_required+" games"); return false; } else if( Numpicks.total_flights-(Numpicks.unpicked) < Numpicks.num_picks_required ) { alert("You have picked less than "+Numpicks.num_picks_required+" games"); return false; } return true; }, random: function() { Numpicks.blank(); }, blank: function() { for(i=0;i<flights.length;i++) { input = Dom.get("nopick_" + flights); input.checked = false; } } } Numpicks.total_flights = 30; Numpicks.num_picks_required = 15; // --> </script> <table id="enterpicks" class="data"> <thead> <tr> <th class="right">Favorite</th> <th class="center">Spread</th> <th class="left">Underdog</th> <th class="center">Don't Use</th> </tr> </thead> <tbody> <tr class="odd"> <td class="right col0"> <label> Michigan
</td></tr></tbody></table>