Normal Forms, Melnikov Functions and Bifurcations of