Sorry, I am not a guru on this subject, but as no one else has replied yet, this is my openion.
Lets take the case that you are really leaving the US. Then you should ask your employer to provide a return ticket for you (that he is supposed to provide by law). You can leave after a reasonable time, reasonable means the time you need to wind up everything like selling the car, breaking the apt. lease etc. 7-10 days is acceptable. Please remember, this is not mentioned anywhere in law but is accepted as de-facto standard. When you next try to enter the US next time, the immigration officer on duty may still challange that. So the theoratical safest thing is to leave next day of termination of H-1 but that is not practically possible, so take 7-10 days as you de-fecto grace.
Now lets take the case as you are not actully leaving the US and you are trying to find another sponsorer for H1. In this case, the law says that your new H1 petition should be filed before termination of existing H1, but I have seen people getting H1 transfered to new sponsorer even after 2 months of gap in employment.
Whatever you decide, Best of Luck!
EricS