Removed onload call in HTML, put scripts at end of index file, modified ...

...js to line up end dot with line and do proper z indexing.