Acceptor and donor functions of chemisorbed ammonia