function isEmptyString(strValue)
{
    var strTestString = new String(strValue);
    if ( strValue == null || strTestString.length == 0 )
        return true;
    for (i = 0; i < strTestString.length; i++)
        if ( strTestString.charAt(i) != ' '  && strTestString.charAt(i) != '\t' &&
             strTestString.charAt(i) != '\n' && strTestString.charAt(i) != '\r' )
            return false;
    return true;
}

function swapImage(image_id, image_file)
{
    var image;

    image = document.getElementById(image_id);
    image.src = image_file;
}

function clickNode(ig_id)
{
    var bullet, row;

    bullet = document.getElementById('bul_' + ig_id);
    row    = document.getElementById('row_' + ig_id);
    if ( row )
    {
        if ( row.style.display != 'block' )
        {
            bullet.src = '/images/shop/bullet_menu_opened.gif';
            row.style.display = 'block';
            document.cookie = escape('ig_open_' + ig_id) + '=1; path=/'
        }
        else
        {
            bullet.src = '/images/shop/bullet_menu_closed.gif';
            row.style.display = 'none';
            document.cookie = escape('ig_open_' + ig_id) + '=0; path=/'
        }
    }
}

function clickGroup(ig_id)
{
    var bullet, block;

    bullet = document.getElementById('bul_' + ig_id);
    block  = document.getElementById('blk_' + ig_id);
    if ( block )
    {
        if ( block.style.display != 'block' )
        {
            bullet.src = '/images/shop/bullet_menu_opened.gif';
            block.style.display = 'block';
            document.cookie = escape('ig_open_' + ig_id) + '=1; path=/'
        }
        else
        {
            bullet.src = '/images/shop/bullet_menu_closed.gif';
            block.style.display = 'none';
            document.cookie = escape('ig_open_' + ig_id) + '=0; path=/'
        }
    }
}
