//Menu.js || Menu and button / DHTML Effects
var img_lst = [];

function preload(loc){
	var nImg = new Image();
	nImg.src = loc;
	return nImg;
}

function init_btn(id){
	var img = $(id);
	var src = $(id).src;
	img_lst[id] = new Object();
	img_lst[id].up = preload(src);
	if(src){
		if(src.indexOf("_ovr.gif") > -1){
			img_lst[id].ovr = preload(src);
		}else{
			img_lst[id].ovr = preload(src.replace(/.gif/, "_ovr.gif"));
		}
		
		img.onmouseover = function(){
			btn_ovr(this.id);
		}
		
		img.onmouseout = function(){	
			btn_up(this.id);
		}
	}
}

function btn_ovr(id){
	$(id).src = img_lst[id].ovr.src;	
}
function btn_up(id){
	$(id).src = img_lst[id].up.src;	
}