In the second function , the array is coming up as undefined. Any Ideas ?

Code:
<script type="text/javascript">

var year = ["1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012",
...