  Hecke algebras are usually defined algebraically, via generators and
relations. We give a new algebro-geometric construction of affine and
double-affine Hecke algebras (the former is known as the Iwahori-Hecke algebra,
and the latter was introduced by Cherednik [Ch1]). More generally, to any
generalized Cartan matrix A and a point q in a 1-dimensional complex algebraic
group \c we associate an associative algebra H. If A is of finite type and
\c=C^*, the algebra H is the affine Hecke algebra of the corresponding finite
root system. If A is of affine type and \c=C^* then H is, essentially, the
Cherednik algebra. The case \c=C corresponds to `degenerate' counterparts of
the above objects cosidered by Drinfeld [Dr] and Lusztig [L2]. Finally, taking
\c to be an elliptic curve one gets some new elliptic analogues of the affine
Hecke algebra.
