It would be helpful to know what environment you are working in. Is this a WordPress plug-in maybe? The code is really ancient.
AFAIK all browsers can deal with CSS in the body of the page, even though it will not validate. If it were me, Iād either get a more modern image slider, or just let it be.