var isFormattingHelpExpanded;

function init() {
	isFormattingHelpExpanded = false;
}

function toggleFormattingHelp() {
	if(isFormattingHelpExpanded == true) {
		new Effect.BlindUp('formattingHelp'), {duration:0.3};
		isFormattingHelpExpanded = false;
	} else {
		new Effect.BlindDown('formattingHelp'), {duration:0.3};
		isFormattingHelpExpanded = true;
	}
}

function validateApplication() {
	
	// Do this if I get 'spare' time
	
/*	new Ajax.Request('/union/WebObjects/union.woa/wa/validateApplication',
					{
						method: 'get',
						parameters: $('registrationForm').serialize(true),
						onSuccess: function(transport) {
										var nodes = transport.responseXML.childNodes;
										var i;
										for(i=0;i<nodes.length;i++) {
											var fieldName = nodes(i).tagName;
											alert(fieldName);
											alert(nodes(i).firstChild.firstChild.text);
											var isValid = (nodes(i).firstChild.firstChild.text == 'true');
											if (! isValid) {
												var domElement = document.getElementById(fieldName);
												domElement.style = "background-color: red";
												alert(fieldName + " is not valid");
											}
										}
										
								   },
						onFailure: function(transport) {
						           }
				    }); */

}