<PAGE>

                                                                    EXHIBIT 10.5


                       AMENDED AND RESTATED LOAN AGREEMENT

      THIS AMENDED AND RESTATED LOAN AGREEMENT ("Agreement" or "Loan Agreement")
is entered into effective July 27, 2000 by and between CALIFORNIA BANK & TRUST,
A CALIFORNIA BANKING CORPORATION (formerly Sumitomo Bank of California) ("Bank")
and ADVANCED MARKETING SERVICES, INC., a California corporation ("Borrower").

      This Agreement amends and restates that Commercial Loan Agreement ("Loan
Agreement") and Promissory Note dated as of January 20, 1995 in the original
principal amount of Ten Million Dollars ($10,000,000.00) ("Note") as modified
and extended by those Amendment Agreements dated July 31, 1996, March 20, 1997,
August 13, 1997, November 19, 1997 and September 30, 1998. The Note and Loan
Agreement, and all extensions, amendments and modifications thereof and other
documents executed in connection with any of them are collectively referred to
as "Loan Documents."

CREDIT FACILITIES, AMOUNT AND TERMS. BANK AGREES TO MAKE THE FOLLOWING CREDIT
FACILITIES ("LOAN" OR "LOANS") AVAILABLE TO BORROWER ON THE TERMS, COVENANTS AND
CONDITIONS SET FORTH HEREIN.

A.    REVOLVING LINE OF CREDIT. During the Availability Period, Bank will, on a
      revolving basis, make advances to Borrower ("Revolving Line") which may
      not at any time exceed, in the aggregate outstanding the amount of
      $12,000,000.00, less the aggregated outstanding face amount of Letters of
      Credit. During the Availability Period, Borrower may repay principal
      amounts and reborrow them.

            (1)   Minimum Advance. Each advance must be for at least One Hundred
                  Thousand Dollars ($100,000.00), or for the amount of the
                  remaining available Revolving Line, if less.

            (2)   Maximum Loan Balance. Borrower agrees not to permit the
                  outstanding principal balance of the Revolving Line plus the
                  outstanding face amount of any letters of credit, including
                  amounts drawn on letters of credit and not yet reimbursed
                  (such sum is the "Loan Balance"), to exceed the Commitment and
                  is further subject to compliance with the Borrowing Base,
                  defined hereinbelow.

            (3)   Availability Period. Unless extended in writing by Bank, the
                  period under which Borrower may draw on the Revolving Line
                  ("Availability Period") is between the date of this Agreement
                  and August 31, 2002 (the "Maturity Date") unless Borrower is
                  in default, in which event Bank need not make any advances.

            (5)   Interest Rate.

                  (a)   Unless Borrower elects an Optional Interest Rate,
                        advances outstanding hereunder will bear interest at the
                        rate per annum equal to Bank's Prime Rate in effect from
                        time to time. The "Prime Rate"
<PAGE>
                        equals the rate of interest set from time to time by
                        Bank as its Prime Rate. It is determined by Bank as a
                        means of pricing credit extensions to some customers and
                        is neither tied to any external rate of interest or
                        index, nor is it necessarily the lowest rate of interest
                        charged by Bank at any given time for any particular
                        class of customers or credit extensions. Any changes in
                        the interest rate resulting from a change in the Prime
                        Rate shall take effect without notice on the date
                        specified at the time the Prime Rate is set.

                  (b)   Interest shall be calculated on a 365/360 basis; that
                        is, by applying the ratio of the annual interest rate
                        over a year of 360 days, multiplied by the outstanding
                        principal balance, multiplied by the actual number of
                        days the principal balance is outstanding.

                  (c)   Optional Interest Rate. Instead of the interest rate
                        based on Bank's Prime Rate, Borrower may elect to have
                        all or any portion, but not less than $500,000.00 of the
                        revolving portion of the Revolving Line (during the
                        Revolving Availability Period) bear interest at the rate
                        described below ("Optional Interest Rate") during an
                        interest period agreed to in writing by Bank and
                        Borrower. Each interest rate is a rate per annum.
                        Interest will be paid in arrears. At the end of any
                        interest period, the interest rate will revert to the
                        rate based on the Prime Rate, unless Borrower has
                        designated another Optional Interest Rate for that
                        portion. The optional interest rate will be equal to
                        LIBOR, as described below, plus a spread equal to one
                        and one half percent (1.50%) per annum.

                        (i)   LIBOR shall mean the London Interbank Offered
                              Rate, which is the rate of interest at which
                              deposits in U.S. Dollars for one month are offered
                              to first class banks in the London Interbank
                              Market as quoted for the mid-morning average LlBOR
                              rate as published by Telerate Systems, Inc. or
                              such other publications as Bank may reasonable
                              select, two (2) Business Days prior to the
                              commencement of each relevant Interest Period.

                        (ii)  Borrower may select an Optional Interest Rate for
                              periods of 30, 60, 90, 120, 150 or 180 days,
                              provided Borrower may not elect an Optional
                              Interest Rate with respect to any portion of the
                              principal balance which is scheduled to be repaid
                              before the last day of the applicable Interest
                              Period.

                        (iii) No portion of the principal balance of the
                              Revolving Line already bearing interest at an
                              Optional Interest Rate may be converted to a
                              different rate during its Interest Period.

                        (iv)  Each prepayment of principal of the Revolving Line
                              which is covered by an Optional Interest Rate,
                              whether voluntary, by reason of acceleration or
                              otherwise, will be accompanied
<PAGE>
                              by the amount of accrued interest on the amount
                              prepaid, and a prepayment fee equal to the amount
                              (if any) by which: (a) the additional interest
                              which would have been payable on the amount
                              prepaid had it not been paid until the last day of
                              the interest period, exceeds (b) the interest
                              which would have been recoverable by Bank by
                              placing the amount prepaid on the deposit in the
                              offshore dollar market for a period starting on
                              the date on which it was prepaid and ending on the
                              last day of the interest period for such portion.

                        (v)   Bank will have no obligation to accept an election
                              of an Optional Interest Rate if: (a) dollar
                              deposits in the principal amount, and for periods
                              equal to the interest period, of an Optional
                              Interest Rate portion are not available in the
                              offshore Dollar Interbank market; or (b) the
                              Optional Interest Rate does not accurately reflect
                              the cost of an Offshore Rate portion.

            (6)   Repayment. Borrower will pay interest monthly on the first day
                  of each calendar month until Maturity, at which time all
                  principal, interest and other charges outstanding shall be
                  due. Borrower may prepay the Revolving Line in full or in part
                  at any time. Any prepayment will be applied first to interest
                  and charges and then to principal. Principal amounts repaid
                  may be re-borrowed.

            (7)   Letter of Credit Sub-limit.

                  (a)   The Revolving Line may be used for financing commercial
                        or standby letters of credit with a maximum maturity of
                        one year, but not to extend more than ninety (90) days
                        beyond the Maturity Date.

                  (b)   The amount of outstanding letters of credit, including
                        amounts drawn on letters of credit and not yet
                        reimbursed, may not exceed at any one time five hundred
                        thousand dollars ($500,000.00).

                  (c)   Any sum drawn under a letter of credit may, at the
                        option of Bank, be added to the principal amount
                        outstanding under the Revolving Line. Such amount will
                        bear interest and be due as described hereinabove at
                        Section 5(a).

                  (d)   In the event any letters of credit are outstanding on
                        the Maturity Date, or in the event an Event of Default
                        shall have occurred, Borrower shall immediately prepay
                        such letters of credit and deposit with Bank, as cash
                        collateral for the obligations of Borrower under such
                        letters of credit, and Borrower hereby grants to Bank a
                        security interest in such cash collateral, an amount
                        equal to the face amount of all outstanding letters of
                        credit, to be applied to repay draws under letters of
                        credit as and when made.
<PAGE>
                  (e)   The issuance of any letter of credit or any amendment to
                        a letter of credit is subject to Bank's written approval
                        and must be in form and content satisfactory to Bank and
                        in favor of a beneficiary acceptable to Bank.

                  (f)   Borrower will sign Bank's form applications for any
                        letter of credit issued pursuant to this Agreement.

                  (g)   Borrower agrees that Bank may automatically charge its
                        deposit account for applicable fees, discounts and other
                        charges relating to any letters of credit.

                  (h)   Borrower will pay any issuance and/or other fees that
                        Bank notifies Borrower will be charged for issuing and
                        processing letters of credit.

INTEREST RATES. The interest rates payable on the above facility will be
computed on the basis of a 360 day year and the actual number of days elapsed.
This results in more interest than if a 365 day year is used.

DEFAULT RATE. Upon the occurrence and during the continuance of any Event of
Default, at Bank's sole option, Borrower shall pay interest on the outstanding
principal and interest at the rate of interest otherwise provided, plus five
percent (5%) (the "Default Rate"). This will not constitute a waiver of any
Event of Default.

FEES AND EXPENSES.

      (a)   Letter of Credit Fees. Borrower agrees to pay any issuance fees/and
            or other fees that Bank notifies Borrower will be charged for
            issuing and processing letters of credit for Borrower.

      (b)   Expenses. Borrower agrees to immediately repay Bank for expenses,
            including without limitation, filing, recording and documentation
            fees. Borrower agrees to reimburse Bank for any expenses it incurs
            in the negotiation and preparation of this Agreement and any
            agreement or instrument required by this Agreement, which expenses
            include, without limitation, reasonable attorneys' fees, including
            any allocated costs of Bank's in house counsel. Borrower further
            agrees to reimburse Bank for the cost of periodic audits and
            appraisals of the collateral securing the Loan, at such intervals as
            Bank may reasonably require, including audits and appraisals
            performed by employees of the Bank.

GUARANTORS. There are no guarantors of the indebtedness.

COLLATERAL. Borrower's obligations to Bank are unsecured.

DISBURSEMENTS, PAYMENTS AND COSTS

      REQUEST FOR CREDIT. Each request for an advance under any line of credit
will be made in writing in a manner acceptable to Bank, or by another means
acceptable to Bank.
<PAGE>
      DISBURSEMENT AND PAYMENTS. Each disbursement by Bank and each payment by
      Borrower will be:

      (a)   made at Bank's branch (or other location) selected by Bank from time
            to time.

      (b)   made for the account of Bank's Branch selected by Bank from time to
            time.

      (c)   made in immediately available funds, or such other type of funds
            selected by Bank.

      (d)   evidenced by records kept by Bank. In addition, Bank may, at its
            discretion, require Borrower to sign one or more promissory notes.

      TELEPHONE AUTHORIZATION

      (a)   Bank may honor telephone instructions for advances or repayments
            given by any officer of Borrower or a person or persons so
            authorized by any officer of Borrower.

      (b)   Advances will be deposited in, and repayments will be withdrawn from
            Borrower's deposit account with Bank.

      (c)   Bank will provide written confirmation to Borrower of transactions
            made based on telephone instructions. Borrower agrees to notify Bank
            promptly of any discrepancy between the confirmation and telephone
            instructions. If there is a discrepancy and Bank has already acted
            on the telephone instructions, the telephone instructions will
            prevail over the written confirmation.

      (d)   Borrower indemnifies and holds Bank harmless (including its
            officers, employees and agents) from all liability, loss, and costs
            in connection with any act resulting from telephone instructions it
            reasonably believes are made by an officer of Borrower or a person
            authorized by an officer of Borrower. This indemnity and agreement
            to hold harmless will survive this Loan Agreement's termination.

      BANKING DAYS. Unless otherwise provided in this Loan Agreement or other
      document executed in connection with any of the loan(s), a "Banking Day"
      is a day other than a Saturday or Sunday on which Bank is open for
      business in California. For amounts bearing interest at an Optional
      Interest Rate (if any), a Banking Day is a day other than a Saturday or a
      Sunday on which Bank is open for business in California and dealing in
      offshore dollars. All payments and disbursement which would be due on a
      day which is not a Banking Day will be due on the next Banking Day. All
      payments received on a day which is not a Banking Day will be applied to
      the applicable loan(s) on the next Banking Day.

      OVERDRAFTS. At Bank's sole option in each instance, Bank may make advances
      under any line of credit to prevent or cover an overdraft on any account
      of Borrower with Bank. Each such advance will accrue interest from the
      date of the advance or the date on which the account is overdrawn,
      whichever occurs first, at the interest rate described in the
<PAGE>
      applicable line of credit from which the advance is made. Borrower shall
      be liable to Bank for any advance made to cover an overdraft.

      OVERADVANCES. If at any time the principal outstanding balance of any line
      of credit exceeds the commitment, that amount shall be immediately due and
      payable.

CONDITIONS. Bank must have received the following fully executed items, in form
and content acceptable to Bank, before it is required to extend any credit to
Borrower under any of the loan(s):

      (a)   Evidence that the execution, delivery and performance by Borrower
            have been duly authorized.

      (b)   Evidence of Insurance coverage, if and as required by Bank.

      (c)   Borrower shall have opened its primary business accounts with Bank.

      (d)   Borrower shall have paid to Bank any commitment fees and costs
            associated with the Loan.

CONDITIONS TO EACH ADVANCE. It shall be a condition to Bank's obligation to make
advances under any line of credit that:

      (a)   Borrower shall not be in default of any payment terms or covenants
            applicable to the Loans.

      (b)   All representations and warranties of Borrower must be true and
            correct.

      (c)   No material adverse change in the financial condition of the
            Borrower or any Guarantor, or to the value of any collateral
            securing the Loan, in Bank's sole discretion, shall have occurred;

REPRESENTATIONS AND WARRANTIES. Borrower represents and warrants as of the date
of this Agreement and during the term hereof until notice of the contrary is
given that:

      (a) Organization. Borrower is and at all times shall be a corporation duly
organized, validly existing and in good standing under the laws of the State of
California and is and shall be qualified to do business in each jurisdiction
where the character of its business or assets requires such qualification.
Borrower has full power, right and authority to (i) own its property, including,
without limitation, the Property, (ii) carry on its business as now conducted,
(iii) execute and deliver this Loan Agreement and other loan documents and
perform its obligations thereunder, and (iv) consummate the transactions
contemplated hereby.

      (b) Authority. The execution, delivery and performance of this Agreement
and any instrument or agreement required hereunder are within the power of
Borrower, have been duly authorized and do not and will not (1) conflict with
the terms of any charter, bylaws, partnership agreement, trust instruments, or
other organizational papers of Borrower; (2) violate any provision of any law,
rule, regulation, order, writ, judgment, injunction, decree, determination, or
award in effect having applicability to Borrower, or (3) result in a breach of
or constitute a default under any indenture or loan or credit agreement or any
other agreement, lease or
<PAGE>
instrument to which Borrower is a party or by which Borrower or the Property may
be bound or affected.

      (c) Legally Enforceable Agreements. This Agreement is, and each of the
other Loan Documents when delivered under this Agreement or otherwise will be,
legal, valid, and binding obligations of Borrower, enforceable against Borrower
in accordance with their respective terms, except to the extent that such
enforcement may be limited by applicable bankruptcy, insolvency, and other
similar laws affecting creditors' rights generally.

      (d) Litigation. There are no actions, suits or proceedings pending, or to
the knowledge of Borrower, threatened against or affecting Borrower, or
involving the validity or enforceability of any of the Loan Documents or the
priority of the liens created therein, at law or in equity, or before or by any
governmental authority or local authority. Borrower is not in default with
respect to any order, writ, injunction, decree or demand of any court or any
governmental authority.

      (e) ERISA. Any defined benefit pension plans as defined in the Employee
Retirement Income Security Act of 1974, as amended ("ERISA") of Borrower meet,
as of the date hereof, the minimum funding standards of Section 302 of ERISA,
and no Reportable Event or Prohibited Transaction as defined in ERISA has
occurred with respect to any such plan.

      (f) Taxes and Utilities. Borrower has filed all tax returns (federal,
state, and local) required to be filed and have paid all taxes, utility charges,
assessments, and governmental charges and levies on Borrower and the Collateral,
including interest and penalties.

      Each request for an advance shall constitute a renewed representation of
the above matters.

FINANCIAL COVENANTS AND REPORTING. During the term of this Loan Agreement,
Borrower will:

      (a)   Within 45 days of period end, provide Bank with quarterly interim
            financial statements, on a consolidated basis, including a balance
            sheet and income statement and Borrower's filed 10Q;

      (b)   Provide Bank, within 120 days of fiscal year end, CPA audited annual
            financial statements, on a consolidated basis, with an unqualified
            opinion;

      (c)   Not incur debt in excess of $10 million for purchase money
            obligations, unsecured debt and capital lease obligations;

      (d)   Not incur or suffer to exist any liens against its property, except
            in the ordinary course of business or for purchase money
            transactions for real and personal property, including leases, with
            a limitation on such in an aggregate not to exceed $10 million;

      (e)   Not repurchase any of Borrower's own stock in excess of $6 million
            in the aggregate from the date of this document through the Maturity
            date.
<PAGE>
      (f)   Not acquire or purchase a business or its assets for a
            consideration, including assumption of debt and seller financing, if
            the aggregate value of all such transactions, in any rolling 12
            month period, exceed two times the sum of Borrower's trailing four
            quarters' income from operations, lest interest expense for the
            period, less tax expense for the period. Total aggregate
            consideration paid for all acquisitions shall not exceed
            $25,000,000.00;

      (g)   Maintain compliance with the following financial covenants:

            (i)    Maximum Leverage of Total Liabilities to Tangible Net Worth,
                   on a consolidated basis as of the last day of each quarter, a
                   ratio Total Liabilities to Tangible Net Worth not exceeding
                   2.50:1, except for the quarter ending September 30, during
                   which quarter the ratio is not to exceed 3.00:1 and December
                   31, during which quarter the ratio is not to exceed 2.75:1;

                  "Total Liabilities" equals the sum of current liabilities plus
                  long-term liabilities, minus debt subordinated to Borrower's
                  obligations to Bank.

            (ii)  Minimum Tangible Net Worth of $60,000,000.00 on a consolidated
                  basis on the last day of each quarter;

                  "Tangible Net Worth" means book net worth, minus intangible
                  assets plus liabilities subordinated to Bank in a manner
                  acceptable to Bank.

            (iii)  Minimum Current Ratio of 1.15:1;

                  "Current Ratio" means current assets divided by current
                  liabilities.

AFFIRMATIVE COVENANTS. Until the full and final payment of all obligations
incurred hereunder, Borrower will:

      (a)    Repay the Loan(s) in accordance with their terms;

      (b)   Faithfully perform all of the obligations to be performed by
            Borrower under the Loan Documents.

      (c)    Promptly give written notice to Bank of:

            (i)    any change in the principal place of business of Borrower;

            (ii)  any material change in the Property or the business and
                  financial affairs of Borrower;

            (iii)  any default or Event of Default, setting forth in such notice
                   the details of such Default or Event of Default and the
                   action which is proposed to be taken by Borrower with respect
                   thereto;

            (iv)   all actions, suits, and proceedings before any court or
                   governmental department, commission, board, bureau, agency,
                   or instrumentality,
<PAGE>
                  domestic or foreign, affecting Borrower which, if determined
                  adverse to Borrower could have a material adverse effect on
                  the ability of Borrower to perform its obligations under this
                  Loan Agreement;

            (v)   any dispute between Borrower and any governmental regulatory
                  body which may have a material adverse effect on the ability
                  of Borrower to perform its obligations under this Agreement;

      (d)    Permit Bank or its agents with at least 24 hours notice by
             telephone, telephone facsimile and actual delivery of written
             notice to Borrower, to examine and make copies and abstracts from
             the records and books of account of and visit Borrower's premises,
             and to discuss the affairs, finances, and accounts of Borrower with
             any of its employees and Borrower's independent accountants.

      (e)    Insurance. Furnish and maintain, until full repayment of the Loan,
             in form and amounts and from a company satisfactory to Bank,
             policies of insurance, including (i) all risk, fire and hazard
             insurance for the full replacement cost of all property comprising
             Bank's collateral; and (ii) general business business coverage in a
             type and amount typical for Borrower's business.

      (f)    Taxes and Liens. Pay and discharge all lawful claims, including
             taxes, assessments and governmental charges or levies imposed upon
             it, its income or profits, before penalties attach thereto;
             provided, however, that Borrower shall not be required to pay any
             such tax, assessment charge or levy, the payment of which is being
             contested in good faith and by proper proceedings, which serves to
             stay enforcement of such obligations and any lien securing such
             obligations, and Borrower has obtained a bond, insurance or other
             security reasonably satisfactory to Bank to specifically secure
             these liens or obligations.

      (g)    Expense Reimbursement. Upon demand, immediately reimburse Bank for
             any and all expenses incurred in connection with and after the
             execution of this Agreement, whether or not the Loan is made,
             including the expenses of Bank's in-house legal and audit expenses.
             In the event that those expenses are not paid within ten (10) days
             of the Notice, Bank, in its sole and absolute discretion, may treat
             the amount of any expense as a disbursement of Loan proceeds
             hereunder and pay the same (whether by reimbursement of itself or
             by payment to third parties) notwithstanding the fact that the
             conditions precedent set forth herein and/or the requirements of
             any other Article hereof have not been satisfied. In such event,
             the failure to pay the Bank. Expenses upon demand shall constitute
             an Event of Default.

      (h)   Additional Information. Provide in a timely manner to Bank such
            additional information concerning the condition or operations,
            financial or otherwise, of Borrower as Bank may from time to time
            request.

NEGATIVE COVENANTS. Borrower covenants and agrees that, until full and final
payment of all indebtedness incurred hereunder, it will not, without the prior
written consent of Bank:
<PAGE>
      (a)   Liens or Encumbrances. Permit or suffer any additional liens or
            encumbrances except:

            (i)    liens for taxes or assessments or other governmental charges
                   not delinquent or being contested in good faith and by proper
                   proceedings, which serve to stay enforcement of such
                   obligations and any lien securing such obligations, if
                   Borrower has obtained a bond, insurance or other security
                   reasonably satisfactory to Bank to specifically secure these
                   liens or obligations;

            (ii)   purchase money liens on equipment and goods;

            (iii)  liens in favor of Bank; and

            (iv)   liens disclosed and approved in writing by Bank.

      (b)    Change in Organization or Operations. Make any material change,
             revision, amendment or modification of any kind in and to its
             organization and operations or the organization and operation of
             any person or entity comprising the Borrower.

EVENTS OF DEFAULT. Notwithstanding the terms of this Loan Agreement or any note
to the contrary, Bank may, at its option, declare all outstanding sums hereunder
immediately due and payable without notice of default, presentment or demand for
payment, protest or notice of nonpayment or dishonor, or other notices or
demands of any kind or character, upon occurrence of any of the following (each
an "Event of Default"):

      (a)   Borrower fails to pay when due, any payment of interest or principal
            or any other sum due under this Agreement or any of the Loan
            Documents in accordance with the terms hereof, or the Note, or the
            other Loan Documents; or Borrower fails to pay when due, any payment
            of interest or principal or any other sum due under any other
            agreement Borrower has with Bank; or Borrower fails to pay when due,
            any payment of interest or principal or any other sum due under any
            other agreement, or breaches any agreement Borrower may have with
            another lender.

      (b)   Other than as to a default described in (a) above, Borrower fails or
            neglects to perform, keep, or observe any term, provision. covenant,
            condition or agreement set forth in this Agreement or any other Loan
            Documents and such failure, if curable, is not cured within ten (10)
            Business Days after notice to Borrower of such failure.

      (c)   Borrower commences a voluntary case concerning itself under Title 11
            of the United States Code entitled "Bankruptcy" as now or hereafter
            in effect, or any successor thereto (the "Bankruptcy Code"); or an
            involuntary case is commenced against Borrower and the petition is
            not controverted within twenty (20) days, or is not dismissed within
            sixty (60) days, after commencement of the case; or a custodian (as
            defined in the Bankruptcy Code) is appointed for, or takes charge
            of, all or substantially all of the property of Borrower, or
            Borrower commences any other proceedings under any reorganization,
            arrangements, adjustment of debt,
<PAGE>
            relief of debtors, dissolution, insolvency or liquidation or similar
            law of any jurisdiction whether now or hereafter in effect relating
            to such Borrower, or there is commenced against Borrower any such
            proceeding which remains undismissed for a period of sixty (60)
            days, or Borrower is adjudicated insolvent or bankrupt; or any order
            of relief or other order approving any such case or proceeding is
            entered; or Borrower suffers any appointment of any custodian or the
            like for it or any substantial part of its property to continue
            undischarged or unstated for a period of Sixty (60) days; or
            Borrower makes a general assignment for the benefit of creditors; or
            Borrower shall generally not pay its debts as such debts become due,
            or shall admit in writing its inability to pay its debts generally.

      (d)   Any representation or warranty under this Agreement or any
            agreement, instrument or certificate executed pursuant to this
            Agreement or in connection with any transaction contemplated hereby
            shall prove to have been false or misleading in any material respect
            when made or when deemed to have been made.

      (e)   One or more judgments, decrees, or orders for the payment of money
            in excess of Fifty Thousand Dollars in the aggregate shall be
            rendered against Borrower and such judgment, decrees, or orders
            shall continue unsatisfied and in effect for a period of thirty (30)
            consecutive days without being vacated, discharged, satisfied, or
            stayed or bonded pending appeal.

      (f)   A material adverse change occurs in the operations, business,
            property, assets, financial condition or prospects of Borrower.

REMEDIES. Upon the occurrence of an Event of Default herein, Bank shall be
entitled to pursue any and all remedies, rights, privileges and benefits
contained in this Loan Agreement or in any Note or other Loan Document, or
available at law or in equity or by statute, including, without limitation,
declaring the Note immediately due and payable. No remedy conferred upon or
reserved to Bank hereunder or under any of the other Loan Documents is intended
to be exclusive of any other remedy conferred upon or reserved to Bank hereunder
or under any of the other Loan Documents or at law or in equity or by statute,
but each shall be cumulative and shall be in addition to every other remedy
given hereunder or under the other Loan Documents or now or hereafter existing
at law or in equity or by statute. Every power or remedy given by the Loan
Documents to Bank may be exercised, concurrently or independently, from time to
time and as often as may be deemed expedient by Bank, and Bank may pursue
inconsistent remedies.
<PAGE>
MISCELLANEOUS

      No Waiver. No failure on the part of Bank to exercise, and no delay in
exercising, any right, power, or remedy under any Loan Documents shall operate
as a waiver thereof; nor shall any single or partial exercise of any right under
any Loan Documents preclude any other or further exercise thereof or the
exercise of any other right. The remedies provided in the Loan Documents are
cumulative and not exclusive of any remedies provided by law.

      Notices. Any communication between the parties hereto or notices required
to be given under this Loan Agreement may be given at the addresses either party
may designate by written notice to the other party, and shall be deemed to have
been given (i) in the case of notice by express carrier with delivery fees
prepaid, one day after it is sent, (ii) in the case of notice by letter, two
days after it is deposited in the mail certified and return receipt requested,
or (iii) the same day in the case given by facsimile or telecommunication. Any
party may change its address for notices under this Agreement by giving formal
written notice to the other parties, specifying that the purpose of the notice
is to change the party's address. To the extent permitted by applicable law, if
there is more than one Borrower, notice to any Borrower will constitute notice
to all Borrowers. For notice purposes, Borrower, any Guarantor or third party
Grantor agrees to keep Bank informed at all times of their respective current
address(es).

      No Third Party Beneficiary. Neither party intends that this Loan Agreement
is or will be for the benefit of or enforceable by any third party even though
proceeds of the Loan are received by the third party or used either directly or
indirectly for the benefit of the third party.

      Successors and Assigns. The terms and provisions of this Loan Agreement
shall be binding upon, and the benefits shall inure to, the parties and their
respective successors and assigns; provided, however, that Borrower shall not
assign this Agreement or any of the rights, duties or obligations of Borrower
hereunder without the prior written consent of Bank.

      Attorney's Fees. In the event any action is brought to interpret or
enforce this Loan Agreement or the Note or any part thereof, or any other Loan
Document, including without limitation the Guaranty, the prevailing party shall
be entitled to recover reasonable attorneys' fees, expert witness fees, and
litigation related expenses, in addition to costs of suit.

      Costs and Expenses. Borrower agrees to pay on demand all costs and
expenses in connection with the preparation, execution, delivery, filing,
recording, review, and administration of this Loan Agreement or any of the Loan
Documents, including, without limitation, the reasonable fees and out-of pocket
expenses of counsel (including in-house counsel) of Bank

      Choice of Law and Venue: Waiver of Jury Trial. The Loan Documents shall be
deemed to have been made in the State of California and the validity of this
Loan Agreement, the construction, interpretation, and enforcement hereof, and
the rights of the parties hereto be determined under, governed by, and construed
in accordance with the internal laws of the State of California, without regard
to principles of conflicts of law. BORROWER, GUARANTORS AND BANK WAIVE ANY RIGHT
EACH MAY HAVE TO ASSERT THE DOCTRINE OF FORUM NON CONVENIENS OR TO OBJECT TO
VENUE ON ANY BASIS WHATSOEVER. BORROWER, GUARANTORS AND BANK EACH HEREBY
EXPRESSLY, INTENTIONALLY AND KNOWINGLY WAIVE THE RIGHT TO TRIAL BY JURY OF ANY
MATTERS ARISING OUT THIS AGREEMENT OR ANY OF THE
<PAGE>
LOAN DOCUMENTS OR THE CONDUCT OF THE RELATIONSHIP BETWEEN BORROWER AND BANK.

      Severability of Provisions. Any provision of any Loan Document which is
prohibited or unenforceable in any jurisdiction shall, as to such jurisdiction,
be ineffective to the extent of such prohibition or unenforceability without
invalidating the remaining provisions of such Loan Document or affecting the
validity or enforceability of such provision in any other jurisdiction.

      Headings. Article and Section headings in the Loan Documents are included
in such Loan Documents for the convenience of reference only and shall not
constitute a part of the applicable Loan Documents for any other purpose.

      Entire Agreement. This Agreement and the documents described herein
represent the entire agreement of the parties and supersede all prior oral and
written communication between the parties. If there is any conflict between this
Loan Agreement and any documents referred to herein, this Loan Agreement shall
prevail. No amendment of this Loan Agreement shall be valid unless it is in
writing and is signed by the parties to this Loan Agreement.

      Assignments and Participations. Bank may at any time sell, assign, grant
participations in, or otherwise transfer to any other person, firm or
corporation ("Participant") all or part of the indebtedness of Borrower
outstanding under this Agreement or the Note. Borrower hereby acknowledges and
agrees that any such disposition will give rise to a direct obligation of
Borrower to the Participant Borrower agrees and consents to Bank's sale or
transfer, whether now or later, of one or more participation interests in the
Loan to one or more purchasers, whether related or unrelated to Bank. Bank may
provide, without any limitation whatsoever, to any one or more Participants, or
potential Participant, any information or knowledge Bank may have about Borrower
or about any other matter relating to the Loan, and Borrower hereby waives any
rights to privacy it may have with respect to such matters. Borrower
additionally waives any and all notices of sale of participation interests, as
well as all notices of any repurchase of such participation interests. Borrower
also agrees that the Participants will be considered as the absolute owners of
such interests in the Loan and will have all the rights granted under the
participation agreement or agreements governing the sale of such participation
interests. Borrower further waives all rights of offset or counterclaim that it
may have now or later against Bank or against any Participant and
unconditionally agrees that either Bank or such participant may enforce
Borrower's obligations under the Loan(s) irrespective of the failure or
insolvency of any holder of any interest in the Loan(s). Borrower further agrees
that the Participant may enforce its interest irrespective of any personal
claims or defenses that Borrower may have against Bank.

      Documentation. In addition to the instrument and documents mentioned or
referred to herein, Borrower shall, at its own cost and expense, supply Bank
with such other instruments, documents, information and data as are reasonably
necessary, as determined by Bank, for the purposes hereof, all of which shall be
in form and content as reasonably required by Bank.

      Revival Clause. If any of the payments of money or transfers of property
made to Bank by Borrower hereunder or under the Notes should for any reason
subsequently be declared to be "fraudulent" or a "voidable preference" within
the meaning of any state or federal law relating to fraudulent conveyances,
preferential, or otherwise voidable or recoverable, in whole or in part, for any
reason, under the Bankruptcy Code or any other federal or state law
(collectively referred to herein as "Voidable Transfers"), and Bank is required
to repay or restore the amount of any
<PAGE>
such Voidable-Transfers, or any portion thereof, then, as to the amount repaid
or restored pursuant to any such Voidable Transfer (including all costs,
expenses and attorneys' fees of Bank related thereto, including, without
limitation, relief from stay or similar proceedings), the liability of Borrower
shall automatically be revived, reinstated and restored in such amount or
amounts, and shall exist as though such Voidable Transfer had never been made to
Bank. Nothing set forth herein is an admission that any such Voidable Transfer
has occurred. Borrower expressly acknowledges that Bank may rely upon advice of
counsel, and if so advised by counsel, may settle, without defending, any action
to avoid any alleged Voidable Transfer, and that upon settlement, Borrower shall
again be liable for any deficiency resulting from such settlement as provided in
this Section.

      Survival of Representations and Warranties. All representations and
warranties of the Borrower contained herein or in any other Loan Document, or in
any certificate or other writing delivered by or on behalf of the Borrower
pursuant to any Loan Document, will survive the making of the Loan and the
execution and delivery of the Loan Documents, and recordation of the Deed of
Trust, and have been or will be relied upon by Bank, notwithstanding any
investigation made by Bank or on its behalf.

      Appointment of Bank as Attorney in Fact. Until all the obligations have
been paid in full, Borrower irrevocably appoints Bank as its attorney in fact
and authorizes and empowers it to endorse and affix Borrower's name to or upon
any check, draft, note, instrument or other writing relating to any Collateral,
or .upon any check or other instrument given in payment thereof, or upon any
omitted assignment, notification of assignment, demand or auditor's verification
relating to Collateral and upon all other instruments and writings required to
assert and protect Bank's rights in the Collateral.

      Time is of the Essence. Time is of the essence of each and every provision
contained in this Agreement and all of the other Loan Documents.

      Counterparts. This Agreement may be executed in multiple counterparts,
each of which shall be deemed an original but all of which shall constitute one
and the same instrument. Bank may rely upon a photocopy or telephonic facsimile
of any such executed counterpart as an original.

      Provisional Remedies. Nothing contained in this Loan Agreement shall be
construed to limit any right that Bank may have under this Agreement or at law
to exercise any provisional remedies that it may have under this Loan Agreement
or any of the other Loan(s).

      IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
executed this Agreement as of the date first above written.

BANK:                                 BORROWER:


CALIFORNIA BANK &  TRUST              ADVANCED-MARKETING SERVICES, INC.
A CALIFORNIA BANKING CORPORATION      A CALIFORNIA CORPORATION

By: /s/ Steve Delong                By: /s/ Michael M. Nicita
    --------------------------          ---------------------------------
Name: Steve Delong                    Name:  Michael M. Nicita
Title:  Vice President                Title:  President and Chief Executive
                                      Officer