function CloseAndRebind()
{
   GetRadWindow().close();
   try{
        GetRadWindow().BrowserWindow.refreshGrid(null);
   } catch(ex)
   {
   }
}

function MessageCloseAndRebind(strMsg)
{
   GetRadWindow().close();
   try
   {
    GetRadWindow().BrowserWindow.refreshGridMessage(null, strMsg);
    } catch(ex)
   {
   }
}

function Close(strMsg)
{
   GetRadWindow().close();
}

function CloseAndRebindWindow()
{
   //GetRadWindow().BrowserWindow.refresh(null);
   
   try {
        GetRadWindow().BrowserWindow.refreshWindow(null);
    } catch(ex)
   {
   }
   GetRadWindow().close();
}

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 CancelEdit()
{
   GetRadWindow().close();
}

function Foco(objCampo)
{
   var objCampo2 = document.getElementById(objCampo);
   document.getElementById(objCampo2.id + "_text").focus();
   return false;
}

function FocoCombo(objCampo)
{
   var objCampo2 = document.getElementById(objCampo);
   document.getElementById(objCampo2.id + "_input").focus();
   return false;
}

function ob_upper(sender,eventargs)
{
   sender.set_value(sender.get_value().toUpperCase());
}
function ob_lower(sender,eventargs)
{
   sender.set_value(sender.get_value().toLowerCase());
}
