/**
 *
 * @access public
 * @return void
 **/
 var ajaxObj = new XMLHTTP("/js/ajax/ajax.php");
    ajaxObj.debug = 0;

function ChangeCategoryFromRange(){
var range = document.getElementById('range').value;
  ajaxObj.call(
    'class=changecategory&method=getnewcategories&range='+range,
    redrawCategoriesFromResponse
  );
}

/**
 *
 * @access public
 * @return void
 **/
function redrawCategoriesFromResponse(oResponse){
      oSel = document.getElementById('category');
    oSel.options.length = 0;
    oSel[0] = new Option('Select a category', 0);
    for(var el in oResponse) {
      oSel[oSel.length] = new Option(oResponse[el].range, oResponse[el].id)
    }
}

/**
 *
 * @access public
 * @return void
 **/
function clearProductSearch(){
  if (document.getElementById('product-search').value=='Keyword Search') {
    document.getElementById('product-search').value = '';
  }
}
