﻿
//GetRadWindow obtains a reference to the hosting RadWindow"
function GetCurrentRadWindow()
{
     var oWindow = null;
     if (window.radWindow)
        oWindow = window.radWindow;     
     else if (window.frameElement.radWindow)
       oWindow = window.frameElement.radWindow;   
     return oWindow;
}
function CloseOnReload()
{    
  GetCurrentRadWindow().close();
}
function CloseRadWindow()
{
  GetCurrentRadWindow().close();
}
function RefreshParentPage()
{   
  if (GetCurrentRadWindow().BrowserWindow.location.toString().indexOf("Activation") > 0 )
      CloseRadWindowAndLoadHome();
  else
    GetCurrentRadWindow().BrowserWindow.location.reload(); //= GetCurrentRadWindow().BrowserWindow.location.href;
}

function CloseRadWindowAndLoadHome()
{
  GetCurrentRadWindow().BrowserWindow.location = "/"; 
}
