The following example shows how to enable or disable a MS Crm Tab when an user tries to go in offline mode or in online mode. In this case i try to disable the tab that contains an Iframe with a Custom Service Calendar.
// Comment
HeadServiceCalendarInOfflineMode: Function()
{
//Check if mscrm is in online or offline mode
if(!isOnline)
{
try
{
Xrm.Page.ui.tabs.get("service_calendar_Tab").setVisible(false);
}catch(err){}
}
}