int FalconScriptingModule::executeScriptGlobal(const CEGUI::String& function_name)
{
    Falcon::Item* func = d_vm->findGlobalItem(Falcon::String(function_name.c_str()));
    if(func != NULL && func->isCallable()) {
        d_vm->callItem(*func, 0);
        d_vm->reset();
        Falcon::Item& ret = d_vm->regA();
        return ret.forceInteger();
    }
    return 0;
}
bool FalconScriptingModule::executeScriptedEventHandler(const CEGUI::String& handler_name, const CEGUI::EventArgs& e)
{
    Falcon::Item* func = d_vm->findGlobalItem(Falcon::String(handler_name.c_str()));
    if(func != NULL && func->isCallable()) {
        d_vm->pushParam(3);
        d_vm->callItem(*func, 1);
        d_vm->reset();
        Falcon::Item& ret = d_vm->regA();
        return ret.isBoolean() ? ret.asBoolean() : true;
    }
    return false;
}