function g(o) {return document.getElementById(o);}

var filename = location.pathname.substring(location.pathname.lastIndexOf('/') + 1).split('?#');
filename = filename[0];

var nav = [
	['home', '15', 'home.html'],
	['how', '18', 'how.html'],
	['eval', '17', 'estimate.php'],
	['about', '18', 'about.html'],
	['profile', '18', 'profile.html'],
	['faqs', '17', 'faqs.html'],
	['contact', '18', 'contact.html']
];

var output = '<div class="menu"><img src="i/menu_top2.gif" width="126" height="22" alt="" style="display:block;" />';
var precache = '';

for(var i = 0; i < nav.length; i++) {
	var t = nav[i];
	output += '<a href="'+t[2]+'"><img width="126" height="'+t[1]+'" alt="'+t[0]+'" border="0" ';
	if(filename == t[2]) {
		output += ' src="i/menu_'+t[0]+'_on.gif" ';
	}
	else {
		output += ' src="i/menu_'+t[0]+'_off.gif" onmouseover="this.src = \'i/menu_'+t[0]+'_on.gif\';" onmouseout="this.src = \'i/menu_'+t[0]+'_off.gif\';" ';
		precache += '<img src="i/menu_'+t[0]+'_on.gif" alt="" />';
	}
	output += ' /></a>';
}

output += '<img src="i/menu_bottom2.gif" width="126" height="74" alt="" style="display:block;" /></div>';

output += '<div class="precache">'+precache+'</div>';

document.write(output);