Check your reed switch http://www.mac-forums.com/forums/apple-notebooks/68635-g3-ibook-boots-immediately-sleep.html
open