// JavaScript Document
	function carru() {
		if (playa == 0) {
			window.clearInterval(intval);
			document.getElementById("botonPlay").src="imagenes/play.png";
			playa = 1;
		} else if (playa == 1) {
			intval=setInterval("setSrc()",7000);
			document.getElementById("botonPlay").src="imagenes/pause.png";	
			playa = 0;
		}
}
function setRes() {
   			if (aux == 0){
				aux = longitudImagenes-1;
			} else {
				aux = aux-1;
			}

   			var imagenAux  = imagenes[aux];
			var imagenAuxi = inicial+imagenAux+final;
   		  	var elemento = document.getElementById("imagenNoticias");
           	elemento.style.backgroundImage = imagenAuxi;
			if(planOindice == 0) {//si estamos en planes
				if (tiene[aux] == 0) {//si no tiene link
					if(idioma == 0) {// si esta en castellano
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/planes.php?lan=0";
					} else if (idioma == 1) {// si esta en ingles
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/planes.php?lan=1";	
					}
					
				} else if(tiene[aux] == 1) {//si tiene link
						document.getElementById("mismo").target = "_blank";					
						document.getElementById("mismo").href = enlace[aux];
				}
			} else if(planOindice == 1) {// si es en indice
				if (tiene[aux] == 0) {//si no tiene link
					if(idioma == 0) {// si esta en castellano
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/indice.php?lan=0";
					} else if (idioma == 1) {// si esta en ingles
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/indice.php?lan=1";	
					}
					
				} else if(tiene[aux] == 1) {//si tiene link
						document.getElementById("mismo").target = "_blank";	
						document.getElementById("mismo").href = enlace[aux];
				}			
			}
						
			document.getElementById("asuntoNoticias").innerHTML = asuntos[aux]; 
			document.getElementById("contenidoNoticias").innerHTML = contenidos[aux];
			
 }	
function setSrc() {
   			if (aux == longitudImagenes-1){
				aux = 0;
			} else {
				aux = aux+1;
			}

   			var imagenAux  = imagenes[aux];
			var imagenAuxi = inicial+imagenAux+final;
   		  	var elemento = document.getElementById("imagenNoticias");
           	elemento.style.backgroundImage = imagenAuxi;
			if(planOindice == 0) {//si estamos en planes
				if (tiene[aux] == 0) {//si no tiene link
					if(idioma == 0) {// si esta en castellano
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/planes.php?lan=0";
					} else if (idioma == 1) {// si esta en ingles
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/planes.php?lan=1";	
					}
					
				} else if(tiene[aux] == 1) {//si tiene link
						document.getElementById("mismo").target = "_blank";					
						document.getElementById("mismo").href = enlace[aux];
				}
			} else if(planOindice == 1) {// si es en indice
				if (tiene[aux] == 0) {//si no tiene link
					if(idioma == 0) {// si esta en castellano
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/indice.php?lan=0";
					} else if (idioma == 1) {// si esta en ingles
						document.getElementById("mismo").target = "_self";
						document.getElementById("mismo").href = "http://www.deandreasluma.com/indice.php?lan=1";	
					}
					
				} else if(tiene[aux] == 1) {//si tiene link
						document.getElementById("mismo").target = "_blank";				
						document.getElementById("mismo").href = enlace[aux];
				}			
			}
			document.getElementById("asuntoNoticias").innerHTML = asuntos[aux]; 
			document.getElementById("contenidoNoticias").innerHTML = contenidos[aux];
			
   }
