<!--

//This function will validate selected form input parameters.

function Validate() {
	var Proceed = 1;
	var FocusField = "";
	var Msg = "";

	while (Proceed == 1) {

		if (document.replyform.title.selectedIndex == 0) {
			Proceed = 0;
			FocusField = "title";
			Msg = "Please select a title";
			break;
		}

		if (document.replyform.firstname.value.length == 0) {
			Proceed = 0;
			FocusField = "firstname";
			Msg = "Please enter your full name";
			break;
		}

		if (document.replyform.surname.value.length == 0) {
			Proceed = 0;
			FocusField = "surname";
			Msg = "Please enter your surname";
			break;
		}

		if (document.replyform.org.value.length == 0) {
			Proceed = 0;
			FocusField = "org";
			Msg = "Please enter your institution";
			break;
		}

		if (document.replyform.countrya.selectedIndex == 0) {
			Proceed = 0;
			FocusField = "countrya";
			Msg = "Please select the country your are based now";
			break;
		}

		if (document.replyform.countryb.selectedIndex == 0) {
			Proceed = 0;
			FocusField = "countryb";
			Msg = "Please select your country of origin";
			break;
		}

		if (document.replyform.email.value.length == 0) {
			Proceed = 0;
			FocusField = "email";
			Msg = "Please enter your email address";
			break;
		}

		if (document.replyform.web.value.length == 0) {
			Proceed = 0;
			FocusField = "web";
			Msg = "Please enter your Web address";
			break;
		}
		if (document.replyform.willing.selectedIndex == 0) {
			Proceed = 0;
			FocusField = "willing";
			Msg = "Please select your willingness for involvement in the NIH Alumni Association";
			break;
		}



		break;	
	}

	if (Proceed == 1) {
		return true;
	}else{
		alert (Msg);

		//This statement will place cursor at error field

		eval("document.replyform." + FocusField + ".focus()");
		return false;
	}				

}

		// -->

