		window.addEvent('domready', function(){
			$('myForm').addEvent('submit', function(e) {
				/**
				 * Prevent the submit event
				 */
				new Event(e).stop();
			
				/**
				 * This empties the log and shows the spinning indicator
				 */
				 myhtml = '<center><img src="images/progressbar.gif"><br>查詢中,請稍候....<br></center>';
				var log = $('log_res').empty().setHTML(myhtml);
				var btt = $('submitter').setProperties({
						 disabled: 'true'
						});
			
				/**
				 * send takes care of encoding and returns the Ajax instance.
				 * onComplete removes the spinner from the log.
				 */
				this.send({
					update: log,
					onComplete: function() {
						log.removeClass('ajax-loading');
						btt.removeProperty('disabled');
					}
				});
			});
		}); 