============================================================
Script: Change Scrollbar Color Dynamically
Functions: Changes the color of the scrollbars in a page
dynamically, via a simple JavaScript function;
shows how to attach the scrollbar color change
function to links and to mouseOver and other
events.
Browsers: IE5.5 and Later (ignored by other browsers)
Author: etLux
============================================================
Step 1. Optional Style
This is optional. If you leave it out, the browser will show
the standard default color for the scrollbars (usually that
is #C0C0C0). If you include this style, then you can set
the initial scrollbar color to whatever you wish -- just
change the #C0C0C0 to whatever color is required.
The <style> ... </style> goes in the head of your
page:
<style>
body{
scrollbar-base-color: #C0C0C0
}
</style>
============================================================
Step 2. The Script
Put the following <script ... </script> in the head of
your page. No modifications are needed:
<script>
// (C) 2001 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
function changeScrollbarColor(C){
if (document.all){
document.body.style.scrollbarBaseColor = C
}
}
</script>
============================================================