topBarPathOn = "/css/css_images/top_bar/on/";
topBarPathOff = "/css/css_images/top_bar/off/";
topBarImageNames = ["home","explorer","forums","submitua","downloads"];
topBarImageObjects = new Object();
for(var i=0;i<topBarImageNames.length;i++){
	topBarImageObjects[topBarImageNames[i]] = new Object();
	topBarImageObjects[topBarImageNames[i]].on = new Image();
	topBarImageObjects[topBarImageNames[i]].on.src = topBarPathOn + topBarImageNames[i] + ".png";
	topBarImageObjects[topBarImageNames[i]].off = new Image();
	topBarImageObjects[topBarImageNames[i]].off.src = topBarPathOff + topBarImageNames[i] + ".png";
}
function topBarState(element,state){
	var img = element.firstChild;
	img.src = topBarImageObjects[img.name][state].src;
}