function postFormular()
{
    jQuery.post("index.php?ajax=1&PHPSESSID=<?=session_id()?>", $('#formular').serialize(), function(){})
}

$(document).ready(function()
{
    $('#formular').submit(function(){ return false; });    
    
    $('#button-next').click(function()
    {
        jQuery.post("index.php?ajax=1&PHPSESSID=<?=session_id()?>", $('#formular').serialize(), function(data)
        {
            if($('#subquestion').length > 0)
            {
                location.href = 'index.php?next='+$('#question').val()+'&notice='+$('#subquestion').val();
            }
            else
            {
                location.href = 'index.php?next='+$('#question').val();
            }
        });
    });
                
    $('#button-prev').click(function()
    {
        if($('#subquestion').length > 0)
        {
            location.href = 'index.php?prev='+$('#question').val()+'&notice='+$('#subquestion').val();
        }
        else
        {
            location.href = 'index.php?prev='+$('#question').val();
        }
    });
});
