// aquamsgBox http://www.xmiz.net var aquaimgpath='MBoximg/aquamsgBox/';if(typeof(_isIE)=='undefined')var _isIE=(navigator.userAgent.match(/Gecko/))?false:true;var aquamsgBox={msgobj:null,bglayer:null,msgtitle:null,msgdesc:null,msgicon:null,msgbtn:null,blnDrag:false,curmove:{'x':0,'y:':0},returnValue:false,returnFunction:null,initDesign:function(){if(document.body)var b=document.body;else if(document.documentElement)var b=document.documentElement;if(b.nodeName!='BODY'){for(var i=0;i5||parseInt(e.clientX-aquamsgBox.curmove.x)<-5){aquamsgBox.msgobj.style.left=parseInt(e.clientX)-parseInt(aquamsgBox.msgobj.offsetWidth)/3+document.documentElement.scrollLeft+'px';aquamsgBox.curmove.x=e.clientX;}if(parseInt(e.clientY-aquamsgBox.curmove.y)>5||parseInt(e.clientY-aquamsgBox.curmove.y)<-5){aquamsgBox.msgobj.style.top=parseInt(e.clientY)-15+document.documentElement.scrollTop+'px';aquamsgBox.curmove.y=e.clientY;}}},cancelEvent:function(e){return false;},resizecheck:function(){aquamsgBox.bglayer.style.height=(document.body.offsetHeight>document.documentElement.offsetHeight?document.body.offsetHeight:document.documentElement.offsetHeight)+'px';aquamsgBox.bglayer.style.width=(document.body.offsetWidth>document.documentElement.offsetWidth?document.body.offsetWidth:document.documentElement.offsetWidth)+'px';},bgshow:function(val){if(this.bglayer==null){var obj=document.createElement('DIV');obj.className='aquamsgBoxbg';try{obj.style.opacity=0.8;}catch(e){}try{obj.style.MozOpacity=0.8;}catch(e){}try{obj.style.filter='alpha(opacity=80)';}catch(e){}try{obj.style.KhtmlOpacity=0.8;}catch(e){}document.body.appendChild(obj);this.bglayer=obj;}if(val==1){var _height=this.trueBody().scrollHeight;var _width=this.trueBody().scrollWidth;_height=_height>this.trueBody().offsetHeight?_height:this.trueBody().offsetHeight;_width=_width>this.trueBody().offsetWidth?_width:this.trueBody().offsetWidth;this.bglayer.style.height=_height+'px';this.bglayer.style.width=_width+'px';this.bglayer.style.display='block';}else{this.bglayer.style.display='none';}},init:function(getTitle,getMsg,getBtn,getIcon,returnObj){if(this.msgobj==null)var result=this.initDesign();if(result==false){return false;}if(!getTitle)getTitle='MessageBox Title';if(!getMsg)getMsg='MessageBox Description';if(!getBtn)getBtn='OK';if(!getIcon)getIcon=1;this.msgobj.style.left='40%';this.msgobj.style.top='40%';this.msgtitle.innerHTML=getTitle;this.msgdesc.innerHTML=getMsg.replace(/\n/g,'
');this.returnFunction=null;if(returnObj!=null)this.returnFunction=returnObj;if(document.documentElement.scrollTop!=0){this.msgobj.style.top=document.documentElement.scrollTop+(document.documentElement.offsetHeight/3)+'px';}else if(document.body.scrollTop!=0){this.msgobj.style.top=document.body.scrollTop+(document.body.offsetHeight/4)+'px';}if(document.documentElement.scrollLeft!=0)this.msgobj.style.left=document.documentElement.scrollLeft+(document.documentElement.offsetWidth/3)+'px';else if(document.body.scrollLeft!=0)this.msgobj.style.left=document.body.scrollLeft+(document.body.offsetWidth/4)+'px';if(getIcon!=0&&getIcon<5){if(getIcon==1)this.msgicon.src=aquaimgpath+'icon_info.gif';else if(getIcon==2)this.msgicon.src=aquaimgpath+'icon_question.gif';else if(getIcon==3)this.msgicon.src=aquaimgpath+'icon_warning.gif';else if(getIcon==4)this.msgicon.src=aquaimgpath+'icon_error.gif';this.msgicon.style.display='block';}var btnstr='';var btnarr=getBtn.split(';')[0].split('|');var cnt=btnarr.length;for(var i=0;i';}this.msgbtn.innerHTML=btnstr;return true;},show:function(title,msg,returnobj,btn,icontype){var result=this.init(title,msg,btn,icontype,returnobj);if(result==true){this.bgshow(1);if(_isIE)window.attachEvent('onresize',aquamsgBox.resizecheck);else window.addEventListener('resize',aquamsgBox.resizecheck,false);this.msgobj.style.display='block';if(btn!=undefined&&btn.split(';')[1]!=undefined)this.setFocus(btn.split(';')[1]);else this.setFocus();}else{window.alert(msg);}},hide:function(){this.bgshow(0);this.msgobj.style.display='none';if(_isIE){window.document.detachEvent('onmousemove',aquamsgBox.draging);window.document.detachEvent('onselectstart',aquamsgBox.cancelEvent);window.document.detachEvent('onmouseup',aquamsgBox.dragEnd);window.detachEvent('onresize',aquamsgBox.resizecheck);}else{window.document.removeEventListener('mousemove',aquamsgBox.draging,false);window.document.removeEventListener('mouseup',aquamsgBox.dragEnd,false);window.removeEventListener('resize',aquamsgBox.resizecheck,false);}if(this.returnFunction!=null)this.returnFunction();},setValue:function(val){if(typeof(val)=='string')this.returnValue=val;else this.returnValue=val;},getValue:function(){return this.returnValue;},setFocus:function(val){if(!val){if(this.msgbtn.hasChildNodes()==false)return false;if(this.msgbtn.firstChild.nodeName=='INPUT')this.msgbtn.firstChild.focus();else this.msgbtn.firstChild.nextSibling.focus();return true;}else{if(this.msgbtn.hasChildNodes()==false)return false;for(var i=0;i