JS- how to calculate a rectangle's ratio?

Hi there,

How do I calculate the height of a rectangle that has is 16:9 from only the width?
More specifically, how do I calculate it using JavaScript :slight_smile:

Is there a standard way to determine the browser and do an if - else in javascript. I want to change the browser window but the behaviour is different with IE. So I need a if IE do this else do that.

tnks!!

-hroth