function getSAHeight() {
    h = (document.body.scrollHeight > document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight;
    document.getElementById('sa').style.height = h + "px";
}

function hideRe() {
    $('sa').fade();
    $('advance').hide();
    $('advance').innerHTML = '<div class="top"></div><div class="mid" id="adcontent"></div><div class="btm"></div>';
}


function showPopUp(mode, idComm, type, a, b, c, d, e) {
    $('advance').innerHTML = '<div class="top"></div><div class="mid" id="adcontent"></div><div class="btm"></div>';
    $('sa').show();
    $('advance').show();
    var element = Builder.node('div', { className:'pre' });
    $('adcontent').appendChild(element);

    var req = new JsHttpRequest();
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
          $('advance').innerHTML = req.responseJS.strRes;
        }
    }
    req.open('POST', sHomePath + '/_content/popup_'+type+'.php', true);
    req.send( {mode: mode, idComm: idComm, type: type, a: a, b: b, c: c,d: d,e: e} );
}

