﻿window.onload = initAll;


function initAll(){
	var mainmenu = document.getElementById("mainmenu");
	for(i=0; i<mainmenu.childNodes.length; i++){
		if(mainmenu.childNodes[i].nodeType==1){
				    mainmenu.childNodes[i].childNodes[0].childNodes[0].onmouseover = change;
				   mainmenu.childNodes[i].childNodes[0].childNodes[0].onmouseout = retrive;
		}
	}
	function change(){
		this.src = 'images/'+this.id+'-over.gif';
	}
	
	function retrive(){
		this.src = 'images/'+this.id+'.gif';
	}
}


