Need JavaScript code to suit the two lots of css code - horizontal and vertical

Printable View