Railo.adapters.Window=function(){var a={};return{getWindowObject:function(c){try{var b=a[c].object;if(!b){Railo.globalErrorHandler("window.windowNotFound",[n])}}catch(d){alert(d)}return b},windowExists:function(b){return a[b]!=undefined},create:function(e,h,d,c,i){if(!c){c={}}c.title=h;c.refreshOnShow=c.refreshOnShow?c.refreshOnShow:false;c.width=c.width?c.width:500;c.height=c.height?c.height:300;c.minWidth=c.minWidth?c.minWidth:150;c.minHeight=c.minHeight?c.minHeight:150;if(c.modal=="undefined"){c.modal=false}if(c.resizable=="undefined"){c.resizable=true}if(c.draggable=="undefined"){c.draggable=true}if(c.x!="undefined"&&c.x>=0&&c.y!="undefined"&&c.y>=0){c.position=[c.x,c.y]}c.autoOpen=false;if(a[e]){Railo.globalErrorHandler("window.windowAlreadyExists",[e]);return}if(!i){var f=document.getElementById(e);if(!f){var f=document.createElement("div");f.id=e;document.getElementsByTagName("body")[0].appendChild(f)}}if((typeof(d)!=undefined)&&(!i)){var g=Math.ceil(Math.random()*1000000);i="_Railo_Win_"+g;Railo.Bind.register(i,{bindTo:e,bindExpr:[],url:d,errorHandler:"",handler:"Railo.Bind.urlBindHandler",listener:"Railo.Ajax.innerHtml"},false)}var b=$(document.getElementById(e)).dialog(c);a[e]={};a[e].object=b;a[e].options=c;a[e].bind=i;a[e].loaded=false},show:function(c){var b=this.getWindowObject(c);b.dialog("open");if(a[c].bind){if((a[c].options.refreshOnShow)||(!a[c].loaded)){Railo.Events.dispatchEvent(a[c].bind,Railo.Bind.getBind(a[c].bind));a[c].loaded=true}}},hide:function(c){var b=this.getWindowObject(c);b.dialog("close")},onHide:function(c,d){var b=this.getWindowObject(c);b.bind("dialogclose",function(){d(c)})},onShow:function(c,d){var b=this.getWindowObject(c);b.bind("dialogopen",function(){d(c)})}}};