Simple alternative to CSS3 property "background-size cover" in Javascript.