var velocidadfoto = 10;
var velocidadtiempo = 5;
var esprincipal =  false;
function aclara(url,objeto, velo_foto, velo_time) {
	velot = velo_time;
	velof = velo_foto;
	dir=url;
	obj = objeto;
	if(navigator.appName == "Netscape") {
		cambiafoto(url, objeto);
	}
	else {
		if(window.restaurando) clearInterval(restaurando);
			aclarando=setInterval("aclara2(obj, dir, velof)", velot);
		}
}

function cambiafoto(direccion, objeto) {
	obj=objeto;
	obj.src=direccion;
}

function aclara2(cur2, direccion,velo) {
	if(cur2.filters.alpha.opacity>0) cur2.filters.alpha.opacity-=velo
	else {
		if(window.aclarando) clearInterval(aclarando);
		cambiafoto(direccion, cur2);
	}
}

function restaura(obj, velo_foto, velo_time) {
	velot = velo_time;
	velof = velo_foto;
	objeto=obj;
	restaurando=setInterval("restaura2(objeto,velof)", velot);
}

function restauranormal(objeto,velo_foto, velo_time) {
	velot = velo_time;
	velof = velo_foto;
		obj=objeto;
		restaurando=setInterval("restauranormal2(obj,velof)", velot);
}



function restaura2(cur2, velo) {
		velof = velo;
	if(cur2.filters.alpha.opacity < 100) cur2.filters.alpha.opacity+=velof
	else if(window.restaurando) {
			clearInterval(restaurando);
		cur2.filters.alpha.opacity=100

	}
	
}

function restauranormal2(cur1, velo) {
	if(cur1.filters.alpha.opacity < 100) cur1.filters.alpha.opacity+=velo;
	else if(window.restaurando) clearInterval(restaurando);
}

function high(which2) {
	theobject=which2;
	highlighting=setInterval("highlightit(theobject)",20);
}

function low(which2) {
	clearInterval(highlighting);
	which2.filters.alpha.opacity=55;
}
function highlightit(cur2) {
	if(cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=5
	else if(window.highlighting)
		clearInterval(highlighting)
}





