var pic = [""];

if (document.images) //preload images for button rollovers
	{
		//Add more images to preload at the end of this array. Note the postion for referrencing when you call the swap function.
		var imgs = new Array()
		imgs[0] = "http://www.vital-xl.com/images/nav_slice_home_over.gif"
		imgs[1] = "http://www.vital-xl.com/images/nav_slice_home.gif"
		imgs[2] = "http://www.vital-xl.com/images/nav_slice_how_over.gif"
		imgs[3] = "http://www.vital-xl.com/images/nav_slice_how.gif"
		imgs[4] = "http://www.vital-xl.com/images/nav_slice_ingredients_over.gif"
		imgs[5] = "http://www.vital-xl.com/images/nav_slice_ingredients.gif"
		imgs[6] = "http://www.vital-xl.com/images/nav_slice_testimonials_over.gif"
		imgs[7] = "http://www.vital-xl.com/images/nav_slice_testimonials.gif"
		imgs[8] = "http://www.vital-xl.com/images/nav_slice_questions_over.gif"
		imgs[9] = "http://www.vital-xl.com/images/nav_slice_questions.gif"
		imgs[10] = "http://www.vital-xl.com/images/nav_slice_order_over.gif"
		imgs[11] = "http://www.vital-xl.com/images/nav_slice_order.gif"
		imgs[12] = "http://www.vital-xl.com/images/nav_slice_contact_over.gif"
		imgs[13] = "http://www.vital-xl.com/images/nav_slice_contact.gif"
		
		
		for(i=0;i<imgs.length;i++)
		{
			pic[i] = new Image;  //create a new image object
			pic[i].src = imgs[i];  //defines the images source for the object and preloads it
		}
	}
else
	{
		for(i=0;i<imgs.length;i++)
		{
			pic[i].src = "";
		}
	}
	
/*Add this code to the <a> tag to use the image swap function:
onMouseOver="swap('$$imagename$$',pic[0])" onMouseOut="swap(''$$imagename$$',pic[1])"
Make sure that you are calling the right picture from the array in the code. pic[i] = the array position of the image source.*/		
function swap(image1,image2) //image swap function for buttons
	{
		document[image1].src=image2.src;
	}