'S' is the start position, 'T' is the target position and black positions are blocked.
Start and target positions are moved by clicking on them and then clicking on a new position. Any other position will be blocked or unblocked if clicked on.
The script is successfully tested on Mozilla Firefox.
Mark open positions