Client script tricks for generating dynamic CSS styles
An easy way to define css styles that are functions of client script, note that the document.write inserts a string after the block of script in which it is embedded:
var CSSInsertion =
'<STYLE><!--\r\n'
+'@FONT-FACE {FONT-FAMILY:MYFONTONE; FONT-STYLE:
+'.BOOKTITLE {BACKGROUND-IMAGE:URL('+BeforeReference+'Basics/banner.gif);}'
+'\r\n// --></STYLE>';
document.write(CSSInsertion);