since I could not get the ClientScript to work as required, I did a workaround using the code below:
function closeWin() {
//If txt = 'cancel' then close;
GetRadWindow().Close();
}
<td align="center"><asp:Button runat="server" ID="btnClose" Text="Close"
OnClientClick="closeWin();return false;" onclick="btnClose_Click"/></td>