// JavaScript Document

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function jumpVirtual() 
{
var pagina=document.getElementById("juizadosVirtuais")[document.getElementById("juizadosVirtuais").selectedIndex].value;
if (pagina!="")
	window.open(document.getElementById("juizadosVirtuais")[document.getElementById("juizadosVirtuais").selectedIndex].value);
}

function jumpPeticaoVirtual() 
{
var pagina=document.getElementById("peticaoVirtual")[document.getElementById("peticaoVirtual").selectedIndex].value;
var propriedade='location=no,resizable=no,toolbar=no,scrollbars=no,status=yes,menubar=no'; 

if (pagina!="")
	window.open(document.getElementById("peticaoVirtual")[document.getElementById("peticaoVirtual").selectedIndex].value,"Creta",propriedade);
}

function alimentarMenus()
{
var menuVirtuais;
var i=0;

menuVirtuais=document.getElementById("juizadosVirtuais"); 

menuPeticoesVirtuais=document.getElementById("peticaoVirtual"); 

for (i=menuPeticoesVirtuais.length;i>=0;i--)
	menuPeticoesVirtuais.remove(i);

menuPeticoesVirtuais.options.add(new Option("Sistema Virtual - CRETA"));
menuPeticoesVirtuais.options.add(new Option("CRETA Ceara","http://wwws.jfce.gov.br/cretace/"));
//menuPeticoesVirtuais.options.add(new Option("CRETA Treinamento","http://www.jfce.gov.br/creta/manutencao.jsp"));

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//funções do rolamento de notícias - INÍCIO

function movedown()
{
if (window.moveupvar) clearTimeout(moveupvar)
if (iens6&&parado==0)
	{
	crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
	if(parseInt(crossobj.style.top)<(contentheight*(-1)))
		{
		stopscroll()
		movetop()
		}
	}
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",70)
}

function moveup()
{
if (window.movedownvar) clearTimeout(movedownvar)
if (iens6&&parado==0)
	crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
	else 
	if (ns4&&crossobj.top<=0)
		crossobj.top+=speed
moveupvar=setTimeout("moveup()",70)
if(parseInt(crossobj.style.top)==0)
	{
	stopscroll()
	movedown()
	}
}

function subir()
{
parado=0;
}

function descer()
{
parado=0;
}

function parar()
{
parado=1;
}

function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)
}

function movetop(){
stopscroll()
if (iens6)
crossobj.style.top=0+"px"
else if (ns4)
crossobj.top=0
}

function getcontent_height()
{
if (iens6)
	contentheight=crossobj.offsetHeight
	else if (ns4)
	document.nscontainer.document.nscontent.visibility="show"
}

//funções do rolamento de notícias - FIM