<PAGE>   1
                                                                    Exhibit 10.4



                     STOCK PURCHASE AND REPURCHASE AGREEMENT

        STOCK PURCHASE AND REPURCHASE AGREEMENT (the "Agreement"), made this
11th day of October, 2000 between MEGA GROUP, INC., a New York corporation (the
"Company"), and Nelson Beebe, an individual and resident of New York (the
"Shareholder").

        WHEREAS, pursuant to that certain Agreement and Plan of Exchange dated
July 13, 2000, between the Company and Small Business Investment Company of
America, Inc., an Oregon corporation ("SBICOA") and that certain Subscription
Agreement dated October 11, 2000, between the Company and the Shareholder (the
"Subscription Agreement"), Shareholder is purchasing herewith 60,000 shares of
the Company's no par value common stock (the "Shares") for services valued at
$.04 per share (the "Original Purchase Price").

        NOW THEREFORE, in consideration of the mutual promises and covenants set
forth herein and for other good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, the parties agree as follows:

        1.     GRANT OF OPTION. The Company hereby grants to the Shareholder a
nonqualified stock option (the "Option"), which shall not be considered an
incentive stock option within the meaning of Section 422 of the Internal Revenue
Code of 1986, as amended (the "Code"), to purchase up to 60,000 additional
shares (the "Additional Shares") of the Company's Common Stock at a purchase
price (the "Purchase Price") of $3.00 per Additional Share, paid in cash,
exercisable at any time and from time to time, until 5:00 p.m. Eastern Time on
the 180th day after the date of this Agreement, upon the delivery of the Notice
of Exercise form attached hereto, completed and signed by the Shareholder, to
the Company together with the Purchase Price. The Purchase Price shall be
appropriately adjusted for any stock splits, stock dividends, recapitalizations,
reclassifications, or other similar events affecting the number of outstanding
shares of capital stock of the Company.

        2.     NO RIGHT TO CONTINUOUS SERVICE. Nothing contained in this
Agreement, nor any action taken by the Company in connection herewith, shall
confer upon the Shareholder any right with respect to continuous service with
the Company, its parent or a subsidiary, nor shall it interfere in any way with
the right of the Company, its parent or a subsidiary to terminate the
Shareholder's continuous service at any time with or without cause.

        3.     SALE OR OTHER DISPOSITION BY MAJORITY. Shareholder hereby
irrevocably appoints the Company, by its President, as Shareholder's agent and
attorney-in-fact, with full power of substitution for and in Shareholder's name,
to transfer or otherwise dispose of Shareholder's Shares and Additional Shares
and to do any and all things and to execute any and all documents and
instruments in connection therewith, such power of attorney not to become
operable until the holder or holders of a majority of the issued and outstanding
Common Stock of the Company elect to enter into a transaction (including one
which may constitute a change in control). Any transfer or other disposition of
all or a portion of Shareholder's Shares and Additional Shares pursuant to the
foregoing powers of attorney shall be made upon substantially the same terms and
conditions (including sale price) applicable to a transfer or other disposition
by the holder or holders of a majority of the Common Stock. The foregoing power
of attorney shall be irrevocable and coupled with an interest and shall not
terminate by operation of law,




<PAGE>   2

whether by the death, bankruptcy or adjudication of incompetence of Shareholder
or the occurrence of any other event.

        4.     RIGHT TO REQUIRE REPURCHASE.

               (a) Until 5:00 p.m., Eastern Time, on the date 270 days after the
date hereof (the "Repurchase Period"), the Shareholder shall have the right (the
"Repurchase Right"), exercisable once only, to require the Company to repurchase
all or part of the Shares at a price per share equal to $.50 plus all accrued
but unpaid dividends (the "Repurchase Price"), upon the delivery of the Demand
to Repurchase form attached hereto, completed and signed by the Shareholder, to
the Company, together with the certificates for the Shares with respect to which
the Repurchase Right is being exercised, duly endorsed for transfer to the
Company or accompanied by a duly executed instrument of transfer in a form
reasonably satisfactory to the Company, subject, however, to the following
conditions and contingencies:

                   i.    The Company shall have completed a public or private
        offering of its Common Stock, at an offering price of not less than $.50
        per share, with net proceeds to the Company of not less than $500,000.

                   ii.   The Company shall have a net tangible book value,
        determined in accordance with generally accepted accounting principles,
        of not less than $.25 per share.

                   iii.  Any underwriter, investment banker, or financial
        advisor engaged by the Company shall have consented to the repurchase.

The Repurchase Price shall be appropriately adjusted for any stock splits, stock
dividends, recapitalizations, reclassifications, or any similar events affecting
the number of outstanding shares of capital stock of the Company.

               (b) If the Repurchase Right is exercised as provided herein, the
Company shall within thirty (30) days of the Exercise Date pay or cause the
Repurchase Price to be paid to the Shareholder either in cash or by certified
check or bank wire transfer.

               (c) Notwithstanding the foregoing, in repurchasing any Shares
hereunder, the Company shall not be required to take any action which, in the
reasonable belief of the Company or its counsel, would violate any applicable
market regulation, insider trading, or tender offer requirements, including,
without limitation, Sections 13(e) and 14(e) of the Shares Exchange Act of 1934,
as amended, and Rules 13e-1 and 14e-1 thereunder.

        5.     RESTRICTIVE LEGEND. In addition to any other legends required by
any other agreement, the certificate(s) evidencing the Shares and Additional
Shares shall be endorsed with the following legend:

               THE SHARES REPRESENTED BY THIS CERTIFICATE ARE SUBJECT TO THE
        PROVISIONS OF A STOCK PURCHASE AND REPURCHASE AGREEMENT DATED _________
        ___, 2000, BETWEEN THE COMPANY AND THE SHAREHOLDER, A COPY OF WHICH IS
        ON FILE WITH THE SECRETARY OF THE COMPANY.





                                       2
<PAGE>   3

        6.     GENERAL PROVISIONS.

               (a) This Agreement shall be governed by the laws of the State of
New York. This Agreement represents the entire agreement between the parties
with respect to the subject matter hereof and may only be modified or amended in
writing signed by both parties.

               (b) Any notice, demand, or request required or permitted to be
given by either the Company or the Shareholder pursuant to the terms of this
Agreement shall be in writing and shall be deemed given when delivered
personally or deposited in the U.S. mail first class with postage prepaid and
addressed to the parties at the addresses of the parties set forth at the end of
this Agreement or such other address as a party may request by notifying the
other in writing.

               (c) The rights and benefits of the Shareholder under this
Agreement shall not be transferable to any one or more persons or entities other
than by operation of law, without prior written consent of the Company.

               (d) Either party's failure to enforce any provision or provisions
of this Agreement shall not in any way be construed as a waiver of any such
provision or provisions, nor prevent that party thereafter from enforcing each
and every other provision of this Agreement. The rights granted both parties
herein are cumulative and shall not constitute a waiver of either party's right
to assert all other legal remedies available to it under the circumstances.

               (e) The Shareholder shall execute any further documents or
instruments necessary or desirable to carry out the purposes or intent of this
Agreement.

               (f) The provisions of this Agreement shall inure to the benefit
of and be binding upon the respective successors and assigns of the parties.

               (g) If one or more provisions of this Agreement are held to be
unenforceable under applicable law, such provision shall be excluded from this
Agreement and the balance of the Agreement shall be interpreted as if such
provisions were so excluded and shall be enforceable in accordance with its
terms.

               (h) This Agreement may be executed in any number of counterparts,
each of which shall be an original, but together shall constitute one Agreement.

        [REMAINDER OF THIS PAGE INTENTIONALLY LEFT BLANK]






                                       3
<PAGE>   4




        IN WITNESS WHEREOF, the parties have duly executed this Stock Repurchase
Agreement as of the day and year first set forth above.

                                   MEGA GROUP, INC.



                                   By:    /s/ STEVE GREGORY
                                          -----------------
                                          Name:  Steve Gregory
                                          Title: President
                                          Address:



                                   /s/ NELSON BEEBE
                                   ----------------
                                   Subscriber:   Nelson Beebe
                                   Address:      P.O. Box 4983
                                                 Clifton Park, New York  12065








                                       4
<PAGE>   5





                               NOTICE OF EXERCISE


To:     Mega Group, Inc. (the "Company")


        I hereby exercise the option contained in that certain Stock Purchase
and Repurchase Agreement, dated _______ ___, 2000, between the Company and me
(the "Agreement"), to purchase a total of _______________ Additional Shares of
the Company's Common Stock, and deliver herewith cash in the amount of $.04 per
Additional Share representing the Purchase Price therefor, with such adjustment
as the Agreement provides.


        Capitalized terms used in this Notice of Election have the meanings
ascribed to them in the Agreement.


        Dated this _______ day of __________, 200___.



                                              -------------------------------
                                              Signature







                                       5
<PAGE>   6




                              DEMAND TO REPURCHASE


To:     Mega Group, Inc. (the "Company")


        I hereby demand that the Company repurchase _______ of my Shares or
Additional Shares of Common Stock for a Repurchase Price of $.50 per Share or
Additional Share, as provided in that certain Stock Purchase and Repurchase
Agreement, dated _______ ___, 2000, between the Company and me (the
"Agreement"), and deliver herewith one or more certificates for the said Shares
or Additional Shares endorsed to the Company and otherwise in proper form.


        Capitalized terms used in this Notice of Election have the meanings
ascribed to them in the Agreement.


        Dated this _______ day of __________, 200___.



                                              -------------------------------
                                              Signature





                                       6