Newly revealed court documents have Yahoo squirming. It now appears the company may have spurned an offer from Microsoft worth $40 a share way back in 2007 — months before all its hand-wringing over a much-publicized, much-lower bid. Yahoo apparently also declined an earlier offer of a search advertising partnership with Google — something it later sought out as a way to keep Microsoft at arm’s length. The documents were introduced in a lawsuit that accuses Yahoo CEO Jerry Yang of refusing to negotiate in good faith and erecting roadblocks to Microsoft’s offer.