Topic: Question: image cropping, area selection

Is there way to select with rectangle tool an area from an image (html map), get the coordinates and create a new area in this map with the new coordinates. I know that this is possible in javascript, may be there is a rails plugin already created.