  
 
  vFooterText = "<div id='endMatter'><span id='menuNavigation'><a href='http://blog.rosterslots.com' target='_new' id='about'>About</a> | <span onClick='toggleRoster(\"previous\",\"same\")' id='lineups'>Lineups</span> | <span onClick='switchLeaderboard(\"yesterday\")' id='leaderboards'>Leaderboards</span> | <span onClick='loadComments()' id='comments'>Comments</span> | <span onClick='tradingPost()' id='trades'>Trades</span></span><span id='copyright'>Copyright and Trademark 2009 - RosterSlots.com. Patent Pending.</span></div><iframe onload='this.contentWindow.document.body.scrollTop=115' id='twitterFeed' frameborder='0' scrolling='no' height='190px' src='twitterFeed.html'></iframe></span>";
  //| <span id='live'>Watch</span> | <span id='invitations'>Invite</span> | <span id='customize'>Customize</span> | <span id='membership'>Membership</span>
  vFirstSpin = "yes";
  vSpinNumber = "";
  vSpinPotential = "";
  window.onload = rosterSlots;
  function rosterSlots()
                {
		 checkForUser();
		 start();
		}
      function AjaxTemplate()
		{
		xmlhttp=GetXmlHttpObject();
		var url=".php";  
		xmlhttp.onreadystatechange=fromReadyStateChangeAbove;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null); 
		}
      function fromReadyStateChangeAbove() 
		{  
		if (xmlhttp.readyState==4)  
		{    
		document.getElementById('').innerHTML=xmlhttp.responseText;  
		} 
		}
      function showDesc(vID)
                {
                document.getElementById(vID).style.display="inline";
                }
      function hideDesc(vID)
                {
                document.getElementById(vID).style.display="none";
                }
      function saveToGroup(vGroup, vMember)
                {
                 if(validUser=="true")
                 {
		  document.location.href="saveToGroup.php?member=" + vMember;
                 }
                 else
                 {
                  alert('You must log in first.');
                 }
		}
      function loadComments()
		{
                window.location.href = "history.php";
		//xmlhttp=GetXmlHttpObject();
		//var url="loadComments.php";  
		//xmlhttp.onreadystatechange=showComments;  
		//xmlhttp.open("GET",url,true);  
		//xmlhttp.send(null); 
		}
      function showComments() 
		{  
		if (xmlhttp.readyState==4)  
		{
		document.getElementById('indexContent').innerHTML=xmlhttp.responseText + vFooterText;
		window.location.href = "#commentPage";
		} 
		}
      function makeTrade(vID)
                {
		if (validUser=='true')
		{
		xmlhttp=GetXmlHttpObject();
		var url="makeTrade.php?tradePostId=" + vID;  
		xmlhttp.onreadystatechange=confirmTrade;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null); 
		}
		else
		{
		alert('You must log in to make a trade.');
		}
		}
      function showConfirm(vNum)
               {
	       vConfirm = "otherTeamsConfirm" + vNum;
	       vUndo = "otherTeamsUndo" + vNum;
               document.getElementById(vConfirm).style.visibility = "visible";
	       document.getElementById(vUndo).style.visibility = "visible";
	       //document.getElementById('trade').style.visibility = "hidden";
               }
      function hideConfirm(vNum)
               {
	       vConfirm = "otherTeamsConfirm" + vNum;
	       vUndo = "otherTeamsUndo" + vNum;
	       document.getElementById(vConfirm).style.visibility = "hidden";
	       document.getElementById(vUndo).style.visibility = "hidden";
	       //document.getElementById('trade').style.visibility = "visible";
	       }
      function confirmTrade() 
		{  
		if (xmlhttp.readyState==4)  
		{    
		  vResponse = xmlhttp.responseText;
		  if (vResponse.indexOf('same') != "-1")
		    {
		     alert('You cannot trade for your own players.');
		    }
		  else
                    {
                     if (vResponse.indexOf('short') != "-1")
		      {
		        alert('You do not have enough spins to make this trade.');
		      }
                     else
                      {
		        if (vResponse != "short" && vResponse != "same")
		         {
		           alert('The trade is complete.');
		           document.location.href = "trades.php"; 
		         }
                      }
		    }
		}
                }
      function postToTrade(vSpins)
                {
		if (validUser=='true')
		{
		if (vSpins == '')
		{
		 alert('You must first select the number of spins you want in exchange for these players.');
		}
		else
		{
		xmlhttp=GetXmlHttpObject();
		var url="postToTrade.php?wanted=" + vSpins + "&position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();  
		xmlhttp.onreadystatechange=updateTradePost;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null);
		}
		}
		else
		{
		 alert('You must log in before you can post a trade.'); 
		}
		}
      function updateTradePost() 
		{  
		if (xmlhttp.readyState==4)  
		{
		vResponse = xmlhttp.responseText;
		if (vResponse.lastIndexOf('Cannot post.')!= -1)
		{
		 alert('Cannot post. There are no players in the selected roster slots.');
		}
		else
		{
		tradingPost();
		alert('Your players have been posted');
		}
		} 
		}
      function tradingPost()
		{
		vDate = new Date();
                vTime = vDate.getHours();
		window.location.href = "trades.php";
		}
      function viewLineup(teamName)
                {
		window.location.href = "lineups.php?roster=previous&team=" + teamName; 
		}
      function toggleLock()
		{
		 
		if (validUser=='true')
		{
		xmlhttp4=GetXmlHttpObject();
		var url="toggleLock.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();  
		xmlhttp4.onreadystatechange=updateLockIcon;  
		xmlhttp4.open("GET",url,true);  
		xmlhttp4.send(null);
		}
		else
		{
		 alert('You must sign in or create an account to lock players. ');
		}
		}
      function updateLockIcon() 
		{  
		if (xmlhttp4.readyState==4)  
		{
		document.getElementById('lockButton').innerHTML = xmlhttp4.responseText; 
		} 
		}
      function switchAction()
                {
		 if(document.getElementById('action').value == 'leaderboard')
		  {
		   xmlhttp7=GetXmlHttpObject();
		   var url="loadLeaderboard.php?leaderboard=yesterday";  
		   xmlhttp7.onreadystatechange=loadLeaderboard;  
		   xmlhttp7.open("GET",url,true);  
		   xmlhttp7.send(null); 
		  }
		  if(document.getElementById('action').value == 'lock')
		  {
		   toggleLock(); 
		  }
		  if(document.getElementById('action').value == 'trade')
		  {
		   tradingPost(); 
		  }
		  if(document.getElementById('action').value == 'lineup')
		  {
		   toggleRoster("current","same");
		  }
		  if(document.getElementById('action').value == 'scoring')
		  {
		   toggleRoster("previous","same");
		  }
		  if(document.getElementById('action').value == 'play')
		  {
		   pullHandle();
		  }
		 document.getElementById('spinCount').selected = 'spinCount'; 
		}
     function switchLeaderboard(vLeaderboard)
                {
		   xmlhttp7=GetXmlHttpObject();
		   var url="loadLeaderboard.php?leaderboard=" + vLeaderboard;  
		   xmlhttp7.onreadystatechange=loadLeaderboard;  
		   xmlhttp7.open("GET",url,true);  
		   xmlhttp7.send(null); 
		}
      function loadLeaderboard() 
		{  
		if (xmlhttp.readyState==4)  
		{
		responseText = xmlhttp7.responseText + vFooterText;
		document.getElementById('indexContent').innerHTML=responseText;
		window.location.href="#leaderboard";
		} 
		}
      function switchPositionTradePost()
               {
                window.location.href = "trades.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();
               }
      function switchPositionWho()
               {
               window.location.href = "/who.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();
               }
      function switchPositionWhoYesterday()
               {
               window.location.href = "/whoYesterday.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();
               }
      function switchPosition() 
	        {
		document.getElementById('slot1Result').style.visibility = "hidden";  
		document.getElementById('slot2Result').style.visibility = "hidden";  
		document.getElementById('slot3Result').style.visibility = "hidden";
                
		xmlhttpLoad=GetXmlHttpObject();  
		if (xmlhttpLoad==null)  
		{  
		alert ("Your browser does not support XMLHTTP. Please install the most current version of Internet Explorer, FireFox, Chrome, Opera, or Safari");  
		return;  
		}
                vSelPos = document.getElementById('position').selectedIndex;
                var url="loadPrevResults.php?position=" + vSelPos + "&sid=" + Math.random();  
                xmlhttpLoad.onreadystatechange=loadDials; 
		xmlhttpLoad.open("GET",url,true);  
		xmlhttpLoad.send(null);
		}
      function loadDials() 
		{
		if (xmlhttpLoad.readyState==4)  
		{
                vResult = xmlhttpLoad.responseText;
                if (vResult.lastIndexOf('dialNameTop')==-1)
                {
                document.getElementById('slot3').style.visibility = "visible"; 
		document.getElementById('slot1').style.visibility = "visible";  
		document.getElementById('slot2').style.visibility = "visible";
                document.getElementById('customStrip1').style.visibility = "hidden";
                document.getElementById('customStrip2').style.visibility = "hidden";
                document.getElementById('customStrip3').style.visibility = "hidden";
                }
                else
                {
		document.getElementById("slotResults").innerHTML=xmlhttpLoad.responseText;  
		document.getElementById('slot3').style.visibility = "hidden"; 
		document.getElementById('slot1').style.visibility = "hidden";  
		document.getElementById('slot2').style.visibility = "hidden";
		
		document.getElementById('slot1Result').style.visibility = "visible";  
		document.getElementById('slot2Result').style.visibility = "visible"; 
		document.getElementById('slot3Result').style.visibility = "visible";
                document.getElementById('customStrip1').style.visibility = "visible";
                document.getElementById('customStrip2').style.visibility = "visible";
                document.getElementById('customStrip3').style.visibility = "visible";
		 
                }
		}
		xmlhttp4=GetXmlHttpObject();
		var url="loadLockIcon.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();  
		xmlhttp4.onreadystatechange=updateLockIcon; 
		xmlhttp4.open("GET",url,true);  
		xmlhttp4.send(null);
		}
      function checkForUser() 
		{
		xmlhttp=GetXmlHttpObject();  
		if (xmlhttp==null)  
		{  
		alert ("Your browser does not support XMLHTTP. Please install the most current version of Internet Explorer, FireFox, Chrome, Opera, or Safari");  
		return;  
		}  
		var url="checkForUser.php";
		vURL = window.location.href;
		if (vURL.lastIndexOf('spinCount')!=-1)
		{
		var vSpinCount = gup('spinCount');
		document.getElementById('spinCount').innerHTML="Click Baseball, Get Players (" + vSpinCount + ")";
		}
		xmlhttp.onreadystatechange=userText;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null);
		setTimeout("flashBulbs()",2000);
                setTimeout("checkTrade()",2000);
		/*
                if (vURL.lastIndexOf('leaderboard')!=-1)
		{
		 alert("View yesterday's leaderboard");
		 switchLeaderboard('yesterday');
		}
                */
		} 
      function userText() 
		{
		validUser = 'false';
		if (xmlhttp.readyState==4)  
		{  
		userCheckString = xmlhttp.responseText;
		if (userCheckString.indexOf('Hello')==-1)
		{
		 validUser = 'false';
		}
		else
		{
                 document.getElementById("signIn").innerHTML=userCheckString;
		 validUser = 'true';
		}
                getSpinPotential();
		getEventList();
		//getIndexContent(); no more indexContent div
		//switchPosition(); this had to be moved to eventList()
		}
		}
      function getSpinPotential() 
		{
		xmlhttp5=GetXmlHttpObject();  
		var url="getSpinPotential.php";  
		xmlhttp5.onreadystatechange=spinPotential;  
		xmlhttp5.open("GET",url,true);  
		xmlhttp5.send(null);
		}
      function spinPotential() 
		{
		 if (xmlhttp5.readyState==4)  
		  {
		   vSpinPotential = xmlhttp5.responseText;
                  }
                }
      function getEventList() 
		{
		xmlhttp3=GetXmlHttpObject();  
		var url="getEventList.php";  
		xmlhttp3.onreadystatechange=eventList;  
		xmlhttp3.open("GET",url,true);  
		xmlhttp3.send(null);
		}
      function eventList() 
		{
		 if (xmlhttp3.readyState==4)  
		  {
		   document.getElementById('positionDiv').innerHTML=xmlhttp3.responseText;
                   switchPosition(); 
		   //oOption = document.createElement("OPTION");
		   //oOption.text = 'test';
		   //document.getElementById('position').add(oOption);

		  }
		}
      function stretch()
                {
		 document.getElementById('position').style.width='300px';
		}
      function shrink()
                {
		 document.getElementById('position').style.width='175px';
		}
      function getIndexContent() 
		{ 
		xmlhttp2=GetXmlHttpObject();  
		var url="getIndexContent.php";  
		xmlhttp2.onreadystatechange=indexContent;  
		xmlhttp2.open("GET",url,true);  
		xmlhttp2.send(null); 
		}
      function indexContent() 
		{  
		if (xmlhttp2.readyState==4)  
		{
		responseText = xmlhttp2.responseText + vFooterText; 
		document.getElementById('indexContent').innerHTML=responseText;  
		} 
		}
      function pullHandle() 
		{
		if(validUser=='true')
                {
                if(document.getElementById('position').selectedIndex==0)
		{
		alert('You must select a position first.');
		}
		else
		{
		xmlhttp=GetXmlHttpObject();
		var url="checkForLock.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();  
		xmlhttp.onreadystatechange=checkForLock;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null);
		}
                }
                else
                {
                if(document.getElementById('position').selectedIndex==0)
		{
		alert('You must select a position first.');
		}
                else
                {
                alert('You are not signed in. This spin is just practice. \n\nYou can sign in using an existing Google, Facebook, Yahoo, AOL, Microsoft, or OpenId account. You can also create a new account with one of these providers.');
                xmlhttp=GetXmlHttpObject();
		var url="checkForLock.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();  
		xmlhttp.onreadystatechange=checkForLock;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null);
                }
                }
		}
      function checkForLock() 
		{  
		if (xmlhttp.readyState==4)
		{
		if (xmlhttp.responseText=='unlocked')
		{
		document.getElementById('handle').src="animatedHandle.gif";
		reduceSpinCount();
		setTimeout('getPlayers()', 250);
		}
		else
		{
		 if (xmlhttp.responseText=='nospins')
		 {
		  alert('You are out of spins for today. Please play again tomorrow.');
		 }
		 else
		 {
		  alert('These players are locked. Click the lock icon to unlock.');
		 }
		}
		}
		}
      function reduceSpinCount() 
		{  
		xmlhttp3=GetXmlHttpObject();  
		if (xmlhttp3==null)  
		{  
		alert ("Your browser does not support XMLHTTP. Please install the most current version of Internet Explorer, FireFox, Chrome, Opera, or Safari"); 
		return;  
		}  
		var url="reduceSpinCount.php";    
		xmlhttp3.onreadystatechange=loadSpinCount; 
		xmlhttp3.open("GET",url,true);
		xmlhttp3.send(null);
		}
      function loadSpinCount()
		{
                if (xmlhttp3.readyState==4)
		  {
                  vSpinNumber = xmlhttp3.responseText; 
                  document.getElementById('spinCount').innerHTML=vSpinNumber;
                  }
		}
      function getPlayers() 
		{  
		xmlhttpSpin=GetXmlHttpObject();  
		if (xmlhttpSpin==null)  
		{  
		alert ("Your browser does not support XMLHTTP. Please install the most current version of Internet Explorer, FireFox, Chrome, Opera, or Safari"); 
		return;  
		}  
		var url="getPlayers.php?position=" + document.getElementById('position').selectedIndex + "&sid=" + Math.random();    
		xmlhttpSpin.onreadystatechange=loadResults; 
		xmlhttpSpin.open("GET",url,true);
		xmlhttpSpin.send(null); 
		document.getElementById('slot1Result').style.visibility = "hidden";  
		document.getElementById('slot2Result').style.visibility = "hidden";  
		document.getElementById('slot3Result').style.visibility = "hidden";  
		document.getElementById('slot3Spin').style.visibility = "visible";  
		document.getElementById('slot3').style.visibility = "hidden";  
		document.getElementById('slot1Spin').style.visibility = "visible";  
		document.getElementById('slot1').style.visibility = "hidden";  
		document.getElementById('slot2Spin').style.visibility = "visible";  
		document.getElementById('slot2').style.visibility = "hidden";   
		}
      function loadResults()
		{
		if (xmlhttpSpin.readyState==4)  
		{  
		document.getElementById("slotResults").innerHTML=xmlhttpSpin.responseText;  
		setTimeout('pullResult1()', 750);  
		setTimeout('pullResult2()', 1500);  
		setTimeout('pullResult3()', 2250);  
		}
		} 
      function pullResult1() 
		{  
		document.getElementById('slot1Spin').style.visibility = "hidden";  
		document.getElementById('slot1Result').style.visibility = "visible";
                document.getElementById('customStrip1').style.visibility = "visible";

		if (vFirstSpin == 'yes')
		  {
		   document.getElementById('pointsPointer').style.visibility="visible";
		   vFirstSpin = "no";
		   vHidePointer = setTimeout("hidePointer()",5000);
		  }
		}
      function hidePointer()
                {
	         document.getElementById('pointsPointer').style.visibility="hidden";
		}
      function pullResult2() 
		{  
		document.getElementById('slot2Spin').style.visibility = "hidden";  
		document.getElementById('slot2Result').style.visibility = "visible";
                document.getElementById('customStrip2').style.visibility = "visible";
		}
      function pullResult3() 
		{  
		document.getElementById('slot3Spin').style.visibility = "hidden";  
		document.getElementById('slot3Result').style.visibility = "visible";
                document.getElementById('customStrip3').style.visibility = "visible";
                
                if (vSpinNumber < 1 && vSpinPotential == "15")
                    {
                     vShareForSpins = confirm('You are out of spins. Would you like to get 5 more everyday by sharing this site with a friend today? RosterSlots will not store your friends\' e-mail addresses.');
                     if (vShareForSpins)
                     {
                      window.location.href = "share.php";
                     }
                    }
		/*
                 if (validUser=='true')
		{
		xmlhttp5=GetXmlHttpObject();
		var url="updateRoster.php?previous=no";  
		xmlhttp5.onreadystatechange=updateRoster;  
		xmlhttp5.open("GET",url,true);  
		xmlhttp5.send(null);
		}
                */
		}
      function toggleRoster(vSet,vTeam)
                {
		if (validUser=='true')
		{
                  alert('working');
		}
		else
		{
		alert('You must log in to view rosters.');
		}
                }
      function updateRosterWithScroll()
                {
		if (xmlhttp.readyState==4)  
		{
		responseText = xmlhttp5.responseText + vFooterText;
		document.getElementById('contentArea').innerHTML=responseText;
		window.location.href="#lineup";
		} 
		}
      function updateRoster() 
		{  
		if (xmlhttp.readyState==4)  
		{
		responseText = xmlhttp5.responseText + vFooterText;
		document.getElementById('contentArea').innerHTML=responseText;
		} 
		}
      function GetXmlHttpObject()
		{
		if (window.XMLHttpRequest)  
		{  
		// code for IE7+, Firefox, Chrome, Opera, Safari  
		return new XMLHttpRequest();  
		}
		if (window.ActiveXObject)  
		{  
		// code for IE6, IE5  
		return new ActiveXObject("Microsoft.XMLHTTP");  
		}
		return null;
		}
      function gup(name)
                {
		name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
		var regexS = "[\\?&]"+name+"=([^&#]*)";
		var regex = new RegExp( regexS );
		var results = regex.exec( window.location.href );
		if( results == null )
		  return "";
		else
		  return results[1];
                 }
      vCheckTrade = setInterval("checkTrade()", 15000);
      function checkTrade()
		{
		xmlhttp=GetXmlHttpObject();
		var url="refreshTeam.php";  
		xmlhttp.onreadystatechange=refreshTeam;  
		xmlhttp.open("GET",url,true);  
		xmlhttp.send(null);
		}
      function refreshTeam() 
		{
		if (xmlhttp.readyState==4)  
		{
		if (xmlhttp.responseText=="0")
                 {}
                else
                 {
                 if (xmlhttp.responseText=="1")
                  {
                   //alert(xmlhttp.responseText);
                   alert('A trade has been completed. Click OK to refresh your lineup.');
                   document.location.href='index.php';
                  }
                  else
                  {
                     if (xmlhttp.responseText=="2")
                      {
                       alert('Lineups have been locked for today\'s games. Click OK to refresh your lineup.');
                       document.location.href='index.php';
                      }
                  }
                 }
		} 
		}
      
      vFlashBulbs = setInterval("flashBulbs()",30000);    
      function flashBulbs()
                {
		document.getElementById('textGlimmer1').style.visibility='visible';
		document.getElementById('textGlimmer2').style.visibility='visible';
		document.getElementById('textGlimmer3').style.visibility='visible';
		document.getElementById('textGlimmer4').style.visibility='visible';
		document.getElementById('textGlimmer5').style.visibility='visible';
		document.getElementById('textGlimmer6').style.visibility='visible';
		vBegin = setInterval("animateGlimmer()",100);
	        vEnd = setTimeout("clearInterval(vBegin)",4500);
		vEnd2 = setTimeout("hideBulbs()",5000);
		}
      function animateGlimmer()
                {
                vTRandom = randomGenerator(204,364);
                vLRandom = randomGenerator(10,200);
                document.getElementById('textGlimmer1').style.top=vTRandom;
                document.getElementById('textGlimmer1').style.left=vLRandom;
                vTRandom = randomGenerator(204,364);
                vLRandom = randomGenerator(10,200);
                document.getElementById('textGlimmer2').style.top=vTRandom;
                document.getElementById('textGlimmer2').style.left=vLRandom;
                vTRandom = randomGenerator(204,364);
                vLRandom = randomGenerator(800,990);
                document.getElementById('textGlimmer3').style.top=vTRandom;
                document.getElementById('textGlimmer3').style.left=vLRandom;
                vTRandom = randomGenerator(204,364);
                vLRandom = randomGenerator(800,990);
                document.getElementById('textGlimmer4').style.top=vTRandom;
                document.getElementById('textGlimmer4').style.left=vLRandom;
                vTRandom = randomGenerator(204,364);
                vLRandom = randomGenerator(10,200);
                document.getElementById('textGlimmer5').style.top=vTRandom;
                document.getElementById('textGlimmer5').style.left=vLRandom;
                vTRandom = randomGenerator(204,364);
                vLRandom = randomGenerator(800,990);
                document.getElementById('textGlimmer6').style.top=vTRandom;
                document.getElementById('textGlimmer6').style.left=vLRandom;
                }
      function hideBulbs()
                {
		document.getElementById('textGlimmer1').style.visibility='hidden';
		document.getElementById('textGlimmer2').style.visibility='hidden';
		document.getElementById('textGlimmer3').style.visibility='hidden';
		document.getElementById('textGlimmer4').style.visibility='hidden';
		document.getElementById('textGlimmer5').style.visibility='hidden';
		document.getElementById('textGlimmer6').style.visibility='hidden';
		}
      function randomGenerator(vLow,vHigh)
                {
                return Math.floor((vHigh - vLow + 1)*Math.random() + vLow);
                }
      function showStats(vSlot)
                {
		 document.getElementById(vSlot).style.visibility='visible';
		}
      function hideStats(vSlot)
                {
		 document.getElementById(vSlot).style.visibility='hidden';
		}


// ****  Time Zone Count Down Javascript  **** //
/*
Visit http://rainbow.arch.scriptmania.com/scripts/
 for this script and many more
*/

////////// CONFIGURE THE COUNTDOWN SCRIPT HERE //////////////////

/*
var month = '0';     //  '*' for next month, '0' for this month or 1 through 12 for the month 
var day = '+1';       //  Offset for day of month day or + day  
var hour = 13;        //  0 through 23 for the hours of the day
var tz = -5;         //  Offset for your timezone in hours from UTC
var lab = 'tzcd';    //  The id of the page entry where the timezone countdown is to show
*/

var month = '0';     //  '*' for next month, '0' for this month or 1 through 12 for the month 
var day = '+1';       //  Offset for day of month day or + day  
var hour = 13;        //  0 through 23 for the hours of the day
var tz = -4;         //  Offset for your timezone in hours from UTC
var lab = 'tzcd';    //  The id of the page entry where the timezone countdown is to show

function start() {displayTZCountDown(setTZCountDown(month,day,hour,tz),lab);}

    // **    The start function can be changed if required   **
//window.onload = start;

////////// DO NOT EDIT PAST THIS LINE //////////////////

function setTZCountDown(month,day,hour,tz) 
{
var toDate = new Date();
if (month == '*')toDate.setMonth(toDate.getMonth() + 1);
else if (month > 0) 
{ 
if (month <= toDate.getMonth())toDate.setYear(toDate.getYear() + 1);
toDate.setMonth(month-1);
}
if (day.substr(0,1) == '+') 
{var day1 = parseInt(day.substr(1));
toDate.setDate(toDate.getDate()+day1);
} 
else{toDate.setDate(day);
}
toDate.setHours(hour);
toDate.setMinutes(0-(tz*60));
toDate.setSeconds(0);
var fromDate = new Date();
fromDate.setMinutes(fromDate.getMinutes() + fromDate.getTimezoneOffset());
var diffDate = new Date(0);
diffDate.setMilliseconds(toDate - fromDate);
return Math.floor(diffDate.valueOf()/1000);
}
function displayTZCountDown(countdown,tzcd) 
{
if (countdown < 0) document.getElementById(tzcd).innerHTML = "Lineups lock in 24 hours."; 
else {var secs = countdown % 60; 
if (secs < 10) secs = '0'+secs;
var countdown1 = (countdown - secs) / 60;
var mins = countdown1 % 60; 
if (mins < 10) mins = '0'+mins;
countdown1 = (countdown1 - mins) / 60;
var hours = countdown1 % 24;
var days = (countdown1 - hours) / 24;
document.getElementById(tzcd).innerHTML = hours+ 'h : ' +mins+ 'm : '+secs+'s';
setTimeout('displayTZCountDown('+(countdown-1)+',\''+tzcd+'\');',999);
}
}