var buttonArray = [
document.getElementById('underline'),
document.getElementById('bold'),
document.getElementById('italic'),
document.getElementById('tnr'),
document.getElementById('ss'),
document.getElementById('red'),
document.getElementById('green'),
document.getElementById('blue')
];
Can you do this? Or is it too abstract?