
function makeSearch(form_id, post) {

    if (typeof(form_id) == 'undefined')
        form_id = 'quicksearch';

    if (typeof(post) == 'undefined')
        post = true;


    var url = [];
    $(form_id).select('select').each(function(elem) {
                                         if(elem.disabled == false && elem.selectedIndex > 0) 
                                             if (elem.tabIndex > 0)
                                                 url[elem.tabIndex] = elem.value;
                                             else
                                                 url[url.length] = elem.value;
                                     });
    var url = url.compact();
    var tmp = '/carros-usados/';
    for (i = 0; i < url.length; i++)
        tmp += url[i] + '/';

    if (post == false) {
        return tmp;
    }

    window.location = tmp;
    return false;
}
