var currentPage = location.pathname;

function Link( href, name ) {
	this.name = name;
	this.href = href;
	this.id = name.split(' ')[0];
}

var Links = [
	new Link( '/',				'home' ),
	new Link( '/bio.html',		'sample208' ),
	new Link( '/hear',			'hear me' ),
	new Link( '/see',			'see me' ),
 	new Link( '/blog',			'read me' ),
// 	new Link( '/eat',			'eat me' ),
	new Link( 'mailto:sample208@earthlink.net',		'contact me' )
];

function showNav()
{
	var noURLmatch = true,
		thisLink,
		out = '\n	<div id="nav">\n		<div id="nav_inner">\n			';
		out += '<a href="/">home</a>';
	for ( var x=1; x < Links.length; x++ )
	{
		thisLink = Links[x];
		out += '<a href="' + thisLink.href + '" class="' + thisLink.id + ( ( currentPage.indexOf( thisLink.href ) > -1 ) ? ' active' : '' ) + '">' + thisLink.name + '</a>';
	}
	out += '\n		</div>\n	</div>';
	return out;
}

function showHeader()
{
	var out = showNav() + '\n<div id="header">' 
			+ '\n</div>'
			+ '\n<div class="mainContent">';
	document.write( out );
 	//Debug( out );
}

function showFooter()
{
	var out = '\n</div>'
			+ '\n<div id="footer">'
			+ '\n</div>';
	document.write( out );
// 	Debug( out );
}

