A simple javascript algorithm for testing if points are within a polygon