var ntypeVal = "";

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

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