xAjax.LoaderDiv = function () { var isIE =document.all && document.all.item && (document.compatMode!='CSS1Compat'); var docElement=(isIE)? document.body : document.documentElement; var _loader; this.baseImageURL =""; this.create=function(name,img){ if (this.baseImageURL.length>0) this.baseImageURL+= (this.baseImageURL[this.baseImageURL.length-1]!="/") ? "/" : ""; else this.baseImageURL="../images/"; var urlbg= this.baseImageURL + "bgPixel.png"; _loader = document.createElement("div"); _loader.name = name; _loader.id = name; _loader.align ="center"; _loader.style.position="absolute"; _loader.style.float = "left"; _loader.style.display=""; _loader.style.border="0px solid black"; _loader.style.backgroundImage="url(" + urlbg + ")"; _loader.style.backgroundRepeat="repeat"; _loader.style.zIndex = 99; if(isIE){ _loader.style.background="white"; _loader.style.filter= "progid:DXImageTransform.Microsoft.Alpha(opacity=75);"; }else{ _loader.style.background="white"; _loader.style.cssText+="-moz-opacity: 0.75;opacity: 0.75;'"; } document.getElementById('mainFolders').appendChild(_loader); } this.show=function(b_visible){ if (b_visible){ _loader.style.width = theDocument.getWidth()-50; _loader.style.height = theDocument.getHeight()-50; _loader.style.left = 0; _loader.style.top = 0; _loader.style.zIndex=0; xAjax.LoaderDiv.allowShow=true; window.setTimeout("xAjax.LoaderDiv.showLoaderDiv('" + _loader.id + "');",1000); }else{ document.body.style.overflow=""; xAjax.LoaderDiv.allowShow=false; _loader.style.display="none"; //_message.style.display="none"; document.body.scroll="auto"; } } } xAjax.LoaderDiv.allowShow=true; xAjax.LoaderDiv.showLoaderDiv=function(loader){ if (xAjax.LoaderDiv.allowShow){ document.body.style.overflow="hidden"; window.scroll(0,0); document.getElementById(loader).style.display=""; } } var theDocument = new Object(); // Functions for find details about the user's screen // ================================================== theDocument.getWidth = function() { if (!document.compatMode || document.compatMode=="CSS1Compat") { return document.documentElement.clientWidth; } else if (document.compatMode) { return document.body.clientWidth; } return zero(self.innerWidth); } // Get the height of the viewport (viewable area) in the browser window // -------------------------------------------------------------------- theDocument.getHeight = function() { if (!window.opera && (!document.compatMode || document.compatMode=="CSS1Compat")) { return document.documentElement.clientHeight; } else if (document.compatMode && !window.opera) { return document.body.clientHeight; } return zero(self.innerHeight); }