﻿// PrivateSpaceCreatedControl.js

function KGPrivateSpaceCreatedControl_CreatePrivateSpace()
{
  //debugger;
  try
  {
    try
    {
      if (m_srmGetTimes!= null && m_srmGetTimes == "True")
      {
        var now = new Date();
        SetSessionProperty('Srm_T0', now.getTime());
        SetSessionProperty('Srm_Action', 'CreatePrivateSpace');
        SetSessionProperty('Srm_Callbacks', 1);
      }
    }
    catch(e){}
   
    window.location = "CommunitySpace.aspx";
  }
  catch (e) 
  {
    alert("An exception occurred in the script. Error name: " + e.name + ". Error message: " + e.message); 
    debugger;
  }
}

function KGPrivateSpaceAdminControl_OpenPrivateSpace(_groupID)
{
  //debugger;
  try
  {
    var keys = 'KGCurrentGroupID|Topics_SelectedTopicGroupId';
	  var values = _groupID + '|' + _groupID;
    SetSessionProperty(keys, values, true);

    //SetSessionProperty('KGCurrentGroupID', _groupID);
    //SetSessionProperty('Topics_SelectedTopicGroupId', _groupID);
    try
    {
      if (m_srmGetTimes!= null && m_srmGetTimes == "True")
      {
        var now = new Date();
        SetSessionProperty('Srm_T0', now.getTime());
        SetSessionProperty('Srm_Action', 'ConfigurePrivateSpace');
        SetSessionProperty('Srm_Callbacks', 1);
      }
    }
    catch(e){}
  
    //window.location = "PrivateSpaceAdmin.aspx"; 
    window.location = "ConfigureCommunitySpace.aspx";
  }
  catch (e) 
  {
    alert("An exception occurred in the script. Error name: " + e.name + ". Error message: " + e.message); 
    debugger;
  }
}

function CreateCommunitySpace()
{
  //debugger;
  try
  {  
    window.location = "CommunitySpace.aspx"; 
  }
  catch (e) 
  {
    alert("An exception occurred in the script. Error name: " + e.name + ". Error message: " + e.message); 
    debugger;
  }
}
