// ATTENTION: This file (productfinder.js) is generated by blocks/categories/class_ProductFinderScriptBlock.lib
//                      !!!  ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN  !!!
// <pre>
var mci = new Array(
  '3',  
  '4',  
  '5',  
  '6',  
  '44',  
  '41'
);

var mcn = new Array(
  'Biliárd',  
  'Asztali foci',  
  'Darts',  
  'Póker',  
  'Zseton készlet',  
  'Szolgáltatás'
);

mci[-1] = -1;

mcn[-1] = 'Kérem válasszon';

var sci = new Array(
  new Array(
    '7',
    '8',
    '9',
    '10',
    '11',
    '12',
    '13',
    '14',
    '15',
    '16',
    '17',
    '18',
    '48'
  ),
  new Array(
    '19',
    '20',
    '21'
  ),
  new Array(
    '22',
    '23',
    '24',
    '25',
    '26',
    '27'
  ),
  new Array(
    '28',
    '42',
    '43'
  ),
  new Array(
    
  ),
  new Array(
    
  )
);

var scn = new Array(
  new Array(
    'Ajándéktárgy',
    'Biliárdasztal',
    'Dákóemelő',
    'Pool dákó',
    'Snooker dákó',
    'Karambol dákó',
    'Dákótartó',
    'Dákó tok',
    'Golyó',
    'Biliárd kellékek',
    'Lámpa',
    'Biliárd alkatrészek',
    'Szövet'
  ),
  new Array(
    'Csocsóasztal',
    'Csocsó alkatrészek',
    'Légpárnás foci'
  ),
  new Array(
    'Darts tábla',
    'Darts toll',
    'Darts szár',
    'Darts softtip',
    'Darts steeltip',
    'Darts kiegészítők'
  ),
  new Array(
    'Póker kellékek',
    'Póker asztal',
    'Póker asztallap'
  ),
  new Array(
    
  ),
  new Array(
    
  )
);



function buildMainCategoryList() {
  var listId = 'main_category_list';
  document.getElementById(listId).innerHTML = '';
  option = document.createElement('option');
  option.setAttribute('value', "0");
  option.setAttribute('selected', "selected");
  option.innerHTML = mcn[-1];
  document.getElementById(listId).appendChild(option);
//  option = document.createElement('option');
//  option.setAttribute('value', "1");
//  option.innerHTML = label_NOT_IN_LIST;
//  document.getElementById(listId).appendChild(option);
  
  var i;
  for (i=0; i < mci.length; i++) {
    option = document.createElement('option');
    //option.setAttribute('value', mci[i]);
    option.setAttribute('value', mci[i]);
    option.innerHTML = mcn[i];
    document.getElementById(listId).appendChild(option);
  }
}    

addOnloadEvent(buildMainCategoryList);

function mainCategoryChanged(e) {
	var idx = e.value - 1;
  buildSubCategoryList(idx);
}

function buildSubCategoryList(idx) {
  var listId = 'sub_category_list';
  document.getElementById(listId).innerHTML = '';
  option = document.createElement('option');
  option.setAttribute('value', "0");
  option.setAttribute('selected', "selected");
  option.innerHTML = mcn[-1];
  document.getElementById(listId).appendChild(option);
  idx -= 2;
  if (idx >= 0) {
  
    for (i=0; i < sci[idx].length; i++) {
      option = document.createElement('option');
      option.setAttribute('value', sci[idx][i]);
      option.innerHTML = scn[idx][i];
      document.getElementById(listId).appendChild(option);
    }
  }
}    

    
    
