/*
	Copyright David Trewern Design         :: www.dtdesign.com ::
	Unauthorised modification / use is a criminal offence, and
	will be prosecuted to the fullest extent permitted by law.
	All Rights Reserved
*/

// USE: call images 'swap_*_#.gif' in 'i' folder with:
// * = image name (must also be placed in NAVarr array below)
// # = image state : 0 = off, 1 = on

NAVarr = new Array("nav_home" , "nav_about", "nav_solutions", "nav_services", "nav_success", "nav_news", "nav_events", "nav_careers", "nav_support" ,"nav_contact");
if (document.images) {
	for (var NAVitem in NAVarr) { 
		 for (var NAVicount=0; NAVicount < 2; NAVicount++) { 
				eval("b" + NAVarr[NAVitem] + NAVicount + " = new Image()");
				eval("b" + NAVarr[NAVitem] + NAVicount + ".src = 'assets/swap_" + NAVarr[NAVitem] + "_" + NAVicount + ".gif'");
		 } 
	} 
}

function BturnOn(imageName) {
	if (document.images) { document [imageName].src = eval("b" +imageName + "1.src");   }
}

function BturnOff(imageName) {
	if (document.images) { document [imageName].src = eval("b" + imageName + "0.src");   }
}
