Obtaining window dimensions in cross browser way