var tiempo = 0;
var not = -1 ;
var max_not = -1;

function muestra_noticia(noticia){
	//Buscamos la noticia mas alta
	
	if(not ==	-1){		
		for($i=100; $i>0; $i--){
			if(document.getElementById('divNot_' + $i)){
				//Existe
				noticia = 0;
				max_not = $i;
				break;
			}
		}
	}
	

	if(noticia ==  (max_not+1)) noticia = 0;
	
	if(noticia == 0){
		//No ocultamos mostramos la primera
		setTimeout("",750);

//		$('#divNot_' + max_not).hide('fast');
//		$('#divNott_' + max_not).hide('fast');
		
		document.getElementById('divNot_' + max_not).style.display = 'none';
		document.getElementById('divNott_' + max_not).style.display = 'none';
		
		document.getElementById('divNot_0').style.display = 'block';
		document.getElementById('divNott_0').style.display = 'block';
//		$('#divNot_0').show('fast');
//		$('#divNott_0').show('fast');
		
//		document.getElementById('divNot_0').style.display = 'block';
//		document.getElementById('divNott_0').style.display ='block';
	}else{
		setTimeout("oculta(" + noticia + ")",750);
	}

	not++;
	var t=setTimeout("muestra_noticia(" + (noticia +1) + ")",18000);
}
function oculta(muestra){

//	$('#divNot_' + (muestra -1)).hide('fast');
//	$('#divNott_' + (muestra -1)).hide('fast');
	
//	document.getElementById('divNot_' + (muestra -1)).style.display = 'none';
//	document.getElementById('divNott_' + (muestra -1)).style.display = 'none';
	
//	document.getElementById('divNot_' + muestra).style.display = 'block';
//	document.getElementById('divNott_' + muestra).style.display = 'block';
//	$('#divNot_' + muestra).show('fast');
//	$('#divNott_' + muestra).show('fast');
	
//	document.getElementById('divNot_' + (muestra)).style.display = 'none';
//	document.getElementById('divNott_' + (muestra)).style.display = 'none';
}
function ver_por_dias(){
	 window.open('http://www.pordias.servicioalquiler.com');
}

