function fechaDiv() {
    var iFrame = "";
    with (parent.document) {
        getElementById("iFrameDiv").src = "about:blank";
        getElementById("divCenter").style.display = "none";
        getElementById("divOpaco").style.display = "none";

    }
}

/**
 * 
 * @param acao - URL a ser utilizada
 * @param widthFrame - largura do iframe
 * @param heightFrame - altura do iframe
 * @param aumentarDiv - boolean indicando se o divCenter deve ou não ter as mesmas dimensões definidas em widthFrame.
 * @return
 */
function submeteDiv(acao, widthFrame, heightFrame, aumentarDiv) {
    var clHeight = 0;
    var clWidth = 0;
    var scrHeight = 0;
    var scrWidth = 0;
    var div = "";
    var iFrame = "";
    var divCtr = "";

    with (document) {
        div = getElementById("divOpaco");
        iFrame = getElementById("iFrameDiv");
        divCtr = getElementById("divCenter");
        body.scrollTop = 0;
        clHeight = body.clientHeight;
        clWidth = body.clientWidth;
        scrHeight = body.scrollHeight;
        scrWidth = body.scrollWidth;
        if (clHeight > scrHeight) {
            div.style.height = clHeight;    
        } else {
            div.style.height = scrHeight;
        }
        if (clWidth > scrWidth) {
            div.style.width = clWidth;    
        } else {
            div.style.width = scrWidth;
        }
        iFrame.style.width = widthFrame;
        iFrame.style.height = heightFrame;
        if (aumentarDiv != undefined && aumentarDiv == true) {
        	divCtr.style.width = widthFrame;
        }
        div.style.display = "";    
        divCtr.style.display = "";
        with (forms[0]) {
            actionOld = action;
            targetOld = target;
            if (acao != "") {
                action = getAppPath() + acao;        
            }
        
            target = "iFrameDiv";
            submit();
            action = actionOld;
            target = targetOld;
        }
    }
    
} 