home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / htmledit / bashhtml / bashhtml.exe / %AppDir% / scripts / Resolution Check.txt < prev    next >
Encoding:
Text File  |  2003-09-01  |  2.5 KB  |  82 lines

  1. [DESCRIPTION]Customizes the scrollbar's colors and then changes them as you move your mouse over it. If you want custom colors without the mouseover effect, refer to the Colored Scrollbar properties in the CSS window.[/DESCRIPTION]
  2.  
  3. [HEAD CODE][/HEAD CODE]
  4.  
  5. [BODY CODE]<script language="JavaScript1.2">
  6. <!--
  7.  
  8. //onMouseover Scrollbar effect-by Svetlin Staev (svetlins@yahoo.com)
  9. //Submitted to Dynamic Drive
  10. //Visit http://www.dynamicdrive.com for this script
  11.  
  12. /*---------------[IE 5.5+ Scrollbars colorer]-------------------*/
  13. function scrollBar(line,face,theme)
  14.     {
  15.         if (!line||!face)
  16.             {
  17.                 line=null;
  18.                 face=null;
  19.                 switch(theme) // Predefined themes, add or remove as you like
  20.                     {
  21.                         case "blue":
  22.                             var line="#78AAFF"; //the border color
  23.                             var face="#EBF5FF"; //the fill color
  24.                             break;
  25.                         case "orange":
  26.                             var line="#FBBB37";
  27.                             var face="#FFF9DF";
  28.                             break;
  29.                         case "red":
  30.                             var line="#FF7979";
  31.                             var face="#FFE3DD";
  32.                             break;
  33.                         case "green":
  34.                             var line="#00C600";
  35.                             var face="#D1EED0";
  36.                             break;
  37.                         case "neo":
  38.                             var line="#BC7E41";
  39.                             var face="#EFE0D1";
  40.                             break;
  41.                         case "white":
  42.                             var line="#000000";
  43.                             var face="#FFFFFF";
  44.                             break;
  45.                         case "black":
  46.                             var line="#FFFFFF";
  47.                             var face="#000000";
  48.                             break;
  49.                     }
  50.             }
  51.  
  52.                 with(document.body.style)
  53.                     {
  54.                         scrollbarDarkShadowColor=line;
  55.                         scrollbar3dLightColor=line;
  56.                         scrollbarArrowColor="black";
  57.                         scrollbarBaseColor=face;
  58.                         scrollbarFaceColor=face;
  59.                         scrollbarHighlightColor=face;
  60.                         scrollbarShadowColor=face;
  61.                         scrollbarTrackColor="#F3F3F3"; //you can change this if you want, it is the color of the area behind the scrollbar
  62.                     }
  63.             }
  64.  
  65. /*------------------[Pointer coordinates catcher]---------------*/
  66. function colorBar(){
  67.         var w = document.body.clientWidth;
  68.         var h = document.body.clientHeight;
  69.         var x = event.clientX;
  70.         var y = event.clientY;
  71.         if(x>w) scrollBar('#000000','#FFFF80'); // Mouseover colors: border,face
  72.         else scrollBar(null,null,"white"); // Starting theme from list at top
  73.     }
  74.  
  75. if (document.all){
  76. scrollBar(null,null,"neo"); //default theme, you really don't need to change this at all but if you remove the neo theme from the list at the top you might want to
  77. document.onmousemove=colorBar;
  78. }
  79. //-->
  80. </script>[/BODY CODE]
  81.  
  82. [NOTES]Read the comments in the script to see where to make changes. Comments begin with "//".[/NOTES]