function showPopup(sTitle, sMessage, fHeight, fWidth, bModal, bShowEmptyTitle)
{
    var overlay = window.parent.document.getElementById('fancy_overlay', 'DIV');
    var popup = window.parent.document.getElementById('fancy_outer', 'DIV');
    var container = window.parent.document.getElementById('fancy_content', 'DIV');
    var titleText = window.parent.document.getElementById('fancy_title_main', 'TD');
    var title = window.parent.document.getElementById('fancy_title', 'DIV');
    var fancybg = window.parent.document.getElementById('fancy_inner', 'DIV');

    title.style.display = popup.style.display = overlay.style.display = 'block';

    popup.style.height = fHeight + 20 + 'px';
    popup.style.width = fWidth + 20 + 'px';
    fancybg.style.height = fHeight + 10 + 'px';
    fancybg.style.width = fWidth + 10 + 'px';

    container.innerHTML = sMessage;
    if ($.browser.msie)
    {
        container.style.height = fHeight - 10 + 'px';
        container.style.width = fWidth - 10 + 'px';
    }
    container.style.overflow = 'auto';

    var winl = (screen.availWidth - fWidth) / 2;
    var wint = (screen.availHeight - fHeight) / 2;
    popup.style.top = wint/2+ "px";
    popup.style.left = winl + "px";

    title.style.top = wint/2+ fHeight + 60 + 'px';
    title.style.left = winl + fWidth / 2 + 'px';

    if (sTitle == '')
    {
        if (bShowEmptyTitle == true)
            titleText.innerHTML = '---';
        else
            title.style.display = 'none';
    }
    else
    {
        titleText.innerHTML = sTitle;
    }

    if ($.browser.msie)
    {
        title.style.position = overlay.style.position = popup.style.position = 'absolute';
    }
    overlay.onclick = zoomout;
}


function zoomout()
{
    var doc = document;
    var overlay = doc.getElementById('fancy_overlay');
    if (overlay == null)
        doc = window.parent.document;

    overlay = doc.getElementById('fancy_overlay');
    var popup = doc.getElementById('fancy_outer');
    var container = doc.getElementById('fancy_content');
    var title = doc.getElementById('fancy_title');
    var titleText = doc.getElementById('fancy_title_main');

    titleText.innerHTML = container.innerHTML = '';
    title.style.display = popup.style.display = overlay.style.display = 'none';
}

