PHP2Ajax.LOADER_TYPE_INLINE="inline";PHP2Ajax.LOADER_TYPE_OVERPAGE="overpage";PHP2Ajax.LoadManager=function(F,B,E,A){this.id=((F)?F:"ajaxLoadManager");if(B){this.flatElement=document.getElementById(B)}this.setLoaderType(E);this.sRootUrl=((A)?A:"/");if(!document.getElementById(this.id)){preloaderHTML='<table id="'+this.id+'" class="ajaxLoader" style="padding-left: 10px; position: absolute; display: none;" border="0" cellpadding="0" cellspacing="0">';preloaderHTML+='<tr><td id="'+this.id+'_innerCell" valign="middle" align="center">';preloaderHTML+='<img src="'+this.sRootUrl+'images/ajax/loading.circle.gif" height="20" width="20" /> <b><span id="'+this.id+'Caption">Loading ...</span></b>';preloaderHTML+="</td></tr>";preloaderHTML+="</table>";if(document.body.insertAdjacentHTML==undefined){dom=document.body;var D;var C=dom.ownerDocument.createRange();C.selectNodeContents(dom);C.collapse(true);D=C.createContextualFragment(preloaderHTML);dom.insertBefore(D,dom.firstChild)}else{document.body.insertAdjacentHTML("afterbegin",preloaderHTML)}}this.loader=document.getElementById(this.id);this.captionElement=document.getElementById(this.id+"Caption");this.inlineWidth=100;this.inlineHeight=25;this.opacity=0.3};PHP2Ajax.LoadManager.prototype.setLoaderType=function(A){if(A&&(A==PHP2Ajax.LOADER_TYPE_OVERPAGE)){this.loaderType=PHP2Ajax.LOADER_TYPE_OVERPAGE}else{this.loaderType=PHP2Ajax.LOADER_TYPE_INLINE}};PHP2Ajax.LoadManager.prototype.setCaption=function(A){this.caption=A;this.captionElement.innerHTML=this.caption};PHP2Ajax.LoadManager.prototype.setClassName=function(A){this.loader.className=A};PHP2Ajax.LoadManager.prototype.show=function(){if(this.loaderType==PHP2Ajax.LOADER_TYPE_INLINE){var D=HTMLElement.findPosX(this.flatElement)+this.flatElement.offsetWidth+10;var C=HTMLElement.findPosY(this.flatElement);if(D+this.inlineWidth>=HTMLElement.getBrowserWidth()){D=D-this.flatElement.offsetWidth-20-this.inlineWidth}this.setLoaderSize(D,C,this.inlineWidth,this.inlineHeight);this.loader.style.opacity=null;this.loader.style.MozOpacity=null;if(this.loader.style.filter){this.loader.style.filter=null}}else{var D=HTMLElement.findPosX(this.flatElement);var C=HTMLElement.findPosY(this.flatElement);var B=this.flatElement.offsetWidth;var A=this.flatElement.offsetHeight;this.setLoaderSize(D,C,B,A);this.loader.style.opacity=this.opacity;this.loader.style.MozOpacity=this.opacity;if(this.loader.style.filter!=null){this.loader.style.filter="alpha(opacity="+(this.opacity*100)+")"}}this.loader.style.display="inline"};PHP2Ajax.LoadManager.prototype.setLoaderSize=function(D,C,B,A){this.loader.style.left=D+"px";this.loader.style.top=C+"px";this.loader.style.padding=0;this.loader.style.width=B+"px";this.loader.style.height=A+"px";innerCell=document.getElementById(this.id+"_innerCell");if(innerCell!=null){innerCell.style.left=D+"px";innerCell.style.top=C+"px";innerCell.style.width=B+"px";innerCell.style.height=A+"px"}};PHP2Ajax.LoadManager.prototype.hide=function(){if(typeof (this.loader)!="undefined"){this.loader.style.display="none"}};
