var BasicInfo=Class.create({windowList:$H(),initialize:function(){setTimeout(this.poll.bind(this),15000)},showInfo:function(f,h,d){if(d==null){d=2000}var b=document.viewport.getWidth()*2/3;var a=document.viewport.getScrollOffsets().left+document.viewport.getWidth()/2-b/2;var g=document.viewport.getScrollOffsets().top+document.viewport.getHeight()/3;if(d>0){var e=Builder.node("div","");e.innerHTML=f;var c=Builder.node("div",{"class":"infobox",style:"display:block;position:absolute;left:"+a+"px;top:"+g+"px;z-index:11000;width:"+b+"px;"},[Builder.node("div",{"class":"infoboxhead"},h),e,Builder.node("div",{"class":"clear"})]);document.body.appendChild(c);new Effect.Grow(c,{element:c,afterFinish:function(){setTimeout(basicInfo.hide.bind(basicInfo,this.element),d)}})}else{var c=Builder.node("div",{"class":"infobox",style:"display:block;position:absolute;left:"+a+"px;top:"+g+"px;z-index:11000;width:"+b+"px;",onclick:"basicInfo.hide(this)"},[Builder.node("div",{"class":"infoboxhead"},h),f,Builder.node("div",{"class":"clear"})]);document.body.appendChild(c);new Effect.Grow(c,{element:c})}},hide:function(a){new Effect.Shrink(a,{element:a,afterFinish:function(){document.body.removeChild(this.element)}})},poll:function(){new Ajax.Updater("basicinforeload",window.contextPath+"/basic/info/poll"+window.sessionPath,{insertion:Insertion.Bottom,evalScripts:true,parameters:{time:cbasicinfotime}});setTimeout(this.poll.bind(this),30000)},pollOnce:function(){new Ajax.Updater("basicinforeload",window.contextPath+"/basic/info/pollOnce"+window.sessionPath,{insertion:Insertion.Bottom,evalScripts:true})},windowClosed:function(a){var b=this.windowList.get(a);this.logInfo("window "+a+" closed");if(b!=undefined){this.logInfo("removed from list");this.windowList.unset(a)}return true},insertSession:function(b){if(b.indexOf("http")==0){return b}var a=b.indexOf("?");var d=b,c="";if(a>0){d=b.substring(0,a);c=b.substring(a)}a=d.indexOf(";");if(a>0){d=d.substring(0,a)}return d+window.sessionPath+c},openAjaxWindow:function(c,g,a,d,b,f){b=this.insertSession(b);var e=$H({resizable:false,maximizable:false,minimizable:false,closable:true,showEffect:Element.show,hideEffect:Element.hide,destroyOnClose:true,className:"mac_os_x",width:a,height:d,focus:true,centered:true,modal:true,title:g});e.update(f);if(this.windowList.get(c)==undefined){this.windowList.set(c,new Window(c,e.toObject()));this.windowList.get(c).setCloseCallback(this.windowClosed.bind(this,c));this.windowList.get(c).setAjaxContent(b,{},e.get("centered"),e.get("modal"));this.windowList.get(c).toFront()}if(e.get("focus")){self.focus()}},openHTMLWindow:function(b,i,a,c,d,g){var f=$H({resizable:false,maximizable:false,minimizable:false,closable:true,showEffect:Element.show,hideEffect:Element.hide,destroyOnClose:true,className:"mac_os_x",width:a,height:c,focus:true,centered:true,modal:true,title:i});f.update(g);if(this.windowList.get(b)==undefined){this.windowList.set(b,new Window(b,f.toObject()));this.windowList.get(b).setCloseCallback(this.windowClosed.bind(this,b));var e=this.windowList.get(b);e.setHTMLContent(d);e.show(f.get("modal"))}e.toFront();if(f.get("focus")){self.focus()}},closeWindow:function(a){if(this.windowList.get(a)!=undefined){this.windowList.get(a).close()}},include:function(src,sMethod,oCallback){if((eval("typeof("+sMethod+")")==="function")){return}var oHead=document.getElementsByTagName("head")[0];var oScript=document.createElement("script");oScript.type="text/javascript";oScript.src=src;if(oCallback){oScript.onload=oCallback;oScript.onreadystatechange=function(){if(this.readyState=="complete"){oCallback()}}}oHead.appendChild(oScript)},onFunctionAvailable:function(sMethod,oCallback,oObject,bScope){if(typeof(eval(sMethod))==="function"){bScope?oCallback.call(oObject):oCallback(oObject)}else{setTimeout(function(){this.onFunctionAvailable.bind(this,sMethod,oCallback,oObject,bScope)}),50}},logInfo:function(a){if(typeof(console)!=="undefined"&&typeof(console.info)==="function"){console.info(a)}}});var basicInfo=null;basicInfo=new BasicInfo();document.observe("dom:loaded",function(){});
