function doSearchRequest(aUrl, buttonId)
{
    var bDate = $('#hBeginDate').attr('value');
    var eDate = $('#hEndDate').attr('value');
    $.ajax({
    type: 'POST',
    url: aUrl,
    data: 'begin='+bDate+'&end='+eDate,
    beforeSend: function(response){ $('#marketNews').html('<p>Пожалуйста подождите, идет обработка запроса.</p>'); },
    success: function(response){ $('#marketNews').html(response); $('#'+buttonId).attr({disabled : ''}) }
    });
}

function showPopup(url,width,height,scroll)
{
    if(!scroll){var scroll='no';}
    newwin = window.open(url,'','width='+width+',height='+height+',menubar=no,status=no,scrollbars='+scroll+',toolbar=no,screenX=100,screenY=100,left=100,top=100');
}

function doCLSearchRequest(aUrl, buttonId)
{
    var bDate = $('#hBeginDate').attr('value');
    var eDate = $('#hEndDate').attr('value');
    var dType = $('#dType option:selected').val();
    var dRegion = $('#dRegion option:selected').val();

    $.ajax({
    type: 'POST',
    url: aUrl,
    data: 'begin='+bDate+'&end='+eDate+'&type='+dType+'&region='+dRegion,
    beforeSend: function(response){ $('#allClassifieds').html('<p>Пожалуйста подождите, идет обработка запроса.</p>'); },
    success: function(response){ $('#allClassifieds').html(response); $('#'+buttonId).attr({disabled : ''}); }
    });
}