///:::::::::::::::::: Aņadir anuncio ::::::::::::::::::::::::::::::::::::::::::::::::::::
function comboaddpieza(data)
{
for (var i = document.addCust.idtppz.length ; i > 0 ; i--)
document.addCust.idtppz.options[0] = null;
for(var i = 0; i < data.length ; i+=2)
{
var optionName = new Option(data[i+1], data[i], false, false);
var length = document.addCust.idtppz.length;
document.addCust.idtppz.options[length] = optionName;
}
/// set it to -1, except when the OS is MAC, because IE on the MAC can't handle this.
if(navigator.userAgent.indexOf('Mac') == -1) 
document.addCust.idtppz.selectedIndex = -1;
else 
document.addCust.idtppz.options[0].selected = true;
}
///:::::::::::::::::: Modificar anuncio ::::::::::::::::::::::::::::::::::::::::::::::::::::
function combomodpieza(data)
{
for (var i = document.modCust.idtppz.length ; i > 0 ; i--)
document.modCust.idtppz.options[0] = null;
for(var i = 0; i < data.length ; i+=2)
{
var optionName = new Option(data[i+1], data[i], false, false);
var length = document.modCust.idtppz.length;
document.modCust.idtppz.options[length] = optionName;
}
/// set it to -1, except when the OS is MAC, because IE on the MAC can't handle this.
if(navigator.userAgent.indexOf('Mac') == -1) 
document.modCust.idtppz.selectedIndex = -1;
else 
document.modCust.idtppz.options[0].selected = true;
}