STMA.splitArgs = function() {
    if (this) {
        args = new Array();
        var a;
        a = this.split(';');
        for(i=0;i<a.length;i++) {
            item = a[i];
            res = item.split('=');
            arg = res.shift();
            val = res.join('=');
            args.push(new Array(arg, val));
        }
        
        return args;        
    } else {
        return false;
    }
}

STMA.seekParent = function(c) {
    f = true;
    i = 0;
    obj = this;
    while(f) {
        n = obj.parentNode;
        if (n.className.search(c) != '-1') {
            f = false;
            return n;
        } else {
            obj = n;
        }
        i++;
        if (i>50) {
            return false;
        }
    }
}

STMA.getElementsByClassname = function(c) {
    var nodes;
    nodes = this.getElementsByTagName('*');
    res = new Array();
    for(i=0;i<nodes.length;i++) {
        item = nodes[i];
        if (item.className == c) {
            res.push(item);
        }
    }
    return res;
}

STMA.bindWith = function() {
    o = this.previousSibling;
    o.value = (this.checked ? 1 : 0);
    this.checked = (this.checked ? true : false);
}
