/** 
	messageengine.js 
	Author: Chuck Ingrum, Nathan Huebner
**/

//MessageStore constructor
function MessageStore() {
	this.messages = new Object();
}

MessageStore.prototype.addMessage = function (sID, sText) {
	this.messages[sID] = sText;
}

MessageStore.prototype.getMessage = function (sID) {
	return this.hasMessage(sID) ? this.messages[sID]
									:null;
}

MessageStore.prototype.deleteMessage = function (sID) {
	delete this.messages.sID;
}

MessageStore.prototype.hasMessage = function (sID) {
	var retval = false;
	if (this.messages.hasOwnProperty(sID)) {
		retval = true;
	}
	return retval;
}

MessageStore.prototype.clear = function () {
	this.messages = new Object();
}

// Additional API to allow on demand message downloading.
