//*******************************************************************
// Alex Jupe Motorsport Menu JavaScript Class Def. & Variable 
//														Declaration.
//			// (c) 2000-2005 Kappa Solutions Ltd.
//*******************************************************************
//
// Constructor. *****************************************************
function Menu() {
	this._options = [
		{href: 'index.htm', text: "home"},
		{href: 'about.htm',  text: "about"},
		{href: 'upgrades.htm',  text: "upgrades"},
		{href: 'forsale.htm',  text: "for sale"},
		{href: 'news.htm',  text: "news"},
		{href: 'projects.htm',  text: "projects"},
		{href: 'downloads.htm',  text: "downloads"}
	];
}

// Draw. ***********************************************************
Menu.prototype.getHTML = function () {
	var html= this.getOption(this._options[0]);
	for (var i = 1; i < this._options.length; i++) {
		html += this.getOption(this._options[i], " :: ");
	}
	return html;
}
// Get Option. ****************************************************
Menu.prototype.getOption = function (option, spacer) {
	if (!spacer) var spacer = ""
	var html = spacer;
	if ((new String(document.URL)).search(".uk/" + option.href)>0) {
		html += "<font color='#FFFF00'>" + option.text + "</font>";
	} else {
		html += "<a class='ltbold' href='/" + option.href + "' >" + option.text + "</a>";
	}
	return html; 
}
// Draw menu. *****************************************************

document.write((new Menu()).getHTML());

//*******************************************************************