obiaf.ActionResultsDialog=function(){};obiaf.ActionResultsDialog.Model=function(e,d,c,f,b,a){obiaf.ActionResultsDialog.Model.baseConstructor.call(this,e,new obips.Callback(null,function(){}));this.aResults=f||new Array();this.text=d;this.bHTML=(c==true?true:false);this.nWidth=b;this.nHeight=a;this.replaceTokens()};extend(obiaf.ActionResultsDialog.Model,obips.Dialog.Model);obiaf.ActionResultsDialog.Model.prototype.replaceTokens=function(){var c=this.text.match(/@\{(\w+)\}/g);if(c){for(var b=0;b<c.length;++b){var a=c[b].match(/@\{(\w+)\}/)[1];this.text=this.text.replace("@{"+a+"}",this.aResults[a])}}};obiaf.ActionResultsDialog.Viewer=function(c,b,a){obiaf.ActionResultsDialog.Viewer.baseConstructor.call(this,c,b);this.resultsDiv=document.createElement("div");this.resultsDiv.id="actionResultsDiv";if(this.model.nWidth){this.resultsDiv.style.width=this.model.nWidth+"px"}if(this.model.nHeight){this.resultsDiv.style.height=this.model.nHeight+"px";this.resultsDiv.style.overflowY="auto"}this.addText();this.bodyDiv.appendChild(this.resultsDiv);this.controller=new obips.Dialog.Controller(this);this.cancelButton.style.display="none";this.footerDiv.style.textAlign="center";this.floatingWindowManager.prepareDisplay(this);if(this.resultsDiv.scrollHeight>this.resultsDiv.offsetHeight){this.resultsDiv.style.border="1px solid gray"}this.floatingWindowManager.display(this);if(a){this.okButton.onclick=this.goToHomePage}obips.asyncCall(new obips.Callback(null,function(d){d.focus()}),1,this.okButton);this.tabCircler=new obips.TabCircler(this.okButton,this.okButton);this.tabCircler.run(obiaf.ActionResultsDialog.Viewer.tabHandler,this)};extend(obiaf.ActionResultsDialog.Viewer,obips.Dialog.Viewer);obiaf.ActionResultsDialog.Viewer.tabHandler=function(a,b){b.tabCircler.handler(a)};obiaf.ActionResultsDialog.Viewer.prototype.goToHomePage=function(){var a=saw.commandToURL("bieeHome");parent.location.href=a};obiaf.ActionResultsDialog.Viewer.prototype.addText=function(){if(this.model.bHTML){this.resultsDiv.innerHTML=this.model.text}else{var a=this.model.text.split("\n");for(var b=0;b<a.length;b++){if(b>0){this.resultsDiv.appendChild(document.createElement("br"))}this.resultsDiv.appendChild(document.createTextNode(a[b]))}}};