var tipVal = "";

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

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