/**
 * Common logic to load the model and the year in the service parts from
 * requires localizedOtherStr variable defined in the ftl
 * @author Pawandeep Singh(c) Versata 2006
 */
function populateModelInfoData(arrModelInfoList, strSelectName)
{
  var selectModel = document.forms['spForm'].elements[strSelectName];
  selectModel.options.length = 0;
  var modelArray = new Array();
  // Removes the duplicate values from Array
  for (var m = 0; m < arrModelInfoList.length; m++)
  {
    if (arrModelInfoList[m].locateId != null && arrModelInfoList[m].locateId != "") 
    {
        selectModel.options[selectModel.options.length] = new Option(arrModelInfoList[m].name, arrModelInfoList[m].name);
    }
  }
  selectModel.options[selectModel.options.length] = new Option(localizedOtherStr);
}


function populateYearList(strSelectName)
{
  var selectYear = document.forms['spForm'].elements[strSelectName];
  selectYear.options.length = 0;
  var date = new Date();
  var year = date.getFullYear()+1;
  for (var m = 0; m < 10; m++)
  {
    selectYear.options[selectYear.options.length] = new Option(year);
    year = year -1;
  }
  selectYear.options[selectYear.options.length] = new Option(localizedOtherStr, 0);
}
