function byClass(oParent,className){
if(document.getElementsByClassName){ //if it is Firefox
return oParent.getElementsByClassName(className);
}else{
var tags = oParent.getElementsByTagName("*");
var tagsLength = tags.length;
var result = [];
for(var i=0;i<tagsLength;i++){
if(tags[i].className==className){
result.push(tags[i]);
}
}
return result;
}
}