/*
	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("topnav_home", "topnav_aboutus", "topnav_product", "topnav_become", "topnav_membertools", "topnav_creating", "topnav_retiring", "topnav_schools", "topnav_preschools", "topnav_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");   }
	}
	
	
for (var i=0; i < 2; i++) { 
	eval("calculators_" + i + " = new Image()");
	eval("calculators_" + i + ".src = 'assets/right_calculators_" + i + ".gif'");
	eval("interestrates_" + i + " = new Image()");
	eval("interestrates_" + i + ".src = 'assets/right_interestrates_" + i + ".gif'");
}

function toggle(what) {
	if (eval(what + "_body.style.display=='none'")) {
		eval(what + ".src=" + what + "_1.src");
		eval(what + "_body.style.display='block'");
		eval(what + "_foot.style.display='block'");
	} else {
		eval(what + ".src=" + what + "_0.src");
		eval(what + "_body.style.display='none'");
		eval(what + "_foot.style.display='none'");
	}
}

