document.write("<tr height=60 width=100% bgcolor=white>")

rubPos=document.location.href.search('rub')

Query = document.location.href.substring(rubPos+3,rubPos+4)
Query2 = document.location.href.substring(rubPos+4,rubPos+5)

GenerateBarItem("rub1_fr.htm","l\'association...","images/menu_association",Query,Query2,"1")
GenerateBarItem("rub2_fr.htm","un écoquartier, c\'est...","images/menu_ecoquartier",Query,Query2,"2")
GenerateBarItem("rub3_fr.htm","en savoir plus...","images/menu_ensavoirplus",Query,Query2,"3")
GenerateBarItem("rub4_fr.htm","contact...","images/menu_contact",Query,Query2,"4")

document.write("</tr>")
document.write("<tr><td colspan=4><hr></td></tr>")
document.write("<tr>")
document.write("<td>")
document.write("</table>")
	
document.write("<table width=750 border=0 align=center cellspacing=0 cellpadding=20 bgcolor=white>")
document.write("<tr><td>")

function GenerateBarItem(url,text,image_url,active_pos,active_sub_pos,item_pos) {
	if (active_pos!=item_pos) {
		document.write("<td align=center colspan=1>")
		document.write("<A href=" + url + ">" + "<img border=0 src='" + image_url + "_small.jpg' alt=\"" + text + "\" title=\"" + text + "\">" + "</A>")
	} else {
		if (active_sub_pos=="_") {
			document.write("<td align=center bgcolor=white colspan=1>")
			document.write("<A href=" + url + ">" + "<img border=0 src='" + image_url + "_color.jpg' alt=\"" + text + "\" title=\"" + text + "\">" + "</A>")
		} else {
			document.write("<td align=center bgcolor=white colspan=1>")
			document.write("<A href=" + url + ">" + "<img border=0 src='" + image_url + "_small.jpg' alt=\"" + text + "\" title=\"" + text + "\">" + "</A>")
		}
	}
	document.write("</td>")	
}