

function showChild(id)
{

    el = document.getElementById('child_'+id);
    rel =  document.getElementById('root_'+id);
    if (document.getElementById('child_'+id) != null){
        el.style.display = 'block';
        pos =  findPos( el )

        elwidth = el.offsetWidth;
        newpos =  findPos(rel);

        el.style.left = newpos;

    }

}

function hideChild(id)
{
    if (document.getElementById('root_'+id) != null) {
        document.getElementById('root_'+id).className = 'menuNormal';
    }

    if (document.getElementById('child_'+id) != null) {
        document.getElementById('child_'+id).style.display = 'none';
    }

}
function findPos(obj) {
    var curleft = curtop = 0;
    if (obj.offsetParent) {
        do {
            curleft += obj.offsetLeft;
            curtop += obj.offsetTop;
        } while (obj = obj.offsetParent);
    }
    return curleft;
}

