function createNewButt2(j) { newButt2.id = 'butt2'+j; } function addNewButts1() { var i=1; while (i<=5) { createNewButt1(i); i++; }