function ancho(div,max,inc,tim){ // (DIVm,Tamaño maximo,Incremento,Tiempo)
                var obj = document.getElementById(div);
                tam = obj.offsetWidth;
                tam = tam + inc;
                        if(tam <= max){
                                        obj.style.width = tam;
                                        setTimeout("ancho('" + div + "'," + max + "," + inc + "," + tim + ")",tim);
                        }else
                                return 1;
        }

        function largo(div,max,inc,tim){ // (DIV,Tamaño maximo,Incremento,Tiempo)
                var obj = document.getElementById(div);
                tam = obj.offsetHeight;
                tam = tam + inc;
                        if(tam <= max){
                                        obj.style.height = tam;
                                        setTimeout("largo('" + div + "'," + max + "," + inc + "," + tim + ")",tim);
                        }else
                                return 1;
        }

        function dev(id,opa,num,inter){
                var obj = document.getElementById(id);
                opa = opa - num;
		//alert('entro');
                if(opa >= 0){
                        obj.style.opacity = opa * 0.01;
                        obj.style.MozOpacity = opa * 0.01;
                        obj.style.KhtmlOpacity = opa * 0.01;
                        obj.style.filter = "alpha(opacity=" + opa + ")";
                        setTimeout("aclara('" + id + "'," + opa + "," + num +","+ inter + ")",inter);
                }else
                        return 1;
        }

        function aclara(id,opa,num,inter){
                var obj = document.getElementById(id);
                opa = opa + num;
//		alert('entro');
                if(opa <= 100){
                        obj.style.opacity = opa * 0.01;
                        obj.style.MozOpacity = opa * 0.01;
                        obj.style.KhtmlOpacity = opa * 0.01;
                        obj.style.filter = "alpha(opacity=" + opa + ")";
                        setTimeout("aclara('" + id + "'," + opa + "," + num +","+ inter + ")",inter);
                }else
                        return 1;
        }

        function activa(div){
	        //setTimeout("ancho(div,800,50,1)",0);
                //setTimeout("largo(div,500,50,1)",0);
                setTimeout("aclara(div,0,20,1)",1000);
        }
