/* This functions generates the navigation panel which will be
   displayed on the top of the pages. This will make inserting new
   pages into the panel easier and less of a chore. Nice trick ;-)
   
   To insert a new page, just add the name of the panel label to the
   panelElements array.
   Note: The name of the page file should match, and must reside in
   the pages directory 'pageDir'.

   Written by: G. Yaikhom
*/
function insertPanel(page) {
	/* Please change the following information. */
	var elementSeparator = "|";
	var panelElements = "Overview|People|Publications|Documentation|Downloads|Videos|Contacts";
	var pageDir = "";

	/* Please leave the following untouched. */
    var panelArray = panelElements.split(elementSeparator);
	var panel = "<table class='panel' cellpadding='2' cellspacing='2'><tbody><tr>";
	var tdWidth = 700 / panelArray.length;
    for (i = 0; i < panelArray.length; i++) {
		if (page != panelArray[i]) {
			panel += "<td class='panel' style='width:" + tdWidth + ";'><a href='" + pageDir + 
				panelArray[i] + ".html'>" + panelArray[i] + "</a></td>";
		}
	}
	panel += "</tr></tbody></table>";
    document.write(panel);
}

