I hope your using jquery lib in your projects. if not, please try to use hereafter....it will save lot of time in UI manuplations....
we can achive the requirement by using below jquery lib.
http://odyniec.net/projects/imgareaselect/jquery.imgareaselect.dev.js
here is the piece of code...
$(document).ready(function () {
$('#ladybug_ant').imgAreaSelect({ maxWidth: 200, maxHeight: 150, handles: true });
});
you can reach out below link for samples....
http://odyniec.net/projects/imgareaselect/