i want to know to to take an image and only make part of it clickable

on click giving another url or a javascript message box..

heres an example (these are real sites)

http://www.thisisnotporn.com
www.notpron.com

there extreme riddle sites if you want to try

notice how on both home pages thheres a picture, on the first url, only the door is a url on the second only the oven glass is a JS message prompt.

How do i do this?