Centrica.Implementation.ForgottenPasswordChanger = {
	_signIn: null,
	_forgottenPassword: null,
	getControls: function () {
		this._signIn = Centrica.Common.getElementsByTagNameClass(document, "div", "signInForm")[0];
		this._forgottenPassword = Centrica.Common.getElementsByTagNameClass(document, "div", "forgottenPasswordForm")[0];
	},
	enableChanger: function() {
		if ((this._signIn != null) && (this._forgottenPassword != null)) {
			this._signIn.style.display = "none";
			this._forgottenPassword.style.display = "block";
		}
	},
	disableChanger: function() {
		if ((this._signIn != null) && (this._forgottenPassword != null)) {
			this._signIn.style.display = "block";
			this._forgottenPassword.style.display = "none";
		}
	},
	load: function() {
		Centrica.Implementation.ForgottenPasswordChanger.getControls();
		
		if ((Centrica.Implementation.ForgottenPasswordChanger._signIn != null) && (Centrica.Implementation.ForgottenPasswordChanger._forgottenPassword != null)) {
			var _enable_action = Centrica.Implementation.ForgottenPasswordChanger._signIn.getElementsByTagName("a")[0];
			_enable_action.onclick = function() {
				Centrica.Implementation.ForgottenPasswordChanger.enableChanger();
				return false;
			}
			_enable_action.onkeypress = _enable_action.onclick;

			var _disable_action = Centrica.Implementation.ForgottenPasswordChanger._forgottenPassword.getElementsByTagName("a")[0];
			_disable_action.onclick = function() {
				Centrica.Implementation.ForgottenPasswordChanger.disableChanger();
				return false;
			}
			_disable_action.onkeypress = _disable_action.onclick;
		}
		if (Centrica.Implementation.ForgottenPasswordChanger._signIn.style.display == "none") {
			//Centrica.Implementation.ForgottenPasswordChanger.disableChanger();
		} else {
			Centrica.Implementation.ForgottenPasswordChanger.disableChanger();
		}
	}
}

Centrica.Common.addEvent(window, 'load', Centrica.Implementation.ForgottenPasswordChanger.load);