// preloading categories images

var img_cache_ = new Object();
img_cache_[0] = new Image();
img_cache_[0].src = 'http://onlytherealdeal.com/images/menus/cat_1.gif';
img_cache_[1] = new Image();
img_cache_[1].src = 'http://onlytherealdeal.com/images/menus/cat_2.gif';
img_cache_[2] = new Image();
img_cache_[2].src = 'http://onlytherealdeal.com/images/menus/cat_3.gif';
img_cache_[3] = new Image();
img_cache_[3].src = 'http://onlytherealdeal.com/images/menus/cat_4.gif';
img_cache_[4] = new Image();
img_cache_[4].src = 'http://onlytherealdeal.com/images/menus/cat_5.gif';

img_cache_[5] = new Image();
img_cache_[5].src = 'http://onlytherealdeal.com/images/menus/cat_1_o.gif';
img_cache_[6] = new Image();
img_cache_[6].src = 'http://onlytherealdeal.com/images/menus/cat_2_o.gif';
img_cache_[7] = new Image();
img_cache_[7].src = 'http://onlytherealdeal.com/images/menus/cat_3_o.gif';
img_cache_[8] = new Image();
img_cache_[8].src = 'http://onlytherealdeal.com/images/menus/cat_4_o.gif';
img_cache_[9] = new Image();
img_cache_[9].src = 'http://onlytherealdeal.com/images/menus/cat_5_o.gif';

img_cache_[10] = new Image();
img_cache_[10].src = 'http://onlytherealdeal.com/images/menus/cat_1_ov.gif';
img_cache_[11] = new Image();
img_cache_[11].src = 'http://onlytherealdeal.com/images/menus/cat_2_ov.gif';
img_cache_[12] = new Image();
img_cache_[12].src = 'http://onlytherealdeal.com/images/menus/cat_3_ov.gif';
img_cache_[13] = new Image();
img_cache_[13].src = 'http://onlytherealdeal.com/images/menus/cat_4_ov.gif';
img_cache_[14] = new Image();
img_cache_[14].src = 'http://onlytherealdeal.com/images/menus/cat_5_ov.gif';


// menu script

function branch_switch(uid) {

	if(!document.getElementById) return true;
	
	var branch = document.getElementById(uid);
	var branch_img = document.getElementById('img_' + uid);
	
	if(branch.style.display == 'none') {
		branch_img.setAttribute('opened', "true");
		branch.style.display = 'block';
		branch_img.src = branch_img.src.replace("_ov", "").replace(".gif", "_o.gif");		
	}
	else {
		branch_img.setAttribute('opened', "false");
		branch.style.display = 'none';
		branch_img.src = branch_img.src.replace("_o.gif", ".gif");		
	}
	return false;
	
}

function m_over(obj) {
	if(obj.getAttribute('opened') != "true") obj.src = obj.src.replace(".gif", "_ov.gif")
}

function m_out(obj) {
	if(obj.getAttribute('opened') != "true") obj.src = obj.src.replace("_ov.gif", ".gif");
}