function getElementsByClass(cls, node, tag)
{
if(document.getElementsByClass) return document.getElementsByClass(cls, node, tag);
if(! node) node = document;
if(! tag) tag = '*';
var them = node.getElementsByTagName(tag),
rez = [];
for(var notI = 0; notI < them.length; ++notI)
if(them[notI].className == cls) rez.push(them[notI]);
return rez;
}