/*extern KIC, AjaxUpdater, BaseServicesManager */
function SessionServicesManager() {}

SessionServicesManager.prototype = new BaseServicesManager();
SessionServicesManager.prototype.constructor = SessionServicesManager;

SessionServicesManager.prototype.login = function( username, password, from, handler ) {
	// this MUST use post, not get; posting password in url string is insecure
	AjaxUpdater.updateWithPost( '/services/session/Login.ashx', 
		'username='+encodeURIComponent(username)+'&password='+encodeURIComponent(password)+'&nav='+encodeURIComponent(from), 
		handler );
};

SessionServicesManager.prototype.forgotPassword = function( username, handler ) {
	// this can use either get or post
	AjaxUpdater.updateWithPost( '/services/Session/ForgotPassword.ashx',
		'username='+encodeURIComponent(username), 
		handler );
};

SessionServicesManager.prototype.resetPassword = function( password, from, handler ) {
	// this MUST use post, not get; posting password in url string is insecure
	AjaxUpdater.updateWithPost( '/services/Session/ResetPassword.ashx', 
		'password='+encodeURIComponent(password)+'&nav='+encodeURIComponent(from), 
		handler );
};

if (typeof KIC.Services         === "undefined") { KIC.Services = {}; }
if (typeof KIC.Services.Session === "undefined") { KIC.Services.Session = new SessionServicesManager(); }

