Maria: adding extra code in the js response. It returns a div to keep and some javascript code to copy into the HEAD. Also added two different ways of manipulating the DOM as I think querySelector does not work on IE7