    function carrega_listagem(total, central){
        var aux=0;
        while(aux<total){
            var quadro = document.getElementById('prg_'+aux);
            quadro.style.display = 'none';
            //window.alert('foi');
            aux++;
        }
        if(central < 3){
            var ini=0;
        }else if((central+3)>total){
            var ini=total-5;
        }else{
            var ini = central-2;
        }
        var aux2 = 0;
        while(aux2<5){
            var exibe = document.getElementById('prg_'+(aux2+ini));
            exibe.style.display = 'block';
            aux2++;
        }

//      window.alert(total+' - '+central);
    }
    function move_prog(total, sentido){
        central = document.getElementById('central_field');
        atual = central.value;
        if(sentido=="dir"){
            novo = parseInt(atual)+1;
        }else{
            novo = parseInt(atual)-1;
        }
        if(novo>1 && novo<(total-2)){
            carrega_listagem(total, novo);
            central.value = novo;
        }
    }

var clear="http://img.rpc.com.br/clear.gif" //path to clear.gif

try{
pngfix=function(){var els=document.getElementsByTagName('*');var ip=/\.png/i;var i=els.length;while(i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(ip)&&!es.filter){es.height=el.height;es.width=el.width;es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src=clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(ip)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage='none';var elkids=el.getElementsByTagName('*');if (elkids){var j=elkids.length;if(el.currentStyle.position!="absolute")es.position='static';while (j-- >0)if(!elkids[j].style.position)elkids[j].style.position="relative";}}}}}
window.attachEvent('onload',pngfix);
}catch(e){}
