Basic javascript framework