JavaScript & CSS Unit Conversion