function xbStyleNotSupported() {}function xbStyleNotSupportStringValue(propname) { xbDEBUG.dump(propname + ' is not supported in this browser'); return '';};/////////////////////////////////////////////////////////////// xbStyle//// Note Opera violates the standard by cascading the effective values// into the HTMLElement.style object. We can use IE's HTMLElement.currentStyle// to get the effective values. In Gecko we will use the W3 DOM Style Standard getComputedStylefunction xbStyle(obj, position){  if (typeof(obj) == 'object' && typeof(obj.style) != 'undefined')     this.styleObj = obj.style;  else if (document.layers) // NN4  {    if (typeof(position) == 'undefined')      position = '';            this.styleObj = obj;    this.styleObj.position = position;  }  this.object = obj;}xbStyle.prototype.styleObj = null;xbStyle.prototype.object = null;/////////////////////////////////////////////////////////////// xbStyle.getEffectiveValue()// note that xbStyle's constructor uses the currentStyle object // for IE5+ and that Opera's style object contains computed values// already. Netscape Navigator's layer object also contains the // computed values as well. Note that IE4 will not return the // computed values.function xbStyleGetEffectiveValue(propname){  var value = null;  // W3/Gecko  if (document.defaultView && document.defaultView.getComputedStyle)  {    if (navigator.family == 'gecko')    {      // xxxHack: work around Gecko getComputedStyle bugs...      switch(propname)      {      case 'clip':         return this.styleObj[propname];      case 'top':        if (navigator.family == 'gecko' && navigator.version < 0.96 && this.styleObj.position == 'relative')           return this.object.offsetTop;      case 'left':        if (navigator.family == 'gecko' && navigator.version < 0.96 && this.styleObj.position == 'relative')           return this.object.offsetLeft;      }    }    // Note that propname is the name of the property in the CSS Style    // Object. However the W3 method getPropertyValue takes the actual    // property name from the CSS Style rule, i.e., propname is     // 'backgroundColor' but getPropertyValue expects 'background-color'.     var capIndex;     var cappropname = propname;     while ( (capIndex = cappropname.search(/[A-Z]/)) != -1)     {       if (capIndex != -1)         cappropname = cappropname.substring(0, capIndex) + '-' + cappropname.substring(capIndex, capIndex).toLowerCase() + cappropname.substr(capIndex+1);     }     value =  document.defaultView.getComputedStyle(this.object, '').getPropertyValue(cappropname);     // xxxHack for Gecko:     if (!value && this.styleObj[propname])       value = this.styleObj[propname];  }  else if (typeof(this.styleObj[propname]) == 'undefined')     value = xbStyleNotSupportStringValue(propname);  else   {    if (navigator.family != 'ie4' || navigator.version < 5)    {      // IE4+, Opera, NN4      value = this.styleObj[propname];    }    else    {     // IE5+     value = this.object.currentStyle[propname];     if (!value)       value = this.styleObj[propname];    }  }  return value;}/////////////////////////////////////////////////////////////////////////////// xbStyle.getVisibility()function cssStyleGetVisibility(){  return this.getEffectiveValue('visibility');}function nsxbStyleGetVisibility(){  switch(this.styleObj.visibility)  {  case 'hide':    return 'hidden';  case 'show':    return 'visible';  }  return '';}/////////////////////////////////////////////////////////////////////////////// xbStyle.setVisibility()function cssStyleSetVisibility(visibility){  this.styleObj.visibility = visibility;}function nsxbStyleSetVisibility(visibility){  switch(visibility)  {  case 'hidden':    visibility = 'hide';    break;  case 'visible':    visibility = 'show';    break;  case 'inherit':    break;  default:    visibility = 'show';    break;  }  this.styleObj.visibility = visibility;}// Modified here/////////////////////////////////////////////////////////////////////////////// xbStyle.getDisplay()function cssStyleGetDisplay(){  return this.getEffectiveValue('display');}function nsxbStyleGetDisplay(){  switch(this.styleObj.display)  {  case 'block':    return 'block';  case 'inline':    return 'inline';  case 'listitem':    return 'list-item';  case 'none':    return 'none';  }  return '';}/////////////////////////////////////////////////////////////////////////////// xbStyle.setDisplay()function cssStyleSetDisplay(display){  this.styleObj.display = display;}function nsxbStyleSetDisplay(display){  switch(display)  {  case 'block':    display = 'block';    break;  case 'inline':    display = 'inline';    break;  case 'list-item':    display = 'listitem';    break;  case 'none':  	display = 'none';    break;  default:    display = 'inline';    break;  }  this.styleObj.display = display;}xbStyle.prototype.getEffectiveValue     = xbStyleGetEffectiveValue; if (document.all || document.getElementsByName){    xbStyle.prototype.getVisibility      = cssStyleGetVisibility;  xbStyle.prototype.setVisibility      = cssStyleSetVisibility;  xbStyle.prototype.setDisplay         = cssStyleSetDisplay;  xbStyle.prototype.getDisplay         = cssStyleGetDisplay;  }else if (document.layers){    xbStyle.prototype.getVisibility      = nsxbStyleGetVisibility;  xbStyle.prototype.setVisibility      = nsxbStyleSetVisibility;  xbStyle.prototype.getDisplay         = nsxbStyleGetDisplay;  xbStyle.prototype.setDisplay         = nsxbStyleSetDisplay;              window.saveInnerWidth = window.innerWidth;  window.saveInnerHeight = window.innerHeight;  window.onresize = nsxbStyleOnresize;}else {  xbStyle.prototype.toString           = xbStyleNotSupported;  xbStyle.prototype.getVisibility      = xbStyleNotSupported;  xbStyle.prototype.setVisibility      = xbStyleNotSupported;  xbStyle.prototype.getDisplay         = xbStyleNotSupported;  xbStyle.prototype.setDisplay         = xbStyleNotSupported;}