
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-8205949-1");
pageTracker._trackPageview();
} catch(err) {}


function getScrollY () 
{
	var scrollY = 0;    
	if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop)
		scrollY = document.documentElement.scrollTop;
	else if (document.body && document.body.scrollTop) 
		scrollY = document.body.scrollTop; 
	else if (window.scrollY) scrollY = window.scrollY;
	return scrollY;
}

function PegaPosY() 
{
	var objPosY = MM_findObj("posY");
	if (objPosY != null){
		objPosY.value = getScrollY();
	}
}

function confirma () {
  if (confirm('Confirma a exclusão?')) {
    return true;
  }else{
    return false;
  }
}

function subMenu(id, nivel){
  if (document.getElementById(id).style.display == 'none') {
	document.getElementById(id).style.display = 'inline';
	document.getElementById("img"+id).src = nivel + '../_imagens/estruturaPrincipal/icoMenuMenos.gif';
  } else {
	document.getElementById(id).style.display = 'none';
	document.getElementById("img"+id).src = nivel + '../_imagens/estruturaPrincipal/icoMenuMais.gif';
  }
}

function over(id){
  document.getElementById(id).className = 'mouseOver';
}

function out(id){
  document.getElementById(id).className = 'mouseOut';
}


function filtroLayout(combo){
  document.location.href=combo[combo.selectedIndex].value;
}


function abrir() {
	var windowFeatures = "", nomeArquivo = "", nomeJanela = "", erro = null
	Argumentos = abrir.arguments; noArgumentos = Argumentos.length; nomeArquivo = Argumentos[0]
	for (i = 1; i < noArgumentos; i++) {
		valor = Argumentos[i].substring(2,Argumentos[i].length)
		switch(Argumentos[i].substring(0,2)) {
			case "nj" : nomeJanela = valor; break
			case "to" : windowFeatures += "top=" + valor + ", "; break
			case "le" : windowFeatures += "left=" + valor + ", "; break
			case "he" : windowFeatures += "height=" + valor + ", "; break
			case "wi" : windowFeatures += "width=" + valor + ", "; break
			case "lb" : windowFeatures += "location=" + valor + ", "; break
			case "mb" : windowFeatures += "menubar=" + valor + ", "; break
			case "sc" : windowFeatures += "scrollbars=" + valor + ", "; break
			case "st" : windowFeatures += "status=" + valor + ", "; break
			case "tb" : windowFeatures += "toolbar=" + valor + ", "; break
			case "tt" : windowFeatures += "titlebar=" + valor + ", "; break
			case "re" : windowFeatures += "resizable=" + valor + ", "; break
			default : erro = '"Código de atributo não informado no '+(i+1)+' º argumento (' +Argumentos[i]+ ')"'
		}
	}
	windowFeatures = windowFeatures.substring(0,windowFeatures.lastIndexOf(","))
	if (erro) { alert(erro) } else { novaJanela = window.open(nomeArquivo, nomeJanela, windowFeatures) }
}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
/* novos */
// *exibeFlash - Exibe o flash - hack para ie7 
function exibeFlash(src, larg, alt, wmode)
{
	var strHtml = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ larg +'" height="'+ alt +'">';
	strHtml += '<param name="movie" value="'+ src +'" />';
	strHtml += '<param name="quality" value="high" />';
	strHtml += '<param name="menu" value="false" />';
	strHtml += '<param name="wmode" value="'+wmode+'">';
	if (wmode == "transparent") // firefoca
	{
		strHtml += '<embed src="'+ src +'" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ larg +'" height="'+ alt +'"></embed>';
	}
	strHtml += '</object>';
		
	document.write(strHtml);
}
function aparecer(obj)
{
	document.getElementById(obj).style.display = 'block';
}
function desaparecer(obj)
{
	document.getElementById(obj).style.display = 'none';
}
function retirarMensagem(pCampo)
{
	pCampo.value = '';
}
function colocarMensagem(pCampo, pMensagem)
{
	if (pCampo.value == '') 
	{
		pCampo.value = pMensagem;
	}
}





