function getEl(el)  {
    if (typeof el == "string") el = document.getElementById(el);
    return el;
}

function toggleCls(el, clsA, clsB) {
	el = getEl(el);
    var cls = (el.className == clsA ? clsB : clsA);
    /** running in a small timeout, to bypass itches through bubbling */
    setTimeout(function()   {
        setCls(el, cls);
    }, 10);
}

function setCls(el, cls){
    el = getEl(el);
    el.className = cls;
}

