function createBuyNowLink(shops, proxy, call, noShopMessage)
{
  var found = false;
  var count = 0;
  shops.each(function(shopinfo, index){
    new Ajax.Request(proxy + "?call=" + encodeURIComponent(shopinfo['url'] + call), {
      method: 'get',
      onSuccess:  function(transport){
        $("ashop_loading_" + index).hide();
        if (transport.responseText != "-1")
        {
          $("ashop_link_" + index).writeAttribute("href", shopinfo['url'] + shopinfo['productPrefix'] + transport.responseText + "?lang=" + shopinfo['langCode']);
          $("ashop_link_" + index).innerHTML = shopinfo['name'];
          found = true;
        }
        else
        {
          $("ashop_link_" + index).hide();
        }
        count ++;
        if ( count == shops.length )
        {
          if (!found)
          {
            $('aShopList').update('<p>' + noShopMessage + '<p>');
          }
        }
      },
      onFailure:  function(transport){
        $("ashop_loading_" + index).hide();
        $("ashop_link_" + index).up().hide();
      }
    });
  });
  
}
