rem: $w('positionedOffset getOffsetParent viewportOffset').each(function(method) { Element.Methods[method] = Element.Methods[method].wrap( function(proceed, element) { element = $(element); var position = element.getStyle('position'); if (position != 'static') return proceed(element); element.setStyle({ position: 'relative' }); var value = proceed(element); element.setStyle({ position: position }); return value; 
add: function(proceed, element, style) { switch (style) { case 'left': case 'top': case 'right': case 'bottom': if (proceed(element, 'position') === 'static') return null; case 'height': case 'width':  if (!Element.visible(element)) return null;    var dim = parseInt(proceed(element, style), 10);  if (dim !== element['offset' + style.capitalize()]) return dim + 'px';  var properties; if (style === 'height') { properties = ['border-top-width', 'padding-top', 'padding-bottom', 'border-bottom-width']; } else { properties = ['border-left-width', 'padding-left', 'padding-right', 'border-right-width']; } return properties.inject(dim, function(memo, property) { var val = proceed(element, property); return val === null ? memo : memo - parseInt(val, 10); }) + 'px'; default: return proceed(element, style); 
context:   $w('positionedOffset getOffsetParent viewportOffset').each(function(method) {    Element.Methods[method] = Element.Methods[method].wrap(      function(proceed, element) {        element = $(element);        var position = element.getStyle('position');        if (position != 'static') return proceed(element);        element.setStyle({ position: 'relative' });        var value = proceed(element);        element.setStyle({ position: position });        return value;      }    );  });
meta: 3332	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3332/ae76169baf0e96830775039bfe03938320067313/dom.js/clean/src/dom.js