Javascript: Get Width Function