
function showtypes() { 
	var alphaUserTypes = document.getElementById('alphaUserTypes');
	var defaultUserTypes = document.getElementById('defaultUserTypes');
	if (document.pbsrgContactForm.InRegardsTo.value == 'Alpha Roofing Program') {
	alphaUserTypes.style.display='block';
	defaultUserTypes.style.display='none';
	}
	else {
	alphaUserTypes.style.display='none';
	defaultUserTypes.style.display='block';
	}
}

function checkvendorareas() {
		if ((document.pbsrgContactForm.Type_of_Visitor == "Vendor") && (document.pbsrgContactForm.vendortype.value == "Other")) {
		showvendors('vendoroptions');
		document.pbsrgContactForm.otherService.style.display='block';
		}
		else if ((document.pbsrgContactForm.Type_of_Visitor == "Vendor") && (document.pbsrgContactForm.vendortype.value != "Other")) {
		showvendors('vendoroptions');
		}
		else {
		return false;
		}
	}

function hidevendors(id) {document.getElementById(id).style.display='none';document.pbsrgContactForm.vendortype.disabled=true;document.pbsrgContactForm.otherService.disabled=true;}
function showvendors(id) {document.getElementById(id).style.display='block';document.pbsrgContactForm.vendortype.disabled=false;document.pbsrgContactForm.otherService.disabled=false;document.pbsrgContactForm.TypeofOther.value = "";}

function otherServicedisplay() { 
	if (document.pbsrgContactForm.vendortype.value == 'Other') {
	document.pbsrgContactForm.otherService.style.display='block';
	document.pbsrgContactForm.otherService.focus();
	}
	else {
	document.pbsrgContactForm.otherService.style.display='none';
	}
}

/*
//Form Validation
function validateForm() {
		if ((document.pbsrgContactForm.Country.value == 'United States') && (document.pbsrgContactForm.State.value == '...') ) {
			alert("Please select which state you are located in.");
			document.pbsrgContactForm.State.focus();
		}
		else if ((document.pbsrgContactForm.Country.value == 'United States') && (document.pbsrgContactForm.City.value == '') ) {
		alert("Please select which city you are located in.");
		document.pbsrgContactForm.City.focus();
		}
		else if ((document.pbsrgContactForm.InRegardsTo.value == '...')) {
		alert("Please specify what this inquiry is in regards to.");
		document.pbsrgContactForm.InRegardsTo.focus();
		}
		else if ((document.pbsrgContactForm.Type_of_Visitor[2].checked) && (document.pbsrgContactForm.TypeofOther.value == "")){
			alert("Please specifically indicate what type of visitor your are.");
			document.pbsrgContactForm.TypeofOther.focus();
		}
		else if ((document.pbsrgContactForm.Type_of_Visitor[6].checked) && (document.pbsrgContactForm.TypeofVisitor.value == "")){
			alert("Please specifically indicate what type of visitor your are.");
			document.pbsrgContactForm.TypeofVisitor.focus();
		}
		else if ((document.pbsrgContactForm.Heard_Through[2].checked) && (document.pbsrgContactForm.HeardThrough.value == "")){
			alert("Please specifically indicate where you heard about us.");
			document.pbsrgContactForm.HeardThrough.focus();
		}				
		else {
			document.pbsrgContactForm.submit();
		}
	}
*/