OK. I didn't realize that the two companies had some connection.
In general, while it's usually well-intentioned, I've seen cases where it caused more problems than it's worth. But from what you described about your situation, then it's probably OK.
As for the original question - IMO you should do it as a contractor, and make sure that all terms (availability,etc.) are worked out and spelled out. It's admirable that you want to help them out and not leave them cold, but you also want to protect yourself.
I've only done it one time where it worked out OK, and in that case I charged my old company what they were paying for me as an employee (before taxes, and factoring in what they were paying for health care) That way they're basically not paying any more for you than they were when you were an employee.
Kevin