
document.write("<div id='header'>");

$url = location.href;



//----if we're on a turn page, the draw the top nav, then a secondary nav 

if (( $url.match('theres') || $url.match('sp_') || $url.match('wellgroomed') ||$url.match('wg') || $url.match('about')  || $url.match('other') || $url.match('buy') || $url.match('contact') ) && !$url.match('pagenotfound')) {
	
	document.write( "<div id=\"nav_single\">" );
	document.write( "<a href=\"index.html\">HOME</a>" );
		
	//----TOP NAV-------------------------------------------- 
	
	//----if we're on an about page, make about selected 

	if (( $url.match('about'))&&(!$url.match('pagenotfound')))
	{
		document.write( " <a href=\"about.html\" class=\"here\">ABOUT PETER</a> " );
	}
	else 
	{
		document.write( " <a href=\"about.html\">ABOUT PETER</a> " );
	}
	
	//----if we're on a spouse page, make spouse selected 

	if (( $url.match('theres') || $url.match('sp_'))&&(!$url.match('pagenotfound')))
	{
		document.write( " <a href=\"theres.html\" class=\"here\">THERE'S A SPOUSE IN MY HOUSE</a> " );
	}
	else 
	{
		document.write( " <a href=\"theres.html\">THERE'S A SPOUSE IN MY HOUSE</a> " );
	}
	
	//----if we're on a well groomed page, make wg selected 

	if (( $url.match('wg') || $url.match('wellgroomed'))&&(!$url.match('pagenotfound')))
	{
		document.write( " <a href=\"wellgroomed.html\" class=\"here\">WELL GROOMED</a> " );
	}
	else 
	{
		document.write( " <a href=\"wellgroomed.html\">WELL GROOMED</a> " );
	}
	
	//----if we're on an other work page, make other work selected 

	if (( $url.match('other'))&&(!$url.match('pagenotfound')))
	{
		document.write( " <a href=\"other_work.html\" class=\"here\">OTHER WORK</a> " );
	}
	else 
	{
		document.write( " <a href=\"other_work.html\">OTHER WORK</a> " );
	}

//----if we're on a buy page, make buy selected 	

	if (( $url.match('buy'))&&(!$url.match('pagenotfound')))
	{
		document.write( " <a href=\"buy.html\" class=\"here\">WHERE TO BUY</a> " );
	}
	else 
	{
		document.write( " <a href=\"buy.html\" >WHERE TO BUY</a> " );
		
	}
		
	//----if we're on a contact us page, make contact selected 	

	if (( $url.match('contact'))&&(!$url.match('pagenotfound')))
	{
		document.write( " <a href=\"contact.html\" class=\"here\">CONTACT</a>" );
	}
	else 
	{
		document.write( " <a href=\"contact.html\">CONTACT</a>" );
	}
	document.write( "</div>" );
}
//----if we're on the home page, draw top nav only with home selected 

else 
{
	
	document.write( "<div id=\"nav_single\">" );
	document.write("<a href=\"index.html\" class=\"here_home\">HOME</a>  <a href=\"about.html\">ABOUT PETER</a>  <a href=\"theres.html\">THERE'S A SPOUSE IN MY HOUSE</a>  <a href=\"wellgroomed.html\">WELL GROOMED</a> <a href=\"other_work.html\">OTHER WORK</a>  <a href=\"buy.html\">WHERE TO BUY</a> <a href=\"contact.html\">CONTACT</a>");
	document.write( "</div>" );

}



//----TURN PAGE NAVS ------------------------------------------- 
	
//----if we're on a spouse page, include the header banner

if (( $url.match('theres') || $url.match('sp_'))&&(!$url.match('pagenotfound')))
	{
	document.write( "<div id=\"nav2\">" );
	
//--------draw the spouse submenu 

		
	if ( $url.match('theres') )
	{
		document.write("<a href=\"theres.html\" class=\"here\">TABLE OF CONTENTS</a>  " );
	}
	else {
document.write("<a href=\"theres.html\">TABLE OF CONTENTS</a>  " );
	}
		
				
	if ( $url.match('sp_excerpt') )
	{
document.write("<a href=\"sp_excerpt_1.html\" class=\"here\">EXCERPTS</a>  " );
	}
	else {
document.write("<a href=\"sp_excerpt_1.html\" >EXCERPTS</a>  " );
	}
		
	if ( $url.match('sp_reviews') )
	{
		document.write("<a href=\"sp_reviews.html\" class=\"here\">REVIEWS</a> " );
	}
	else {
		document.write("<a href=\"sp_reviews.html\" >REVIEWS</a>  " );
	}
	
	if ( $url.match('sp_buy') )
	{
		document.write("<a href=\"sp_buy.html\" class=\"here\">BUY</a> " );
	}
	else {
		document.write("<a href=\"sp_buy.html\" >BUY</a>  " );
	}
		document.write( "</div>" );
	}

//----if we're on a well groomed page, include the header banner

if (( $url.match('wellgroomed') || $url.match('wg'))&&(!$url.match('pagenotfound')))
	{
	document.write( "<div id=\"nav3\">" );
	
//--------draw the spouse submenu 

		
	if ( $url.match('wellgroomed') )
	{
		document.write("<a href=\"wellgroomed.html\" class=\"here\">TABLE OF CONTENTS</a>  " );
	}
	else {
document.write("<a href=\"wellgroomed.html\">TABLE OF CONTENTS</a>  " );
	}
		
				
	if ( $url.match('wg_excerpt') )
	{
document.write("<a href=\"wg_excerpt_1.html\" class=\"here\">EXCERPTS</a>  " );
	}
	else {
document.write("<a href=\"wg_excerpt_1.html\" >EXCERPTS</a>  " );
	}
		
	if ( $url.match('wg_reviews') )
	{
		document.write("<a href=\"wg_reviews.html\" class=\"here\">REVIEWS</a> " );
	}
	else {
		document.write("<a href=\"wg_reviews.html\" >REVIEWS</a>  " );
	}
	
	if ( $url.match('wg_buy') )
	{
		document.write("<a href=\"wg_buy.html\" class=\"here\">BUY</a> " );
	}
	else {
		document.write("<a href=\"wg_buy.html\" >BUY</a>  " );
	}
	
	
		document.write( "</div>" );
	}

//----if we're on a buy page




document.write( "</div>" );

