Change displaying element

There is simple JavaScript which one changes display of elements.