function setregistercode(myform)
{
    request_string = "/setregister.php";
    $.get(request_string, function(data){
        document.getElementById(myform).submit();
    });
}
//-----
function showhide(tag)
{
    $('#'+tag).slideToggle('slow');
    if ( document.getElementById(tag).style.visibility == 'hidden')
    {
        document.getElementById(tag).style.display = 'inline';
        document.getElementById(tag).style.visibility = 'visible';
    }
}
//-----
function view_count(id)
{
    request_string = "/articles/viewcount.php?id=" + id;
    $.get(request_string, function(data){
    });
}
function delete_comment(id)
{
    document.getElementById('comm'+id).innerHTML = '<img src="/js/ajax-loader.gif" width="16" height="16" border=0 title="Wait please">';
    request_string = "/articles/deletecomment.php?id=" + id;
    $.get(request_string, function(data){
        $('#comm'+id).fadeOut('slow');
    });
}
function taghelp()
{
    tag = document.getElementById('addtag').value;
    if ( tag.length > 1 )
    {
        request_string = "/articles/tags.php?mode=viewtag&tag="+encodeURI(tag);
        $.get(request_string, function(data){
            $('#dbtags').html(data);
            $('#dbtags').fadeIn('slow');
        });
    }
    else
        $('#dbtags').fadeOut('slow');
}
function addtag(id)
{
    tag = document.getElementById('addtag').value;
    if ( tag.length > 1 )
    {
        request_string = "/articles/tags.php?mode=addtag&id="+id+"&tag="+encodeURI(tag);
        $.get(request_string, function(data){
            $('#arttags').html(data);
        });
    }
    else
        $('#dbtags').fadeOut('slow');
}
function deletetag(id)
{
    if (id > 0)
    {
        request_string = "/articles/tags.php?mode=deletetag&id="+id;
        $.get(request_string, function(data){
            $('#tag'+id).fadeOut('slow');
        });
    }
}
function deleteobyav(id)
{
    if (id > 0)
    {
        document.getElementById('mess'+id).innerHTML = '<img src="/js/ajax-loader.gif" width="16" height="16" border=0 title="Wait please">';;
        request_string = "/board/deletemessage.php?id="+id;
        $.get(request_string, function(data){
            $('#mess'+id).fadeOut('slow');
        });
    }
}

