menutimer=null;
newWin=null;
obj=null;
ox=7;
oy=-10;

if(lowResolution)alert("Sua placa de vídeo está configurada para exibição em 640x480 pixels.\nO site da Associação Brasileira de Imprensa é melhor visualizado em resolução de 800x600 pixels ou superior, com 16 bits (hi color) ou 24 bits (true color) de profundidade de cor.     ");

function openWin(url)
{
	newWin=window.open(url,'downloads','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=600,height=400');
	if(newWin!=null)newWin.focus();
}

function adjmenuScroll()
{
	if(!loaded)return false;
	dx=ie?document.body.scrollLeft:window.pageXOffset;
	dy=ie?document.body.scrollTop:window.pageYOffset;
	xpos=ns4?dynposmenuLayer.css.pageX:(op?(document.all["posmenuTD"].offsetLeft+document.all["posmenuTD"].offsetParent.offsetLeft+document.all["posmenuTD"].offsetParent.offsetParent.offsetLeft):dynposmenuLayer.getLeft());
	ypos=ns4?dynposmenuLayer.css.pageY:(op?121:dynposmenuLayer.getTop());
	if(dy>110)
	{
		if(dx!=ox||dy!=oy)
		{
			clearTimeout(menutimer);
			dynmenuLayer.hide();
			dynmenuLayer.moveTo(dx+7+xpos,dy-110+ypos);
			menutimer=setTimeout('dynmenuLayer.show()',500);
		}
		else dynmenuLayer.moveTo(dx+7+xpos,dy-110+ypos);
		ox=dx;
		oy=dy;
	}
	else
	{
		dynmenuLayer.moveTo(7+xpos,-10+ypos);
		dynmenuLayer.show();	
	}
	if(ns||op)setTimeout('adjmenuScroll()',100);
}

function changeClass(o,c)
{
	obj=getObj(o);
	obj.className=c;
}

function getObj2(obj){
	var theObj;
	if(typeof obj=='string')theObj=eval('document.getElementById("'+obj+'")');
	else theObj=obj;
	return theObj;
}

function getObj(n,d)
{ 
	var p,i,x;
	if(!d)d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length)
	{
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all)x=d.all[n];
	for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=getObj(n,d.layers[i].document);
	if(!x&&document.getElementById)x=document.getElementById(n);
	return x;
}

newWin=null;
function openImg(image,w,h){
	newWin=window.open('','galeriaABI','left=200,top=50,width='+(w+20)+',height='+(h+20));
	if(newWin!=null){
		newWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>ABI - Associa&ccedil;&atilde;o Brasileira de Imprensa</title></head><body topmargin="10" leftmargin="10" bottommargin="10" rightmargin="10" marginwidth="10" marginheight="10"><img src="/images/galeria/'+image+'" width="'+w+'" height="'+h+'"></body></html>');
	newWin.document.close();
	newWin.focus();
	}
}

newWin2=null;
function openWindow(url){
	newWin2=window.open(url,'contasABI','left=20,top=25,width=600,height=440,toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
	if(newWin2!=null)newWin2.focus();
}