// JavaScript Document
function fillInput(i,o) {
	var input = $("#"+i);
	var div = "#" + i + "s";
	var string = $("#" + o.id).html();
	var list = '';
	if(input.val() != string){
		$("#specialty").val('');
	}
	input.val(string);
	$(div).slideUp("slow");
};
function showList(e) {
	var div = "#" + e.id + "s";
	if (e.id == 'specialty') {
		if ($("#profession").val() == '') {
			$("#specialty").val('Select a profession');
			$("#professions").slideDown("slow");
			return;
		}else {			
			var f = $("#profession").val();
			switch(f) {
				case 'Dental':
					$("#Dental-list").show();
					$("#Medical-list").hide();		
					break;
				case 'Medical':
					$("#Medical-list").show();
					$("#Dental-list").hide();
					break;
			}
		}
	}
	$(div).slideToggle("slow");
};


