Create a simple next / previous link using array (JavaScript)
<p>i have created a simple table showing todays day and what classes are being run that day. I would like to have a link to be able to go to the next or previous day to see what classes are on those days. Below is my code:</p>

<pre><code>&lt;table border="1"&gt;
&lt;th&gt;&lt;div id="display_day"&gt;&lt;/div&gt;&lt;/th&gt;
&lt;tr&gt;
&lt;td&gt;

&lt;script type="text/javascript"&gt;

var day_today=new Date();

var weekday=new Array(7);
    weekday[0]="Sunday";
    weekday[1]="Monday";
    weekday[2]="Tuesday";
    weekday[3]="Wednesday";
    weekday[4]="Thursday";
    weekday[5]="Friday";
    weekday[6]="Saturday";

document.getElementById("display_day").innerHTML=weekday[day_today.getDay()]; /* display in "display_day" div above */

if (day_today.getDay()==0) /* sun */
   {
   document.write("No classes today");
   }
   else if (day_today.getDay()==1) /* mon */
   {
   document.write("9.30am - 10.30am: Mixed&lt;br&gt;5pm - 7pm: Mens advanced");
   }
   else if (day_today.getDay()==2)/* tues */
   {
   document.write("5pm - 7pm: Mens&lt;br&gt;7pm - 9pm: Womens");
   }
   else if (day_today.getDay()==3)/* wed */
   {
   document.write("9.30am - 10.30am: Mixed&lt;br&gt;12pm - 1pm: mums and bubs&lt;br&gt;5pm - 7pm: Mens advanced&lt;br&gt;7pm - 9pm: mixed");
   }
   else if (day_today.getDay()==4)/* thurs */
   {
   document.write("4.15pm - 6.15pm: Kids&lt;br&gt;5pm - 7pm: Mens&lt;br&gt;7pm - 9pm: Womens");
   }
   else if (day_today.getDay()==5)/* fri */
   {
   document.write("5pm - 7pm: Mens advanced");
   }
   else if (day_today.getDay()==6)/* sat */
   {
   document.write("8.30am - 10am: Kids&lt;br&gt;10am - 11am: Womens");
   }

&lt;/script&gt;

&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt; 
</code></pre>

<p>Any help would be greatly appreciated.</p>
