if (document.images) {
		home1 = new Image;
		home2 = new Image;
		favorites1 = new Image;
		favorites2 = new Image;
		about1 = new Image;
		about2 = new Image;
		aroma1 = new Image;
		aroma2 = new Image;
		faves1 = new Image;
		faves2 = new Image;
		shop1 = new Image;
		shop2 = new Image;
		catalog1 = new Image;
		catalog2 = new Image;
		

		
		home1.src="buttons/homebtn.gif";
		home2.src="buttons/homebtn1.gif";
		favorites1.src="buttons/favoritesbtn.gif";
		favorites2.src="buttons/favoritesbtn1.gif";
		about1.src = "buttons/aboutbtn.gif";
		about2.src = "buttons/aboutbtn1.gif";
		aroma1.src = "buttons/aromabtn.gif";
		aroma2.src = "buttons/aromabtn1.gif";
		shop1.src="buttons/shopbtn.gif";
		shop2.src="buttons/shopbtn1.gif";

		
	}
	else {
		home1 = "";
		home2 = "";
		favorites1 = "";
		favorites2 = "";
		about1 = "";
		about2 = "";
		aroma1 = ""
		aroma2 = ""
		shop1 = "";
		shop2 = "";
	}
	
function rollIt(imgField, imgPic) {
		if(document.images) {
		document[imgField].src = eval (imgPic + ".src")
		}
	}

function checkIt() {

	
	 if (document.infoReq.first.value < 1) {
	 alert ('Please enter your  first name.')
	 document.infoReq.first.focus()
	 return false
	}
	
	if (document.infoReq.last.value <1) {
	alert ('Please enter your last name.')
	document.infoReq.last.focus()
	return false;
	}
	
	if (document.infoReq.sendPromos[1].checked) {
	
		if (document.infoReq.Address.value < 1) {
			alert ('Please enter your address');
			document.infoReq.Address.focus();
			return false;
		}
		
		if (document.infoReq.city.value < 1) {
			alert ("Please enter your city");
			document.infoReq.city.focus();
			return false;
		}
		
		if (document.infoReq.State.value < 1) {
			alert ('Please enter your state/province');
			document.infoReq.State.focus();
			return false;
		}
		
		if (document.infoReq.zip.value < 1) {
			alert ('Please enter your zip/postal code');
			document.infoReq.zip.focus();
			return false;
		}
	}
	

	if (document.infoReq.email.value < 1) {
	alert ('Please enter your Email address.');
	document.infoReq.email.focus()
	return false
	}

 	atSign = document.infoReq.email.value.indexOf("@")
 	dotSign = document.infoReq.email.value.lastIndexOf(".")
 	spaceCase = document.infoReq.email.value.indexOf(" ")
 	atDot = dotSign - atSign

 	
 	if(atSign == -1 || atSign == 0 || dotSign == - 1 || dotSign == 0 || atDot == 1 || spaceCase != -1) {
 	alert("Email address is not valid. Email addresses should be formatted as name@provider.com")
 	document.infoReq.email.focus ()
 	return false
 	} else {
	return true
	}
}

function submitIt(thisForm) {
	lastVist = String ('')
	myForm = Number ()
	lastVisit = document.forms[thisForm].shopPage.value
	document.forms[thisForm].submit()
	myPage = thisForm
	}
	
function mailIt(theAddress, theSubject) {
	theDomain = "gardenofedenstores";

	theURL = "mailto:" + theAddress + "@" + theDomain + ".com" + "?Subject=" + theSubject;

	document.location = theURL;
}
