<!--

function refreshParent(postbackControl)
{
    if (typeof(window.opener.__CMS_CurrentUrl) != "undefined")
    {
        window.opener.__CMS_PostbackForm.action = window.opener.__CMS_CurrentUrl;
    }
    window.opener.__doPostBack(postbackControl,'');
    window.close();
}

function closeWindow()
{
    window.close();
}

function CMS_prepareEditPostback(strUrl)
{
    // cache original state of the Form
    g_strOriginalFormAction = __CMS_PostbackForm.action;
    g_strOriginalFormTarget = __CMS_PostbackForm.target;    

    __CMS_PostbackForm.action = strUrl;
    __CMS_PostbackForm.target = "CmsEditWindow";
    
    if (typeof(__CMS_PostbackFormBeenReset) != "undefined")
    {
        __CMS_PostbackFormBeenReset = true;
    }
    
    // open a blank window for the target Preview postback
    WBC_openWindowOnFocus("about:blank", "CmsEditWindow", "top=50,left=150,width=650,height=425,menubar=0,scrollbars=1,resizable=yes");
}

function CMS_restoreAfterEditPostback()
{
    // restore state of form
    __CMS_PostbackForm.action = g_strOriginalFormAction;
    __CMS_PostbackForm.target = g_strOriginalFormTarget;
    
    if (typeof(__CMS_PostbackFormBeenReset) != "undefined")
    {
        __CMS_PostbackFormBeenReset = true;
    }
    
    g_bWarnBeforeLeave = true;
}

//-->