function MBAccount() { this.isAuthorized = function() { return false; } this.getUsername = function() { return ""; } this.isCustomerService = function() { return false; } } function isCallerAuthorized() { var acct = new MBAccount(); return acct.isAuthorized(); }