var faqVal = "";

new Event.observe(window,"load", function(ev) {

	// Setup observer for the changing FAQ value.
	faqVal = $("faqtopic").value;
	$("faqtopic").observe("dropdown:change",function(ev) {
		ev.stop();
		if (this.value != faqVal) {
			// It's been changed, let's reload the FAQs!
			faqVal = this.value;
			new Ajax.Updater("faqs","http://www.familytreemd.org/modules/faqs/get-topic.php?id=" + faqVal);
		}
	});
	
});