

		window.addEvent('domready', function() {
			
			var formHeight = $('form-box').getSize().y + 16;
			$('infoForm').setStyle('position', 'static');
			$('infoForm').setStyle('height', '0');
			$('infoForm').setStyle('opacity', '0');
			$('jsout').setAttribute('value', 'true');
			$('openform').addEvent('click', function(e) {
				e.stop();				
				formFx = new Fx.Tween($('infoForm'));
				formFx.start('height', '0', formHeight -22);
				formOpacity = new Fx.Tween($('infoForm'));
				formOpacity.start('opacity', '0', '1');
				$('openform').removeEvents('click');
				$('openform').addEvent('click', function(e) { e.stop(); });
			});

			var infoFormValidation = new Validate('infoForm',{
				errorClass: 'red',
				onSuccess: function() {
					var formContent = $('form-box');
					var form = $('infoForm');
					//Fade out form, add loader gif to bg, set the height of the form for future tween
					var formContentFader = new Fx.Tween(formContent);
					formContentFader.start('opacity', '1', '0');
					form.addClass('ajax-loading');
					form.setStyle('height', formHeight - 22);
					
					//Set the options of the form's Request handler. 
					$('infoForm').set('send', {onComplete: function(response) { 
							// Empty Form, remove loader gif, load html
							formContent.empty();
							form.removeClass('ajax-loading');
							formContent.set('html', response);
							
							// Fade in Response,  tween to response height
							formContentFader.cancel();
							formContentFader.start('opacity', '1');
							formResizer = new Fx.Tween(form);
							if(ie) {formResizer.start('height', formContent.getSize().y);} 
							else {formResizer.start('height', formContent.getSize().y);}
						}
					});
					//Send the form.
					$('infoForm').send();
				}
			});
			
		});