ob=document;oi=false;oj=true;obf=navigator;obg=obf.userAgent;ora=frames;function BusyBox(id,varName,imageCount,imageNamePrefix,imageNameSuffix,imageDelay,width,height,url){this.id=id;this.ImageCount=imageCount;this.CurrentImageIndex=0;this.ImageWidth=0;this.ImageHeight=0;this.ImageNamePrefix=imageNamePrefix;this.ImageNameSuffix=imageNameSuffix;this.ImageDelay=imageDelay;this.DivID="BusyBoxDiv";this.ImgID="BusyBoxImg";this.Enabled=oj;this.Width=width;this.Height=height;this.VarName=varName;this.timeout_id=null;this.CacheImages();this.BusyBoxUrl=url;this.IFrame=ob.getElementById(this.id);this.Hide();if(this.BusyBoxUrl)this.LoadUrl(this.BusyBoxUrl);else this.RenderContent();if(!frames[this.id])this.Enabled=oi}BusyBox.prototype.GetIFrameDocument=function(){var doc;if(this.IFrame.contentDocument)doc=this.IFrame.contentDocument;else if(this.IFrame.contentWindow)doc=this.IFrame.contentWindow.document;else if(this.IFrame.document)doc=this.IFrame.document;else doc=this.IFrame.document;return doc};BusyBox.prototype.LoadUrl=function(url){var IFrameDoc=this.GetIFrameDocument();IFrameDoc.location.replace(url);};BusyBox.prototype.RenderContent=function(){var doc=this.GetIFrameDocument();var style=" style='BORDER: navy 3px solid; POSITION: absolute;' ";doc.open();doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");doc.writeln("   <div id='"+this.DivID+"' align=center "+style+">");doc.writeln("      <img id='"+this.ImgID+"' src=''>");doc.writeln("      <br><h3>Processing</h3>");doc.writeln("   </div>");doc.writeln("</body>");doc.close();};BusyBox.prototype.Resize=function(){if(BusyBox.IsBrowserIE()){var div=frames[this.id].document.getElementById(this.DivID);this.IFrame.style.width=div.offsetWidth;this.IFrame.style.height=div.offsetHeight}else{this.IFrame.style.width=this.Width;this.IFrame.style.height=this.Height}};BusyBox.prototype.Center=function(){if(!this.IFrame)return;var ogz=(ob.body.clientWidth-this.IFrame.offsetWidth)/2;var oha=(ob.body.clientHeight-this.IFrame.offsetHeight)/2;ogz+=ob.body.scrollLeft;oha+=ob.body.scrollTop;this.IFrame.style.position="absolute";this.IFrame.style.top=oha;this.IFrame.style.left=ogz};BusyBox.prototype.CacheImages=function(){this.Images=new Array(this.ImageCount);for(var i=0;i<this.ImageCount;i++){this.Images[i]=new Image();this.Images[i].src=this.ImageNamePrefix+i+this.ImageNameSuffix}};BusyBox.prototype.IsAnimating=function(){if(this.timeout_id==null)return oi;else return oj};BusyBox.prototype.IsVisible=function(){var ifrm=ob.getElementById(this.id);if(ifrm.style.visibility=="visible"&&ifrm.style.width>0)return oj;else return oi};BusyBox.prototype.Animate=function(){if(frames[this.id])frames[this.id].document.getElementById(this.ImgID).src=this.Images[this.CurrentImageIndex].src;else ob.getElementById(this.ImgID).src=this.Images[this.CurrentImageIndex].src;this.Resize();this.Center();this.CurrentImageIndex=(this.CurrentImageIndex+1)%this.ImageCount;this.timeout_id=setTimeout(this.VarName+".Animate();",this.ImageDelay);};BusyBox.prototype.StartAnimate=function(){if(this.IsAnimating())return;this.Animate();};BusyBox.prototype.StopAnimate=function(){clearTimeout(this.timeout_id);this.timeout_id=null};BusyBox.prototype.Hide=function(){this.StopAnimate();this.IFrame.style.visibility="hidden";this.IFrame.style.width=0;this.IFrame.style.height=0};BusyBox.prototype.Show=function(){if(!this.Enabled)return;if(this.IsAnimating()||this.IsVisible())return;this.Resize();this.Center();this.IFrame.style.visibility="visible";this.IFrame.style.zIndex="999999";this.StartAnimate();};BusyBox.IsBrowserIE=function(){try{return(obg.indexOf("MSIE ")>0);}catch(x){return oi}};BusyBox.IsBrowserNS=function(){try{return(obg.indexOf("Netscape")>0);}catch(x){return oi}};BusyBox.IsBrowserFirefox=function(){try{return(obg.indexOf("Firefox")>0);}catch(x){return oi}}