// Custom Javascript functions
function valbutton() {
// place any other field validations that you require here
	if (document.form1.searchtype[0].checked && document.form1.searchcity.value=="empty") {
		alert("Please select a city to search");
		return false;
		}
	if (document.form1.searchtype[1].checked && document.form1.salonspaname.value=="") {
		alert("Please provide a salon or spa name to search for.");
		return false;
		}
// validate myradiobuttons
	myOption = -1;
	for (i=0; i<document.form1.searchtype.length; i++) {
		if (document.form1.searchtype[i].checked) {
		myOption = i;
		}
	}
	if (myOption == -1) {
		alert("You must specify a search type.");
		return false;
	}
// place any other field validations that you require here
document.form1.submit(); // this line submits the form after validation
}

function checkSelect1(){
	//alert("You selected an option");
	document.form1.searchtype[0].checked = true;
	}

function checkSelect2(){
	//alert("You selected an option");
	document.form1.searchtype[1].checked = true;
	}

function checkSelect3(){
	//alert("You selected an option");
	document.form1.searchtype[2].checked = true;
	}
//-----------------------------------------------------------
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function CompareCheck(){
	var checkbox_choices = 0;
	for (counter = 0; counter < this.form1.compare.length; counter++)
		{
		if (this.form1.compare[counter].checked)
			{ 
			checkbox_choices = checkbox_choices + 1;
			}
		if (checkbox_choices > 3 )
			{
		   	alert("You can only select 3 listings to compare at once.");
			}	
		}
}

// Hide Search Boxes in Student Section
function hideStudentSearch(){
	document.studentSearch.search_school.checked = false;
	document.getElementById('studentSearchOptionsSchool').style.display = "none";
	document.studentSearch.search_cert.checked = false;
	document.getElementById('studentSearchOptionsCert').style.display = "none";
	document.studentSearch.search_graddate.checked = false;
	document.getElementById('studentSearchOptionsGradDate').style.display = "none";
	document.studentSearch.search_relocate.checked = false;
}
-->
