code: function () {
          if (!('ActiveXObject' in window)) {
              if (clusterUrl && clusterUrl != null) {
                  //clusterUrl = clusterUrl.replace('http://', 'https://');
  
                  if (clusterUrl.indexOf('ssl/') < 0) {
                      var slashAtTheEnd = clusterUrl.search(/\/([\d.]*)\/$/);
  
                      if (slashAtTheEnd > -1) {
                          clusterUrl = clusterUrl.substring(0, slashAtTheEnd + 1) + 'ssl/' + clusterUrl.substring(slashAtTheEnd + 1, clusterUrl.length)
                      } else {
                          clusterUrl = clusterUrl.substring(0, clusterUrl.lastIndexOf('/') + 1) + 'ssl/' + clusterUrl.substring(clusterUrl.lastIndexOf('/') + 1);
                      }
                  }
              }
              else {
                  url = url.replace('http://', 'https://');
              }
          }
          // Create session cookie
          //createSessionCookie(sslSessionCookieName, 1);
      }
docs: *********************************************************
  @private methods
  ********************************************************* /*
  Change the current URL to use SSL