/*
		LIBRARYFUNCTION DEFINITION
*/
  
  function addOption(label, value, item) {
    var el = document.createElement('OPTION');
    el.setAttribute('value', value);
    el.appendChild( document.createTextNode(label) );
    var main = item;//document.getElementById('component-select');
    main.appendChild(el);
  }

  function delOptions(item) {
    var main = item;//document.getElementById('component-select');	
	while(main.hasChildNodes)
	{
		try{
		 main.removeChild(main.firstChild);
		}catch(exception) {break;}
	}
  }

  function loadArray(index, item, array) {
	for(i=0; i<array[index][0].length; i++) {
		addOption(array[index][0][i],array[index][1][i], item);
	}
  }

  function rebuild(index, item, array) {
	delOptions(item);
	loadArray(index, item, array);
  }
  
/*
		E O F  < == > LIBRARYFUNCTION DEFINITION
*/
