if (document.images){
	path = 'http://levi-uat04.uat.gsipartners.com/images/footer/';

	footer_submit_on = new Image();footer_submit_on.src = path + "footer_submit_on.jpg";
	footer_secure_shopping_on = new Image();footer_secure_shopping_on.src = path + "footer_secure_shopping_on.jpg";
		
	footer_submit = new Image();footer_submit.src = path + "footer_submit.jpg";
	footer_secure_shopping = new Image();footer_secure_shopping.src = path + "footer_secure_shopping.jpg";		
}

function imgOn(imgName){
	if (document.images) { $(imgName).src = eval(imgName + "_on.src"); }
}

function imgOff(imgName){
	if (document.images) { $(imgName).src = eval(imgName + ".src"); }
}

function validEmailFooter(){
	var str=document.emailFormFooter.emailAddress.value
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	
	if (filter.test(str)){
		return true
	}else{
		return false;
	}
}

function ValidateEFormFooter(frm){
	if (!validEmailFooter()){
		alert('Please enter a valid email.');
		return false;
	}else{
		new Ajax.Request('http://levi-uat04.uat.gsipartners.com/emailHandler/index.jsp',
		  {
			method:'post',
			parameters: {_ID_:'levi.150', emailPref:'Y', targetPage:'http://levi-uat04.uat.gsipartners.com/include/entry_confirmation.html', footerEmailSignup:'true', emailAddress:document.emailFormFooter.emailAddress.value, store:document.emailFormFooter.store.value}, 
			onSuccess: function(transport){
				$('emailSignupFooter').innerHTML = '<img src="http://levi-uat04.uat.gsipartners.com/images/footer/footer_OAS_thanks.gif" alt="Thanks for Signing Up!" />';
			},
			onFailure: function(){ alert("'We're sorry, we could not sign you up at this time.\n\nPlease try again later.") }
		  });
		return false;
	}
}