// Nav bar code for http://soupisgoodfood.net/portfolio/ - last modified: 28-08-2001


// Preload images

function preload() {

if (typeof(document.img) == 'undefined') {
	document.img = new Array();
	var name = 0;
	while (name < preload.arguments.length) {
		document.img[name] = new Image();
		document.img[name].src = 'nav/'+preload.arguments[name]+'.gif';
		name ++;
		}
	}
}

preload(
't_00', 't_01', 't_02', 't_03', 't_04', 't_05', 't_info',
'm_00', 'm_01', 'm_02', 'm_03', 'm_04', 'm_05', 'm_info',
'm_on_00', 'm_on_01', 'm_on_02', 'm_on_03', 'm_on_04', 'm_on_05', 'm_on_info',
'm_off_00', 'm_off_01', 'm_off_02', 'm_off_03', 'm_off_04', 'm_off_05', 'm_off_info',
'l_bar', 'l_bar_l', 'l_bar_m', 'l_bar_r', 'loadbar', 'loading'
)



// Swap images

var currentImg = '00';

function on(img) {
	if (currentImg != img) {
		document.getElementById(img).src = 'nav/m_on_'+img+'.gif';
		document.getElementById('title').src = 'nav/t_'+img+'.gif';
	}
}


function off(img) {
	if (currentImg != img) {
		document.getElementById(img).src = 'nav/m_'+img+'.gif';
		document.getElementById('title').src = 'nav/t_'+currentImg+'.gif';
	}
}


function selectImg(img) {
	if (currentImg != img) {
		document.getElementById(img).src = 'nav/m_off_'+img+'.gif';
		document.getElementById(currentImg).src = 'nav/m_'+currentImg+'.gif';
		currentImg = img;
	}
}



// Swap layers

var currentDiv = '00';


function select(newDiv) {
	if (currentDiv != newDiv) {
		document.getElementById('subnav'+newDiv).style.visibility = 'visible';
		document.getElementById('subnav'+currentDiv).style.visibility = 'hidden';
		currentDiv = newDiv;
	}
}



/*

Copyright - 2001, Justin Bell
justin@soupisgoodfood.net

You may copy, use, modify, redistribute any JavaScript, HTML, PHP, or CSS code on this site.

You may NOT copy, use, modify, redistribute any images, multimedia such as flash and movie files, text content in the HTML, or design layout on this site without my permission first.

*/
