﻿function pop_file(f, w, h, scroll) {
	var temp_url = f;
	if (scroll)
		var new_win = window.open(temp_url, 'pop' + h + w, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + w + ',height=' + h + ',alwaysRaised=yes');
	else
		var new_win = window.open(temp_url, 'pop' + h + w, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=' + w + ',height=' + h + ',alwaysRaised=yes');
	new_win.focus();
}

function check_fap_form() {
	form = document.fap_form;
	if (form.physician_list[form.physician_list.selectedIndex].value != '-2') {
		form.act.value = 'search';
		if (form.physician_list[form.physician_list.selectedIndex].value == '-1' || form.physician_list[form.physician_list.selectedIndex].value == 'alpha') {
			form.SearchType.value = '';
		} else if (form.physician_list[form.physician_list.selectedIndex].value == 'specialty') {
			form.SearchType.value = 'by_specialty';
		} else if (form.physician_list[form.physician_list.selectedIndex].value == 'location') {
			form.SearchType.value = 'by_location';
		}
	}
	return true;
}

function check_fac_form() {
	form = document.fac_form;
	form.action = form.career_list[form.career_list.selectedIndex].value;
	return true;
}

function check_hl_form() {
	form = document.hl_form;
	var el = '';
	if (form.SearchTerm.value == '') {
		alert('Please enter a term to search on and then click "SEARCH" again');
		return false;
	} else {
		return true;
	}
}

function search_results(st, n) {
	form = document.hl_form;
	form.SearchTerm.value = st;
	form.SearchStart.value = n;
	form.submit();
}

function left_nav_rollover(id) {
	if (document.getElementById) document.getElementById('LN' + id).className = 'LeftNavRollover';
}

function left_nav_rolloff(id) {
	if (document.getElementById) document.getElementById('LN' + id).className = '';
}

