function indicate(field, msg) {
	if (field && field.style) field.style.border = "2px solid #FF9900";
	alert(msg);
	if (field) field.focus();
	return false;
}
function validateBasicInfo() {
	if(document.regform.salutation.selectedIndex == 0) return indicate(document.regform.salutation, "You must enter your Title");    
	if(document.regform.firstname.value == '') return indicate(document.regform.firstname, "You must enter your First Name");
	if(document.regform.lastname.value == '') return indicate(document.regform.lastname, "You must enter a Last Name");
	if(document.regform.specialty.selectedIndex == 0) return indicate(document.regform.specialty, "You must select your specialization");
	if(document.regform.years_in_practice.selectedIndex == 0) return indicate(document.regform.years_in_practice, "You must select your Years of Practice");
        if(document.regform.address1.value == '') return indicate(document.regform.address1, "You must enter your Address");
	if(document.regform.city.value == '') return indicate(document.regform.city, "You must enter your City");
	if(document.regform.country.selectedIndex == 0) return indicate(document.regform.country, "You must enter your Country");
        if(document.regform.state.selectedIndex == 0) return indicate(document.regform.state, "You must enter your State");
	if(document.regform.zip.value == '') return indicate(document.regform.zip, "You must enter your Postal/Zip Code");
	if(document.regform.hospital.value == '') return indicate(document.regform.hospital, "You must enter your Hospital Affiliation");

	//if(document.regform.login && document.regform.login.value.length < 5) return indicate(document.regform.login, "Your username must be at least 5 characters long");
	if(document.regform.passwd && document.regform.passwd.value.length < 5) return indicate(document.regform.passwd, "Your password must be at least 5 characters long");
	if(document.regform.passwd.value != document.regform.passwd2.value) return indicate(document.regform.passwd, "Your passwords do not match");
	if(document.regform.email.value.length < 1) return indicate(document.regform.email, "You must enter an Email Address");
	emailDelim = document.regform.email.value.indexOf("@");
	if(emailDelim < 2) return indicate(document.regform.email, "That is not a valid Email Address");
	if(document.regform.email.value!=document.regform.email2.value) return indicate(document.regform.email, "Your email addresses do match");
	document.regform.patient_population.value = document.regform.pp1.value+":"+document.regform.pp1val.value+";"+document.regform.pp2.value+":"+document.regform.pp2val.value+";"+document.regform.pp3.value+":"+document.regform.pp3val.value
	return true;
}
function bindvalue(){
   strData = "";
   if(!validateBasicInfo()) return false;
   if(document.regform.accept.checked){
       strData = " Accepted";               
   }else{
       alert(" You must accept the terms and conditions");
       return false;
   }
   document.regform.about_me.value = strData;
   return true;
}