He has played White House Deputy Chief of Staff Josh Lyman on the NBC television drama `` The West Wing '' , Danny Tripp on `` Studio 60 on the Sunset Strip '' , Dan Stark in the Fox police buddy-comedy `` The Good Guys '' , Timothy Carter , a character who was believed to be Red John in the CBS series `` The Mentalist '' , and antagonist Eric Gordon in the film `` Billy Madison '' .
He has played White House Deputy Chief of Staff Josh Lyman on the NBC television drama `` The West Wing '' , Danny Tripp on `` Studio 60 on the Sunset Strip '' , Dan Stark in the Fox police buddy-comedy `` The Good Guys '' , Timothy Carter in the CBS series `` The Mentalist '' , and Eric Gordon in the movie `` Billy Madison '' .