function hasClass(selector, name) {
var obj = ge(selector);
return obj && (new RegExp('(\\s|^)' + name + '(\\s|$)')).test(obj.className);
}
function addClass(selector, name) {
var obj = ge(selector);
if ( !hasClass(selector, name) ) {
obj.className = (obj.className ? obj.className + ' ' : '') + name;
}
}