//from http://www.disegnocentell.com.ar
function set_opacity(div, value) { 
    div.style.opacity = value; 
    div.style.MozOpacity = value; 
    div.style.KhtmlOpacity = value; 
    div.style.filter = 'alpha(opacity=' + value*100 + ')'; 
    div.style.zoom=1;//necesario para Explorer 
} 
//var transicion=function(inicio,fin,segundos){ 
var transicion=function(inicio,fin,milisegundos,avanzar){ 
	if (!avanzar){
		avanzar=1;	
	}
	this.avanzar=avanzar; 
	var _this=this; 
    this.test=0; 
    if(_this.intervalo)clearInterval(_this.intervalo); 
    if(this.val && Math.abs(fin-_this.val)<0.01)return; 
    this.val=!this.val?inicio<1?inicio+.0001:inicio:this.val; 
    set_opacity(this, this.val); 
    this.pasos=(fin-inicio)/100; 
 //   this.pausa=segundos*10; 
    this.pausa=milisegundos; 
	///document.getElementById("log").innerHTML+="pasos: "+this.pasos+"<br>";
	//document.getElementById("log").innerHTML+="pausa: "+this.pausa+"<br>";
    this.intervalo=setInterval( 
    function(){ 
        if(_this.test>99 || Math.abs(fin-_this.val)<0.01){ 
          clearInterval(_this.intervalo); 
        } 
        _this.test++; 
       // document.getElementById("log").innerHTML+=_this.test; 
        _this.val=_this.val+(_this.pasos * _this.avanzar); 
        if(_this.val<=.01)  
            _this.style.display='none'; 
        else 
            _this.style.display=''; 
        set_opacity(_this, _this.val); 
    },this.pausa); 
}
function fp_hide_tr(id,mseg,av){
	
	var objeto=fp_get_element_by_id(id);
	if (objeto!=null ) {
		transicion.call(objeto,1,0,mseg,av); 
	}
}
function fp_show_tr(id,mseg,av){
	var objeto=fp_get_element_by_id(id);
	if (objeto!=null ) {
		transicion.call(objeto,0,1,mseg,av); 
	}
}
