/*
	This function prepares data from the search screen so it can be used in the 
	creation of the pdf so the same docs are selected as a regular search (more or less). 
*/
	function submitPDF() {
		var url = new String();
		var args = new String();
		url = '/pdf/generate_public_select.asp';
		args = ""

		if (document.edit.last.value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'last=' + document.edit.last.value;
		}

		if (document.edit.first.value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'first=' + document.edit.first.value;
		} 

		if (document.edit.specialtyID.options[document.edit.specialtyID.selectedIndex].value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'specialtyid=' + document.edit.specialtyID.options[document.edit.specialtyID.selectedIndex].value;
		}

		if (document.edit.hospital.options[document.edit.hospital.selectedIndex].value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'hospital=' + document.edit.hospital.options[document.edit.hospital.selectedIndex].value;
		}
		
/*		if (document.search.practice.options[document.search.practice.selectedIndex].value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'practice=' + document.search.practice.options[document.search.practice.selectedIndex].value;
		}

		if (args.length > 0) {args = args + '&'} else {args = args + '?'}
		args = args + 'hospitalname=northside'

		if (document.edit.city.options[document.edit.city.selectedIndex].value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'city=' + document.edit.city.options[document.edit.city.selectedIndex].value;
		} 

		if (document.edit.keyword.value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'keyword=' + document.edit.keyword.value;
		} 
		
		if (document.search.gender.options[document.search.gender.selectedIndex].value != '') {
			if (args.length > 0) {args = args + '&'} else {args = args + '?'}
			args = args + 'gender=' + document.search.gender.options[document.search.gender.selectedIndex].value;
		}

		for (var i=0; i<=document.search.gender.length-1; i++) {
			if (document.search.gender[i].checked == true && document.search.gender[i].value != '') {
				if (args.length > 0) {args = args + '&'} else {args = args + '?'}
				args = args + 'gender=' + document.search.gender[i].value;
				i=document.search.gender.length;
			}
		}
*/
		url = url + args;
		

	//	alert(url);
		var pdfWin = window.open(url);
		return false;
	}
/* --- END --- */