Agreed. Or at least use jQuery to attach event handlers. Unobtrusive JS FTW.