var presentation={for_snapshot:function(A){this.dom.setStyles({visibility:"visible",display:"block",position:"absolute",top:100,left:100,zIndex:11});this.dom.injectInside(document.body);$E(".bottombuttons .cancel").onclick=function(){console.log("clicked on cancel");this.hide()}.bind(this);$E(".bottombuttons .ok").onclick=function(){console.log("clicked on ok");createPresentationFromSnapshot(A,this.get("name"),this.get("description"));this.hide()}.bind(this)},for_presentation:function(A){this.dom.setStyles({visibility:"visible",display:"block",position:"absolute",top:100,left:100,zIndex:11});this.dom.injectInside(document.body);$E(".bottombuttons .cancel").onclick=function(){console.log("clicked on cancel");this.hide()}.bind(this);$E(".bottombuttons .ok").onclick=function(){console.log("clicked on ok");createPresentationFromPresentation(A,this.get("name"),this.get("description"));this.hide()}.bind(this)},for_collection:function(A){this.dom.setStyles({visibility:"visible",display:"block",position:"absolute",top:100,left:100,zIndex:11});this.dom.injectInside(document.body);$E(".bottombuttons .cancel").onclick=function(){console.log("clicked on cancel");this.hide()}.bind(this);$E(".bottombuttons .ok").onclick=function(){console.log("clicked on ok");createPresentationFromCollection(A,this.get("name"),this.get("description"));this.hide()}.bind(this)},hide:function(){this.dom.setStyles({visibility:"hidden"});this.set("description","");this.set("name","")},set:function(A,B){if(A==="name"){$E("#create-presentation .name").value=B}if(A==="description"){$E("#create-presentation .description").value=B}},get:function(A){if(A==="name"){return $E("#create-presentation .name").getValue()}if(A==="description"){return $E("#create-presentation .description").getValue()}return null},dom:null};window.addEvent("domready",function(){var A=new Ajax("/cbi/presentation/widget",{method:"get",onComplete:function(B){presentation.dom=new Element("div").setHTML(B).getChildren()[0]}}).request()})