document.write('<div id="light" class="content"><br>Application is busy, please wait...<br><img id="img_progress"></div>');
document.write('<div id="fade" class="overlay"></div>');

function show_overlay(){         
  document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('fade').style.visibility = "visible";setTimeout('document.images["img_progress"].src = "/i/progress.gif"', 200);        

  if (document.getElementById('fade').style.visibility == "visible")
  {
    document.body.style.overflow = "hidden";
  }
  else
  {
    document.body.style.overflow = "auto";
  }
};

function html_submit_progress(pThis){
  show_overlay();
  document.wwv_flow.p_request.value = pThis;
  document.wwv_flow.submit();
};

function zxcWWHS(){
  if (document.all){
    zxcWH=document.documentElement.clientHeight;
    zxcWW=document.documentElement.clientWidth;
    zxcWS=document.documentElement.scrollTop;
    if (zxcWH==0){
      zxcWS=document.body.scrollTop;
      zxcWH=document.body.clientHeight;
      zxcWW=document.body.clientWidth;
    }
  }
  else if (document.getElementById){
    zxcCur='pointer';
    zxcWH=window.innerHeight-15;
    zxcWW=window.innerWidth-15;
    zxcWS=window.pageYOffset;
  }
  zxcWC=Math.round(zxcWW/2);
  return [zxcWW,zxcWH,zxcWS];
}

window.onscroll=function(){
  var div=document.getElementById('fade');
  if (!document.all){ div.style.position='fixed'; window.onscroll=null; return; }
  if (!div.pos){ div.pos=div.offsetTop; }
  div.style.top=(zxcWWHS()[2]+div.pos)+'px';
  
  var div2=document.getElementById('light');
  if (!document.all){ div2.style.position='fixed'; window.onscroll=null; return; }
  if (!div2.pos){ div2.pos=div2.offsetTop; }
  div2.style.top=(zxcWWHS()[2]+(document.body.clientHeight*.4))+'px';
}
