// This function preloads the on/off global nav images
if (document.images) {
		about_on = new Image();
		books_on = new Image();
		orders_on = new Image();
		cards_on = new Image();
		contact_on = new Image();
		home_on = new Image();
		
		books_babies_on = new Image();
		books_children_on = new Image();
		books_grownups_on = new Image();
		books_weddings_on = new Image();
		books_graduation_on = new Image();

		about_off = new Image();
		books_off = new Image();
		orders_off = new Image();
		cards_off = new Image();
		contact_off = new Image();
		home_off = new Image();
		
		books_babies_off = new Image();
		books_children_off = new Image();
		books_grownups_off = new Image();
		books_weddings_off = new Image();
		books_graduation_off = new Image();
		
		about_on.src = "resources/images/nav/about_on.gif"
		books_on.src = "resources/images/nav/books_on.gif"
		orders_on.src = "resources/images/nav/orders_on.gif"
		cards_on.src = "resources/images/nav/cards_on.gif"
		contact_on.src = "resources/images/nav/contact_on.gif"
		home_on.src = "resources/images/nav/home_on.gif"
		
		books_babies_on.src = "resources/images/books_babies_on.gif"
		books_children_on.src = "resources/images/books_children_on.gif"
		books_grownups_on.src = "resources/images/books_grownups_on.gif"
		books_weddings_on.src = "resources/images/books_weddings_on.gif"
		books_graduation_on.src = "resources/images/books_graduation_on.gif"

		about_off.src = "resources/images/nav/about_off.gif"
		books_off.src = "resources/images/nav/books_off.gif"
		orders_off.src = "resources/images/nav/orders_off.gif"
		cards_off.src = "resources/images/nav/cards_off.gif"
		contact_off.src = "resources/images/nav/contact_off.gif"
		home_off.src = "resources/images/nav/home_off.gif"
		
		books_babies_off.src = "resources/images/books_babies_off.gif"
		books_children_off.src = "resources/images/books_children_off.gif"
		books_grownups_off.src = "resources/images/books_grownups_off.gif"
		books_weddings_off.src = "resources/images/books_weddings_off.gif"
		books_graduation_off.src = "resources/images/books_graduation_off.gif"
		
		}
// This function does the image swaps onMouseOver
		function imgOn(imgName) {
        	if (document.images) {
			document[imgName].src = eval(imgName + "_on.src");
			}
		}

// This function does the image swaps onMouseOut	
		function imgOff(imgName) {
        	if (document.images) {
			document[imgName].src = eval(imgName + "_off.src");
			}
		}
		
// open window for small picture enlargement		
		function newWindow(url) {
			wordsWindow = window.open(url,'wordsWin', 'width=640,height=464,top=0,left=0,resizable=no,toolbar=no,status=no,menubar=no,directories=no,location=no,scrollbars=no')
			wordsWindow.focus()
		}
		
// open window for large wide picture enlargement		
		function bigWindow(url) {
			wordsWindow2 = window.open(url,'bigWin', 'width=332,height=430,top=0,left=0,resizable=no,toolbar=no,status=no,menubar=no,directories=no,location=no,scrollbars=no')
			wordsWindow2.focus()
		}
		
// open window for little cards card enlargement	-300x300
		function smallWindow(url) {
			wordsWindow3 = window.open(url,'smallWin', 'width=300,height=337,top=0,left=0,resizable=no,toolbar=no,status=no,menubar=no,directories=no,location=no,scrollbars=no')
			wordsWindow3.focus()
		}

// open window for little cards tag enlargement	-250x165
		function tinyWindow(url) {
			wordsWindow4 = window.open(url,'tinyWin', 'width=250,height=202,top=0,left=0,resizable=no,toolbar=no,status=no,menubar=no,directories=no,location=no,scrollbars=no')
			wordsWindow4.focus()
		}
		
//this function validates the form for required field entry
		var box=document.frmOrder;
		var charexp = /./;
		function hasChar(str) {
			return charexp.test(str);
		}
		
		function validate(theForm)
		{
			var box=document.frmOrder;
			var missingInfo="";
			
			
			if(!hasChar(box.username.value))
			{
				missingInfo += "* Name\n";
			}
			
			if((!hasChar(box.address1.value)) && (!hasChar(box.address2.value)))
			{
				missingInfo += "* Address\n";
			}
			
			if(!hasChar(box.cityStateZip.value))
			{
				missingInfo += "* City, State, Zip\n";
			}
			
			if(!hasChar(box.phone.value))
			{
				missingInfo += "* Phone number\n";
			}
			
			if(!hasChar(box.email.value))
			{
				missingInfo += "* Email address\n";
			}
			
			if(!hasChar(box.email2.value))
			{
				missingInfo += "* Email address confirmation\n";
			}
			
			if(missingInfo != "")
			{
				alert ("Please go back and enter the following missing information:\n" + missingInfo);
				return false;
			}
		}

