<html>
<head>
<title>JavaScript Scrollbar</title>
</head>
<script language="JavaScript">
<!--
var ie=document.all?1:0;
var ns=document.layers?1:0;
var dom=document.getElementById?1:0;
if (dom&&document.getElementById==null)document.getElementById=function(name){return document.all[name];}
function scrollBars(theme)
	{
		switch(theme)
			{
				case "blue":
					var line="#78AAFF";
					var face="#EBF5FF";
					break;
				case "orange":
					var line="#FBBB37";
					var face="#FFF9DF";
					break;
				case "red":
					var line="#FF7979";
					var face="#FFE3DD";
					break;
				case "green":
					var line="#00C600";
					var face="#D1EED0";
					break;
				case "neo":
					var line="#BC7E41";
					var face="#EFE0D1";
					break;
			}
		with(document.body.style)
			{
				scrollbarDarkShadowColor=line;
				scrollbar3dLightColor=line;
				scrollbarArrowColor="black";
				scrollbarBaseColor=face;
				scrollbarFaceColor=face;
				scrollbarHighlightColor=face;
				scrollbarShadowColor=face;
				scrollbarTrackColor="#F3F3F3";
			}
	}
//-->
</script>
<body>
<p align="center"><b><font face="Verdana" size="2"><a href="javascript:scrollBars('blue')">Blue</a>
| <a href="javascript:scrollBars('red')">Red</a> | <a href="javascript:scrollBars('green')">Green</a>
| <a href="javascript:scrollBars('neo')">Neo</a> | <a href="javascript:scrollBars('orange')">Orange</a></font></b></p>
</body>
</html>
Published in: JavaScript
Download

Related snippets