The following story suggests that they can not only look at it, but require you to supply passwords and operating instructions -- and then they can keep it for months or even years.
http://www.msnbc.msn.com/id/23037049/page/2/
This story is specific to US customs, and I have never experienced such an event in the US; but I have experienced it in several other countries, so this is probably the case for all border crossings where customs inspection is permitted. Something to keep in mind (with all these threads on encrypted hard drive and cleaning a laptop).