function callStoreProducts(){
	var selectProductType = document.getElementById("lineswf").value;
	var selectProductDetail= document.getElementById("product").value;
	var errMsg = "";
	
	if(selectProductType == 0){
		errMsg = errMsg + "<br> Please select any Product Type.";
	}
	
	if(errMsg == '' && selectProductDetail == 0){
		errMsg = errMsg + "<br> Please select a Product scent and size.";
	}

	if(errMsg != ''){
		// show Error Messages
		document.getElementById("show_errors").innerHTML = errMsg;
		return false;
	}else {
		document.OptionMaker.prodType.value = selectProductType;
		document.OptionMaker.prodDetail.value = selectProductDetail;
		// some action
        document.OptionMaker.action = "/en_US/wheretobuyresults.do";

		document.getElementById("show_errors").innerHTML = '';
		return true;
	}
}

			function getOptions(prodcategory) {
		    removeAllOptions(document.OptionMaker.catItem);
			addOption(document.OptionMaker.catItem, "0", "Select a Product");
			if(document.OptionMaker.ProdCategory.value == '1')
			{
			addOption(document.OptionMaker.catItem, "037000446002", "Fresh 15 ct");
			addOption(document.OptionMaker.catItem, "037000417590", "Fresh 20 ct");
			addOption(document.OptionMaker.catItem, "037000143895", "Fresh 32 ct");
			addOption(document.OptionMaker.catItem, "037000143925", "Fresh 60 ct");
 			addOption(document.OptionMaker.catItem, "037000186298", "Fresh 85 ct");
			addOption(document.OptionMaker.catItem, "037000051404", "Citrus 15 ct");
			addOption(document.OptionMaker.catItem, "037000431213", "Citrus 20 ct");		
			addOption(document.OptionMaker.catItem, "037000143901", "Citrus 32 ct");
			addOption(document.OptionMaker.catItem, "037000143932", "Citrus 60 ct");
			}

			if(document.OptionMaker.ProdCategory.value == '2')
			{
			addOption(document.OptionMaker.catItem, "037000119692", "Bleach 15 ct");
			addOption(document.OptionMaker.catItem, "037000115465", "Bleach 20 ct");
			addOption(document.OptionMaker.catItem, "037000143949", "Bleach 60 ct");
			addOption(document.OptionMaker.catItem, "037000463023", "Apple Blossom 20 ct");
			addOption(document.OptionMaker.catItem, "037000169390", "Regular 110 ct");
			}

			if(document.OptionMaker.ProdCategory.value == '3')
			{
			addOption(document.OptionMaker.catItem, "037000401469", "Fresh 45 oz");
			addOption(document.OptionMaker.catItem, "037000401520", "Fresh 75 oz");
			addOption(document.OptionMaker.catItem, "037000401483", "Lemon 45 oz");
			addOption(document.OptionMaker.catItem, "037000401513", "Lemon 60 oz");
			addOption(document.OptionMaker.catItem, "037000401544", "Lemon 75 oz");
			addOption(document.OptionMaker.catItem, "037000401551", "Lemon 100 oz");
			addOption(document.OptionMaker.catItem, "037000316831", "Lemon 155 oz");
			addOption(document.OptionMaker.catItem, "037000401537", "Orchard Splash 75 oz");
			addOption(document.OptionMaker.catItem, "037000435129", "Orange 75 oz");
			addOption(document.OptionMaker.catItem, "037000417194", "Summertime Showers 75 oz");
			}

			if(document.OptionMaker.ProdCategory.value == '4')
			{
			addOption(document.OptionMaker.catItem, "037000175254", "Lemon 75 oz");
			}

			if(document.OptionMaker.ProdCategory.value == '5')
			{
			addOption(document.OptionMaker.catItem, "037000008033", "Fresh 35 oz");
			addOption(document.OptionMaker.catItem, "037000340348", "Fresh 45 oz");
			addOption(document.OptionMaker.catItem, "037000340355", "Fresh 60 oz");
			addOption(document.OptionMaker.catItem, "037000340362", "Fresh 75 oz");
			addOption(document.OptionMaker.catItem, "037000408413", "Fresh 100 oz");
			addOption(document.OptionMaker.catItem, "037000315643", "Fresh 155 oz");
			addOption(document.OptionMaker.catItem, "037000448655", "Fresh 180 oz");
			addOption(document.OptionMaker.catItem, "037000340393", "Lemon 45 oz");
			addOption(document.OptionMaker.catItem, "037000340409", "Lemon 60 oz");
			addOption(document.OptionMaker.catItem, "03700034041", "Lemon 75 oz");
			addOption(document.OptionMaker.catItem, "037000371977", "Orchard Splash 75 oz");
			}

			if(document.OptionMaker.ProdCategory.value == '6')
			{
            addOption(document.OptionMaker.catItem, "037000175230", "Lemon 75 oz");
			}

			if(document.OptionMaker.ProdCategory.value == '7')
			{
			addOption(document.OptionMaker.catItem, "037000190028", "Fresh 16 ct");
			addOption(document.OptionMaker.catItem, "037000190035", "Fresh 26 ct");
			addOption(document.OptionMaker.catItem, "037000190042", "Fresh 48 ct");
			addOption(document.OptionMaker.catItem, "037000190066", "Lemon Burst 16 ct");			
			addOption(document.OptionMaker.catItem, "037000190073", "Lemon Burst 26 ct");
			}

			if(document.OptionMaker.ProdCategory.value == '8')
			{
			addOption(document.OptionMaker.catItem, "037000338383", "Fresh 45 oz");
			addOption(document.OptionMaker.catItem, "037000338406", "Fresh 75 oz");
			addOption(document.OptionMaker.catItem, "037000029458", "Fresh 125 oz");
			addOption(document.OptionMaker.catItem, "037000371342", "Citrus Breeze 45 oz");
			addOption(document.OptionMaker.catItem, "037000433576", "Citrus Breeze 75 oz");
			addOption(document.OptionMaker.catItem, "037000188612", "Lemon Burst 75 oz");
			addOption(document.OptionMaker.catItem, "037000115441", "Fresh Rapids 75 oz");			
			}

			if(document.OptionMaker.ProdCategory.value == '9')
			{
			addOption(document.OptionMaker.catItem, "037000005933", "Fresh 45 oz");
			addOption(document.OptionMaker.catItem, "037000338369", "Fresh 75 oz");
			addOption(document.OptionMaker.catItem, "037000410515", "Fresh 125 oz");
			}

			if(document.OptionMaker.ProdCategory.value == '10')
			{
			addOption(document.OptionMaker.catItem, "037000115458", "Fresh Rapids 75 oz");
			}

			if(document.OptionMaker.ProdCategory.value == '11')
			{
			addOption(document.OptionMaker.catItem, "037000006336", "Regular Rinse Agent 4.22 oz");
			addOption(document.OptionMaker.catItem, "037000006343", "Regular Rinse Agent 8.45 oz");
			addOption(document.OptionMaker.catItem, "037000300014", "Regular Rinse Agent 16 oz");
			addOption(document.OptionMaker.catItem, "037000006350", "Citrus Rinse Agent 8.45 oz");
			addOption(document.OptionMaker.catItem, "037000272830", "Regular Rinse Agent 30.5 oz");
			}

			}

			function addOption(selectbox, value, text )
			{
				var optn = document.createElement("OPTION");
				selectbox.options.add(optn);

				optn.text = text;
				optn.value = value;


			}

			function removeAllOptions(selectbox)
			{
			  var i;
			  for(i = selectbox.options.length - 1; i >= 0; i -- )
			{

			 selectbox.remove(i);
			 }


			}

	  function callStoreProducts1()
	{

		var selectProductType = document.getElementById("lineswf").value;
		var selectProductDetail= document.getElementById("product").value;
		var SelectZipCode= document.getElementById("zipValue").value;

		var zipcode = document.getElementById("zipValue").value;

		document.OptionMaker.prodType.value = selectProductType;
		document.OptionMaker.prodDetail.value = selectProductDetail;
		document.OptionMaker.zipCode.value = SelectZipCode;

		document.OptionMaker.action="/en_US/storesearch.do";
		document.OptionMaker.method="post";
		document.OptionMaker.submit();
	  }

	  function submitForm(){
	var selectProductType = document.getElementById("lineswf").value;
	var selectProductDetail= document.getElementById("product").value;
	var SelectZipCode= document.getElementById("zipValue").value;
	var zipcode = document.getElementById("zipValue").value;
	document.getElementById("zipValue").value = trim(zipcode);

	var errMsg = "";

	  if(zipcode == ""){
		errMsg += "Please enter Zipcode .";
	  }if(zipcode != ""){
		  if(!isZipUS(trim(zipcode))){
			errMsg += "Please enter proper Zipcode .";
			}
		}


	if(errMsg != ''){
		// show Error Messages
		document.getElementById("show_errors").style.display = "block;";
		document.getElementById("show_errors").innerHTML = errMsg;
		return false;
	}else {
		document.OptionMaker.prodType.value = selectProductType;
		document.OptionMaker.prodDetail.value = selectProductDetail;
		document.OptionMaker.zipValue.value = SelectZipCode;
		document.OptionMaker.action = "/en_US/storesearch.do";
		document.OptionMaker.method="post";
		document.getElementById("show_errors").innerHTML = '';



		return true;
	}
}

function callOnlinestore(){
	var selectProductType = document.getElementById("lineswf").value;
	var selectProductDetail= document.getElementById("product").value;
document.OptionMaker.prodType.value = selectProductType;
document.OptionMaker.prodDetail.value = selectProductDetail;
document.OptionMaker.action = "/en_US/wheretobuyresults.do";
document.OptionMaker.method="post";
document.getElementById("show_errors").innerHTML = '';
document.OptionMaker.submit();
}

