//Verificar browser
ie=document.all?1:0
n=document.layers?1:0
ns6=document.getElementById&&!document.all?1:0

//Margem em relação ao topo
var mov = 5;

//Definir variaveis de posicionamento
if (n||ns6){
	var scrolling = "window.pageYOffset"; 
} else if (ie){
	var scrolling="document.body.scrollTop"; 
}

function mover_chato(){
	var chato = document.getElementById('pubMovel');

    if (n||ns6){
        var posActual = chato.offsetTop;
    } else if (ie){
        var posActual = chato.style.pixelTop;
    }
    var posFinal = eval(scrolling)+parseInt(mov);
    var diferenca = posActual - posFinal;
    var movimento = Math.round(diferenca / 6);
    if (n||ns6){
        chato.style.top = eval(scrolling)+'px';
    } else if (ie){
        chato.style.pixelTop = '300px';//eval(movimento)+'px';//Fiquei aqui... em ie nao funciona
    }
    setTimeout("mover_chato()", 10);
}

function fecha_chato(){
    document.getElementById('pubMovel').style.display = 'none';
}