There is a much much easier way to get it back! Instead of going through the law, etc, why don't you use it against the school? Tell the teacher who took it this: "Fine, you can confiscate my laptop for a while, but all the homework due in which is on the laptop which i can't hand in, i will hold you personally responsible. Any homework i have been given while it is confiscated, -you- can do for me. Thankyou."
Either he lays a brick there and then and gives it you, or he disagrees. If he disagrees tell the teacher who's homework it is that you can't hand it in because he's got the homework on your laptop.
This is what I would do, and it sounds pretty f*cking ingenius to me.