function AdfDhtmlChooseDateDOMUtils(){}AdfDhtmlChooseDateDOMUtils.buildDomFromStructure=function(a){AdfAssert.assertObject(a);var b=AdfAgent.AGENT,d=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes(a.node,{}),e;for(e in a)switch(e){case "children":for(var f=a[e],g=0;g<f.length;g++)d.appendChild(AdfDhtmlChooseDateDOMUtils.buildDomFromStructure(f[g]));break;case "text-content":d.textContent=a[e];break;case "node":break;default:b.setAttribute(d,e,a[e])}return d};
AdfDhtmlChooseDateDOMUtils.createAndAppendElement=function(a,b,d){AdfAssert.assertNonEmptyString(a);AdfAssert.assertObject(b);AdfAssert.assertDomElement(d);a=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes(a,b);d.appendChild(a);return a};AdfDhtmlChooseDateDOMUtils.createElementWithAttributes=function(a,b){AdfAssert.assertNonEmptyString(a);AdfAssert.assertObject(b);var d=document.createElement(a);AdfDomUtils.writeAttributesToElement(d,b);return d};
AdfDhtmlChooseDateDOMUtils.swapElement=function(a,b){AdfAssert.assertDomElement(a);AdfAssert.assertDomElement(b);var d=AdfAgent.AGENT;d.elementsRemoved(a);if("gecko"==d.getPlatform()&&3.5>d.getVersion()){var e=document.createElement("span");e.appendChild(b);var f=a.parentNode;f.innerHTML=e.innerHTML;d.elementsAdded(f)}else a.parentNode.replaceChild(b,a),d.elementsAdded(b)};
AdfDhtmlChooseDateDOMUtils.removeAllChildren=function(a){AdfAssert.assertDomElement(a);AdfAgent.AGENT.elementsRemoved(a);AdfPage.PAGE.removeComponentsInSubtree(a);for(var b=!1;a.lastChild;)a.removeChild(a.lastChild),b=!0;return b};AdfDhtmlChooseDateDOMUtils.getParentTableElement=function(a,b){AdfAssert.assertDomElement(b);AdfAssert.assertDomElement(a);for(var d=null;!d&&b&&b!=a&&1==b.nodeType;)if("TABLE"==b.tagName.toUpperCase()){d=b;break}else b=b.parentNode;return d};
AdfDhtmlChooseDateDOMUtils.buildSelectOneChoiceElement=function(a,b,d,e,f){AdfAssert.assertNonEmptyString(a);AdfAssert.assertString(b);AdfAssert.assertString(d);AdfAssert.assert(null!=e);AdfAssert.assert(null!=f);var g=AdfPage.PAGE.getLookAndFeel(),h=AdfRichUIPeer.CreateSubId(a,"content");e=AdfDhtmlChooseDateDOMUtils._buildSelectOneChoiceOptions(e,f);a={node:"span",id:a,"class":g.getStyleClass("af|chooseDate::choice-list"),children:[{node:"select",id:h,name:a,"class":b,title:e.title,children:e.optionsArray},
{node:"label","for":h,"class":"p_OraHiddenLabel","text-content":d}]};return AdfDhtmlChooseDateDOMUtils.buildDomFromStructure(a)};AdfDhtmlChooseDateDOMUtils._buildSelectOneChoiceOptions=function(a,b){for(var d={optionsArray:[],title:""},e=0;e<a.length;e++){var f=AdfDhtmlChooseDateDOMUtils.getKeys(a[e])[0],g=a[e][f],h={node:"option",value:f};b==f&&(h.selected=!0,d.title=g);h.title=g;h["text-content"]=g;d.optionsArray[e]=h}return d};
AdfDhtmlChooseDateDOMUtils.buildNumberSpinboxElement=function(a,b,d,e,f,g,h,k){AdfAssert.assertString(a);AdfAssert.assertNumber(d);AdfAssert.assertNumber(e);AdfAssert.assertNumber(f);AdfAssert.assertBoolean(g);AdfAssert.assertString(h);AdfAssert.assertPrototype(k,TrNumberConverter);var l=AdfPage.PAGE.getLookAndFeel(),m=AdfRichUIPeer.CreateSubId(a,AdfDhtmlChooseDatePeer._INCREMENT_ID),n=AdfRichUIPeer.CreateSubId(a,AdfDhtmlChooseDatePeer._DECREMENT_ID),q=AdfRichUIPeer.CreateSubId(a,"content");g={node:"div",
id:a,"class":l.getStyleClass("af|chooseDate::spinbox"),_adfinc:m,_adfdec:n,_adfLeadingZero:g?"true":"",children:[{node:"table",cellpadding:0,cellspacing:0,border:0,summary:"",role:"presentation",children:[{node:"tbody"}]}]};g.children[0].children[0].children=[{node:"tr",children:[{node:"td",children:[{node:"input",id:q,name:a,style:"text-align: right;width:auto;","class":l.getStyleClass("af|chooseDate::spinbox-content"),size:f,autocomplete:"off",type:"text",value:k.getAsString(b),role:"spinbutton",
"aria-valuemax":e,"aria-valuemin":d,title:b},{node:"label","for":q,"class":"p_OraHiddenLabel","text-content":h}]},{node:"td",children:[{node:"div","class":l.getStyleClass("af|chooseDate::increment-cell"),children:[{node:"a",role:"button",tabindex:"-1","class":l.getStyleClass("af|chooseDate::spinbox-incrementor-icon-style"),id:m,title:l.getTranslatedString("af_inputNumberSpinbox.TIP_INCREMENT")}]},{node:"div","class":l.getStyleClass("af|chooseDate::decrement-cell"),children:[{node:"a",role:"button",
tabindex:"-1","class":l.getStyleClass("af|chooseDate::spinbox-decrementor-icon-style"),id:n,title:l.getTranslatedString("af_inputNumberSpinbox.TIP_DECREMENT")}]}]}]}];return AdfDhtmlChooseDateDOMUtils.buildDomFromStructure(g)};
AdfDhtmlChooseDateDOMUtils.getKeys=function(a){AdfAssert.assert(null!=a);var b=Object.prototype.hasOwnProperty,d=!{toString:null}.propertyIsEnumerable("toString"),e="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),f=e.length;if("object"!==typeof a&&("function"!==typeof a||null===a))throw new TypeError("AdfDhtmlChooseDatePeer.getKeys called on non-object");var g=[],h;for(h in a)b.call(a,h)&&g.push(h);if(d)for(d=0;d<f;d++)b.call(a,e[d])&&g.push(e[d]);
return g};