function vehiculo (index, id_marca, marca, id_linea, linea, id_especificacion, especificacion, modelo, precioventa, kilometraje, placa, codigo, idfichatecnica) {
 this.index = index;
 this.id_marca = id_marca;
 this.marca = marca;
 this.id_linea = id_linea;
 this.linea = linea;
 this.id_especificacion = id_especificacion;
 this.especificacion = especificacion;
 this.modelo = modelo;
 this.precioventa = precioventa;
 this.kilometraje = kilometraje;
 this.placa = placa;
 this.codigo = codigo;
 this.idfichatecnica = idfichatecnica;
}
function get_random(maxNum) {
 if (Math.random && Math.round)
 {
  var ranNum= Math.round(Math.random()*(maxNum-1));
  ranNum+=1;
  return ranNum;
 }
 else
 {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}
function modificarSelect (modo) {
  if (modo == 1) {
    document.getElementById('nuevos').className ='comboxclatresactivo';
    document.getElementById('usados').className ='comboxclatresinactivo';
	document.getElementById('selectnuevos').disabled = false;
	document.getElementById('selectusados').disabled = true;
  }
  else {
    document.getElementById('nuevos').className ='comboxclatresinactivo';
    document.getElementById('usados').className ='comboxclatresactivo';
	document.getElementById('selectnuevos').disabled = true;
	document.getElementById('selectusados').disabled = false;
  }     
}
