
/* old function */
function preload()	{
		var images = new Array('images/headers/public/menu/1_on.gif','images/headers/public/menu/1_off.gif','images/headers/public/menu/2_on.gif','images/headers/public/menu/2_off.gif','images/headers/public/menu/3_on.gif','images/headers/public/menu/3_off.gif','images/headers/public/menu/4_on.gif','images/headers/public/menu/4_off.gif','images/headers/public/menu/5_on.gif','images/headers/public/menu/5_off.gif');
		for (i=0; i<images.length; i++)
			{
			var new_image = new Image();
			new_image.src = images[i];
			}
}
		
function swap(element, to)	{
		img_name="img"+element;
		document.images[img_name].src="../../images/headers/public/menu/"+element+"_"+to+".gif";
}

/* DOM rocks by erational :) */
function showhide(id) {
	if (document.getElementById(id).style.display =="block") document.getElementById(id).style.display ="none";
	else document.getElementById(id).style.display ="block";
}

function hide(id) {
	document.getElementById(id).style.display ="none";	
}

function show(id) {
	document.getElementById(id).style.display ="block";	
}

function fold(id) {
	for (i=1 ; i<8; i++) hide("m"+i);
	show(id);
}

function roll(id, url) {
	document.images[id].src = url;
}
