/**
 * for internal use only
 *
 * @author  Thomas Meyer
 */

function getAssembly($producerId)
{
    getProduct(parseInt($producerId), 0);
    var assembly = new ApiBfKatalog('assembly_select');
    assembly.bfKatalogGetAssembly('producer_id=' + parseInt($producerId) + '&assembly_id=0');
    return false;
}

function getProduct($producerId, $assemblyId)
{
    var catalogue = new ApiBfKatalog('catalogue');
    catalogue.bfKatalogGetProduct('producer_id=' + parseInt($producerId) + '&assembly_id=' + parseInt($assemblyId));
    return false;
}

function searchProducts($name, $value)
{
    var catalogue = new ApiBfKatalog('catalogue');
    catalogue.bfKatalogGetProduct($name.replace(/target\[(\w+)\]/, '$1') + '=' + $value);
    return false;
}