//#######################################################################
//
//					Eric Steinberg's Image Swapper
//					If you use this, give me credit.
//					Email me at eric@apparelart.com
//
//		To use this properly make sure your images are given an
//	    id in your img tag and follow a numeric order.(EX. id="one")
//		Image preloader is done on the index page by using the swapped
//		images as a hidden span class.  (EX. <span class="hidden"><IMG SRC></span>
//		Make sure you define the "hidden" class as a .css style.										 
//
//#######################################################################

// Create the image arrays, add images as necessary
var imgOn=new Array("./images/nav_bar_screen_on.jpg","./images/nav_bar_emb_on.jpg","./images/nav_bar_promo_on.jpg","./images/nav_bar_patches_on.jpg","./images/nav_bar_military_on.jpg","./images/nav_bar_client_on.jpg");
var imgOff=new Array("./images/nav_bar_screen_off.jpg","./images/nav_bar_emb_off.jpg","./images/nav_bar_promo_off.jpg","./images/nav_bar_patches_off.jpg","./images/nav_bar_military_off.jpg","./images/nav_bar_client_off.jpg");

//Swap to second image
function swapImg(id)
{
	if(id=="zero")
		{var num='0';}
	else if(id=="one")
		{var num='1';}
	else if(id=="two")
		{var num='2';}
	else if(id=="three")
		{var num='3';}
	else if(id=="four")
		{var num='4';}
	else if(id=="five")
		{var num='5';}

//Add more elseif statements if necessary.  Make sure it mataches the statements in the swapImgBack function.

	theImg=document.getElementById(id);
	theImg.setAttribute("src",imgOff[num]);
}

//Swap Back to original image
function swapImgBack(id)
{
	if(id=="zero")
		{var num='0';}
	else if(id=="one")
		{var num='1';}
	else if(id=="two")
		{var num='2';}
	else if(id=="three")
		{var num='3';}
	else if(id=="four")
		{var num='4';}
	else if(id=="five")
		{var num='5';}

//Add more elseif statements if necessary.  Make sure it mataches the statements in the swapImg function.

	theImg=document.getElementById(id);
	theImg.setAttribute("src",imgOn[num]);
}