Graham
Lordeagle This seems to work it creates the style tag and the classes anyway
this has to read the value directly from the form
if you want it to take its value from the submitted search variable
change
var kwd = document.forms["srchfrm"]["srch"].value;
to
var kwd = "{_$srch|}";