obips.TextDialog=function(){};obips.TextDialog.Model=function(c,b,a,e,d){obips.TextDialog.Model.baseConstructor.call(this,c,a,e,true);this.message=b;this.titleImage=d};extend(obips.TextDialog.Model,obips.Dialog.Model);obips.TextDialog.Viewer=function(b,a){obips.TextDialog.Viewer.baseConstructor.call(this,b,a);this.textDiv=document.createElement("div");this.textDiv.style.fontWeight="bold";this.constructTextDiv();this.bodyDiv.appendChild(this.textDiv);this.floatingWindowManager.prepareDisplay(this);if(this.bodyDiv.offsetWidth>500){this.bodyDiv.style.width="500px"}else{if(this.textDiv.offsetWidth<this.bodyDiv.offsetWidth){this.textDiv.style.width=this.bodyDiv.offsetWidth}}if(this.textDiv.offsetHeight>400){this.textDiv.style.height="400px";this.textDiv.style.overflowY="scroll"}this.createController();if(obips.TabStop.isSupportWaiAriaOnSimpleControls()&&obips.TabStop.isSupport508()){obips.TabStop.setWaiAriaAttrs([["role","alert"]],this.textDiv)}};extend(obips.TextDialog.Viewer,obips.Dialog.Viewer);obips.TextDialog.Viewer.prototype.updateMessage=function(a,b){this.model.message=a;var c=this.textDiv.offsetWidth;obips.HTMLDOM.removeChildNodes(this.textDiv);this.constructTextDiv();if(b){this.textDiv.style.width=c}};obips.TextDialog.Viewer.prototype.constructTextDiv=function(){this.textDiv.appendChild(document.createElement("br"));var a=this.model.message.split("\\n");for(var b=0;b<a.length;b++){this.textDiv.appendChild(document.createTextNode(a[b]));this.textDiv.appendChild(document.createElement("br"))}if(a.length==1){this.textDiv.align="center"}this.textDiv.appendChild(document.createElement("p"))};obips.TextDialog.Viewer.prototype.createController=function(){this.controller=new obips.TextDialog.Controller(this)};obips.TextDialog.Viewer.prototype.updateTitle=function(){obips.HTMLDOM.removeChildNodes(this.titleSpan);if(this.model.titleImage){var a=document.createElement("img");a.src=this.model.titleImage;a.alt="";a.align="absmiddle";a.style.marginRight="6px";this.titleSpan.appendChild(a)}this.titleSpan.appendChild(document.createTextNode(this.model.titleText))};obips.TextDialog.Controller=function(a){obips.TextDialog.Controller.baseConstructor.call(this,a)};extend(obips.TextDialog.Controller,obips.Dialog.Controller);