// JavaScript Document
var referenciaEstilo;

var capaVisible;

var navegador;

if (navigator.appName == "Netscape") {

referenciaEstilo = "";

capaVisible="show";

navegador = "Netscape"; }

else {

referenciaEstilo = "style.";

capaVisible="visible";

navegador = "Explorer"; }

function referenciaCapa(nombreCapa) {

if (navegador=="Netscape")

return "document.layers['"+nombreCapa+"'].";

else

return "document.all['"+nombreCapa+"'].";

}

function high(which2){
			theobject=which2;
			highlighting=setInterval("highlightit(theobject)",50);
		}	
		function low(which2){
			clearInterval(highlighting);
			which2.filters.alpha.opacity=25;
		}
		function highlightit(cur2){
			if(cur2.filters.alpha.opacity<100)
				cur2.filters.alpha.opacity+=5
			else if(window.highlighting)
				clearInterval(highlighting)
		}
		function ocultarCapa(nombreCapa) {
			transparente(nombreCapa,0,00, 5);
			eval(referenciaCapa(nombreCapa)+referenciaEstilo+'visibility = "hidden"');
		}
		function CambiarImagen (nombreCapa, objetoImagen, tamaņo) {
			
			eval(referenciaCapa(nombreCapa)+referenciaEstilo+'visibility = "visible"');
			//fadeIn(10);
			transparente(nombreCapa,100,00,5);
			document.imagen.src = objetoImagen;
			document.imagen.width = tamaņo;
	    }
		objetos = new Object(); 
		tiempotrans = new Object(); 

		function transparente(object, destOp, rate, delta){ 
			if (!document.all) 
				return 
			if (object != "[object]"){ 
				setTimeout("transparente("+object+","+destOp+","+rate+","+delta+")",0); 
				return; 
				} 
			
		clearTimeout(tiempotrans[object.sourceIndex]); 

		diff = destOp-object.filters.alpha.opacity; 
		direccion = 1; 
		if (object.filters.alpha.opacity > destOp){ 
			direccion = -1; 
		} 
		delta=Math.min(direccion*diff,delta); 
		object.filters.alpha.opacity+=direccion*delta; 
		
		if (object.filters.alpha.opacity != destOp){ 
			objetos[object.sourceIndex]=object; 
			tiempotrans[object.sourceIndex]=setTimeout("transparente(objetos["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate); 
		} 
	}	 		
		var IE_X, IE_Y, AntX, AntY, RatonPulsado = false;

	  function InicioArrastre(capa) {
		    if (event.button == 1) {
	  /* Coordenadas auxiliares */
	      AntX = modulo.style.pixelLeft;
	      AntY = modulo.style.pixelTop;
	      IE_X = event.clientX;
	      IE_Y = event.clientY;
		  //modulo.filters.alpha.opacity = 75;
	      RatonPulsado = true;
	      document.onmousemove = Arrastrar;
	      return false;
      		}
    	}

  function FinArrastre() {
    if (event.button == 1) {
	  //modulo.filters.alpha.opacity = 50;
      RatonPulsado = false;
      return false;
      }
    }

  function Arrastrar() {
    if (RatonPulsado) {
		document.all.modulo.style.posLeft = AntX + event.clientX - IE_X;
	  	document.all.modulo.style.posTop = AntY  + event.clientY - IE_Y;
      return false;
      }
    }

 document.onmouseup = FinArrastre;


