Drawing grid with js