You should be able to do things like that in the Html Content feature using html view in the editor but it looks incorrect and incomplete to me.
Where is the function getCookie?
Where are those functions you list in onclick?
Even if those functions were there shouldn't it be onclick="newCustomer();" not onclick="newCustomer"
The code you posted is only going to run when the page first loads, it won't fire after the button click.