function fadein(x) {
    
      $('#'+x).fadeTo("fast", 0);
}

function fadeout(x) {
    
      $('#'+x).fadeTo("fast", 1);
}

function adelante() {

	$(".tablaclientesgrande").stop();
	$(".tablaclientesgrande").animate({
		marginLeft: "-622px"
	},1000);

};

function atras() {

	$(".tablaclientesgrande").stop();
	$(".tablaclientesgrande").animate({
		marginLeft: "0px"
	},1000);

};

function inicio() {
	// la primera novedad (nov0) se debe mostrar
	var novedad = document.getElementById('nov'+0);
	novedad.style.display = 'block';
	
	idnov = 0;
	botones();		// llamo a la funcion para habilitar o deshabilitar los botones
	
}

function adelnov() {
	var idsiguiente = idnov+1;

	document.getElementById('nov'+idnov).style.display = 'none';			// oculto el actual

	document.getElementById('nov'+idsiguiente).style.display = 'block';			 // y muestro el siguiente

	idnov = idsiguiente;
	
	botones();
		
}

function atrasnov() {
	var idanterior = idnov-1;

	document.getElementById('nov'+idnov).style.display = 'none';			// oculto el actual

	document.getElementById('nov'+idanterior).style.display = 'block';			 // y muestro el anterior

	idnov = idanterior;

	botones();

}

function botones() {		// funcion que habilita o deshabilita botones
	
	if(idnov == 0)							// si es el primer item, no se puede ir más a la izquierda		
		document.getElementById('left').disabled = true;
	else
		document.getElementById('left').disabled = false;
		

	if(idnov == 1)				// si es el ultimo item, no se puede ir más a la derecha	
		document.getElementById('right').disabled = true;
	else
		document.getElementById('right').disabled = false;
	
}	
