moved some code from the view.php into script.js
added mootools and raphael for ease of use