Dotted rect line :
Start selection by an onclick event on the left/up corner of the rectangle. Move (mouseup) to the right/down corner to draw the rectangle. End selection with an onclick event on the right/bottom.
Rectangle shape
Solid rect line
Clip selection
JavaScript from ©2003-VB'Breizh