Generalized Frobenius Algebras and Hopf Algebras