function open_submenu(id)
{
    if($("#ul_"+id).attr('class') == 'open')
    {
        $("#span_"+id).html("<a href=\"#\" onclick=\"return false;\" id=\"a_"+id+"\">"+$("#span_"+id).html()+"</a>");
        $("#ul_"+id).attr('class', 'close');
    }
    else
    {
        $("#span_"+id).html("<span style=\"cursor: pointer;\">"+$("#a_"+id).html()+"</span>");
        $("#ul_"+id).attr('class', 'open');    
    }    
        
}

function change_picture(id)
{
    current_pic = $("#current_pic").val();
    $("#current_pic").val(id);
    new_picture = $("#_pic"+id).val();
    $("#picture").attr("src", new_picture);
    $("#pic"+current_pic).html("<a href=\"\" onclick=\"change_picture('"+current_pic+"'); return false;\">"+current_pic+"</a>");
    $("#pic"+id).html(id);
}

function counter()
{
 counter = "<a href='http://www.liveinternet.ru/click' "+
"target=_blank><img src='http://counter.yadro.ru/hit?t25.4;r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' alt='' title='LiveInternet: показано число посетителей за"+
" сегодня' "+
"border=0 width=88 height=15><\/a>";
 document.getElementById('cc').innerHTML = counter;
}
