function disableStores(){
	document.getElementById("stateListRow").style.display = "none";
	document.getElementById("storeListRow").style.display = "none";
}
function enableStores(){
	document.getElementById("stateListRow").style.display = "";
	document.getElementById("storeListRow").style.display = "";
}
function getStores(state){
	xmlHttp.onreadystatechange = gotStores;
	xmlHttp.open("GET", "/includes/storeListByState.asp?state=" + state, true);
	xmlHttp.send(null);
}
function gotStores(){
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			document.getElementById("storeList").innerHTML = '<select onchange="updateOfferCode(this)" name="store" id="store">'+xmlHttp.responseText+'</select>';
		}else{
			alert("An error has occured. Please try your request later.");
		}
	}
}
function updateOfferCode(selObj){
	document.getElementById("contactForm").offercode.value = selObj.value;
}
function validateForm(frm){
	if(frm.general_specific[0].checked){
		frm.storestate.value = "";
		frm.store.value = "";
		return true;
	}else{
		if(frm.storestate.value == "" || frm.store.value == ""){
			alert("Please select a store from the drop down list provided.");
			return false;
		}else{
			return true;
		}
	}
}