function bookmarks()
{
    arg = bookmarks.arguments
    str = '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
    str += '<tr>';
    for (i = 0; i < arg.length; i++)
    {
        if (i == 0 && arg[i][2] == true)
        {
            str += '<td height="7"><img src="img/dynamic_stat/first_active_left.gif" width="7" height="22"></td>';
        }
        else
            if (i == 0)
            {
                str += '<td height="7"><img src="img/dynamic_stat/first_left.gif" width="7" height="22"></td>';
            }
        if (arg[i][2] == true)    str += '<td nowrap class="bookmarks_active" width="' + 100 / arg.length + '%" background="img/dynamic_stat/bg_active.gif">' + arg[i][0] + '</td>';
        else
        {
            str += '<td class="bookmarks" nowrap width="' + 100 / arg.length + '%" background="img/dynamic_stat/bg.gif">';
            str += '<a href="' + arg[i][1] + '">' + arg[i][0] + '</a>';
            str += '</td>';
        }

        if (arg[i][2] == true && i == arg.length - 1) {
            str += '<td height="1" bgcolor="#7c8fde"><img src="img/1x1.gif"  width="1" height="1"></td>'
        }
        else
            if (arg[i][2] == true)
            {
                str += '<td height="7"><img src="img/dynamic_stat/active_right.gif"  width="7" height="22"></td>';
            }

            else
                if (i != arg.length - 1)
                {
                    if (arg[i + 1][2] != true)
                    {
                        str += '<td height="7"><img src="img/dynamic_stat/right.gif"  width="7" height="22"></td>'
                    }
                    else str += '<td height="9"><img src="img/dynamic_stat/active_left.gif"  width="9" height="22"></td>';

                }
    }
    str += '</tr>';
    str += '</table>';
    document.write(str);
}

function top_bookmarks()
{
    arg = top_bookmarks.arguments
    str = '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
    str += '<tr>';
    for (i = 0; i < arg.length; i++)
    {
        if (i == 0 && arg[i][2] == true)
        {
            str += '<td height="7"><img src="img/dynamic_stat/top_first_active_left.gif" width="7" height="22"></td>';
        }
        else
            if (i == 0)
            {
                str += '<td height="7"><img src="img/dynamic_stat/top_first_left.gif" width="7" height="22"></td>';
            }
        if (arg[i][2] == true)    str += '<td nowrap class="top_bookmarks_active" width="' + 100 / arg.length + '%" background="img/dynamic_stat/top_bg_active.gif">' + arg[i][0] + '</td>';
        else
        {
            str += '<td class="top_bookmarks" nowrap width="' + 100 / arg.length + '%" background="img/dynamic_stat/top_bg.gif">';
            var href = arg[i][1];
            if (href != '') {
                str += '<a href="' + arg[i][1] + '">' + arg[i][0] + '</a>';
            } else {
                str += arg[i][0]; 
            }
            str += '</td>';
        }

        if (arg[i][2] == true && i == arg.length - 1) {
            str += '<td height="1" bgcolor="#1f41d6"><img src="img/1x1.gif"  width="1" height="1"></td>'
        }
        else
            if (arg[i][2] == true)
            {
                str += '<td height="7"><img src="img/dynamic_stat/top_active_right.gif"  width="7" height="22"></td>';
            }

            else
                if (i != arg.length - 1)
                {
                    if (arg[i + 1][2] != true)
                    {
                        str += '<td height="7"><img src="img/dynamic_stat/top_right.gif"  width="7" height="22"></td>'
                    }
                    else str += '<td height="9"><img src="img/dynamic_stat/top_active_left.gif"  width="9" height="22"></td>';

                }
    }
    str += '</tr>';
    str += '</table>';
    document.write(str);
}


