/*#############################################################################
# Add Scrollbarcolor styles to contentblock (for IE only)
#############################################################################*/
function Lanza_AddExtraStyles() {
  var mContentScroll = WHITE_GetElementFlex('content');

  if ('object' == typeof mContentScroll)
  {
    mContentScroll.style.overflowX = 'hidden';
    mContentScroll.style.overflowY = 'auto';

    mStyleValue = WHITE_EXTRA_GetGlobalStyle(mContentScroll, 'zIndex', 'z-index');

    if (mStyleValue) 
    {
      //### Lanza ScrollbarColor
      if ('1' == mStyleValue)
      {
        mContentScroll.style.scrollbarBaseColor =       '#FFFFFF';   
        mContentScroll.style.scrollbarFaceColor =       '#BAB7AC';  
        mContentScroll.style.scrollbarArrowColor =      '#FFFFFF';   
        mContentScroll.style.scrollbar3dLightColor =    '#FFFFFF';   
        mContentScroll.style.scrollbarHighlightColor =  '#FFFFFF';  
        mContentScroll.style.scrollbarDarkShadowColor = '#BAB7AC';   
        mContentScroll.style.scrollbarShadowColor =     '#FFFFFF';   
        mContentScroll.style.scrollbarTrackColor =      '#ECEAE4';   
      }
       }
    else
    {
      //### Lanza ScrollbarColor (default)
      mContentScroll.style.scrollbarBaseColor =       '#FFFFFF';   
      mContentScroll.style.scrollbarFaceColor =       '#BAB7AC';   
      mContentScroll.style.scrollbarArrowColor =      '#FFFFFF';  
      mContentScroll.style.scrollbar3dLightColor =    '#FFFFFF';   
      mContentScroll.style.scrollbarHighlightColor =  '#FFFFFF';  
      mContentScroll.style.scrollbarDarkShadowColor = '#FFFFFF';   
      mContentScroll.style.scrollbarShadowColor =     '#FFFFFF';  
      mContentScroll.style.scrollbarTrackColor =      '#FFFFFF';   
    }
  }
}

/*#############################################################################
# Get global defined style (style in external stylesheet)
#############################################################################*/
function WHITE_EXTRA_GetGlobalStyle(oElement, sCSSProperty, sCSSPropertyNS)
{
  //### http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml
  var mStyleValue = false;

  //# For IE
  if (oElement.currentStyle)
  {
    mStyleValue = oElement.currentStyle[sCSSProperty];
  }
  //# For FireFox
  else if (window.getComputedStyle)
  {
    var oElementStyle=window.getComputedStyle(oElement, "");
    mStyleValue = oElementStyle.getPropertyValue(sCSSPropertyNS);
  }

  return mStyleValue;
}

/*#############################################################################
# Run function extra style on onload of body
#############################################################################*/
if ('function' == typeof WHITE_AddLoadEvent)
{
  WHITE_AddLoadEvent(Lanza_AddExtraStyles);
}
