var _searchText = '';
var _mainCatID = 0;
var _catID = 0;
var _subCatID = 0;
var _mainCatName = '';
var _catName = '';
var _subCatName = '';

function initSearchResults(searchText, mainCatID, catID, subCatID, mainCatName, catName, subCatName, aType, vType, pIndex) {
  _searchText = searchText;
  _mainCatID = mainCatID;
  _catID = catID;
  _subCatID = subCatID;
  _mainCatName = mainCatName;
  _catName = catName;
  _subCatName = subCatName;
  initPageHistory();
  initProdPageDetails(aType, vType, pIndex);
}

function getProductsList() {
  var params = 'searchText=' + _searchText + '&mainCatID=' + _mainCatID + '&catID=' + _catID + '&subCatID=' + _subCatID + '&aType=' + _aType + '&vType=' + _vType + '&sBy=' + _sBy + '&pIndex=' + _pIndex;
  executeServerRequest('GetSearchResults', params);
}

function getResponseMethodEx(methodName) {
  switch (methodName) {
    case 'GetSearchResults': return getProductsResult;
  }
}

function getProductsResultEx(responseXml) {
  var sp = document.getElementById("spProdCount");
  if (sp)
    sp.innerHTML = strGetXmlString(responseXml.selectSingleNode('auctionsCount'));
}