/*****************************************************************************
Efecto en imagen. Script creado por Tunait!(2002)
Actualizado el 28/12/2003
Si quieres usar este script en tu sitio eres libre de hacerlo con la condición de que permanezcan intactas estas líneas, osea, los créditos.
No autorizo a publicar y ofrecer el código en sitios de script sin previa autorización
Si quieres publicarlo, por favor, contacta conmigo.
http://javascript.tunait.com/
tunait@yahoo.com 
******************************************************************************/
var iex = navigator.appName=="Microsoft Internet Explorer"?true:false;
var fi = iex?'filters.alpha.opacity':'style.MozOpacity'
var opaMax= iex?100:1;
var opaMin= iex?50:0.5;
var inc = iex?5:0.05;
function subir(cual){
	opa = new Number(eval('cual.' + fi))
	eval('cual.' + fi + '= opa + inc')
	if(opa< opaMax){
		tiempo2=setTimeout("subir(imagen)",20)
	}
	if(opa == opaMax){
		clearTimeout(tiempo2)
	}
}
function bajar(cual){
	imagen = cual
	opa = new Number(eval('cual.' + fi))
	eval('cual.' + fi + '= opa + inc')
	if(opa > opaMin){
		eval('cual.' + fi + '= opa - inc')
		tiempo=setTimeout("bajar(imagen)",20)
		}
	if(opa == opaMin){
		clearTimeout(tiempo);
		subir(imagen)
		}
	}
	if(iex){
		with(document){
			write ('<style type="text/css" >')
			write ('#pepe {')
			write ('filter: alpha(opacity=100)}')
			write ('</style>')
		}
	}else{
		window.onload=function(){
			document.getElementById('pepe').style.MozOpacity = 1
			document.getElementById('ima1').style.MozOpacity = 1
			document.getElementById('ima2').style.MozOpacity = 1
			document.getElementById('ima3').style.MozOpacity = 1
			document.getElementById('ima4').style.MozOpacity = 1
			document.getElementById('ima5').style.MozOpacity = 1
			document.getElementById('ima6').style.MozOpacity = 1
			document.getElementById('ima7').style.MozOpacity = 1
			document.getElementById('ima8').style.MozOpacity = 1
			document.getElementById('ima9').style.MozOpacity = 1
			document.getElementById('ima10').style.MozOpacity = 1
			document.getElementById('ima11').style.MozOpacity = 1
			document.getElementById('ima12').style.MozOpacity = 1
			document.getElementById('ima13').style.MozOpacity = 1
			document.getElementById('ima14').style.MozOpacity = 1
	}
}