function $byclass(classname,pName){
    var node = null,
        temps = [],
        re = new RegExp('\\b'+classname+'\\b','i');
    if(typeof pName != 'undefined'){
        node = pName;
    }else{
        node = document;
    }
    var all =  node.getElementsByTagName("*");
    for(var i=0;i<all.length;i++){
        if(re.test(all[i].className)){
            temps.push(all[i]);
        }
    }
    if(temps.length == 1){
        return temps[0];
    }
    return temps;
}