OMFG I HATE JS.
....................../´¯/)
....................,/¯../
.................../..../
............./´¯/'...'/´¯¯`·¸
........../'/.../..../......./¨¯\
........('(...´...´.... ¯~/'...')
.........\.................'...../
..........''...\.......... _.·´
............\..............(
..............\.............\...
Put the entire string of shit into a var, then document.write the var. DUMB. it works now. (though I changed the CSS, i confirmed that had nothing to do with it.
<script>
var stuff = "<style>#theflyoutdivjs{display:none;position:relative;top:-40px;}#flyout:hover #theflyoutdivjs{display:block;}</style>";
stuff = stuff + "<a href=\"#\" id=\"flyout\"><img src=\"http://www.bookerbox.com/images/favorites.gif\"><div id=\"theflyoutdivjs\">AAAAAA</div></a>";
document.write(stuff);
</script>