window.addEventListener?window.addEventListener("load",init,false):window.attachEvent("onload",init);
var count = 0;

function init() {
	if(!document.getElementById || !document.createElement || !document.getElementById("leftnav")) return;
	anchortags = document.getElementById("leftnav").getElementsByTagName('a');
	
	for(i=0; i<anchortags.length; i++) {
		new indivSetup(anchortags[i]);		
	}
}


function indivSetup(obj) {
	var img = obj.firstChild;
	var filename = img.src.substring(0, img.src.length-4);
	
	//preloads the ON image
	MM_preloadImages(filename+'_on.gif');
	
	//Sets an ID for the image
	img.setAttribute('id', 'leftnav_' + count++);
	
	obj.onmouseover = function() { MM_swapImage(img.getAttribute('id'), '', filename+'_on.gif', 1); }
	obj.onmouseout = function() { MM_swapImgRestore(); }	
}