out of curiosity is there a reason you're not using jquery? seems fine, just unlike what we do in most places.