http://www.java2s.com/Code/JavaScrip...crosshairs.htm