var mida;
var imatge = new Array();
imatge[0] = new Image(107,107);
imatge[0].src = "./buses/bus1.jpg";

imatge[1] = new Image(107,107);
imatge[1].src = "./buses/bus8.jpg";

imatge[2] = new Image(107,107);
imatge[2].src = "./buses/bus3.jpg";

imatge[3] = new Image(107,107);
imatge[3].src = "./buses/bus11.jpg";

/* BackUp old rojo function ... */

function rojo_old(objeto)
	{
	document.getElementById(objeto).style.color="red";
	document.getElementById(objeto).style.fontFamily="Comic Sans MS";  /*"Times new Roman";  */

	
	document.getElementById(objeto).style.fontSize="19pt"; 
	document.getElementById(objeto).style.background="orange"; 
	
	
	if (objeto =="Inftitol") 
	{	CanviBus(2);
		
	}
	else 
	{        CanviBus(3); }
		
	}
/* -----------------------------------*/ 


function Destaca(objeto)
	{
	var obj = document.getElementById(objeto);
	
	obj.style.color="red";
	obj.style.fontFamily="Comic Sans MS";  /*"Times new Roman";  */

	
	obj.style.fontSize="19pt"; 
	obj.style.background="orange"; 
	
	
	if (objeto =="Inftitol") 
	{	
		CanviBus(2);
		BlurMe("Primaria",1);
		
	}
	else 
	{        
		CanviBus(3);
		BlurMe("Infantil",1);	
		}
		
	}
	

function BlurMe(objeto, On)
{
	var obj = document.getElementById(objeto);
	
	if (On==0) {
			if (obj.filters)
			{
				
				obj.style.filter= "alpha(opacity= 100)";  
				/* obj.filters.alpha.opacity=100;  /* Curiosament ara va bé amb aquest sintaxi !!!*/
				
			}
			 else 
			 {
				obj.style.opacity=1;
				
			};
		}
	else
	{
		if (obj.filters)
		{
			 obj.style.filter= "alpha(opacity= 35)";
			/* obj.filters.alpha.opacity=40;  /* Curiosament ara va bé amb aquest sintaxi !!!*/
		} else {
			obj.style.opacity=0.35;
		};
	}
	
	
	
	
	
	
	
	
}
	



function ResetInfantil(objeto)
	{
	document.getElementById(objeto).style.color="#E7FBFE";
	document.getElementById(objeto).style.fontFamily="Arial";
	document.getElementById(objeto).style.fontSize="18pt"; 
	document.getElementById(objeto).style.background="#68e"; 
	/* Primaria.style.background="none";  */
	
	CanviBus(0);
	BlurMe("Primaria",0);/* Restablece el brillo de la zona opuesta a Infantil */ 
	}

function ResetPrimaria(objeto)
	{
	document.getElementById(objeto).style.color="#E7FBFE";
	document.getElementById(objeto).style.fontFamily="Arial";
	document.getElementById(objeto).style.fontSize="18pt"; 
	document.getElementById(objeto).style.background="#d24"; 
	/* Primaria.style.background="none";  */
	
	CanviBus(0);
	BlurMe("Infantil",0); 
	}



/* Funcions de canvi d'imatge del Bus */

	
function CanviBus(x)
	{
  	document.bus.src = imatge[x].src ;	
	
	}
