
Event.observe(window, 'load', function() {
	setContentHeight();
});

function setContentHeight() {
	var submenu = $('submenu');
	var content = $('content');
	if (!content) {
		content = $('contentMiddleColumn')
	}
	var minHeight = 400;
	
	if (submenu.getHeight() > minHeight) minHeight = submenu.getHeight();
	if (content.getHeight() > minHeight) minHeight = content.getHeight();
	minHeight += 50;
	$('main').style.height = minHeight + "px";
}


var ForgotPassword = {
	_alreadySubmitted: false,
	
	submitForgotPassword: function() {
		if (_alreadySubmitted == false) {
			_alreadySubmitted = true;
			
			new Ajax.Updater('login', '/fhpo/password/generate.web', {
				parameters: { username: $F('forgotpw_username')}, onComplete: function(response) {
					_alreadySubmitted = false;
				} 
			});
		}
	},
	
	getforgotPasswordView: function() {
		_alreadySubmitted = false;
		new Ajax.Updater('login', '/fhpo/password/view.web');
	} 
	

}



