/*
 * Created on 29.05.2011
 * Copyright (c) Andreas Bauer <andreas.bauer@creaktif.de>
 */

function CustomEvent(name)
{
	this._eventName = name;
	this._eventAction = null;
}

CustomEvent.prototype.Subscribe = function(callback)
{
	this._eventAction = callback;
}

CustomEvent.prototype.Fire = function(sender, eventArgs)
{
	if (this._eventAction != null)
		this._eventAction(sender, eventArgs);
	else
		alert('There was no function subscribed to the ' + this._eventName + ' event!');
}
