<!--
	/***************** INICIO FOTONOTICIA ***********************************/

	var timeOut;
	function rota(id,num) {
		if(noticias = window.document.getElementById('fotonoticia-' + id)) {
			for(inoticia in noticias.childNodes) {
				noticia = noticias.childNodes[inoticia];
				if((typeof(noticia.id) != "undefined") && (noticia.id.indexOf('fotonoticia-' + id) == 0))
					noticia.style.display = "none";
			}
			if(noticia = window.document.getElementById('fotonoticia-' + id + '-' + num))
				noticia.style.display = "";
		}
		if(pestanas = window.document.getElementById('fotonoticia-thumb-' + id)) {
			for(ipestana in pestanas.childNodes) {
				pestana = pestanas.childNodes[ipestana];
				if((typeof(pestana.id) != "undefined") && (pestana.id.indexOf('fotonoticia-thumb-' + id) == 0))
					pestana.className = "thumb";
			}
			if(pestana = window.document.getElementById('fotonoticia-thumb-' + id + '-' + num))
				pestana.className = "thumb activo";
		}
		num++;
		if (num > 3){
			num = 1;
		}
		timeOut = window.setTimeout("rota(" + id + ", " + num +")", 4500);
	}
	
	function fotoNoticia(id,num) {
		window.clearTimeout(timeOut);
		if(noticias = window.document.getElementById('fotonoticia-' + id)) {
			for(inoticia in noticias.childNodes) {
				noticia = noticias.childNodes[inoticia];
				if((typeof(noticia.id) != "undefined") && (noticia.id.indexOf('fotonoticia-' + id) == 0))
					noticia.style.display = "none";
			}
			if(noticia = window.document.getElementById('fotonoticia-' + id + '-' + num))
				noticia.style.display = "";
		}
		if(pestanas = window.document.getElementById('fotonoticia-thumb-' + id)) {
			for(ipestana in pestanas.childNodes) {
				pestana = pestanas.childNodes[ipestana];
				if((typeof(pestana.id) != "undefined") && (pestana.id.indexOf('fotonoticia-thumb-' + id) == 0))
					pestana.className = "thumb";
			}
			if(pestana = window.document.getElementById('fotonoticia-thumb-' + id + '-' + num))
				pestana.className = "thumb activo";
		}
	}
	function fotoPestana(id,accion) {
		window.clearTimeout(timeOut);
		if(pestanas = window.document.getElementById('fotonoticia-thumb-' + id)) {
			var inicio = 0;
			var fin = 3;
			var total = 0;
			for(ipestana in pestanas.childNodes) {
				pestana = pestanas.childNodes[ipestana];
				if((typeof(pestana.id) != "undefined") && (pestana.id.indexOf('fotonoticia-thumb-' + id) == 0)) {
					datosPestana = pestana.id.split('-');
					numPestana = parseInt(datosPestana[datosPestana.length - 1]);
					if((inicio == 0) && (pestana.style.display == "")) inicio = numPestana;
					if((numPestana > 3) && (pestana.style.display == "")) fin = numPestana;
					pestana.style.display = 'none';
					total += 1;
				}
			}
			if((fin < total) && (accion == "+")) {
				inicio = inicio + 1;
				fin = fin + 1;
			}
			if((inicio > 1) && (accion == "-")) {
				inicio = inicio - 1;
				fin = fin - 1;
			}
			if(flecha = window.document.getElementById('fotonoticia-thumb-izq-' + id))
				flecha.style.display = inicio == 1 ? 'none' : '';
			if(flecha = window.document.getElementById('fotonoticia-thumb-der-' + id))
				flecha.style.display = fin == total ? 'none' : '';
			for(i=inicio;i<=fin;i++) {
				if(pestana = window.document.getElementById('fotonoticia-thumb-' + id + '-' + i))
					pestana.style.display = "";
			}
		}
	}
	/***************** FIN FOTONOTICIA ***********************************/