// This function outputs a standard line for the bottom of every page
function outputFooter()
{
  	document.write('<tr><td align="left"> </td><td align="center"> </td><td align="right"> <a class="smallLink" href="mailto:info@niatcm.com"> </a></td></tr>');
}

// This function outputs a title line to be used on every page
function outputTitle()
{
  	document.write('The Northern Ireland Association of Traditional Chinese Medicine');
}

// This function dynamically creates the main menu of hyperlinks that appears on every page
// The input parameter passed from the HTML page is used to disable and colour the menu link for that page
// To add a new menu option:
// 1) Create a new menux variable
// 2) Copy and modified one of the if-else statements
// 3) Add the new menux option to the output parameter in the final document.write statement
function buildMenu(currentMenu)
{
	var home, members, training, faq, findPractitioner, contact = " ";
	var spacer = " : "
	// for debugging - document.write(currentMenu);
	if (currentMenu == "home") 
		home = '<font class="menuCurrent">home</font>'
	else
		home = '<a class="menuLink" href="index.html">home</SPAN></a>'

	if (currentMenu == "members") 
		members = '<font class="menuCurrent">members area</font>'
	else
		members = '<a class="menuLink" href="http://www.niatcm.com/members">members area</a>'
	
	if (currentMenu == "training") 
		training = '<font class="menuCurrent">training</font>'
	else
		training = '<a class="menuLink" href="training.html">training</a>'

	if (currentMenu == "faq") 
		faq = '<font class="menuCurrent">information</font>'
	else
		faq = '<a class="menuLink" href="faq.html">information</a>'
	
	if (currentMenu == "find") 
		findPractitioner = '<font class="menuCurrent">find a practitioner</font>'
	else
		findPractitioner = '<a class="menuLink" href="practitioner.html">find a practitioner</a>'

	if (currentMenu == "contact") 
		contact = '<font class="menuCurrent">contact</font>'
	else
		contact = '<a class="menuLink" href="contact.html">contact</a>'	
	
	// to change the order of the menu just move the order of the items below
	// to change the spacer character change the setting in the variable definition above
	document.write(home + spacer + faq + spacer + training + spacer  + findPractitioner + spacer + contact + spacer + members);
}

