// Setup default hook variables
// Hooks fired in templateSecure:  "menu", "header", "content", "footer";
var hooks = new Array();

// Add a hook to the hook stack
function addHook(location, hkFunction)
{
	hooks.push(new Hook(location, hkFunction));
}

// Fire all the hooks for the given location
function fireHooks(location)
{
	hooks.each(function(hook) {
		if (hook.location == location)
			hook.fire();
	});
}

// Hook object
function Hook(location, hkFunction)
{
	this.location = location;
	this.fire = hkFunction;
}
