function AdfDhtmlPopupSelector() {
  this.Init()
}
AdfObject.createSubclass(AdfDhtmlPopupSelector, AdfDhtmlPopupWindow);
AdfDhtmlPopupSelector.InitClass = function() {
  this._STYLECLASS = "AFPopupSelector";
  this._HEADER_STYLECLASS = "AFPopupSelectorHeader";
  this._HEADER_START_STYLECLASS = "AFPopupSelectorHeaderStart";
  this._HEADER_END_STYLECLASS = "AFPopupSelectorHeaderEnd";
  this._CONTENT_STYLECLASS = "AFPopupSelectorContent";
  this._CONTENT_START_STYLECLASS = "AFPopupSelectorContentStart";
  this._CONTENT_END_STYLECLASS = "AFPopupSelectorContentEnd";
  this._FOOTER_STYLECLASS = "AFPopupSelectorFooter";
  this._FOOTER_START_STYLECLASS = "AFPopupSelectorFooterStart";
  this._FOOTER_END_STYLECLASS = "AFPopupSelectorFooterEnd";
  this._POPUP_LIVE_CONTENT_ID = "AFPopupLiveContent"
};
AdfDhtmlPopupSelector.prototype.Init = function() {
  AdfDhtmlPopupSelector.superclass.Init.call(this)
};
AdfDhtmlPopupSelector.prototype.CreateDomElement = function() {
  var page = AdfPage.PAGE;
  var domDocument = page.getDomDocument();
  var rootElement = domDocument.createElement("div");
  var laf = page.getLookAndFeel();
  var el = this.CreateTable(3, 3);
  el.cellPadding = 0;
  el.cellSpacing = 0;
  el.setAttribute("role", "presentation");
  rootElement.appendChild(el);
  var tds = el.getElementsByTagName("td");
  tds[1].innerHTML = "\x26#160;";
  var contentElement = tds[4];
  if(this.NeedsCloseLink()) {
    var innerDiv = domDocument.createElement("div");
    tds[4].appendChild(innerDiv);
    var closeLabel = laf.getTranslatedString("af_popup.TIP_DISMISS");
    innerDiv.innerHTML = '\x3ca href\x3d"javascript:;" style\x3d"position:absolute;top:-999px;" ' + 'onclick\x3d"AdfPage.PAGE.getAutoDismissalManager().dismiss(this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode)"\x3e' + closeLabel + "\x3c/a\x3e";
    innerDiv = domDocument.createElement("div");
    tds[4].appendChild(innerDiv);
    contentElement = innerDiv
  }
  tds[3].innerHTML = "\x26#160;";
  tds[5].innerHTML = "\x26#160;";
  tds[7].innerHTML = "\x26#160;";
  this.SetContentParent(contentElement);
  var windowClass = AdfDhtmlPopupSelector;
  var myClass = AdfDhtmlPopupSelector;
  AdfDomUtils.addCSSClassName(rootElement, laf.getStyleClass(windowClass._STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[0], laf.getStyleClass(myClass._HEADER_START_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[1], laf.getStyleClass(myClass._HEADER_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[2], laf.getStyleClass(myClass._HEADER_END_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[3], laf.getStyleClass(myClass._CONTENT_START_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[4], laf.getStyleClass(myClass._CONTENT_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[5], laf.getStyleClass(myClass._CONTENT_END_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[6], laf.getStyleClass(myClass._FOOTER_START_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[7], laf.getStyleClass(myClass._FOOTER_STYLECLASS));
  AdfDomUtils.addCSSClassName(tds[8], laf.getStyleClass(myClass._FOOTER_END_STYLECLASS));
  return rootElement
};
AdfDhtmlPopupSelector.prototype.SetContentParent = function(contentParentElement) {
  this._contentElement = contentParentElement
};
AdfDhtmlPopupSelector.prototype.GetContentParent = function() {
  return this._contentElement
};
AdfDhtmlPopupSelector.prototype.GetAnimationDurationSkinProperty = function() {
  return".AFPopupSelector-tr-open-animation-duration"
};
AdfDhtmlPopupSelector.prototype.GetAnimateSkinProperty = function() {
  return".AFPopupSelector-tr-animate"
};
AdfDhtmlPopupSelector.prototype.setAccessibleAttrs = function(hints) {
  var wrapper = this.getElement();
  wrapper.setAttribute("role", "dialog");
  var ariaLabel = hints[AdfDhtmlPopupHints.ARIA_LABEL];
  if(ariaLabel) {
    wrapper.setAttribute("aria-label", ariaLabel)
  }
};
AdfDhtmlPopupSelector.prototype.show = function(hints) {
  if(hints && hints[AdfDhtmlPopupHints.ALIGN] && !hints[AdfDhtmlPopupHints.ALIGN_ELEMENT]) {
    var launchSourceId = hints[AdfRichPopup.HINT_LAUNCH_ID];
    if(launchSourceId) {
      hints[AdfRichPopup.HINT_ALIGN_ID] = launchSourceId;
      hints[AdfDhtmlPopupHints.ALIGN_ELEMENT] = AdfAgent.AGENT.getElementById(launchSourceId)
    }
  }
  if(hints && hints[AdfDhtmlPopupHints.ALIGN_ELEMENT] && !hints[AdfDhtmlPopupHints.ALIGN]) {
    hints[AdfDhtmlPopupHints.ALIGN] = AdfRichPopup.ALIGN_AFTER_START
  }
  AdfDhtmlPopupSelector.superclass.show.call(this, hints)
};
