// JavaScript Document

/*
File: see_htm.js
Purpose: Recieve a whole number called which_htm from a navigation area and replace the current .htm with the new one identified by which_htm
      <input type="button" value="WiP1"onclick="see_htm(1)" />
      <input type="button" value="Calendar of Events" onclick="see_htm(2)"/>
      <input type="button" value="WiP3" onclick="see_htm(3)"/>
      <br />
      <input type="button" value="WiP7" onclick="see_htm(7)" />
      <input type="button" value="WiP4" onclick="see_htm(4)"/>
      <input type="button" value="WiP16" onclick="see_htm(16)"/>
      <br />
      <input type="button" value="WiP9" onclick="see_htm(9)"/>
      <input type="button" value="WiP18" onclick="see_htm(18)" />

*/

htm_file = [
"not_used", // 0
"../index.htm", // 1
"nu_calendar2009_10.htm", // 2
"generic_calendar.htm", // 3
"wip_calendar.htm", // 4
"", // 5
"", // 6
"continuous_calendar3.htm", // 7
"", // 8
"wip_calendar.htm", // 9
"", // 10
"", // 11
"", // 12
"", // 13
"", // 14
"", // 15
"wip_calendar.htm", // 16
"", // 17
"wip_calendar.htm", // 18
"", // 19
"", // 20
"", // 21
"" // 22
]

//Manually assign the htm file names a position in the array. 

function see_htm(which_htm){//which_htm is assigned in the calling object and identifies the position in the array for the htm file.
	for (i=0;i<htm_file.length;i++){
		//document.write("i= "+i+"<br />");
		if (i==which_htm){
		window.location=htm_file[i]
		}
	}
}

function view_htm_array(){//utility for developer to see the array (htm_file) and rank
	for (i=0;i<htm_file.length;i++){
		document.write("&nbsp;&nbsp;htm_file["+i+"]= "+htm_file[i]+"<br />");
	}
}