  var ajaxobj;
  var aw;
  var ah;
  
  function positionBody(is_result) {
    wbody = document.getElementById('body');
    w = getScreenWidth();
    h = getScreenHeight();
    wbody.style.left = ((w - 770) / 2) + 'px';
    wbody.className = 'show';
    wmain = document.getElementById('main');
    wfooter = document.getElementById('footer');
    if (wmain.offsetHeight > 430) wfooter.style.top = wmain.offsetHeight + 10 + 'px';
    if (wmain.offsetHeight > h) cor = -16;
    else cor = 0;
    /*
    wdis = document.getElementById('disable');
    wdis.style.width = w + cor + 'px';
    if (wmain.offsetHeight < h) wdis.style.height = h + 'px';
    else wdis.style.height = wmain.offsetHeight + 140 + 'px';
    */
  }
  
  
  function show(theId) {
    obj = document.getElementById(theId);
    obj.className = obj.className.replace('a0','a1');
  }

  function hide(theId) {
    obj = document.getElementById(theId);
    obj.className = obj.className.replace('a1','a0');
  }

  function getScreenWidth() {
    isNetscape = (navigator.appName == "Netscape");
    available = (isNetscape) ? window.innerWidth : document.body.clientWidth;
    return available;
  }
  
  function getScreenHeight() {
    isNetscape = (navigator.appName == "Netscape");
    available = (isNetscape) ? window.innerHeight : document.documentElement.clientHeight;
    return available;
  }
  
  function popDiv(theFile,w,h) {
    ajax(theFile,'popDiv');
    ajaxobj = document.getElementById('popDiv');
    sw = getScreenWidth();
    sh = getScreenHeight();
    scrolly = (document.all)?document.body.scrollTop:window.pageYOffset;
    ajaxobj.style.left = Math.ceil((sw - w) / 2)  + 'px';
    ajaxobj.style.top = Math.ceil((sh - h) / 2) + scrolly + 'px';
    show('popDiv');

//    trackLoad();
    //show('disable');
  }

  var tracker=null;
  function trackLoad() {
    ajaxobj = document.getElementById('popDiv');
    if (tracker) clearTimeout(tracker);
    if(ajaxobj.innerHTML == 0) {
      tracker = setTimeout("trackLoad()",1000);
    } else {
      aw = ajaxobj.offsetWidth;
      ah = ajaxobj.offsetHeight;
      scrollx = (document.all)?document.body.scrollLeft:window.pageXOffset;
      scrolly = (document.all)?document.body.scrollTop:window.pageYOffset;
      sw = getScreenWidth();
      sh = getScreenHeight();
      ajaxobj.style.left = Math.ceil(sw / 2) - Math.ceil((sw - aw) / 2)  + 'px';
      ajaxobj.style.top = sh - scrolly + 240 + 'px';
      show('popDiv');

    }
  }


  function hidePop() {
    obj = document.getElementById('popDiv');
    obj.innerHTML = '';
    hide('popDiv');
    //hide('disable');
  }

