changed nbsp to #160
adapted code for IE9
adapted code for IE9