Crude first attempt at javascript, need to get this put into an external file. Good for a demo though