/* ************************************************************************ */
/* Set up site navigation menu                 							    */
/* Input: None                                   							*/
/* Output: anchor href list                     							*/
/* Notes: to add a new navigation tab add the   							*/
/* name in the NavNameArray and the page to link						    */
/* to in the NavURLArray                        							*/
/* ************************************************************************ */

/* get the current filename to see what page we are on */
var filename = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
		
/* set up an array for the page link descriptions */
var NavNameArray = new Array("Home",
												 "Stoves",
												 "Accessories",
												 "Specials",
												 "Installation",
												 "Logs",
												 "FAQ",
												 "About us",
												 "Contact us");
												 
/* set up an array for the actual pages */
var NavURLArray = new Array("index.html",
														"WCS_Stoves.html",
														"WCS_Accessories.html",
														'WCS_Stoves_Links.html?name=specials',
														"WCS_Installation.html",
														"WCS_Logs.html",
														"WCS_FAQ.html",
														"WCS_Aboutus.html",
														"WCS_Contactus.html");


/* create the HTML for unordered list refering to the CSS class */		
document.write('<div id="tabs">');
document.write('<ul>');

/* start a loop that continues until all the link pages have been processed */
for (var i = 0; i < NavNameArray.length; i++)  {
	/* test to see of the current filename is the same as the current page name */
	if (filename	== NavURLArray[i])
		{
		document.write('<li><a class="tabs0" id="current"><span>' + NavNameArray[i]);  
		document.write('</span></a></li>'); 
		}	
	/* if not this filename */
	else  {
		  document.write('<li class="tabs"><a href="' + NavURLArray[i] +'" title="');
		  document.write(NavNameArray[i] + '"><span>' + NavNameArray[i]);
		  document.write('</span></a></li>')
		  }	
/* finished processing all the names in the array	 */ 
}

/* create HTML for end of list  */ 	
document.write('</ul>');
document.write('</div>');

