
		function requiredFieldsCheck(formObj)
		{	

			
			missingFields = '';
			
			
						if (document.getElementById("snFName")) {
							var firstName = document.getElementById("snFName").value;
							if (firstName.toUpperCase().replace("", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",first name";
								} else {
									missingFields = "first name";
								}
							}
						}
						
						if (document.getElementById("snLName")) {
							var lastName = document.getElementById("snLName").value;
							if (lastName.toUpperCase().replace("", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",last name";
								} else {
									missingFields = "last name";
								}
							}
						}
						
						if (document.getElementById("snEmail")) {
							var email = document.getElementById("snEmail").value;
							if (email.toUpperCase().replace("", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",email";
								} else {
									missingFields = "email";
								}
							}
						}
						
						if (document.getElementById("snVEmail")) {
							var emailv = document.getElementById("snVEmail").value;
							if (emailv.toUpperCase().replace("", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",confirm email";
								} else {
									missingFields = "confirm email";
								}
							}
						}
						
						if (document.getElementById("snCI")) {
							var pDInd = document.getElementById("snCI").value;
							if (pDInd.toUpperCase().replace("0", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",primary category";
								} else {
									missingFields = "primary category";
								}
							}
						}
						
						if (document.getElementById("snCR")) {
							var country = document.getElementById("snCR").value;
							if (country.toUpperCase().replace("0", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",country";
								} else {
									missingFields = "country";
								}
							}
						}
						
						
						var allBlank = 1;  // indicates if all the fields in a group are blank, assume they are
						
						var fieldsInGroup = 'snZip5,snZipCanada,snZipGeneric'.split(",");
						
						for (var i=0; i<fieldsInGroup.length; i++)
						{
							var elem = document.getElementById(fieldsInGroup[i]);
							thisFieldLen = elem.value.toUpperCase().replace('', '').length;
							if (thisFieldLen > 0)
							{
								allBlank = 0;  // all fields are not blank, just found one that wasn't
							}
						}
							
						if (allBlank)
						{
							if (missingFields.length)
							{
								missingFields = missingFields + ",zip/postal code";
							} else {
								missingFields = "zip/postal code";
							}
						}
						
						if (document.getElementById("countryConfirmed")) {
							var countryConfirmed = document.getElementById("countryConfirmed");
							if (!countryConfirmed.checked)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",confirm country";
								} else {
									missingFields = "confirm country";
								}
							}
						}
						
						if (document.getElementById("snPWD")) {
							var pass_skip = document.getElementById("snPWD").value;
							if (pass_skip.toUpperCase().replace("", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",password";
								} else {
									missingFields = "password";
								}
							}
						}
						
						if (document.getElementById("snVPWD")) {
							var passv_skip = document.getElementById("snVPWD").value;
							if (passv_skip.toUpperCase().replace("", "").length < 1)
							{
								if (missingFields.length)
								{
									missingFields = missingFields + ",confirm password";
								} else {
									missingFields = "confirm password";
								}
							}
						}
						
			
			catSelect = document.getElementById("snci");
			if (catSelect) {

				currSelectNum = 0;
				for (i=1; i<catSelect.length; i++)
				{
					if (catSelect.options[i].selected == true)
					{
						currSelectNum = currSelectNum + 1;
						if (currSelectNum > 1) break;  // don't need to know exact number, just that there's more than one.
					} 
				}
				
				if (currSelectNum > 1)
				{
					alert ('Please limit your selection of primary category to only one choice.');
					return (false);
				}
			}
			
			if (missingFields.length)
			{
				var missingFieldArray = missingFields.split(",");
				missingFields = missingFieldArray[0];
				
				for (var i=1; i<missingFieldArray.length; i++) {
					if (missingFieldArray.length == 2)
					{
						missingFields = missingFields + ' and ' + missingFieldArray[i];
					} else { 
						if (i == (missingFieldArray.length - 1))
						{	
						 	missingFields = missingFields + ', and ' + missingFieldArray[i];
						} else {
							missingFields = missingFields + ', ' + missingFieldArray[i];
						}
					 }
				}

				alert ('You are missing the following required fields :\n\n ' + missingFields + '\t\n');
				return (false);
			} else return (true);
		}
			

		
		function finalizeZipContents (countryID) {
			var zip5 = document.getElementById("snZip5");
			var zip4 = document.getElementById("snZip4");
			var zipCanada = document.getElementById("snZipCanada");
			var zipNonUS = document.getElementById("snZipGeneric");

			
			if (countryID == 1) { 	// US
				zipCanada.value="";
				zipNonUS.value="";
			} else if ((countryID < 28 && countryID > 14) || (countryID == 2)) { // Canada
				zip5.value="";
				zip4.value="";
				zipNonUS.value="";
			} else if (countryID != 0) { // Non-US Country and not "not specified"
				zip5.value="";
				zip4.value="";
				zipCanada.value="";
			} else {
				zip5.value="";
				zip4.value="";
				zipCanada.value="";
				zipNonUS.value="";
			}
			
			return;
		
		}
		
		function changeCountry (countryID)
		{
		
			var usZipLabel = document.getElementById("snUSZipLabel");
			var foreignZipLabel = document.getElementById("snNonUSZipLabel");
			var zipStar = document.getElementById("zipStar");
		
			var usZip = document.getElementById("snZipUSDiv");
			var canadaZip = document.getElementById("snZipCanada");
			var nonUsZip = document.getElementById("snZipGeneric");
			
			if (countryID == 1) { 	// US
				usZipLabel.style.display = "";
				foreignZipLabel.style.display = "none";
				if (zipStar) zipStar.style.display = "";
				
				usZip.style.display = "";
				canadaZip.style.display = "none";
				nonUsZip.style.display = "none"; 
			} else if ((countryID < 28 && countryID > 14) || (countryID == 2)) { // Canada
				usZipLabel.style.display = "none";
				foreignZipLabel.style.display = "";
				if (zipStar) zipStar.style.display = "";
				
				usZip.style.display = "none";
				canadaZip.style.display = "";
				nonUsZip.style.display = "none";
			} else if (countryID != 0) { // Non-US Country and not "not specified"
				usZipLabel.style.display = "none";
				foreignZipLabel.style.display = "";
				if (zipStar) zipStar.style.display = "";
				
				usZip.style.display = "none";
				canadaZip.style.display = "none";
				nonUsZip.style.display = "";
			} else {
				usZipLabel.style.display = "";
				foreignZipLabel.style.display = "none";
				if (zipStar) zipStar.style.display = "";
				
				usZip.style.display = "";
				canadaZip.style.display = "none";
				nonUsZip.style.display = "none";
			}
			
			finalizeZipContents (countryID);
			return;
		}
		
		function showCountryConfirm(newCountry) {
			countryConfirmObj = document.getElementById("countryConfirm");
			countryConfirmedObj = document.getElementById("countryConfirmed");
			dynCNameObj = document.getElementById("dynCName");
			
			if (countryConfirmObj && dynCNameObj) {
				countryConfirmedObj.checked = "";
				countryConfirmObj.style.display = "";
				dynCNameObj.innerHTML = document.getElementById ("snCR").options[document.getElementById ("snCR").selectedIndex].text;
			}
			return;
		}
			
	