//Button text
var text = new Array();
text[1]  = "Home";
text[2]  = "Jim"
text[3]  = "Security";
text[4]  = "Web Development";
text[5]  = "Windows Scripting Host";
text[6]  = "Guitar";
text[7]  = "Science Girl";
text[8]  = "Rachel";

//target URLs
var link = new Array();
link[1] = "index.html";
link[2] = "jim.html";
link[3] = "papers.html";
link[4] = "webdev.html";
link[5] = "wsh.html";
link[6] = "guitar.html";
link[7] = "beccy.html";
link[8] = "rachel.html";

//section names
var sect = new Array();
sect[1] = "home";
sect[2] = "jim";
sect[3] = "sec";
sect[4] = "webdev";
sect[5] = "wsh";
sect[6] = "guitar";
sect[7] = "sgirl";
sect[8] = "rachel";

//target frames
var target = new Array();
target[1] = "_top";
target[2] = "body";
target[3] = "body";
target[4] = "body";
target[5] = "body";
target[6] = "body";
target[7] = "body";
target[8] = "body";
var numcols = 8;

function write_button(num, frames) {
	var code =""

        if (frames == "1")
	{
	    code += "<tr>"
	}	
	code += "<td><a href=\"" + link[num] + "\""

	if (frames == "1")
	{
		code += " target=" + target[num]
	}
	code += "><span class=\"clsCol" + (num%numcols + 1) +"\">" + text[num] + "</span></a></td>"
	
        if (frames == "1")
	{
	    code += "</tr>"
	}	
	self.document.write(code)

}

function show_header(page) {
	// don't show header if we are using a navigation frame
	if ( parent.document.frameform.frames.value == "n")
	{
	    self.document.write('<table border=0 cellpadding=10 cellspacing=0><tr>');
	    
	    for (var i=1; i<text.length; i++)
	    {
		// don't show link if we are in that section
		if ( page == sect[i] )
		{
		    self.document.write("<td><span class=\"clsCol" + (i%numcols + 1) +"\">" + text[i] + "</span></td>");
		}
		else
		{
		    write_button(i, 0);
		}
	    }
	    self.document.write('</tr></table>');
	}
}

function do_spaces(num)
{
    for (i=0;i<num;i++)
    {
    	self.document.write('&nbsp;')
    }
}

function show_navbar() {
	    self.document.write('<table border=0 cellpadding=10 cellspacing=0>');
	    
	    for (var i=1; i<text.length; i++)
	    {
		write_button(i, 1);
	    }
	    self.document.write('</table>');
}

function do_footer( updated )
{
    self.document.write('<hr><FONT SIZE=1>This page was last revised: ' + updated + '</FONT>');
}


//"main" - add a hidden field in case the calling page is the top (parent) frame for the non-frames case.
//	   This should get overridden by a similar field in the parent frame if frames are being used.
	self.document.write('<form name="frameform"><INPUT TYPE=HIDDEN NAME="frames" VALUE="n"></form>');
	
