function bgndHilit(IDtoHighlight) { bgndTranspAll(); document.getElementById(IDtoHighlight).style.backgroundColor = '#ffff00'; } function bgndTranspAll() { var arryBlogs = document.getElementsByTagName("a"); /* Must not get ID here */ //var arryBlogs = document.getElementsByTagName("a"); /* Gives ID, e.g. "blog-*" */ //var arryBlogs = document.getElementById("menuBlogs").getElementsByTagName("a"); /* Gives filename, e.g. "blog-*.htm" */ //var arryBlogs = document.getElementById("menuBlogs").getElementsByTagName("a"); /* Gives ID, e.g. "blog-*" */ //alert(''+ arryBlogs.length); var tx = ''; for (var cou=0; cou<=arryBlogs.length-1; cou++) { document.getElementById(arryBlogs[cou].id).style.backgroundColor = 'transparent'; /* Works ! */ tx += cou +'='+ arryBlogs[cou].id +'\n'; //tx += cou +'='+ arryBlogs[cou].childNodes[0].nodeText +'\n'; } //alert('tx=\n'+ tx); }