var children =[];var ochildren;if(parent){var oparent = document.getElementById(parent);ochildren =oparent.getElementsByTagName('*');}else{ochildren = document.getElementsByTagName('*');}for(i=0;i<ochildren.length;i++{if(ochildren[i].className==clsName){children.push(ochildren[i]);}}return children;