public object CallMemberFunction(string functionName, params object[] parameters)
{
var function = GetPropertyValue(functionName);
if (function == null)
throw new JavaScriptException(this.Engine, ErrorType.TypeError, string.Format("Object {0} has no method '{1}'", this.ToString(), functionName));
if ((function is FunctionInstance) == false)
throw new JavaScriptException(this.Engine, ErrorType.TypeError, string.Format("Property '{1}' of object {0} is not a function", this.ToString(), functionName));
return ((FunctionInstance)function).CallLateBound(this, parameters);
}