var ns = document.layers;
var ie = document.all;
var ns6 = (document.getElementById && !document.all);
var div_Move;
var pos_inicial = 2;
var lastScrollY = 0;
var body_central;

function EventoScrol()
{
	var percent;
	
	if(document.body.scrollTop != lastScrollY) 
	{
		
		percent = .3 * (document.body.scrollTop - lastScrollY);
	
		if(percent > 0) 
		{
			percent = Math.ceil(percent);
		}
		else 
		{
			percent = Math.floor(percent);
		}
		if(ie) 
		{
			if (document.body.scrollTop < 384){

			pos_inicial = 384;	
			}
			if (document.body.scrollTop > document.body.scrollHeight-3750){
			pos_inicial = document.body.scrollHeight-3750;
			}
			
			
			pos_inicial += percent; 
			div_Move.pixelTop = pos_inicial;
		}
		if(ns) 
		{			
			div_Move.top = div_Move.top + percent;
		}
		if(ns6)
		{
			if (document.body.scrollTop < 384){

			pos_inicial = 384;	
			}
			if (document.body.scrollTop > document.body.scrollHeight-3750){
			pos_inicial = document.body.scrollHeight-3750;
			}
			pos_inicial += percent;
			div_Move.top = pos_inicial;
		}		
		lastScrollY = lastScrollY + percent;
	}
	setTimeout('EventoScrol()',50);
}

function SetaDivMove()
{
	if(ie) 
	{
		div_Move = document.all['CSeg'].style;
		body_central = document.all['central'].style;
	}
	else if(ns)
	{
		div_Move = document.CSeg;
		body_central = document.central;
	}
	else if(ns6)
	{
		div_Move = document.getElementById('CSeg').style;
		body_central = document.getElementById('central').style;
	}
	EventoScrol();
	
	if(screen.width <= 640)
	{
		body_central.overflow='auto';
	}
}

function ReloadTop()
{ 
	try
	{
	parent.frames[0].frames.document.FormIB2001.AGN.focus(); 
	}
	catch(e)
	{
	var detect = navigator.userAgent.toLowerCase();
	if (detect.indexOf('mac') < 1)
	{}
	}
	SetaDivMove();
}