// JavaScript Document

var num = 0;
function chgtop(){
if(num < 5) num++;
else num = 1;
$GEBId("topslide").src = "imgs/index/chgimg_"+num+".jpg";
setTimeout("chgtop()", "10000");
}

var MOZ = (!document.all);

var top = 300+"px"; //quanto menor, mais para o topo e vice-versa

var pos = 11;   // posicao inicial noticias
var stp = 1;    // incremento
var spd = 40;   // velocidade com q é incrementado
var tim;         // timer

var upr=0;

function scroll_up() {
//alert("here");
	if(pos > upr) {
		pos -= stp;
	}
		
	pos = pos <= upr ? 80 : pos;

	do_scroll(pos);
	
	tim = setTimeout("scroll_up()", spd);
	
}

function do_scroll(pos) {

	document.getElementById('divTxt').style.top = pos+"px";


}

function no_scroll() {
	clearTimeout(tim);
}


function winopen(not,num){
	window.open(not,num,"width=400,height=300,top=120,left=200");
}


window.onload = function() {
walk("ind");
printDate();
clock();
oHome = 1;
chgtop();
upr= -(document.getElementById('divTxt').scrollHeight);	
scroll_up();
//if(MOZ) document.getElementById('newsmain').style.left = "116px";
}