var MsgDialog={ lastaction:null, info:function(msg) { $("msgimg").src="../../images/bg_success.gif"; $("tipmsg").innerHTML=msg; //this.showDialog(); this.showLayer("MsgDialog"); }, error:function(msg) { $("msgimg").src="../../images/bg_wrong.gif"; $("tipmsg").innerHTML=msg; //this.showDialog(); this.showLayer("MsgDialog"); }, showDialog:function() { if(overlayerinitflag==0) { initoverlayer(); } hideSelectBoxes();//隐藏页面上的所有select选择框 var arrayPageSize = getPageSize(); Element.setHeight('overlay2', arrayPageSize[1]); new Effect.Appear('overlay2', { duration: 0.2, from: 0.0, to: 0.8 }); // calculate top offset for the Login and display var arrayPageSize = getPageSize(); var arrayPageScroll = getPageScroll(); var LoginTop = arrayPageScroll[1] + (arrayPageSize[3] / 2); Element.setTop('MsgDialog', LoginTop); //Element.show($("MsgDialog")); new Effect.Appear('MsgDialog', { duration: 0.5, queue: 'end' }); }, showLayer:function(layerid) { if(overlayerinitflag==0) { initoverlayer(); } hideSelectBoxes();//隐藏页面上的所有select选择框 var arrayPageSize = getPageSize(); Element.setHeight('overlay_whiteblank', arrayPageSize[1]); Element.show($("overlay_whiteblank")); //new Effect.Appear('overlay2', { duration: 0.2, from: 0.0, to: 0.8 }); // calculate top offset for the Login and display var arrayPageSize = getPageSize(); var arrayPageScroll = getPageScroll(); var LoginTop = arrayPageScroll[1] + (arrayPageSize[3] / 2); Element.setTop(layerid, LoginTop); Element.show($(layerid)); //new Effect.Appear(layerid, { duration: 0.5}); }, closeLayer:function(layerid) { Element.hide($(layerid)); Element.hide($("overlay_whiteblank")); showSelectBoxes(); }, confirm:function(title,msg,cbfunction) { $("confirmtitle").innerHTML=title; $("confirmmsg").innerHTML=msg; $("confirmbtn").innerHTML='确认'; this.showLayer("ConfirmDialog"); } }