var rpc_objCode = ''; var rpc_defaultMethod = "GET"; var rpc_queueLock = false; var rpc_lockLock = false; var rpc_currentCalls = new Array(); var rpc_functions = new Array(); var rpc_failed = false; // Calls a remote function on the server function rpc_doCall(name, pArguments) { if (rpc_failed) return; var func = rpc_functions[name]; if (!func) { rpc_alertFunction(name); return; } var args = new Array(); var callback, i; for (i=0;i0) { i--; if (rpc_currentCalls[i].id == id) return true; } return false; } // Reads the queue and returns the RPC call identified by the ID passed by the // caller. Returns null if the RPC call cannot be found. function rpc_getCall(id) { for (i=0;i