window.addEvent('domready', function() {
			$('myForm').addEvent('submit', function(e) {
			
				var mySlide = new Fx.Slide('page');
				
				e = new Event(e);
				mySlide.slideOut();
				e.stop();
				
				/**
				 * Prevent the submit event
				 */
				new Event(e).stop();
			
				/**
				 * This empties the log and shows the spinning indicator
				 */
				var log = $('log_res').empty().addClass('ajax-loading');
			
				/**
				 * 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');
					}
				});
			});
			
			
	$$('.text').each(function(text){
			var mySlide = new Fx.Slide(text.id);
			mySlide.hide();
			$('toggle' + text.id).addEvent('click', function(e){
				e = new Event(e);
				mySlide.toggle();
				e.stop();
			});
		});	
});	
	
		
	