function textoampliado(valor) {
      		
      var posicionx, posiciony;
      var objeto = document.getElementById('global');
      posicionx = parseInt(objeto.offsetLeft)
      posiciony = parseInt(objeto.offsetTop)
      switch (valor) {
		case 'V':

		    document.getElementById('vialibresabuf').style.visibility = 'visible';
		    document.getElementById('vialibresabuf').style.position = 'absolute';
		    document.getElementById('vialibresabuf').style.left = posicionx + 500;
		    document.getElementById('vialibresabuf').style.top = posiciony + 415;
		    break;
		case 'F':
		    document.getElementById('grupofundosabuf').style.visibility = 'visible';
		    document.getElementById('grupofundosabuf').style.position = 'absolute';
		    document.getElementById('grupofundosabuf').style.left = posicionx + 500;
		    document.getElementById('grupofundosabuf').style.top = posiciony + 415;
		    break;
	        default: 
	            document.getElementById('vialibresabuf').style.visibility = 'hidden';
	            document.getElementById('grupofundosabuf').style.visibility = 'hidden';
	            break;
      }
}


function initexfot() { 

   window.document.getElementById("texto1").innerHTML = 'Rebajes de Piso';
   window.document.getElementById("texto2").innerHTML = 'Euro Taxi';
   window.document.getElementById("texto3").innerHTML = 'Mandos de Coduccion';
   window.document.getElementById("texto4").innerHTML = 'Plataformas';

}

var proxim = 0;
function rotarimg1() {

	img = document.getElementById("banner1");
	ftr = 'blendTrans(duration=1.5) revealTrans(duration=1.5,transition=6)';
	img.style.filter = ftr;

	var src = new Array();

	src[0] = 'img/portada/rp1.jpg';
	src[1] = 'img/portada/r1.jpg';
	src[2] = 'img/portada/rp2.jpg';
	src[3] = 'img/portada/r2.jpg';
	src[4] = 'img/portada/rp3.jpg';
	src[5] = 'img/portada/r3.jpg';
	src[6] = 'img/portada/rp4.jpg';
	src[7] = 'img/portada/r4.jpg';

	texto = new Array
	texto[0] = 'Rebajes de Piso';
	texto[1] = 'Rampas';
	texto[2] = 'Rebajes de Piso';
	texto[3] = 'Rampas';
	texto[4] = 'Rebajes de Piso';
	texto[5] = 'Rampas';
	texto[6] = 'Rebajes de Piso';
	texto[7] = 'Rampas';

	proxim++;
	if (proxim == src.length) proxim = 0;
	img.filters[0].apply();
	img.filters[1].apply();

	img.src = src[proxim];

	img.filters[0].play();
	img.filters[1].play();

        window.document.getElementById("texto1").innerHTML = texto[proxim];

	setTimeout("rotarimg1()",12000);	

}

var proxim2 = 0;
function rotarimg2() {

	img = document.getElementById("banner2");
	ftr = 'blendTrans(duration=1.5) revealTrans(duration=1.5,transition=6)';
	img.style.filter = ftr;

	var src = new Array();

	src[0] = 'img/portada/et1.jpg';
	src[1] = 'img/portada/ac1.jpg';
	src[2] = 'img/portada/et2.jpg';
	src[3] = 'img/portada/ac2.jpg';
	src[4] = 'img/portada/et3.jpg';
	src[5] = 'img/portada/ac3.jpg';
	src[6] = 'img/portada/et4.jpg';
	src[7] = 'img/portada/ac4.jpg';

	texto = new Array;
	texto[0] = 'Euro Taxi';
	texto[1] = 'Anclajes y Cinturones';
	texto[2] = 'Euro Taxi';
	texto[3] = 'Anclajes y Cinturones';
	texto[4] = 'Euro Taxi';
	texto[5] = 'Anclajes y Cinturones';
	texto[6] = 'Euro Taxi';
	texto[7] = 'Anclajes y Cinturones';

	proxim2++;
	if (proxim2 == src.length) proxim2 = 0;
	img.filters[0].apply();
	img.filters[1].apply();

	img.src = src[proxim2];

	img.filters[0].play();
	img.filters[1].play();

        window.document.getElementById("texto2").innerHTML = texto[proxim2];

	setTimeout("rotarimg2()",12000);	

}

var proxim3 = 0;
function rotarimg3() {

	img = document.getElementById("banner3");
	ftr = 'blendTrans(duration=1.5) revealTrans(duration=1.5,transition=6)';
	img.style.filter = ftr;

	var src = new Array();

	src[0] = 'img/portada/m1.jpg';
	src[1] = 'img/portada/ar1.jpg';
	src[2] = 'img/portada/m2.jpg';
	src[3] = 'img/portada/e1.jpg';
	src[4] = 'img/portada/m3.jpg';
	src[5] = 'img/portada/ar2.jpg';
	src[6] = 'img/portada/m4.jpg';
	src[7] = 'img/portada/e2.jpg';


	texto = new Array;
	texto[0] = 'Mandos de Conduccion';
	texto[1] = 'Asientos y reposacabezas';
	texto[2] = 'Mandos de Conduccion';
	texto[3] = 'Escalones';
	texto[4] = 'Mandos de Conduccion';
	texto[5] = 'Asientos y reposacabezas';
	texto[6] = 'Mandos de Conduccion';
	texto[7] = 'Escalones';
	
	proxim3++;
	if (proxim3 == src.length) proxim3 = 0;
	img.filters[0].apply();
	img.filters[1].apply();

	img.src = src[proxim3];

	img.filters[0].play();
	img.filters[1].play();

        window.document.getElementById("texto3").innerHTML = texto[proxim3];

	setTimeout("rotarimg3()",12000);	

}

var proxim4 = 0;
function rotarimg4() {

	img = document.getElementById("banner4");
	ftr = 'blendTrans(duration=1.5) revealTrans(duration=1.5,transition=6)';
	img.style.filter = ftr;

	var src = new Array();

	src[0] = 'img/portada/p1.jpg';
	src[1] = 'img/portada/g1.jpg';
	src[2] = 'img/portada/p2.jpg';
	src[3] = 'img/portada/g2.jpg';
	src[4] = 'img/portada/p3.jpg';
	src[5] = 'img/portada/g3.jpg';
	src[6] = 'img/portada/p4.jpg';
	src[7] = 'img/portada/g4.jpg';

	texto = new Array;
	texto[0] = 'Plataformas';
	texto[1] = 'Gruas y robots';
	texto[2] = 'Plataformas';
	texto[3] = 'Gruas y robots';
	texto[4] = 'Plataformas';
	texto[5] = 'Gruas y robots';
	texto[6] = 'Plataformas';
	texto[7] = 'Gruas y robots';

	proxim4++;
	if (proxim4 == src.length) proxim4 = 0;
	img.filters[0].apply();
	img.filters[1].apply();

	img.src = src[proxim4];

	img.filters[0].play();
	img.filters[1].play();

    window.document.getElementById("texto4").innerHTML = texto[proxim4];

	setTimeout("rotarimg4()",12000);	

}

