/**
 * @author Kalapuc Roman (rkalapuc@gmail.com)
 * @copyright Finport Technologies Inc
 * @since 2006
 * @version 1.0
 */

function wlpMessage(/*String*/ _text,/*messageID*/ _id){
	this.text = _text;
	this.ID = _id;
}

/**
 * @author Kalapuc Roman (rkalapuc@gmail.com)
 * @copyright Finport Technologies Inc
 * @since 2006
 * @version 1.0
 */

function wlpMessenger(/*String*/_messages){
	this._registeredMessages = new wlpArrayList(_messages);
}

wlpMessenger.prototype.registerMessage = function(/*messageID*/_id){
	this._registeredMessages.add(_id);
}

wlpMessenger.prototype.unregisterMessage = function(/*messageID*/_id){
	this._registeredMessages.remove(_id);
}

wlpMessenger.prototype.showMessage = function(/*wlpMessage*/ message,_control){
	if (this._registeredMessages.contains(message.ID)){
		return true;
	} else {
		return false;
	}
}

wlpMessenger.prototype.hideMessage = function(/*wlpMessage*/ message){
	if (this._registeredMessages.contains(message.ID)){
		return true;
	} else {
		return false;
	}
}

