TheJavascript code that you have in within your HTML doesn't work well with major ISPs. Having this code in your HTML will result in poor delivery and high fail rates because most ISPs block any e-mail that contains Javascript.
Do not send e-mail campaigns with Javascript contained within the HTML!!!