jQuery(function($) {

	$('#twDate1').date_input();
	$('#twDate1Clear').bind('click', function() {$('#twDate1').val("");})

	$('#twDate2').date_input();
	$('#twDate2Clear').bind('click', function() {$('#twDate2').val("");})
//	alert($('#twforms_header select.twmasterList:first').get())

	$('#twmasterList').bind('change', function(){
		var params = eval("(" + this.getAttribute('params') + ")") || {};
		if (params) {
			jQuery.ajax({
				url : '/twforms/',
				dataType: 'text',
				cache: false,
				data: params,
				success : function(text) {
					$('#twslaveList').html(text);
				}
			});
		}
	})

})
