javascript User Interface Implementation