function AdfIEAgentLegacy(version, domWindow) {
  this.Init(version, domWindow);
  AdfIEAgentLegacy.assertBrowserMode(this)
}
AdfIEAgentLegacy.assertBrowserMode = function(agent) {
  if(AdfIEAgentLegacy._isIllegalBrowserDetected(agent)) {
    if(typeof checkBrowserMode != "undefined" && checkBrowserMode != null) {
      if(checkBrowserMode == "alert") {
        alert(AdfAgent._UNSUPPORTED_BROWSER_MODE_ALERT)
      }
      window.setTimeout('try{AdfLogger.LOGGER.warning(unescape("' + escape(AdfAgent._UNSUPPORTED_BROWSER_MODE_ALERT) + '"));}catch(problem){}', 1E3)
    }
  }
};
AdfIEAgentLegacy._isIllegalBrowserDetected = function(agent) {
  var agentVersion = agent.getVersion();
  var documentMode = document.documentMode;
  if(agentVersion < 8) {
    if(agentVersion < 7) {
      return true
    }else {
      if(documentMode == null) {
        return false
      }else {
        return true
      }
    }
  }
  if(documentMode < 8) {
    return true
  }
  var absoluteAgentVersion = Math.abs(agentVersion);
  var absoluteDocumentMode = Math.abs(documentMode);
  if(absoluteAgentVersion != absoluteDocumentMode) {
    return true
  }
  return false
};
AdfObject.createSubclass(AdfIEAgentLegacy, AdfAgent);
AdfIEAgentLegacy._USERDATA_BEHAVIOR = "url(#default#userData)";
AdfIEAgentLegacy._USERDATA_ID = "userDataState";
AdfIEAgentLegacy._USERDATA_SEPARATOR = "|";
AdfIEAgentLegacy._USERDATA_ROOT_ELEMENT_ID = "storageId";
AdfIEAgentLegacy._USERDATA_WINDOW_ID = "windowId";
AdfIEAgentLegacy._USERDATA_WINDOW_ELEMENT = "window";
AdfIEAgentLegacy._USERDATA_DATA_ELEMENT = "data";
AdfIEAgentLegacy._USERDATA_PROP_KEY = "propKey";
AdfIEAgentLegacy._USERDATA_PROP_VALUE = "propValue";
AdfIEAgentLegacy._DEFAULT_WINDOW_ID = "userDataWindowId";
AdfIEAgentLegacy._SESSION_WINDOW_DATA_TIMEOUT = 1440;
AdfIEAgentLegacy._CAPTURE_PANE_STYLE_CLASS = "AFCapturePane";
AdfIEAgentLegacy._IN_CAPTURE = "_afrInCapture";
AdfIEAgentLegacy.__getAgentVersion = function(agentName) {
  var agentVersion = null;
  var matches = matches = agentName.match(/trident\/(\d+[.]\d+)/);
  if(matches) {
    agentVersion = parseFloat(matches[1]);
    agentVersion += 4
  }else {
    matches = agentName.match(/msie (\d+\.\d+);/);
    if(!matches) {
      matches = agentName.match(/msie (\d+\.\d+)b;/)
    }
    agentVersion = parseFloat(matches[1])
  }
  return agentVersion
};
AdfIEAgentLegacy.prototype.Init = function(version, domWindow) {
  AdfIEAgentLegacy.superclass.Init.call(this, AdfAgent.IE_PLATFORM, AdfAgent.guessOS(), version, domWindow);
  this._imageURLs = new Object;
  this._cursorURLsInited = false;
  this._ID_TO_DOM_MAP = new Object;
  this._EVENT_CAPTURES = {_captureRefCount:0};
  this._userDataStorageInstance = null;
  this._scrollRecord = null
};
AdfIEAgentLegacy.prototype.createXMLHttpRequest = function() {
  var xmlhttp = AdfIEAgentLegacy.superclass.createXMLHttpRequest.call(this);
  if(!xmlhttp) {
    if(window.ActiveXObject) {
      try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
      }catch(e) {
        try {
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
        }catch(e) {
        }
      }
    }
  }
  return xmlhttp
};
AdfIEAgentLegacy.prototype.getElementById = function(id) {
  if(AdfAssert.DEBUG) {
    var cachedDom = this._ID_TO_DOM_MAP[id];
    var elementById = this.getDomDocument().getElementById(id);
    if(cachedDom != elementById) {
      AdfAssert.assert(false, "document.getElementById('" + id + "')\x3d\x3d" + elementById + " not " + cachedDom)
    }
  }
  return this._ID_TO_DOM_MAP[id]
};
AdfIEAgentLegacy.prototype.isSessionStorageEnabled = function() {
  if(this._isSessionStorageEnabled === undefined) {
    try {
      this._setUserDataProperty("_adfTestKey", "on", 2);
      this._removeUserDataProperty("_adfTestKey");
      this._isSessionStorageEnabled = true
    }catch(e) {
      AdfLogger.LOGGER.logErrorAsInfo(e, "userdata monitoring has been disabled because an error " + "occurred accessing the UserData store. Please ensure that 'userdata persistence' is " + "enabled in your IE browser.");
      this._isSessionStorageEnabled = false
    }
  }
  return this._isSessionStorageEnabled
};
AdfIEAgentLegacy.prototype.getSessionStorageProperty = function(propKey, dataTimeout) {
  AdfAssert.assertString(propKey);
  var propVal = null;
  try {
    propVal = this._getUserDataProperty(propKey, dataTimeout)
  }catch(e) {
    AdfLogger.LOGGER.logErrorAsInfo(e, "An error occurred when retrieving the property from the" + " UserData store. Please make sure your browser's userdata persistence feature is enabled.");
    throw e;
  }
  return propVal
};
AdfIEAgentLegacy.prototype._getUserDataProperty = function(propKey, dataTimeout) {
  var propVal = null;
  var userDataInstance = this._loadUserDataFromStore();
  var objXMLDoc = userDataInstance.xmlDocument;
  var dataNode = this._getUserDataStorageDataNode(objXMLDoc, propKey);
  if(dataNode) {
    propVal = dataNode.getAttribute(AdfIEAgentLegacy._USERDATA_PROP_VALUE)
  }
  var storageId = this._getUserDataStorageId();
  this._setSessionStorageExpiration(userDataInstance, storageId, dataTimeout);
  return propVal
};
AdfIEAgentLegacy.prototype.removeSessionStorageProperty = function(propKey) {
  AdfAssert.assertString(propKey);
  try {
    this._removeUserDataProperty(propKey)
  }catch(e) {
    AdfLogger.LOGGER.logErrorAsInfo(e, "An error occurred when removing a property from the " + "UserData store. Please make sure your browser's userdata persistence feature is enabled.");
    throw e;
  }
};
AdfIEAgentLegacy.prototype._removeUserDataProperty = function(propKey) {
  AdfAssert.assertString(propKey);
  var userDataInstance = this._loadUserDataFromStore();
  var storageId = this._getUserDataStorageId();
  var objXMLDoc = userDataInstance.xmlDocument;
  var dataNode = this._getUserDataStorageDataNode(objXMLDoc, propKey);
  if(dataNode) {
    var docElem = objXMLDoc.documentElement;
    docElem.removeChild(dataNode)
  }
  this._saveUserDataToStore(userDataInstance, storageId)
};
AdfIEAgentLegacy.prototype.setSessionStorageProperty = function(propKey, propValue, dataTimeout) {
  AdfAssert.assertString(propKey);
  AdfAssert.assertString(propValue);
  try {
    this._setUserDataProperty(propKey, propValue, dataTimeout)
  }catch(e) {
    AdfLogger.LOGGER.logErrorAsInfo(e, "An error occurred when saving property value to the " + "UserData store. Please make sure your browser's userdata persistence feature is enabled.");
    throw e;
  }
};
AdfIEAgentLegacy.prototype._setUserDataProperty = function(propKey, propValue, dataTimeout) {
  AdfAssert.assertString(propKey);
  AdfAssert.assertString(propValue);
  var userDataInstance = this._loadUserDataFromStore();
  var storageId = this._getUserDataStorageId();
  userDataInstance.load(storageId);
  var objXMLDoc = userDataInstance.xmlDocument;
  var createDataNode = false;
  var dataNode;
  var rootElemId = userDataInstance.getAttribute(AdfIEAgentLegacy._USERDATA_ROOT_ELEMENT_ID);
  if(rootElemId) {
    dataNode = this._getUserDataStorageDataNode(objXMLDoc, propKey);
    if(!dataNode) {
      createDataNode = true
    }
  }else {
    userDataInstance.setAttribute(AdfIEAgentLegacy._USERDATA_ROOT_ELEMENT_ID, storageId);
    createDataNode = true
  }
  if(createDataNode) {
    dataNode = this._createUserDataChildNode(objXMLDoc, AdfIEAgentLegacy._USERDATA_DATA_ELEMENT, AdfIEAgentLegacy._USERDATA_PROP_KEY, propKey);
    objXMLDoc.documentElement.insertBefore(dataNode, null)
  }
  dataNode.setAttribute(AdfIEAgentLegacy._USERDATA_PROP_VALUE, propValue);
  this._saveUserDataToStore(userDataInstance, storageId);
  this._setSessionStorageExpiration(userDataInstance, storageId, dataTimeout)
};
AdfIEAgentLegacy.prototype._getUserDataStorageId = function() {
  var windowId = AdfPage.PAGE.getWindowId();
  if(!windowId) {
    windowId = AdfIEAgentLegacy._DEFAULT_WINDOW_ID
  }
  var storageId = AdfIEAgentLegacy["_userDataSessionToken"] + AdfIEAgentLegacy._USERDATA_SEPARATOR + windowId;
  return storageId
};
AdfIEAgentLegacy.prototype._loadUserDataFromStore = function() {
  var userDataInstance = this._userDataStorageInstance;
  if(!userDataInstance) {
    var theDocument = this.getDomDocument();
    userDataInstance = theDocument.createElement("div");
    userDataInstance.id = AdfIEAgentLegacy._USERDATA_ID;
    userDataInstance.style.behavior = AdfIEAgentLegacy._USERDATA_BEHAVIOR;
    theDocument.body.appendChild(userDataInstance);
    this._userDataStorageInstance = userDataInstance
  }
  var storageId = this._getUserDataStorageId();
  try {
    userDataInstance.load(storageId)
  }catch(e) {
    AdfLogger.LOGGER.fine("Unable to load object participating in userData persistence from UserData store.");
    throw e;
  }
  return userDataInstance
};
AdfIEAgentLegacy.prototype._saveUserDataToStore = function(userDataInstance, storageId) {
  AdfAssert.assertString(storageId);
  AdfAssert.assertObject(userDataInstance);
  try {
    userDataInstance.save(storageId)
  }catch(e) {
    AdfLogger.LOGGER.fine("Unable to save object participating in userData persistence to a UserData store.");
    throw e;
  }
};
AdfIEAgentLegacy.prototype._setSessionStorageExpiration = function(userDataInstance, storageId, expirationTime) {
  AdfAssert.assertString(storageId);
  AdfAssert.assertObject(userDataInstance);
  var objCurrentTime = new Date;
  if(!expirationTime) {
    expirationTime = AdfIEAgentLegacy._SESSION_WINDOW_DATA_TIMEOUT
  }
  objCurrentTime.setMinutes(objCurrentTime.getMinutes() + expirationTime);
  var expirationDate = objCurrentTime.toUTCString();
  userDataInstance.expires = expirationDate;
  this._saveUserDataToStore(userDataInstance, storageId)
};
AdfIEAgentLegacy.prototype._getUserDataStorageDataNode = function(objXMLDoc, propKey) {
  var dataNodes = objXMLDoc.getElementsByTagName(AdfIEAgentLegacy._USERDATA_DATA_ELEMENT);
  var dataNode = null;
  if(dataNodes && dataNodes.length > 0) {
    dataNode = this._getUserDataChildNode(dataNodes, AdfIEAgentLegacy._USERDATA_PROP_KEY, propKey)
  }
  return dataNode
};
AdfIEAgentLegacy.prototype._getUserDataChildNode = function(children, childName, childVal) {
  AdfAssert.assertString(childName);
  AdfAssert.assertStringOrNull(childVal);
  if(!children) {
    return null
  }
  var childNode = null;
  var arraySize = children.length;
  for(var i = 0;i < arraySize;i++) {
    if(children[i].getAttribute(childName) == childVal) {
      childNode = children[i];
      break
    }
  }
  return childNode
};
AdfIEAgentLegacy.prototype._createUserDataChildNode = function(objXmlDoc, nodeName, nodeIdName, nodeIdVal) {
  AdfAssert.assertObject(objXmlDoc);
  AdfAssert.assertString(nodeName);
  AdfAssert.assertString(nodeIdName);
  AdfAssert.assertString(nodeIdVal);
  var childNode = objXmlDoc.createNode(1, nodeName, "");
  childNode.setAttribute(nodeIdName, nodeIdVal);
  return childNode
};
AdfIEAgentLegacy.prototype.elementsRemoved = function(node) {
  var idToDomMap = this._ID_TO_DOM_MAP;
  var targetId = node.id;
  if(targetId != null) {
    delete idToDomMap[targetId]
  }
  var elements = node.all;
  var elementCount = elements.length;
  for(var i = 0;i < elementCount;i++) {
    var currElement = elements(i);
    var currId = this._getAttribute(currElement, "id");
    if(currId) {
      delete idToDomMap[currId]
    }
  }
};
AdfIEAgentLegacy.prototype.allElementsRemoved = function() {
  this._ID_TO_DOM_MAP = new Object;
  this.elementsAdded(this.getDomDocument())
};
AdfIEAgentLegacy.prototype.elementsAdded = function(node) {
  var idToDomMap = this._ID_TO_DOM_MAP;
  var targetId = node.id;
  if(targetId != null) {
    idToDomMap[targetId] = node
  }
  var elements = node.all;
  var elementCount = elements.length;
  for(var i = 0;i < elementCount;i++) {
    var currElement = elements(i);
    var currId = this._getAttribute(currElement, "id");
    if(currId) {
      idToDomMap[currId] = currElement
    }
  }
};
AdfIEAgentLegacy.prototype._getAttribute = function(node, attrName) {
  var value = node.getAttribute(attrName);
  if(value && typeof value !== "string") {
    var attrs = node.attributes;
    var attrCount = attrs.length;
    for(var i = 0;i < attrCount;i++) {
      if(attrs[i].name == attrName) {
        return attrs[i].value
      }
    }
    return undefined
  }
  return value
};
AdfIEAgentLegacy.prototype.getDescendantComponentsForNode = function(node, children) {
  if(!children) {
    children = new Array
  }
  var elements = node.all;
  var elementCount = elements.length;
  var page = AdfPage.PAGE;
  for(var i = 0;i < elementCount;i++) {
    var currElement = elements(i);
    var currId = currElement.id;
    if(currId) {
      var comp = page.findComponent(currId);
      if(comp) {
        children.push(comp)
      }
    }
  }
  return children
};
AdfIEAgentLegacy.prototype.setTextContent = function(node, newText) {
  AdfAssert.assertDomNode(node);
  if(!newText) {
    newText = ""
  }
  switch(node.nodeType) {
    case 1:
      node.innerText = newText;
      break;
    case 2:
    ;
    case 5:
    ;
    case 6:
    ;
    case 11:
    ;
    case 3:
    ;
    case 4:
    ;
    case 8:
    ;
    case 7:
      node.nodeValue = newText;
      break;
    case 9:
    ;
    case 10:
    ;
    case 12:
  }
};
AdfIEAgentLegacy.prototype.getTextContent = function(node) {
  AdfAssert.assertDomNode(node);
  switch(node.nodeType) {
    case 1:
      var textContent = node.innerText;
      if(textContent == undefined) {
        textContent = node.text
      }
      return textContent;
    case 2:
    ;
    case 5:
    ;
    case 6:
    ;
    case 11:
    ;
    case 3:
    ;
    case 4:
    ;
    case 8:
    ;
    case 7:
      return node.nodeValue;
    case 9:
    ;
    case 10:
    ;
    case 12:
      return null
  }
};
AdfIEAgentLegacy.prototype.getCursor = function(cursorName) {
  if(!this._cursorURLsInited) {
    this._cursorURLsInited = true;
    var cursorMap = AdfIEAgentLegacy._CSS3_TO_IE_MAP;
    var richPage = AdfPage.PAGE;
    cursorMap.alias = "url('" + richPage.getResourceURL("/afr/alias.cur") + "')," + cursorMap.alias;
    cursorMap.copy = "url('" + richPage.getResourceURL("/afr/copy.cur") + "')," + cursorMap.copy
  }
  return AdfIEAgentLegacy._CSS3_TO_IE_MAP[cursorName]
};
AdfIEAgentLegacy.prototype.getWindowClientWidth = function(domWindow) {
  var theDocument = domWindow.document;
  var sizeTarget = theDocument.compatMode === "BackCompat" ? theDocument.body : theDocument.documentElement;
  return sizeTarget.clientWidth
};
AdfIEAgentLegacy.prototype.getWindowClientHeight = function(domWindow) {
  var theDocument = domWindow.document;
  var sizeTarget = theDocument.compatMode === "BackCompat" ? theDocument.body : theDocument.documentElement;
  return sizeTarget.clientHeight
};
AdfIEAgentLegacy.prototype.getWindowScrollWidth = function(domWindow) {
  var theDocument = domWindow.document;
  var sizeTarget = theDocument.compatMode === "BackCompat" ? theDocument.body : theDocument.documentElement;
  return sizeTarget.scrollWidth
};
AdfIEAgentLegacy.prototype.getWindowScrollHeight = function(domWindow) {
  var theDocument = domWindow.document;
  var sizeTarget = theDocument.compatMode === "BackCompat" ? theDocument.body : theDocument.documentElement;
  return sizeTarget.scrollHeight
};
AdfIEAgentLegacy.prototype.getBrowserViewportScrollLeft = function() {
  var scrollLeft = AdfIEAgentLegacy.superclass.getBrowserViewportScrollLeft.call(this);
  if(AdfPage.PAGE.getLocaleContext().isRightToLeft()) {
    var domWindow = this.getDomWindow();
    scrollLeft -= this.getWindowScrollWidth(domWindow) - this.getWindowClientWidth(domWindow)
  }
  return scrollLeft
};
AdfIEAgentLegacy.prototype.getElementLeft = function(element) {
  AdfAssert.assertDomElement(element);
  var boundingRect = element.getBoundingClientRect();
  var elemLeft = boundingRect.left;
  var docElement = element.ownerDocument.documentElement;
  var scrollLeft = docElement.scrollLeft;
  if(AdfPage.PAGE.getLocaleContext().isRightToLeft()) {
    scrollLeft += docElement.clientWidth - docElement.scrollWidth
  }
  elemLeft -= docElement.clientLeft - scrollLeft;
  return elemLeft
};
AdfIEAgentLegacy.prototype.getElementTop = function(element) {
  AdfAssert.assertDomElement(element);
  var boundingRect = element.getBoundingClientRect();
  var elemTop = boundingRect.top;
  var docElement = element.ownerDocument.documentElement;
  elemTop -= docElement.clientTop - docElement.scrollTop;
  return elemTop
};
AdfIEAgentLegacy.prototype.getElementPosition = function(element) {
  AdfAssert.assertDomElement(element);
  var boundingRect = element.getBoundingClientRect();
  var elemTop = boundingRect.top;
  var elemLeft = boundingRect.left;
  var docElement = element.ownerDocument.documentElement;
  var scrollLeft = docElement.scrollLeft;
  if(AdfPage.PAGE.getLocaleContext().isRightToLeft()) {
    scrollLeft += docElement.clientWidth - docElement.scrollWidth
  }
  elemLeft -= docElement.clientLeft - scrollLeft;
  elemTop -= docElement.clientTop - docElement.scrollTop;
  return{x:elemLeft, y:elemTop}
};
AdfIEAgentLegacy.prototype.getElementPageBounds = function(domElement) {
  AdfAssert.assertDomElement(domElement);
  var boundingRect = domElement.getBoundingClientRect();
  var docElement = domElement.ownerDocument.documentElement;
  var scrollLeft = docElement.scrollLeft;
  if(AdfPage.PAGE.getLocaleContext().isRightToLeft()) {
    scrollLeft += docElement.clientWidth - docElement.scrollWidth
  }
  deltaX = docElement.clientLeft - scrollLeft;
  deltaY = docElement.clientTop - docElement.scrollTop;
  return{top:boundingRect.top - deltaY, left:boundingRect.left - deltaX, bottom:boundingRect.bottom - deltaY, right:boundingRect.right - deltaX}
};
AdfIEAgentLegacy.prototype.pointInElementBounds = function(element, pageX, pageY) {
  var boundingRect = element.getBoundingClientRect();
  var documentElement = element.ownerDocument.documentElement;
  var clientX = pageX - documentElement.scrollLeft - 2;
  var clientY = pageY - documentElement.scrollTop - 2;
  return clientY >= boundingRect.top && clientY <= boundingRect.bottom && clientX >= boundingRect.left && clientX <= boundingRect.right
};
AdfIEAgentLegacy.prototype.pointInElementChrome = function(element, pageX, pageY) {
  var documentElement = element.ownerDocument.documentElement;
  var windowClientX = pageX - documentElement.scrollLeft;
  var windowClientY = pageY - documentElement.scrollTop;
  var chromePart = element.componentFromPoint(windowClientX, windowClientY);
  return chromePart && chromePart != "outside"
};
AdfIEAgentLegacy.prototype.isChromeEvent = function(domEvent) {
  AdfAssert.assertObject(domEvent);
  switch(domEvent.type) {
    case "mousedown":
      return this._handleInlineEditingMouseDown(domEvent);
    case "mouseup":
      return this._handleInlineEditingMouseUp(domEvent);
    case "mousemove":
      return this._handleInlineEditingMouseMove(domEvent);
    case "click":
      return this._handleInlineEditingClick(domEvent);
    default:
      return false
  }
};
AdfIEAgentLegacy._handleScrollInterval = function() {
  var scrollRecord = AdfAgent.AGENT._scrollRecord;
  if(scrollRecord.currChromePart === scrollRecord.draggedChromePart) {
    scrollRecord.currTarget.doScroll(scrollRecord.draggedChromePart)
  }
};
AdfIEAgentLegacy.prototype._getBlockingDiv = function() {
  return this.getDomDocument().body.firstChild
};
AdfIEAgentLegacy.prototype._handleInlineEditingMouseDown = function(domEvent) {
  var realTarget = this.getEventTarget(domEvent);
  var chromePart = realTarget.componentFromPoint(domEvent.clientX, domEvent.clientY);
  var isScrollingChromePart = false;
  if(chromePart) {
    var scrollRecord = {draggedChromePart:"", currChromePart:"", scrollTimer:0, currTarget:null, startDrag:0, startScroll:0, noClick:false};
    switch(chromePart) {
      case "scrollbarPageDown":
      ;
      case "scrollbarPageUp":
      ;
      case "scrollbarPageLeft":
      ;
      case "scrollbarPageRight":
      ;
      case "scrollbarLeft":
      ;
      case "scrollbarRight":
      ;
      case "scrollbarUp":
      ;
      case "scrollbarDown":
        scrollRecord.scrollTimer = window.setInterval(AdfIEAgentLegacy._handleScrollInterval, 50);
      case "scrollbarVThumb":
      ;
      case "scrollbarHThumb":
        if(chromePart === "scrollbarVThumb") {
          scrollRecord.startDrag = domEvent.clientY;
          scrollRecord.startScroll = realTarget.scrollTop
        }else {
          scrollRecord.startDrag = domEvent.clientX;
          scrollRecord.startScroll = realTarget.scrollLeft
        }
        scrollRecord.currTarget = realTarget;
        scrollRecord.draggedChromePart = chromePart;
        var blockingDiv = this._getBlockingDiv();
        blockingDiv.setCapture(true);
        isScrollingChromePart = true;
        this._scrollRecord = scrollRecord
    }
  }
  return isScrollingChromePart
};
AdfIEAgentLegacy.prototype._handleInlineEditingMouseUp = function(domEvent) {
  var scrollRecord = this._scrollRecord;
  if(scrollRecord) {
    if(scrollRecord.noClick) {
      this._handleInlineEditingMouseMove(domEvent)
    }else {
      this._handleInlineEditingClick(domEvent)
    }
    var blockingDiv = this._getBlockingDiv();
    blockingDiv.releaseCapture();
    if(this._scrollRecord.scrollTimer) {
      window.clearInterval(this._scrollRecord.scrollTimer)
    }
    this._scrollRecord = null;
    return true
  }else {
    return false
  }
};
AdfIEAgentLegacy.prototype._handleInlineEditingMouseMove = function(domEvent) {
  var scrollRecord = this._scrollRecord;
  if(scrollRecord) {
    scrollRecord.noClick = true;
    var draggedChromePart = scrollRecord.draggedChromePart;
    if(draggedChromePart) {
      var realTarget = this.getEventTarget(domEvent);
      if(draggedChromePart === "scrollbarVThumb" || draggedChromePart === "scrollbarHThumb") {
        var scrollDelta;
        if(draggedChromePart === "scrollbarVThumb") {
          scrollDelta = AdfIEAgentLegacy._computeScrollDelta(scrollRecord, realTarget.clientHeight, realTarget.scrollHeight, domEvent.clientY - scrollRecord.startDrag);
          realTarget.scrollTop = scrollRecord.startScroll + scrollDelta
        }else {
          if(draggedChromePart === "scrollbarHThumb") {
            scrollDelta = AdfIEAgentLegacy._computeScrollDelta(scrollRecord, realTarget.clientWidth, realTarget.scrollWidth, domEvent.clientX - scrollRecord.startDrag);
            realTarget.scrollLeft = scrollRecord.startScroll + scrollDelta
          }
        }
      }else {
        scrollRecord.currChromePart = realTarget.componentFromPoint(domEvent.clientX, domEvent.clientY)
      }
    }
    return true
  }else {
    return false
  }
};
AdfIEAgentLegacy._computeScrollDelta = function(scrollRecord, viewPortSize, canvasSize, dragDelta) {
  var alleySize = Math.max(viewPortSize - 39, 0);
  var thumbSize = alleySize > 14 ? Math.max(Math.ceil(alleySize * viewPortSize / canvasSize), 14) : alleySize;
  var scrollRemainder = alleySize - thumbSize;
  var scrollRatio = scrollRemainder ? (canvasSize - viewPortSize) / scrollRemainder : 0;
  return Math.ceil(dragDelta * scrollRatio)
};
AdfIEAgentLegacy.prototype._handleInlineEditingClick = function(domEvent) {
  var realTarget = this.getEventTarget(domEvent);
  var chromePart = realTarget.componentFromPoint(domEvent.clientX, domEvent.clientY);
  if(chromePart) {
    realTarget.doScroll(chromePart);
    return true
  }else {
    return false
  }
};
AdfIEAgentLegacy.prototype.getOverrideStyle = function(element) {
  return element.runtimeStyle
};
AdfIEAgentLegacy.prototype.getComputedStyle = function(element) {
  return element.currentStyle
};
AdfIEAgentLegacy.prototype.getStyleProperty = function(style, propertyName) {
  return style[propertyName]
};
AdfIEAgentLegacy.prototype.getLocalName = function(element) {
  var nodeName = element.nodeName;
  var prefix = element.prefix;
  if(prefix) {
    nodeName = nodeName.substring(prefix.length + 1, nodeName.length)
  }
  return nodeName
};
AdfIEAgentLegacy.prototype.getNodeName = function(node) {
  var nodeName;
  switch(node.nodeType) {
    case 1:
      var prefix = node.prefix;
      if(prefix) {
        nodeName = node.nodeName
      }else {
        var nodeName = node.tagName;
        var scopeName = node.scopeName;
        if(scopeName && scopeName != "HTML") {
          nodeName = scopeName + ":" + nodeName
        }
      }
      break;
    case 3:
      nodeName = "#text";
      break;
    case 8:
      nodeName = "#comment";
      break
  }
  return nodeName
};
AdfIEAgentLegacy.prototype.getPrefix = function(element) {
  var prefix = element.prefix;
  if(!prefix) {
    prefix = element.scopeName
  }
  return prefix
};
AdfIEAgentLegacy.prototype.setCssFloat = function(element, value) {
  element.style.styleFloat = value
};
AdfIEAgentLegacy.prototype.addBubbleEventListener = function(element, eventType, listener) {
  AdfAssert.assertString(eventType);
  AdfAssert.assertFunction(listener);
  element.attachEvent("on" + eventType, listener)
};
AdfIEAgentLegacy.prototype.removeBubbleEventListener = function(element, eventType, listener) {
  AdfAssert.assertString(eventType);
  AdfAssert.assertFunction(listener);
  element.detachEvent("on" + eventType, listener)
};
AdfIEAgentLegacy.prototype.startDocumentKeyEventCapture = function(listenerMap, focusProxy) {
  AdfAssert.assert(listenerMap);
  AdfAssert.assertDomElement(focusProxy);
  var keyEvents = AdfAgent.KEY_EVENTS;
  var eventCount = keyEvents.length;
  var focusDocument = focusProxy.ownerDocument;
  var focusBody = focusDocument.body;
  for(var eventIndex = 0;eventIndex < eventCount;eventIndex++) {
    var currEventName = keyEvents[eventIndex];
    var currListener = listenerMap[currEventName];
    if(currListener) {
      AdfAssert.assertFunction(currListener);
      focusProxy.attachEvent("on" + currEventName, currListener)
    }
  }
  var focusState = null;
  var activeElement = focusDocument.activeElement;
  if(activeElement) {
    var activeID = activeElement.id;
    focusState = {"activeElement":activeElement, "activeID":activeID}
  }
  focusBody.focus();
  return focusState
};
AdfIEAgentLegacy.prototype.endDocumentKeyEventCapture = function(listenerMap, focusProxy, focusState) {
  AdfAssert.assert(listenerMap);
  AdfAssert.assertDomElement(focusProxy);
  var keyEvents = AdfAgent.KEY_EVENTS;
  var eventCount = keyEvents.length;
  for(var eventIndex = 0;eventIndex < eventCount;eventIndex++) {
    var currEventName = keyEvents[eventIndex];
    var currListener = listenerMap[currEventName];
    if(currListener) {
      AdfAssert.assertFunction(currListener);
      focusProxy.detachEvent("on" + currEventName, currListener)
    }
  }
  if(focusState) {
    var activeElement = focusState.activeElement;
    if(activeElement) {
      AdfAssert.assertDomElement(activeElement);
      var ownerDoc = focusProxy.ownerDocument;
      if(!AdfDomUtils.isNodeInDocumentHierarchy(ownerDoc, activeElement)) {
        var activeID = focusState.activeID;
        if(activeID) {
          AdfAssert.assert(ownderDoc == this.getDomDocument());
          activeElement = this.getElementById(activeID)
        }else {
          activeElement = null
        }
      }
      if(activeElement) {
        try {
          activeElement.setActive()
        }catch(e) {
          AdfLogger.LOGGER.fine("Could not restore focus to activeElement:", activeElement.id ? activeElement.id : "unknown")
        }
      }else {
        AdfLogger.LOGGER.fine("Could not restore focus")
      }
    }
  }
};
AdfIEAgentLegacy.prototype.addEventBubbles = function(element, listener) {
  var events = AdfIEAgentLegacy._REDISTRIBUTE_EVENTS;
  var eventCount = events.length;
  for(var eventIndex = 0;eventIndex < eventCount;eventIndex++) {
    element[events[eventIndex]] = listener
  }
};
AdfIEAgentLegacy.prototype.removeEventBubbles = function(element, listener) {
  var events = AdfIEAgentLegacy._REDISTRIBUTE_EVENTS;
  var eventCount = events.length;
  for(var eventIndex = 0;eventIndex < eventCount;eventIndex++) {
    element[events[eventIndex]] = null
  }
};
AdfIEAgentLegacy.prototype.addEventCaptures = function(node, listener) {
  AdfAssert.assertDomNode(node);
  AdfAssert.assertFunction(listener);
  var nodeId = node.id;
  AdfAssert.assertString(nodeId);
  var eventCaptures = this._EVENT_CAPTURES;
  var captureListeners = eventCaptures[nodeId];
  if(captureListeners == null) {
    this._addCapturePane(nodeId);
    captureListeners = new Array;
    eventCaptures[nodeId] = captureListeners
  }
  captureListeners.push(listener);
  eventCaptures._captureRefCount++
};
AdfIEAgentLegacy.prototype.removeEventCaptures = function(node, listener) {
  AdfAssert.assertDomNode(node);
  AdfAssert.assertFunction(listener);
  var nodeId = node.id;
  AdfAssert.assertString(nodeId);
  var eventCaptures = this._EVENT_CAPTURES;
  var captureListeners = eventCaptures[nodeId];
  if(captureListeners == null) {
    AdfAssert.assert(false, "no capture listeners registered on:" + node);
    return
  }
  var index = AdfCollections.removeArrayValue(captureListeners, listener);
  AdfAssert.assert(index != -1, "listener:" + listener + " wasn't registered for capture on:" + node);
  if(captureListeners.length == 0) {
    this._removeCapturePane(nodeId);
    delete eventCaptures[nodeId]
  }
  eventCaptures._captureRefCount--
};
AdfIEAgentLegacy.prototype.getComponentEvent = function(component, nativeEvent, prevComponent) {
  var ret = AdfIEAgentLegacy.superclass.getComponentEvent.apply(this, arguments);
  var type = ret.getType();
  if(type == AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE) {
    ret = new AdfIEShowContextMenuEvent(ret.getSource(), type, ret.getNativeEvent())
  }
  return ret
};
AdfIEAgentLegacy.prototype._addCapturePane = function(nodeId) {
  var theDocument = this.getDomDocument();
  var capturePane = theDocument.createElement("div");
  capturePane.id = this._getCapturePaneId(nodeId);
  capturePane.className = AdfIEAgentLegacy._CAPTURE_PANE_STYLE_CLASS;
  var captureStyle = capturePane.style;
  captureStyle.position = "absolute";
  captureStyle.backgroundColor = "red";
  captureStyle.filter = "alpha(opacity\x3d0)";
  captureStyle.zIndex = 1;
  captureStyle.setExpression("top", "AdfAgent.AGENT.getElementTop(AdfAgent.AGENT.getElementById('" + nodeId + "'))");
  captureStyle.setExpression("left", "AdfAgent.AGENT.getElementLeft(AdfAgent.AGENT.getElementById('" + nodeId + "'))");
  captureStyle.setExpression("width", "AdfAgent.AGENT.getElementById('" + nodeId + "').offsetWidth");
  captureStyle.setExpression("height", "AdfAgent.AGENT.getElementById('" + nodeId + "').offsetHeight");
  var theBody = theDocument.body;
  theBody.insertBefore(capturePane, theBody.firstChild);
  this.addEventBubbles(capturePane, AdfIEAgentLegacy._captureListenerStub)
};
AdfIEAgentLegacy.prototype._removeCapturePane = function(nodeId) {
  var theDocument = this.getDomDocument();
  var capturePaneId = this._getCapturePaneId(nodeId);
  var capturePane = theDocument.getElementById(capturePaneId);
  AdfAssert.assertDomElement(capturePane);
  capturePane.parentNode.removeChild(capturePane)
};
AdfIEAgentLegacy.prototype._getCapturePaneId = function(nodeId) {
  return AdfRichUIPeer.createSubId(nodeId, "afrCapture")
};
AdfIEAgentLegacy._isCapturePane = function(element) {
  AdfAssert.assertDomElement(element);
  return element.className == AdfIEAgentLegacy._CAPTURE_PANE_STYLE_CLASS
};
AdfIEAgentLegacy._captureListenerStub = function() {
  AdfAgent.AGENT._captureListener(window.event)
};
AdfIEAgentLegacy.prototype._captureListener = function(domEvent) {
  AdfAssert.assertObject(domEvent);
  var mockEvent;
  var scrollRecord = this._scrollRecord;
  if(scrollRecord) {
    if(scrollRecord.currTarget) {
      mockEvent = new Object;
      AdfCollections.copyInto(mockEvent, domEvent);
      this.setEventTarget(mockEvent, scrollRecord.currTarget);
      this.isChromeEvent(mockEvent);
      this.eatEvent(domEvent);
      return
    }
  }
  var eventCaptures = this._EVENT_CAPTURES;
  var theDocumentElement = this.getDomDocument().documentElement;
  var pageX = theDocumentElement.scrollLeft + domEvent.clientX + 2;
  var pageY = theDocumentElement.scrollTop + domEvent.clientY + 2;
  var domEventType = domEvent.type;
  var isMouseMove = domEventType == "mousemove";
  var lastTarget = eventCaptures._lastTarget;
  var lastPageX = eventCaptures._lastPageX;
  var lastPageY = eventCaptures._lastPageY;
  if(isMouseMove && pageX == lastPageX && pageY == lastPageY) {
    return
  }
  eventCaptures._lastPageX = pageX;
  eventCaptures._lastPageY = pageY;
  var intendedTarget = this.elementFromPagePoint(pageX, pageY, lastTarget, null, AdfIEAgentLegacy._isCapturePane);
  if(lastTarget == intendedTarget && isMouseMove) {
    return
  }
  if(domEventType == "mouseout") {
    if(lastTarget) {
      intendedTarget = lastTarget;
      eventCaptures._lastTarget = null
    }
  }else {
    eventCaptures._lastTarget = intendedTarget
  }
  mockEvent = new Object;
  AdfCollections.copyInto(mockEvent, domEvent);
  this.setEventTarget(mockEvent, intendedTarget);
  if(isMouseMove) {
    mockEvent.type = "mouseover";
    if(lastTarget) {
      var mouseOutEvent = new Object;
      AdfCollections.copyInto(mouseOutEvent, domEvent);
      this.setEventTarget(mouseOutEvent, lastTarget);
      mouseOutEvent.type = "mouseout";
      this._deliverEventToEventCaptures(eventCaptures, mouseOutEvent)
    }
  }
  if(domEventType == "mousedown") {
    if(this.isChromeEvent(mockEvent)) {
      this.eatEvent(domEvent);
      return
    }
  }
  this._deliverEventToEventCaptures(eventCaptures, mockEvent)
};
AdfIEAgentLegacy.prototype._deliverEventToEventCaptures = function(eventCaptures, capturedEvent) {
  var eventTarget = this.getEventTarget(capturedEvent);
  var captureCount = eventCaptures._captureRefCount;
  var listenersInScope = null;
  while(eventTarget != null) {
    var nodeId = eventTarget.id;
    if(nodeId != null) {
      var listeners = eventCaptures[nodeId];
      if(listeners != null) {
        var listenerCount = listeners.length;
        if(listenersInScope == null) {
          listenersInScope = [listeners]
        }else {
          listenersInScope.push(listeners)
        }
      }
      captureCount -= listenerCount;
      if(captureCount == 0) {
        break
      }
    }
    eventTarget = eventTarget.parentNode
  }
  if(listenersInScope != null) {
    for(var inScopeIndex = listenersInScope.length - 1;inScopeIndex >= 0;inScopeIndex--) {
      var nodeListeners = listenersInScope[inScopeIndex];
      var nodeListenerCount = nodeListeners.length;
      for(var nodeListenerIndex = 0;nodeListenerIndex < nodeListenerCount;nodeListenerIndex++) {
        try {
          nodeListeners[nodeListenerIndex](capturedEvent);
          if(capturedEvent.cancelBubble) {
            break
          }
        }catch(e) {
          AdfLogger.LOGGER.logErrorAsSevere(e, "Error delivering captured event on " + this.getEventTarget(capturedEvent) + " to:", nodeListeners[nodeListenerIndex])
        }
      }
      if(capturedEvent.cancelBubble) {
        break
      }
    }
  }
};
AdfIEAgentLegacy.prototype.addKeyEventListener = function(element, listener) {
  element.attachEvent("onkeydown", listener)
};
AdfIEAgentLegacy.prototype.removeKeyEventListener = function(element, listener) {
  element.detachEvent("onkeydown", listener)
};
delete AdfIEAgentLegacy.prototype._valueChangeHandler;
AdfIEAgentLegacy.prototype.getEventTarget = function(event) {
  return event.srcElement
};
AdfIEAgentLegacy.prototype.setEventTarget = function(event, eventTarget) {
  event.srcElement = eventTarget
};
AdfIEAgentLegacy.prototype.getEventToElement = function(nativeEvent) {
  return nativeEvent.toElement
};
AdfIEAgentLegacy.prototype.getEventFromElement = function(nativeEvent) {
  return nativeEvent.fromElement
};
AdfIEAgentLegacy.prototype.cloneEvent = function(event, newTarget) {
  var eventType = event.type;
  var targetNode = newTarget ? newTarget : this.getEventTarget(event);
  var targetDocument = targetNode.ownerDocument;
  var newEvent = null;
  var keyBoardEvent = this.isKeyboardEvent(event);
  var mouseEvent = this.isMouseEvent(event);
  if(keyBoardEvent) {
    newEvent = this._copyKeyboardEvent(event, eventType, newTarget);
    this.addBubbleEventListener(targetDocument, eventType, this.stopPropagation);
    try {
      this.dispatchEvent(targetNode, newEvent)
    }finally {
      this.removeBubbleEventListener(targetDocument, eventType, this.stopPropagation)
    }
  }else {
    newEvent = targetNode.ownerDocument.createEventObject(event)
  }
  return newEvent
};
AdfIEAgentLegacy.prototype.copyEvent = function(event) {
  return this.getEventTarget(event).ownerDocument.createEventObject(event)
};
AdfIEAgentLegacy.prototype._copyKeyboardEvent = function(event, eventType, newTarget) {
  var targetNode = newTarget ? newTarget : event.target;
  var targetDocument = targetNode.ownerDocument;
  var newEvent = targetDocument.createEventObject(event);
  return newEvent
};
AdfIEAgentLegacy.prototype._copyMouseEvent = function(event, targetNode) {
  var newEvent = targetNode.ownerDocument.createEventObject();
  var eventEntries = ["altKey", "altLeft", "button", "clientX", "clientY", "ctrlKey", "ctrlLeft", "offsetX", "offsetY", "screenX", "screenY", "shiftKey", "shiftLeft", "type", "x", "y"];
  for(var i = 0, j = eventEntries.length;i < j;i++) {
    var entry = eventEntries[i];
    if(event[entry] !== undefined) {
      newEvent[entry] = event[entry]
    }
  }
  return newEvent
};
AdfIEAgentLegacy.prototype.dispatchEvent = function(targetElement, event) {
  return targetElement.fireEvent("on" + event.type, event)
};
AdfIEAgentLegacy.prototype.CreateUIInputEvent = function(component, type, nativeEvent) {
  return new AdfIEUIInputEvent(component, type, nativeEvent)
};
AdfIEAgentLegacy.prototype.elementFromPagePoint = function(pageX, pageY, hintElement, exclusionContext, exclusionCallback) {
  if(exclusionCallback) {
    return AdfIEAgentLegacy.superclass.elementFromPagePoint.call(this, pageX, pageY, hintElement, exclusionContext, exclusionCallback)
  }
  return this.getDomDocument().elementFromPoint(pageX, pageY)
};
AdfIEAgentLegacy._doNothing = function() {
  var evt = AdfAgent.AGENT.getDomWindow().event;
  evt.returnValue = false;
  return false
};
AdfIEAgentLegacy.prototype.disableUserSelect = function(element) {
  AdfAssert.assertDomElement(element);
  element.attachEvent("onselectstart", AdfIEAgentLegacy._doNothing)
};
AdfIEAgentLegacy.prototype.enableUserSelect = function(element) {
  AdfAssert.assertDomElement(element);
  element.detachEvent("onselectstart", AdfIEAgentLegacy._doNothing)
};
AdfIEAgentLegacy.prototype.stopPropagation = function(evt) {
  evt.cancelBubble = true
};
AdfIEAgentLegacy.prototype.preventDefault = function(evt) {
  evt.returnValue = false;
  var keyCode = evt.keyCode;
  if(keyCode && keyCode != 17 && keyCode != 16 && this.getEventTarget(evt).type != "file") {
    try {
      evt.keyCode = 0
    }catch(e) {
      AdfLogger.LOGGER.warning("Error slamming keycode:", AdfUIUtils.getPropertiesAsString(evt))
    }
  }
};
AdfIEAgentLegacy.prototype.isDefaultPrevented = function(evt) {
  return evt.returnValue === false
};
AdfIEAgentLegacy.prototype.checkMouseOutEvent = function(element, evt) {
  var inside = false;
  var toElem = evt.toElement;
  while(toElem != null) {
    if(toElem == element) {
      inside = true;
      break
    }
    toElem = toElem.parentNode
  }
  return!inside
};
AdfIEAgentLegacy.prototype.isLeftButton = function(evt) {
  return this.getDomWindow().event.button == 1
};
AdfIEAgentLegacy.prototype.getMousePosition = function(evt) {
  var domDocument = this.getDomDocument();
  var docElement = domDocument.documentElement;
  return{x:evt.clientX + docElement.scrollLeft - docElement.clientLeft, y:evt.clientY + docElement.scrollTop - docElement.clientTop}
};
AdfIEAgentLegacy.prototype.startMouseEventCapture = function(listenerMap) {
  var documentElement = this.getDomDocument().documentElement;
  AdfAssert.assert(!documentElement[AdfIEAgentLegacy._IN_CAPTURE]);
  documentElement[AdfIEAgentLegacy._IN_CAPTURE] = true;
  documentElement.setCapture();
  for(type in listenerMap) {
    if(!(type in AdfAgent.KEY_EVENTS)) {
      documentElement.attachEvent("on" + type, listenerMap[type])
    }
  }
};
AdfIEAgentLegacy.prototype.stopMouseEventCapture = function(listenerMap) {
  var documentElement = this.getDomDocument().documentElement;
  AdfAssert.assert(documentElement[AdfIEAgentLegacy._IN_CAPTURE]);
  documentElement[AdfIEAgentLegacy._IN_CAPTURE] = false;
  documentElement.releaseCapture();
  for(type in listenerMap) {
    if(!(type in AdfAgent.KEY_EVENTS)) {
      documentElement.detachEvent("on" + type, listenerMap[type])
    }
  }
};
AdfIEAgentLegacy.prototype.setCursor = function(domElement, cursor, onTargetElement) {
  AdfAssert.assertDomElement(domElement);
  AdfAssert.assertString(cursor);
  var documentElement = domElement.ownerDocument.documentElement;
  if(documentElement[AdfIEAgentLegacy._IN_CAPTURE] && (onTargetElement == undefined || onTargetElement == false)) {
    domElement.style.cursor = cursor;
    domElement = documentElement
  }
  domElement.style.cursor = cursor
};
AdfIEAgentLegacy.prototype.setImageSource = function(img, src) {
  var targets = this._imageURLs[src];
  if(targets == AdfIEAgentLegacy._IMG_URL_LOADED) {
    img.src = src
  }else {
    if(targets) {
      targets.push(img)
    }else {
      var imageURLs = this._imageURLs;
      targets = new Array;
      imageURLs[src] = targets;
      targets.push(img);
      var image = new Image;
      image.onreadystatechange = AdfIEAgentLegacy._imageReadyCallback;
      targets.image = image;
      image._src = src;
      image.src = src
    }
  }
};
AdfIEAgentLegacy.prototype.createXmlDocument = function() {
  if(window.ActiveXObject) {
    try {
      return new ActiveXObject("Msxml2.DOMDocument")
    }catch(e) {
    }
  }
  var activeXWarningMessage = AdfPage.PAGE.getLookAndFeel().getTranslatedString("af_document.ACTIVEX_UNSUPPORTED");
  alert(activeXWarningMessage);
  return null
};
AdfIEAgentLegacy.prototype.getNodeXml = function(node) {
  return node.xml
};
AdfIEAgentLegacy.prototype.getFormElement = function(form, elementName) {
  var element = null;
  for(var i = 0;i < form.elements.length;i++) {
    var field = form.elements[i];
    if(field.name == elementName) {
      element = field;
      break
    }
  }
  return element
};
AdfIEAgentLegacy.prototype.CreateNativeLogWriter = function() {
  var nativeLogWriter = new AdfIELogWriter;
  var domWindow = this.getDomWindow();
  var console = domWindow.console;
  if(console && console.log) {
    return new AdfIEConsoleLogWriter(domWindow, nativeLogWriter)
  }else {
    return nativeLogWriter
  }
};
AdfIEAgentLegacy.prototype.setOpacity = function(element, opacityPercent) {
  var filters = element.getAttribute("filters");
  var filter = filters ? filters["alpha"] : null;
  if(filter == null) {
    if(opacityPercent != 100) {
      element.style.filter += "alpha(opacity\x3d" + opacityPercent + ")"
    }
  }else {
    filter.opacity = opacityPercent;
    filter.enabled = opacityPercent < 100
  }
};
AdfIEAgentLegacy.prototype.execScript = function(ownerWindow, scriptText) {
  if(scriptText && scriptText.length > 0) {
    ownerWindow.execScript(scriptText)
  }
};
AdfIEAgentLegacy.prototype.createStyle = function(content) {
  var style = document.createElement("style");
  style.setAttribute("type", "text/css");
  style.styleSheet.cssText = content;
  var head = AdfDomUtils.getFirstDescendentElement(AdfAgent.AGENT.getDomDocument().documentElement, "HEAD");
  head.appendChild(style);
  return style
};
AdfIEAgentLegacy.prototype.getWindowHeight = function() {
  return this.getDomDocument().documentElement.clientHeight
};
AdfIEAgentLegacy.prototype.getWindowWidth = function() {
  return this.getDomDocument().documentElement.clientWidth
};
AdfIEAgentLegacy.prototype.hasAttribute = function(element, attribute) {
  return this.isAttributeSpecified(attribute)
};
AdfIEAgentLegacy.prototype.getIntAttribute = function(element, attrName, defaultValue) {
  AdfAssert.assert(element);
  if(element.attributes == null) {
    return defaultValue
  }
  var value = element.getAttribute(attrName);
  if(value == undefined) {
    return defaultValue
  }
  if(typeof value == "string") {
    value = parseInt(value)
  }
  return value
};
AdfIEAgentLegacy.prototype.getBooleanAttribute = function(element, attrName, defaultValue) {
  AdfAssert.assert(element);
  var value = element.getAttribute(attrName);
  if(value == true || value == false) {
    return value
  }
  return AdfIEAgentLegacy.superclass.getBooleanAttribute.call(this, element, attrName, defaultValue)
};
AdfIEAgentLegacy.prototype.isFunctionKey = function(keyEvent) {
  var keyCode = keyEvent.keyCode;
  return keyCode >= 112 && keyCode <= 123
};
AdfIEAgentLegacy.prototype.isDisabledOptionSupported = function() {
  return false
};
AdfIEAgentLegacy.prototype.isEqualIcon = function(firstIcon, secondIcon) {
  var innerHTMLComparison = firstIcon.parentNode.innerHTML == secondIcon.parentNode.innerHTML;
  if(innerHTMLComparison) {
    return true
  }
  var isFirstIconImg = AdfAgent.AGENT.getNodeName(firstIcon) == "IMG";
  var isSecondIconImg = AdfAgent.AGENT.getNodeName(secondIcon) == "IMG";
  if(isFirstIconImg && isSecondIconImg) {
    var firstIconAlt = firstIcon.getAttribute("ALT");
    var secondIconAlt = secondIcon.getAttribute("ALT");
    if(firstIcon.src != secondIcon.src || firstIconAlt != secondIconAlt) {
      return false
    }else {
      return true
    }
  }else {
    return innerHTMLComparison
  }
};
AdfIEAgentLegacy.prototype.addOption = function(element, label, value, selected, disabled, description, index) {
  if(!disabled) {
    var optionElement = this.getDomDocument().createElement("option");
    element.options.add(optionElement, index);
    if(value != null) {
      optionElement.value = value
    }
    if(label) {
      AdfAgent.AGENT.setTextContent(optionElement, label)
    }
    optionElement.selected = selected;
    if(description) {
      optionElement.title = description
    }
  }
};
AdfIEAgentLegacy.prototype.removeIdsFromDomSubTree = function(subTreeRoot) {
  var id = subTreeRoot.id;
  if(id != null && id != "") {
    subTreeRoot.id = ""
  }
  var elements = subTreeRoot.all;
  var elementCount = elements.length;
  for(var i = 0;i < elementCount;i++) {
    var element = elements(i);
    var id = element.getAttribute("id");
    if(id != null && id != "") {
      element.id = ""
    }
  }
};
AdfIEAgentLegacy.prototype.removeStyleProperty = function(element, styleProperty) {
  element.style.removeAttribute(styleProperty)
};
AdfIEAgentLegacy._imageReadyCallback = function() {
  if(this.readyState == "complete") {
    var imageURLs = AdfAgent.AGENT._imageURLs;
    var imageURL = this._src;
    var targets = imageURLs[imageURL];
    var targetCount = targets.length;
    for(var i = 0;i < targetCount;i++) {
      targets[i].src = imageURL
    }
    imageURLs[imageURL] = AdfIEAgentLegacy._IMG_URL_LOADED;
    this._src = undefined;
    targets.image = null;
    this.onreadystatechange = null
  }
};
AdfIEAgentLegacy.prototype.setTableRowHeight = function(row, height) {
  var paddingTop = 0;
  var paddingBottom = 0;
  var firstCell = row.cells[0];
  if(firstCell) {
    var style = this.getComputedStyle(firstCell);
    paddingTop = AdfAgent.getCSSLengthAsInt(style.paddingTop);
    paddingBottom = AdfAgent.getCSSLengthAsInt(style.paddingBottom);
    borderTop = AdfAgent.getCSSLengthAsInt(style.borderTopWidth);
    borderBottom = AdfAgent.getCSSLengthAsInt(style.borderBottomWidth)
  }
  row.style.height = height - paddingTop - paddingBottom - borderTop - borderBottom + "px"
};
AdfIEAgentLegacy.prototype.autoCompleteForm = function(htmlForm) {
  AdfAssert.assertDomElement(htmlForm, "FORM");
  var theExternal = this.getDomWindow().external;
  if(theExternal && typeof theExternal.AutoCompleteSaveForm != "undefined") {
    try {
      theExternal.AutoCompleteSaveForm(htmlForm)
    }catch(e) {
      AdfLogger.LOGGER.info("window.external autocomplete failed")
    }
  }else {
    AdfLogger.LOGGER.info("window.external property null, autocomplete disabled")
  }
};
AdfIEAgentLegacy.prototype.GetCssToDomPropertyNameMap = function() {
  return AdfIEAgentLegacy._CSS_TO_DOM_MAP
};
AdfIEAgentLegacy.prototype.getTableRowCells = function(tableRow) {
  var cells = tableRow.cells;
  if(!cells.length && tableRow.firstChild) {
    cells = [];
    var currRowChild = tableRow.firstChild;
    while(currRowChild) {
      if(currRowChild.nodeType == 1) {
        cells.push(currRowChild)
      }
      currRowChild = currRowChild.nextSibling
    }
  }
  return cells
};
AdfIEAgentLegacy.prototype.parseXML = function(xmlString) {
  var doc = null;
  try {
    doc = this.createXmlDocument();
    doc.loadXML(xmlString)
  }catch(e) {
    doc = null
  }
  return doc
};
AdfIEAgentLegacy.prototype.GetResizeEvents = function() {
  return AdfIEAgentLegacy._RESIZE_EVENTS
};
AdfIEAgentLegacy.prototype.cloneNode = function(domNode) {
  var targetNode;
  try {
    targetNode = domNode.cloneNode(true)
  }catch(e) {
    targetNode = domNode.cloneNode(false);
    targetNode.innerHTML = domNode.innerHTML
  }
  return targetNode
};
AdfIEAgentLegacy.prototype.clearSubtreeIds = function(element) {
  if(element.id) {
    if(typeof element.uniqueID != undefined && element.uniqueID != undefined) {
      element.id = element.uniqueID
    }else {
      element.id = ""
    }
  }
  if(element.name) {
    if(typeof element.uniqueID != undefined && element.uniqueID != undefined) {
      element.name = element.name + element.uniqueID
    }else {
      element.name = ""
    }
  }
  var currChild = element.firstChild;
  while(currChild) {
    if(currChild.nodeType == 1) {
      this.clearSubtreeIds(currChild)
    }
    currChild = currChild.nextSibling
  }
};
AdfIEAgentLegacy.prototype.IsComputedWidthAuto = function() {
  return true
};
AdfIEAgentLegacy.prototype.supportsTransientStyleClasses = function() {
  return false
};
AdfIEAgentLegacy.prototype.slice = function(file, startByte, stopByte) {
  if(typeof Blob === "undefined" || typeof Blob.prototype.slice === "undefined") {
    return undefined
  }
  if(file == null) {
    return null
  }
  if(file.slice) {
    return file.slice(startByte, stopByte)
  }
  return undefined
};
AdfIEAgentLegacy.prototype.toISOString = function(date) {
  AdfAssert.assert(date != null);
  if(date.toISOString) {
    return date.toISOString()
  }
  var pad = function(number) {
    return number < 10 ? "0" + number : number
  };
  return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate()) + "T" + pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + "." + (date.getUTCMilliseconds() / 1E3).toFixed(3).slice(2, 5) + "Z"
};
AdfIEAgentLegacy._IMG_URL_LOADED = new Object;
AdfIEAgentLegacy._REDISTRIBUTE_EVENTS = ["onclick", "ondblclick", "onkeydown", "onkeyup", "onkeypress", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onfocusin", "onfocusout", "oncontextmenu"];
AdfIEAgentLegacy._CSS3_TO_IE_MAP = {"auto":"auto", "default":"default", "none":"default", "context-menu":"default", "help":"help", "pointer":"pointer", "progress":"progress", "wait":"wait", "cell":"crosshair", "crosshair":"crosshair", "text":"text", "vertical-text":"vertical-text", "alias":"crosshair", "copy":"crosshair", "move":"move", "no-drop":"no-drop", "not-allowed":"not-allowed", "e-resize":"e-resize", "n-resize":"n-resize", "ne-resize":"ne-resize", "nw-resize":"nw-resize", "s-resize":"s-resize", 
"se-resize":"se-resize", "sw-resize":"sw-resize", "w-resize":"w-resize", "ew-resize":"e-resize", "ns-resize":"n-resize", "nesw-resize":"move", "col-resize":"col-resize", "row-resize":"row-resize", "all-scroll":"all-scroll", "inherit":"auto"};
AdfIEAgentLegacy._CSS_TO_DOM_MAP = {"float":"styleFloat"};
AdfIEAgentLegacy._RESIZE_EVENTS = ["resize"];
