function aleatorio(inf,supe){ // Genera un número aleatorio entre inf y sup (ambos incluidos)
	numP = supe - inf; 
	rnd = Math.random() * numP;
	rnd = Math.round(rnd);
	return parseInt(inf) + rnd;
} 

//creo array de imágenes
array_imagen = new Array(5)
array_imagen[0] = new Image(120,41)
array_imagen[0].src = "/santadrianord/img/header_01.jpg"
array_imagen[1] = new Image(120,41)
array_imagen[1].src = "/santadrianord/img/header_02.jpg"
array_imagen[2] = new Image(120,41)
array_imagen[2].src = "/santadrianord/img/header_03.jpg"
array_imagen[3] = new Image(120,41)
array_imagen[3].src = "/santadrianord/img/header_04.jpg"
array_imagen[4] = new Image(120,41)
array_imagen[4].src = "/santadrianord/img/header_05.jpg"

num_ale = aleatorio(0,4); // Mostrará un número aleatorio enter 5 y 10

//variable para llevar la cuenta de la imagen siguiente
contador = num_ale;

//función para rotar el banner
function alternar_banner(){
	window.document["banner"].src = array_imagen[contador].src
	contador ++
	contador = contador % array_imagen.length
}

function detectBrowser() {
	var ie = document.all != undefined;
	var opera = window.opera != undefined;
	
	if (opera) return "opera";
	if (ie) return "ie";
	if ((window)&&(window.netscape)&&(window.netscape.security)) {
	  if (window.XML) {
		return "firefox15";
	  }
	  else return "firefox10";
	}
	return "ie";      // Si no sabemos que navegador es, devolvemos ie.
}

function zoomText(Accion,Elemento){
	//inicializacion de variables y parámetros
	var obj=document.getElementById(Elemento);
	var max = 120 //tamaño máximo del fontSize
	var min = 100 //tamaño mínimo del fontSize

	if (obj.style.fontSize==""){
		obj.style.fontSize="100%";
	}
	actual=parseInt(obj.style.fontSize); //valor actual del tamaño del texto
	incremento=10;// el valor del incremento o decremento en el tamaño

	//accion sobre el texto
	if( Accion=="reestablecer" ){
		obj.style.fontSize="100%"
	}
	if( Accion=="aumentar" && ((actual+incremento) <= max )){
		valor=actual+incremento;
		obj.style.fontSize=valor+"%"
	}
	if( Accion=="disminuir" && ((actual+incremento) >= min )){
		valor=actual-incremento;
		obj.style.fontSize=valor+"%"
	}
}	