if(toolbar) { var theButton = document.createElement("INPUT"); theButton.setAttribute("type", "button"); theButton.setAttribute("id", ""); theButton.setAttribute("value", ""); //if NN6 then OK to use the standard setAttribute if ((!document.all)&&(document.getElementById)){ theButton.setAttribute("onClick","()"); } //workaround for IE 5.x if ((document.all)&&(document.getElementById)){ theButton["onclick"]=new Function("()"); } toolbar.appendChild(theButton); }