      function initProgress(){
        hideProgress();
      }
        
      function Dimension(aWidth,aHeight){
        this.Width =aWidth;
        this.Height=aHeight;
      }
      
      function getPageDimension(){
        var theBody = document.getElementsByTagName("body")[0];
        var iFullWidth = getViewportWidth();
        var iFullHeight = getViewportHeight();
        var iPopHeight;
        var iPopWidth;
        
				// Determine what's bigger, scrollHeight or fullHeight / width
				if (iFullHeight > theBody.scrollHeight) {
					iPopHeight = iFullHeight;
				} else {
					iPopHeight = theBody.scrollHeight;
				}
				
				if (iFullWidth > theBody.scrollWidth) {
					iPopWidth = iFullWidth;
				} else {
					iPopWidth = theBody.scrollWidth;
				}
        
        return new Dimension(iPopWidth, iPopHeight);
      }      
      
      function showProgress(){
        var backcover = window.top.document.getElementById("backcover");          
        var cover = window.top.document.getElementById("cover");  
        var progress = window.top.document.getElementById("progress");
        var dimension = getPageDimension();

        cover.style.width =  dimension.Width + "px";
        cover.style.height = dimension.Height + "px";        
        backcover.style.width = dimension.Width+ "px";
        backcover.style.height = dimension.Height +"px";        
        backcover.style.left=0;
        backcover.style.top=0;
        cover.style.display="block";
        backcover.style.display="block";
        progress.style.display="block";
        
        var theBody = document.getElementsByTagName("body")[0];
        
				var scTop = parseInt(getScrollTop(),0);
				var scLeft = parseInt(theBody.scrollLeft,0);
				
				var width = progress.clientWidth;
				var height = progress.clientHeight;
			
				var fullHeight = getViewportHeight();
				var fullWidth = getViewportWidth();
				
				progress.style.top = (scTop + ((fullHeight - height) / 2)) + "px";
				progress.style.left =  (scLeft + ((fullWidth - width) / 2)) + "px";
      }

      function hideProgress(){
        var backcover = window.top.document.getElementById("backcover");          
        var cover = window.top.document.getElementById("cover");  
        var progress = window.top.document.getElementById("progress");
        backcover.style.display="none";
        cover.style.display="none";
        progress.style.display="none";
      }
