function writeMenu()

{

	// build link td's

	var td_link_index = "<td style='color: #3366CC' id='index' class='menu' onmouseover='chBorder(this.id)' onmouseout='chBack(this.id)' onclick='internFlyOut(this.id)'><a href='../index_files/index.html' class='nav'>&nbsp;<img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Home</a></td>";

	var td_link_services = "<td style='color: #3366CC' id='services' class='menu' onmouseover='chBorder(this.id)' onmouseout='chBack(this.id)' onclick='internFlyOut(this.id)'><a href='html/services.html' class='nav'>&nbsp;<img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Services</a></td>";

	var td_link_products = "<td style='color: #3366CC' id='skills' class='menu' onmouseover='chBorder(this.id)' onmouseout='chBack(this.id)' onclick='internFlyOut(this.id)'><a href='html/skills.html' class='nav'>&nbsp;<img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Skills</a></td>";

	var td_link_portfolio = "<td style='color: #3366CC' id='portfolio' class='menu' onmouseover='chBorder(this.id)' onmouseout='chBack(this.id)' onclick='internFlyOut(this.id)'><a href='html/portfolio.html' class='nav'>&nbsp;<img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Portfolio</a></td>";

	var td_link_contact = "<td style='color: #3366CC' id='contact' class='menu' onmouseover='chBorder(this.id)' onmouseout='chBack(this.id)' onclick='internFlyOut(this.id)'><a href='html/contact.html' class='nav'>&nbsp;<img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Contact</a></td>";

	var td_link_about = "<td style='color: #3366CC' id='about' class='menu' onmouseover='chBorder(this.id)' onmouseout='chBack(this.id)' onclick='internFlyOut(this.id)'><a href='html/about.html' class='nav'>&nbsp;<img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> About Us</a></td>";



	// build main td's

	var td_main_index = "<td style='padding-left: 5px; padding-top: 1px; padding-bottom: 1px; color: #000; font-weight: bold; border: solid 1px; border-color: #777; background: #e0e0e0; width: 100%' id='index'> <img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Home</td>";

	var td_main_products = "<td style='padding-left: 5px; padding-top: 1px; padding-bottom: 1px; color: #000; font-weight: bold; border: solid 1px; border-color: #777; background: #e0e0e0; width: 100%' id='products'> <img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Products</td>";

	var td_main_services = "<td style='padding-left: 5px; padding-top: 1px; padding-bottom: 1px; color: #000; font-weight: bold; border: solid 1px; border-color: #777; background: #e0e0e0; width: 100%' id='services'> <img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Services</td>";

	var td_main_portfolio = "<td style='padding-left: 5px; padding-top: 1px; padding-bottom: 1px; color: #000; font-weight: bold; border: solid 1px; border-color: #777; background: #e0e0e0; width: 100%' id='references'> <img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Portfolio</td>";

	var td_main_contact = "<td style='padding-left: 5px; padding-top: 1px; padding-bottom: 1px; color: #000; font-weight: bold; border: solid 1px; border-color: #777; background: #e0e0e0; width: 100%' id='downloads'> <img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> Downloads</td>";

	var td_main_about = "<td style='padding-left: 5px; padding-top: 1px; padding-bottom: 1px; color: #000; font-weight: bold; border: solid 1px; border-color: #777; background: #e0e0e0; width: 100%' id='about'> <img src='images/menuDot.png' style='border: none; vertical-align: middle;' alt='' /> MRO Award</td>";



	// let us shorten the names of the variables...

	// link td's

	var tli = td_link_index;

	var tlp = td_link_products;

	var tls = td_link_services;

	var tlr = td_link_portfolio;

	var tld = td_link_contact;

	var tla = td_link_about;



	// let us shorten the names of the variables...

	// main td's



	var tmi = td_main_index;

	var tmp = td_main_products;

	var tms = td_main_services;

	var tmr = td_main_portfolio;

	var tmd = td_main_contact;

	var tma = td_main_about;



	// now let us check which page is the current one and write the menu...



	var pagename = location.href.substring(location.href.lastIndexOf('/')+1);

	

	// we will also strip the extension...

	pagename = pagename.split(/.html/)

	

	// if the page is index_test.html

	if(pagename == 'index')

	{

		document.write("<tr style='margin: 0px;'>"+tmi+"</tr><tr>"+tls+"</tr><tr>"+tlp+"</tr><tr>"+tlr+"</tr><tr>"+tld+"</tr><tr>"+tla+"</tr>");

	}

	

	// if the page is services_new.html

	else if(pagename == 'services')

	{

		document.write("<tr>"+tli+"</tr><tr>"+tms+"</tr><tr>"+tlp+"</tr><tr>"+tlr+"</tr><tr>"+tld+"</tr><tr>"+tla+"</tr>");

	}

	// if the page is products_new.html

	 else if(pagename == 'products')

	{

		document.write("<tr>"+tli+"</tr><tr>"+tls+"</tr><tr>"+tmp+"</tr><tr>"+tlr+"</tr><tr>"+tld+"</tr><tr>"+tla+"</tr>");

	}

	// if the page is references_new.html

	else if(pagename == 'references')

	{

		document.write("<tr>"+tli+"</tr><tr>"+tls+"</tr><tr>"+tlp+"</tr><tr>"+tmr+"</tr><tr>"+tld+"</tr><tr>"+tla+"</tr>");

	}

	// if the page is downloads_new.html

	else if(pagename == 'downloads')

	{

		document.write("<tr>"+tli+"</tr><tr>"+tls+"</tr><tr>"+tlp+"</tr><tr>"+tlr+"</tr><tr>"+tmd+"</tr><tr>"+tla+"</tr>");

	}

	// if the page is award_new.html

	else if(pagename == 'award')

	{

		document.write("<tr>"+tli+"</tr><tr>"+tls+"</tr><tr>"+tlp+"</tr><tr>"+tlr+"</tr><tr>"+tld+"</tr><tr>"+tma+"</tr>");

	}

	

	// if it's none of the main pages...

	else

	{

		document.write("<tr>"+tli+"</tr><tr>"+tls+"</tr><tr>"+tlp+"</tr><tr>"+tlr+"</tr><tr>"+tld+"</tr><tr>"+tla+"</tr>");

	}

}

