Effect.ResizeWindow=Class.create();Object.extend(Object.extend(Effect.ResizeWindow.prototype,Effect.Base.prototype),{initialize:function(G,F,E,D,A){this.window=G;this.window.resizing=true;var C=G.getSize();this.initWidth=parseFloat(C.width);this.initHeight=parseFloat(C.height);var B=G.getLocation();this.initTop=parseFloat(B.top);this.initLeft=parseFloat(B.left);this.width=D!=null?parseFloat(D):this.initWidth;this.height=A!=null?parseFloat(A):this.initHeight;this.top=F!=null?parseFloat(F):this.initTop;this.left=E!=null?parseFloat(E):this.initLeft;this.dx=this.left-this.initLeft;this.dy=this.top-this.initTop;this.dw=this.width-this.initWidth;this.dh=this.height-this.initHeight;this.r2=$(this.window.getId()+"_row2");this.content=$(this.window.getId()+"_content");this.contentOverflow=this.content.getStyle("overflow")||"auto";this.content.setStyle({overflow:"hidden"});if(this.window.options.wiredDrag){this.window.currentDrag=G._createWiredElement();this.window.currentDrag.show();this.window.element.hide()}this.start(arguments[5])},update:function(B){var C=Math.floor(this.initWidth+this.dw*B);var A=Math.floor(this.initHeight+this.dh*B);var E=Math.floor(this.initTop+this.dy*B);var D=Math.floor(this.initLeft+this.dx*B);if(window.ie){if(Math.floor(A)==0){this.r2.hide()}else{if(Math.floor(A)>1){this.r2.show()}}}this.r2.setStyle({height:A});this.window.setSize(C,A);this.window.setLocation(E,D)},finish:function(A){if(this.window.options.wiredDrag){this.window._hideWiredElement();this.window.element.show()}this.window.setSize(this.width,this.height);this.window.setLocation(this.top,this.left);this.r2.setStyle({height:null});this.content.setStyle({overflow:this.contentOverflow});this.window.resizing=false}});Effect.ModalSlideDown=function(B){var C=WindowUtilities.getWindowScroll();var A=B.getStyle("height");B.setStyle({top:-(parseFloat(A)-C.top)+"px"});B.show();return new Effect.Move(B,Object.extend({x:0,y:parseFloat(A)},arguments[1]||{}))};Effect.ModalSlideUp=function(B){var A=B.getStyle("height");return new Effect.Move(B,Object.extend({x:0,y:-parseFloat(A)},arguments[1]||{}))};PopupEffect=Class.create();PopupEffect.prototype={initialize:function(A){this.html=$(A);this.options=Object.extend({className:"popup_effect",duration:0.4},arguments[1]||{})},show:function(D,B){var A=Position.cumulativeOffset(this.html);var C=this.html.getDimensions();var F=D.win.getBounds();this.window=D.win;if(!this.div){this.div=document.createElement("div");this.div.className=this.options.className;this.div.style.height=C.height+"px";this.div.style.width=C.width+"px";this.div.style.top=A[1]+"px";this.div.style.left=A[0]+"px";this.div.style.position="absolute";document.body.appendChild(this.div)}if(this.options.fromOpacity){this.div.setStyle({opacity:this.options.fromOpacity})}this.div.show();var E="top:"+F.top+";left:"+F.left+";width:"+F.width+";height:"+F.height;if(this.options.toOpacity){E+=";opacity:"+this.options.toOpacity}new Effect.Morph(this.div,{style:E,duration:this.options.duration,afterFinish:this._showWindow.bind(this)})},hide:function(D,B){var A=Position.cumulativeOffset(this.html);var C=this.html.getDimensions();this.window.visible=true;var F=this.window.getBounds();this.window.visible=false;this.window.element.hide();this.div.style.height=F.height;this.div.style.width=F.width;this.div.style.top=F.top;this.div.style.left=F.left;if(this.options.toOpacity){this.div.setStyle({opacity:this.options.toOpacity})}this.div.show();var E="top:"+A[1]+"px;left:"+A[0]+"px;width:"+C.width+"px;height:"+C.height+"px";if(this.options.fromOpacity){E+=";opacity:"+this.options.fromOpacity}new Effect.Morph(this.div,{style:E,duration:this.options.duration,afterFinish:this._hideDiv.bind(this)})},_showWindow:function(){this.div.hide();this.window.element.show()},_hideDiv:function(){this.div.hide()}};