adjusted javascript to not include margins in highlight calculations.