@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */

/* ::::: scrollbar ::::: */
scrollbar {
  -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar");
  cursor: default;
  background-image:url("chrome://global/skin/scrollbar/scrollbar-vertical-background.png") ;
  background-repeat:repeat-y;
}

scrollbar[orient="horizontal"]{
  background-image:url("chrome://global/skin/scrollbar/scrollbar-horizontal-background.png") ;
  background-repeat:repeat-x;	
}

/* :::::  thumb  ::::: */

/* |||| vertical |||| */

/* thumb */
thumb{
  -moz-binding: url("chrome://global/skin/globalBindings.xml#thumb");
  background:url("chrome://global/skin/scrollbar/thumb-vertical-background.png") repeat-y;
  min-height:10px;
  width:17px;
  min-width:17px;
}
thumb:hover {
  background:url("chrome://global/skin/scrollbar/thumb-vertical-background-hover.gif");
}
thumb:active {
  background:url("chrome://global/skin/scrollbar/thumb-vertical-background-active.gif");
}

/* thumb top */
.thumb-start{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-top.png");
}
thumb:hover .thumb-start{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-top-hover.gif");
}
thumb:active .thumb-start{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-top-active.gif");
}

/* thumb bottom */
.thumb-end{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-bottom.png");
}
thumb:hover .thumb-end{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-bottom-hover.gif");
}
thumb:active .thumb-end{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-bottom-active.gif");
}

/* gripper */
thumb gripper {
  width:17px;
  min-width:17px;
  max-width:17px;
  height:10px;
  max-height:10px;
  min-height:10px;
  background:url("chrome://global/skin/scrollbar/gripper-vertical.png");
}
thumb:hover gripper {
  background:url("chrome://global/skin/scrollbar/gripper-vertical-hover.gif");
}
thumb:active gripper {
  background:url("chrome://global/skin/scrollbar/gripper-vertical-active.gif");
}


/* |||| horizontal |||| */

/* thumb */

thumb[orient="horizontal"] {
  background:url("chrome://global/skin/scrollbar/thumb-horizontal-background.png") repeat-x;
  min-width:10px;
  height:17px;
  min-height:17px;
}
thumb[orient="horizontal"]:hover {
  background:url("chrome://global/skin/scrollbar/thumb-horizontal-background-hover.gif");
}
thumb[orient="horizontal"]:active {
  background:url("chrome://global/skin/scrollbar/thumb-horizontal-background-active.gif");
}

/* thumb left */
thumb[orient="horizontal"] .thumb-start{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-left.png");
}
thumb[orient="horizontal"]:hover .thumb-start{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-left-hover.gif");
}
thumb[orient="horizontal"]:active .thumb-start{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-left-active.gif");
}

/* thumb right */
thumb[orient="horizontal"] .thumb-end{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-right.png");
}
thumb[orient="horizontal"]:hover .thumb-end{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-right-hover.gif");
}
thumb[orient="horizontal"]:active .thumb-end{
  list-style-image:url("chrome://global/skin/scrollbar/thumb-right-active.gif");
}

/* gripper */
thumb[orient="horizontal"] gripper {
  width:10px;
  max-width:10px;
  min-width:10px;
  height:17px;
  max-height:17px;
  min-height:17px;
  background:url("chrome://global/skin/scrollbar/gripper-horizontal.png");
}
thumb[orient="horizontal"]:hover gripper {
  background:url("chrome://global/skin/scrollbar/gripper-horizontal-hover.gif");
}
thumb[orient="horizontal"]:active gripper {
  background:url("chrome://global/skin/scrollbar/gripper-horizontal-active.gif");
}



/* ::::: square at the corner of two scrollbars ::::: */

scrollcorner {
  background:url("chrome://global/skin/scrollbar/corner.png");
  cursor: default;
  background-color: -moz-Dialog;
}

/* ::::: scrollbar button ::::: */

scrollbarbutton {
  min-width: 17px;
  min-height: 17px;
  width: 17px;
  height: 17px;
}
/*right Arrow*/
scrollbarbutton[type="increment"] {
  background-image: url("chrome://global/skin/scrollbar/arrow-right.png") ;
}
scrollbar[orient="horizontal"]:hover >scrollbarbutton[type="increment"]{
  background-image: url("chrome://global/skin/scrollbar/arrow-right-hover.gif") ;
}

scrollbar[orient="horizontal"] >scrollbarbutton[type="increment"]:hover {
  background-image: url("chrome://global/skin/scrollbar/arrow-right.gif") ;
}

scrollbar[orient="horizontal"] scrollbarbutton[type="increment"]:active {
  background-image: url("chrome://global/skin/scrollbar/arrow-right2.png");
}

/*down Arrow*/
scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
  background-image: url("chrome://global/skin/scrollbar/arrow-down.png") ;
}
scrollbar[orient="vertical"]:hover  > scrollbarbutton[type="increment"]{
  background-image: url("chrome://global/skin/scrollbar/arrow-down-hover.gif") ;
}
scrollbar[orient="vertical"] > scrollbarbutton[type="increment"]:hover {
  background-image: url("chrome://global/skin/scrollbar/arrow-down.gif") ;
}

scrollbar[orient="vertical"] > scrollbarbutton[type="increment"]:active {
  background-image: url("chrome://global/skin/scrollbar/arrow-down2.png") ;
}

/*left Arrow*/
scrollbarbutton[type="decrement"] {
   background-image: url("chrome://global/skin/scrollbar/arrow-left.png")  ;
}
scrollbar[orient="horizontal"]:hover > scrollbarbutton[type="decrement"] {
   background-image: url("chrome://global/skin/scrollbar/arrow-left-hover.gif");
}

scrollbar[orient="horizontal"] >scrollbarbutton[type="decrement"]:hover {
   background-image: url("chrome://global/skin/scrollbar/arrow-left.gif");
}
scrollbar[orient="horizontal"] scrollbarbutton[type="decrement"]:active {
   background-image: url("chrome://global/skin/scrollbar/arrow-left2.png") ;
}

/*up Arrow*/
scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
   background-image: url("chrome://global/skin/scrollbar/arrow-up.png") ;
}
scrollbar[orient="vertical"]:hover > scrollbarbutton[type="decrement"] {
   background-image: url("chrome://global/skin/scrollbar/arrow-up-hover.gif") ;
}
scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"]:hover {
   background-image: url("chrome://global/skin/scrollbar/arrow-up.gif") ;
}
scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"]:active {
   background-image: url("chrome://global/skin/scrollbar/arrow-up2.png") ;
}
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
@media print {
  /* ::::: scrollbar ::::: */

  html|div scrollbar {
    -moz-appearance: scrollbartrack-horizontal;
    -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar");
    cursor: default;
    background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar;
  }

  html|div scrollbar[orient="vertical"]
  {
     -moz-appearance: scrollbartrack-vertical;
  }

  /* ::::: borders for thumb and buttons ::::: */

  html|div thumb,
  html|div scrollbarbutton {
    border: 2px solid;
    -moz-border-top-colors: #D4D0C8 #FFFFFF;
    -moz-border-right-colors: #404040 #808080;
    -moz-border-bottom-colors: #404040 #808080;
    -moz-border-left-colors: #D4D0C8 #FFFFFF;
    background-color: #DADCE4;
  }

  /* ::::: thumb (horizontal) ::::: */

  html|div thumb {
    -moz-appearance: scrollbarthumb-vertical;
    min-height: 8px;
  }

  html|div thumb[orient="horizontal"] {
    -moz-appearance: scrollbarthumb-horizontal;
    min-width: 8px;
  }
/* 在3.5中以下两句会出错。
  html|div thumb > gripper {
    -moz-appearance: scrollbargripper-vertical;
  }

  html|div thumb[orient="horizontal"] > gripper {
    -moz-appearance: scrollbargripper-horizontal;
  }

  /* ::::: scrollbar button ::::: */

  html|div scrollbarbutton {
    background: #DADCE4 no-repeat 0px 1px;
    min-width: 18px;
    min-height: 18px;
  }

  html|div scrollbarbutton:active {
    -moz-border-top-colors: #808080 #D4D0C8;
    -moz-border-right-colors: #808080 #D4D0C8;
    -moz-border-bottom-colors: #808080 #D4D0C8;
    -moz-border-left-colors: #808080 #D4D0C8;
    background-position: 1px 2px;
  }

  /* ..... increment .... */

  html|div scrollbarbutton[type="increment"] {
    -moz-appearance: scrollbarbutton-right;
    background-image: url("chrome://global/skin/arrow/arrow-rit.gif")
  }

  html|div scrollbarbutton[type="increment"][disabled="true"] {
    background-image: url("chrome://global/skin/arrow/arrow-rit-dis.gif")
  }

  html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
    -moz-appearance: scrollbarbutton-down;
    background-image: url("chrome://global/skin/arrow/arrow-dn.gif")
  }

  html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"][disabled="true"] {
    background-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif")
  }

  /* ..... decrement .... */

  html|div scrollbarbutton[type="decrement"] {
    -moz-appearance: scrollbarbutton-left;
     background-image: url("chrome://global/skin/arrow/arrow-lft.gif")
  }

  html|div scrollbarbutton[type="decrement"][disabled="true"] {
     background-image: url("chrome://global/skin/arrow/arrow-lft-dis.gif")
  }

  html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
    -moz-appearance: scrollbarbutton-up;
     background-image: url("chrome://global/skin/arrow/arrow-up.gif")
  }

  html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"][disabled="true"] {
     background-image: url("chrome://global/skin/arrow/arrow-up-dis.gif")
  }

}