 }
 
 class CompanyList: NSScrollView {
-    
+  
   let left = NSView(frame: NSMakeRect(0,0,70,1560+900))
   let image5 = NSImage(named: "mena.png")
   var disposeBag = DisposeBag()

  var team = Team(JSONString: "{}")
  var reconnect_url: String?
  var ws: WebSocket?
  var lastWsReconnect: Int64?
  
  func websocketDidConnect(socket: WebSocket) {
    Swift.print("websocket is connected")
    //socket.write(string: "hello there!")
  }
  
  func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
    if let e = error {
      Swift.print("websocket is disconnected: \(e.localizedDescription)")
    } else {
      Swift.print("websocket disconnected")
    }
    let now = Int64(NSDate().timeIntervalSince1970)
    
    if now - lastWsReconnect! > 5000 {
      lastWsReconnect = now
      ws = WebSocket(url: URL(string: reconnect_url!)!)
      ws?.delegate = self
      ws?.connect()
    }
    
  }
  
  func websocketDidReceiveMessage(socket: WebSocket, text: String) {

    }
    
  }
  
  func changeCompany(sender:ButtonWithTeam) {
    
    // let existing = UserDefaults.standard.value(forKey: "bcc_teams") as! Array<String>
    // let token = existing[sender.tag-1]
    // let cwr = left.subviews[sender.tag] as! CompanyWithRed
    // cwr.toggleOff()
    
    
    if sender.team?.id == "BCC" {
