function myNewDomElement(name, attrs, style, text){
    var e = document.createElement(name);
    if (attrs) {
        for (key in attrs) {
            if (key == 'class') {
                e.className = attrs[key];
            } else if (key == 'id') {
                e.id = attrs[key];
            } else {
                e.setAttribute(key, attrs[key]);
            }
        }
    }
    if (style) {
        for (key in style) {
            e.style[key] = style[key];
        }
    }
    if (text) {
        e.appendChild(document.createTextNode(text));
    }
    return e;
}

function getId(id){
	if(document.getElementById(id)){
		return document.getElementById(id);
	}
	return false;
}

function jsBasketAddCell(tr, cont, clname, iid){
    var cell = tr.insertCell(-1);
	cell.innerHTML = cont;
	cell.className = clname;
	cell.id = iid;
	return cell;
}