(function(b){b.StatusWindow=function(e,a){var f=this;f.isIE6=/MSIE [56]/.test(navigator.userAgent);e=b.extend({type:"status",width:400,height:240,onaction:function(c){if(c=="ok"){f.close()}}},e);b.Window.call(f,e,a)};b.extend(b.StatusWindow.prototype,b.Window.prototype,{setContent:function(f){var h,a,g="";if(typeof(f)!="string"){b(f).each(function(c,d){g+='<div class="statusrow"><div class="statuscol1">'+d.title+'</div><div class="statuscol2">'+d.content+"</div></div>"})}b("#"+this.id+"_statuscont").html(g||f);return this},render:function(){var f=this,e,a;b.Window.prototype.render.call(f);b.Window.prototype.setContent.call(f,'<div id="'+f.id+'_statuscont" class="statustext"></div><a href="#" class="action ok">'+b.WindowManager.i18n.ok+"</a>");e=f.features;if(a=e.content){f.setContent(a)}return f}});if(!b.CurrentWindowManager){b.extend(b.WindowManager,{status:function(f,a){var g=this,h;f=b.extend({onaction:function(c){if(c=="ok"){h.close();if(a){a.call(g,1)}}else{if(c=="close"){h.close()}}}},f);h=new b.StatusWindow(f).render();g.windows.push(h);return h.focus()},showProgress:function(h){var a=this,f,g="progressWindow";a.hideProgress();a.progress=1;h=b.extend({theme:"clearlooks2",x:-1,y:-1},h);f=b("#windowManProgressEventBlocker");if(!f[0]){b(document.body).append(b.createElm("div",{id:"windowManProgressEventBlocker","class":h.theme+"_event_blocker"}).addClass(h.theme+"_visible_event_blocker"));f=b("#windowManProgressEventBlocker")}f.show().css("z-index",a.zIndex++).css({width:b.winWidth(),height:b.winHeight(),position:a.isIE6?"absolute":"fixed"});b(document.body).appendAll(["div",{id:g,"class":h.theme+"_progress"},["div",{id:g+"_msg","class":"message"}]]);b("#"+g+"_msg").html(h.message);b("#"+g).css({left:-1000,top:-1000}).show();if(h.x==-1){h.x=Math.round((b.winWidth()/2)-(b("#"+g).width()/2))}if(h.y==-1){h.y=Math.round((b.winHeight()/2)-(b("#"+g).height()/2))}b("#"+g).css({left:h.x,top:h.y});b(a).bind("WindowManager:open",function(){a.hideProgress()})},hideProgress:function(){var a=this;if(a.progress){b("#progressWindow").remove();b("#windowManProgressEventBlocker").hide();b(a).unbind("WindowManager:open",a.hideProgress);a.progress=0}}})}})(jQuery);