Javascript UI&DOM Teamwork