﻿// JScript File
function GetModalWindowMain(WindowName, url, height, width)
{
   //Getting rad window manager
   var oManager = GetRadWindowManager();
   //Success. Getting existing window DialogWindow using GetWindowByName
   var oWnd = oManager.GetWindowByName(WindowName);
   //Success. Setting a size and a Url to the window using its client API before showing
   oWnd.SetSize(height,width);
   oWnd.SetUrl(url);
   //Success. Opening window
   oWnd.Show();
}

function GetRadWindow()
{
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;//Will work in Moz in all cases, including clasic dialog
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)
    return oWindow;
}  

function CloseOnReload()
{
    GetRadWindow().Close();
}

function RefreshParentPage()
{
    //GetRadWindow().BrowserWindow.location.reload();
    window.top.location.reload();
}

try {
$(document).ready(function() {
    //chamada moldura
    try
    {
    initBody();
    }catch(err){}
    //fim chamada moldura
});
}catch(e){}
