

// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue() {
	
	for (i = 0; i < 3; i++){
		if (document.form.location[i].checked == true){
			switch(document.form.location[i].value) {
				case "route33":
					document.form.recipient.value = "rt33selfstorage@rcn.com";
				break;
				case "ttown" :
					document.form.recipient.value = "trexlertownselfstorage@rcn.com";
				break;
				case "keystone":
					document.form.recipient.value = "keystoneselfstorage@rcn.com";
				break;
			}
			// This line was for testing purposes only
			//alert(document.form.recipient.value);
		}
	}	
}

function checkform() {
	var val = 0;
	
	if(document.form.name.value == "")
	{
		alert("Please enter your complete name.");
		document.form.name.focus();
		return false;	
	}
	
	if(document.form.email.value == "")
	{
		alert("Please enter your complete email address.");
		document.form.email.focus();
		return false;	
	}
	
	for (i = 0; i < 3; i++){
		if (document.form.location[i].checked == true){
			val = 1;
		}		
	}	
	
	if(val == 0) {
		alert("Please select a location for your email to be sent.");
		return false;
	}
	
}

