1) Assume there is a company that will go public at some point in the future and I will be considered an insider for one reason or another. In simple terms what are my obligations before buying selling stock such that my transaction will be 100% legal. Again, this IS a hypothetical situation. Not a real situation thinly veiled as a hypothetical. I understand if I was really presented with this situation I'd solicit professional advice rather than advice from a public message board.

Yes, professional advice is definitely the way to go, given the complexity of federal securities laws. Good securities lawyers don't come cheap though, so have your wallet handy, unless your corporate attorneys are providing the advice to you for 'free'. ;^)

Having said this, I'll offer some general comments which I hope are basically correct.

Corporate 'insiders' (specifically defined by federal securities law as all directors and 'key executives' at a minimum) have a unique responsibility under federal and state securities laws as owners or potential owners of publicly-owned corporations' securities. They have routine access to "material" inside information. The use of this information for personal gain (including disclosing such information to third parties, even in the absence of direct personal gain) is, in a word, illegal.

As an insider in a private company (i.e. the first part of your question) there is by definition no public trading in the company's securities, so insider trading regulations basically wouldn't apply. I.e., private securities transactions are not regulated. However, if an IPO is forthcoming in the relatively near future, I'm quite certain any competent securities lawyer would advise you to act as though the company were already public. I.e., to err on the side of caution.

The basic intent of these laws is to prevent corporate insiders from enriching themselves by using knowledge that is unavailable to the general public to take advantage of same in what is essentially an unfair transaction. "Material" means "significant" in the sense thatthis information in and of itself would cause an outside investor to consider purchasing or selling securities of the corporation in question. Some corporate information is clearly material and some is clearly not. Much of such information, however, falls in a grey area where materiality may only be determined only in context and, importantly, only after the fact: i.e., did the company's securities change significantly in price once this information became public knowledge?

The main risk to a corporate insider of improperly using such information is, of course, censure in various forms including – at the extreme end – prison ("Club Fed"). There is also a broader risk in that the company itself may be harmed by such practices, through subsequent leitigation and/or or by damage to its reputation.

2) Are companies themselves or their employees required to publicly stay quiet for a certain time period (but file with the SEC) before/after purchasing their own stock back or selling shares?

The issuer (corporate entity) itself is the ultimate insider, and must publicly disclose in advance any proposed repurchases or sales of its securities. I don't believe that its insiders are *required* to remain quiet in advance of selling or buying publicly-traded corporate securities, but it would be foolhardy in the extreme not to do so, because of the high likelihood of future litigation.

Most corporate insiders who own company securities and who wish to sell some portion set up prearranged selling programs wherein they routinely and regularly sell specific amounts of (usually) stock at specific time intervals. And corporate and outside securities attorneys routinely advise their insiders/clients as to appropriate trading 'windows' wherein they may buy or sell company securities without fear of running afoul of pertinent insider trading laws/regulations.

Such insider trading windows tend to be very narrow and restrictive, being governed by ongoing corporate schedules (i.e., regular reporting 'events')as well as any 'unusual' activities a company may be involved in at any point which may require future disclosure. All insider trading must be disclosed 'promptly' (within a specific number of days -- I believe it is five trading days, although my knowledge is probably dated), incuding trading by any outside investor who owns x% (I belive it's 10%) or more of the outstanding secutities class.