﻿// JScript File


//Alert to confirm the result of the operations
function OnClientCloseInvite(oWnd)
{
    var arg = oWnd.argument;
    
    if (arg != null){
        radalert(arg.return_msg,300, 100,arg.sender_aspx);    
        
    }
    //I cleanup...
    //NOTE: I remove the event and argument cause they accumulate. 
    //If I didn't then those events and args would apply for the next requests
    //for the oWnd
    if(oWnd){
        oWnd.argument = null;
        oWnd.setUrl("about:blank"); // Sets url to blank 
        oWnd.remove_close(OnClientCloseInvite); 
    }
    
    
}


//Refreshes after the submit has been sent
function OnClientCloseXPoints(oWnd)
{
    var arg = oWnd.argument;
    
    if (arg != null){
        //Refresh the page.
        window.location.href = window.location.href;        
    }
    //I cleanup...
    //NOTE: I remove the event and argument cause they accumulate. 
    //If I didn't then those events and args would apply for the next requests
    //for the oWnd
    if(oWnd){
        oWnd.argument = null;
        oWnd.remove_close(OnClientCloseXPoints); 
    }
    
    
}

