I think that you need to read your agreement and discuss the law in your state with an attorney.  The other parent would have the primary right to custody of your child should you not be able to care for him or her.  The court would not allow you to by pass that right, so to speak, and any temporary papers drawn up would most likely be set aside.  Good luck.