ns = document.layers;
ie = document.all;
ns6 = (document.getElementById && !document.all);
function moveMouse(e){
 if(ie){
  posx = event.clientX;
  posy = event.clientY;
 } else if (ns){
  posx = e.x;
  posy = e.y;
 } else if (ns6){
  posx = e.clientX;
  posy = e.clientY;
 }
}
if(ns) { document.captureEvents(Event.MOUSEMOVE); }
document.onmousemove = moveMouse;

function sizeFont(elem, acao, size){
 // tamanho inicial da fonte (em px)
 var tamInic = size;
 // Tamanho mínimo da [b]fonte (em px)
 var tamMin = 4;
 // Tamanho máximo da fonte (em px)
 var tamMax = 40;
 // Pega o tamanho da fonte. Se não foi setada ainda (primeira vez que a função é executada) terá como tamanho padrão 'tamInic'.
 if (document.getElementById(elem).style.fontSize == "") {
  var tamFonte = tamInic;
 } else {
  var tamFonte = parseInt(document.getElementById(elem).style.fontSize);
 }
 //alert('[' + document.getElementById(elem).style.fontSize + '] - [' + tamFonte + '] - [' + tamInic + '] - [' + acao + '] - ['+elem+']');
 switch (acao){
  // Aumenta o tamanho, enquanto foi menor que 'tamMax'
  case '+':
   if (tamFonte < tamMax)
   document.getElementById(elem).style.fontSize = (tamFonte + 2) + "px";
  break;
  // Diminui o tamanbo, enquanto for maior que 'tamMin'
  case '-':
  if (tamFonte > tamMin)
   document.getElementById(elem).style.fontSize = (tamFonte - 2) + "px";
  break;
 }
}

var td='';
var inttitle=0;
var start='';
function colocatitle(tt){
 top.document.title=tt;
}
function reloadstop(tt){
 clearInterval(inttitle);
 this.start='';
 top.document.title=tt;
}
function reloadtitle(p,tt){
 clearInterval(inttitle);
 if (p == 3) { this.start = 1; }
 if (p == 1) { colocatitle("Diz: Mensagem"); pr = 2; } else { colocatitle(tt); pr = 1; }
 if (this.start == 1) {
  inttitle = window.setInterval( function() { reloadtitle(pr,tt); }, 1000);
  top.window.focus();
  parent.cafmainFrame.document.getElementById('msg').focus();
 } else {
  colocatitle(tt);
 }
}
function advertpro(regiao,width,height) {
 document.write('<SCR'+'IPT src="http://adn.bonde.com.br/advertpro/servlet/view/banner/javascript/zone?zid='+regiao+'&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'&referrer='+escape(document.location)+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
}
function copyright () {
 //setInterval("window.clipboardData.clearData()",1); // IE
 alert('Prezado leitor,\n\nNão é permitida a utilização desse conteúdo para fins comerciais e/ou profissionais. Para comprar ou obter autorização de uso desse conteúdo, entre em contato com o Portal Bonde pelo e-mail: redacao@bonde.com.br');
}
function disableselect(E){
 return false;
}
function reEnable(){
 return true;
}
function submitwin(id,oper){
 //alert(id + ' - ' + oper);
 var head = document.getElementById(id);
 var eScript = document.createElement('script');
 eScript.setAttribute('src','/acao.php?'+oper);
 head.appendChild(eScript);
}
function restricao(){
 document.onselectstart=new Function ("return false")
 document.onmousedown=disableselect;
 document.onclick=reEnable;
 document.getElementById('resttexto').blur();
}
function clear_campo(tp) {
 if (tp == 'busca') {
  document.getElementById('qbusca').value = '';
 }
}

function validaSubmit() {
 if (document.getElementById('login_frm').value == "") {
  alert ("Você tem que preencher o e-mail");
  document.getElementById('login_frm').focus();
  return false;
 } else if (document.getElementById('senha_frm').value == "") {
  alert ("Você tem que preencher a senha");
  document.getElementById('senha_frm').focus();
  return false;
 } else {
  return true;
 }
}

function excluir(form) {
 if(confirm('Você tem certeza que deseja excluir?')) { return true; } else { return false; }
}
var oldCellColor = "#000";
function focusRow(row) {
	var cells = row.cells;
	if (!cells) return;
	oldCellColor = cells[0].style.backgroundColor;
	for (var i=0;i<cells.length;i++) {
		cells[i].style.backgroundColor='whitesmoke';
	}
}
function blurRow(row) {
	var cells = row.cells;
	if (!cells) return;
	for (var i=0;i<cells.length;i++) {
		cells[i].style.backgroundColor=oldCellColor;
	}
}

function janela(url, width, height, scroll, resizable, name) {
 var Win = window.open(url, name,'width=' + width + ',height=' + height +',scrollbars=' + scroll + ',resizable=' + resizable + ',menubar=no,status=no,left=50,top=50');
 Win.focus();
}

function linkUrl (url) {
 var Win = opener.open(url);
 Win.focus();
}

function textCounter(field, countfield, maxlimit) {
 if (field.value.length > maxlimit)
  field.value = field.value.substring(0, maxlimit);
 else 
  countfield.value = maxlimit - field.value.length;
}

function verificaCPF(cpf){
 var numeros, digitos, soma, i, resultado, digitos_iguais;
 for (i=0;i<4;i++) {
  cpf = cpf.replace(".","");
  cpf = cpf.replace("-","");
 }
 digitos_iguais = 1;
 if (cpf.length < 11)
  return false;
 for (i = 0; i < cpf.length - 1; i++)
 if (cpf.charAt(i) != cpf.charAt(i + 1)){
  digitos_iguais = 0;
   break;
 }
 if (!digitos_iguais){
  numeros = cpf.substring(0,9);
  digitos = cpf.substring(9);
  soma = 0;
  for (i = 10; i > 1; i--)
  soma += numeros.charAt(10 - i) * i;
  resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
  if (resultado != digitos.charAt(0))
   return false;
  numeros = cpf.substring(0,10);
  soma = 0;
  for (i = 11; i > 1; i--)
   soma += numeros.charAt(11 - i) * i;
  resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
  if (resultado != digitos.charAt(1))
   return false;
  return true;
 }else
   return false;
}

function isNumeric(elem){
 var numericExpression = /^[0-9]+$/;
 if(elem.value.match(numericExpression)){
  return true;
 }else{
  elem.focus();
  elem.value = elem.value.substring(0, (elem.value.length -1));
  return false;
 }
}

function newcaptcha() {
 var head = document.getElementById("idCaptcha");
 var eScript = document.createElement('script');
 eScript.setAttribute('src','/captcha.php?oper=newgera');
 head.appendChild(eScript);
}

function clearText (loc) {
 if (loc == "Login") {
  if (document.frmL.frmLogin.value == "Login") {
   document.frmL.frmLogin.value = "";
  }
 } else if (loc == "Senha") {
  if (document.frmL.frmSenha.value == "*****") {
   document.frmL.frmSenha.value = "";  
  }
 } else if (loc == "cadastro") {
  p1 = document.frmL.frmLogin.value;
  p2 = document.frmL.frmSenha.value;
  if ((p1 == "") || (p1 == "Login") || (p2 == "")) {
   if (p2 == "") {
    document.frmL.frmSenha.focus();
   } else {
    document.frmL.frmLogin.value = "";
    document.frmL.frmLogin.focus();
   }
   alert ("Você tem que digitar seu login e senha");
   return false;
  } else { return true; }
 } else if (loc == "textBusca") {
  if (document.frm.q.value == "Busca") {
   document.frm.q.value = "";
  }
 } else if (loc == "busca") {
  if ((document.frm.q.value == "Busca") || (document.frm.q.value == "")) {
   document.frm.q.value = "";
   document.frm.q.focus();
   alert ("Você tem que digitar a palavra para fazer a busca");
   return false;
  } else {
   return true;
  }
 }
}

function menu(frm) {
 window.location.href= frm.value;
}
function menu2(lnk,frm) {
 window.location.href= lnk + frm.value;
}

/* INICIO YOUTYBE */
var IE = document.all?true:false;
function getXmlHttpRequestObject() {
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if(window.ActiveXObject) {
		return new ActiveXObject("Microsoft.XMLHTTP");
	} 
}

function abre_video(tag_musica) {
 var d=document.getElementById('video');
 d.style.display='block';	
 swidth = 375;
 sheight = 310;
 //alert(posx + ' - ' + posy);
 //d.style.top = posy;
 //d.style.left = posx;
 htmlps = '<div><div class="tamanho"><a title="fechar" href="#" onclick="fecha_youtube(&#39;video&#39;);return false;"/></a><a href="#" title="grande" onclick="altera_tamanho_youtube(3,&#39;video&#39;);return false;"/></a><a href="#" title="médio" onclick="altera_tamanho_youtube(2,&#39;video&#39;);return false;"/></a><a href="#" title="pequeno"onclick="altera_tamanho_youtube(1,&#39;video&#39;);return false;"/></a></div></div>';
 htmlps = htmlps + '<object id="obj_video" width="'+swidth+'" height="'+sheight+'" align="middle" type="application/x-shockwave-flash" id="swfobj" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="http://www.youtube.com/v/'+tag_musica+'&autoplay=1" name="movie"/><param value="high" name="quality"/><param value="Transparent" name="wmode"/><embed id="ebd_video" width="'+swidth+'" height="'+sheight+'" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="Transparent" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" name="flashobj" quality="high" flashvars="" src="http://www.youtube.com/v/'+tag_musica+'&autoplay=1"/></embed></object>';
 d.innerHTML=htmlps;
 altera_tamanho_youtube(3,'video');
}

function closediv(ids) {
 var elemento=document.getElementById(ids);
 elemento.innerHTML='';
 elemento.style.display='none';	
}

function abre_video2(ids,tag_musica) {
var d=document.getElementById(ids);
 d.style.display='block';	
 swidth = 375;
 sheight = 310;
 //alert(posx + ' - ' + posy);
 lnk = 'http://www.youtube.com/v/'+tag_musica+'&autoplay=1';
// htmlps = '<div><div class="tamanho"><a title="fechar" href="#" onclick="fecha_youtube(&#39;'+ids+'&#39;);return false;"/></a><a href="#" title="grande" onclick="altera_tamanho_youtube(3,&#39;'+ids+'&#39;);return false;"/></a><a href="#" title="médio" onclick="altera_tamanho_youtube(2,&#39;'+ids+'&#39;);return false;"/></a><a href="#" title="pequeno"onclick="altera_tamanho_youtube(1,&#39;'+ids+'&#39;);return false;"/></a></div></div>';
 htmlps = "<div style='width:368px;border:1px solid #ACA899;background:#ECE8D8;text-align:right;padding:3px 5px 3px 0px'><a href=javascript:closediv('"+ids+"') style='color:#FFFFFF;background:#ACA899;font-size:12px;padding:2px'><b>X</b></a></div>";
 htmlps = htmlps + '<div><object id="obj_video" width="'+swidth+'" height="'+sheight+'" align="middle" type="application/x-shockwave-flash" id="swfobj" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="'+lnk+'" name="movie"/><param value="high" name="quality"/><param value="Transparent" name="wmode"/><embed id="ebd_video" width="'+swidth+'" height="'+sheight+'" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="Transparent" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" name="flashobj" quality="high" flashvars="" src="'+lnk+'"/></embed></object></div>';
 d.innerHTML=htmlps;
 //altera_tamanho_youtube(3,ids);
 
 ids2 = ids.replace("letra","");
 var head = document.getElementById(ids);
 var eScript = document.createElement('script');
 eScript.setAttribute('src','/acao.php?oper=musica_video&id='+ids2);
 head.appendChild(eScript);
}

function abre_audio(ids,tag_musica) {
 var d=document.getElementById(ids);
 d.style.display='block';	
 swidth = 200;
 sheight = 50;
 //alert('A[' + posx + ' - ' + posy + ']');
// htmlps = '<div><div class="tamanho"><a title="fechar" href="#" onclick="fecha_youtube(&#39;'+ids+'&#39;);return false;"/></a><a href="#" title="grande" onclick="altera_tamanho_youtube(3,&#39;'+ids+'&#39;);return false;"/></a><a href="#" title="médio" onclick="altera_tamanho_youtube(2,&#39;'+ids+'&#39;);return false;"/></a><a href="#" title="pequeno"onclick="altera_tamanho_youtube(1,&#39;'+ids+'&#39;);return false;"/></a></div></div>';
 htmlps = "<div style='width:194px;border:1px solid #ACA899;background:#ECE8D8;text-align:right;padding:3px 5px 3px 0px'><a href=javascript:closediv('"+ids+"') style='color:#FFFFFF;background:#ACA899;font-size:12px;padding:2px'><b>X</b></a></div>";
 htmlps = htmlps + "<object type='application/x-shockwave-flash' data='/new/img/player.swf' width='200' height='20'><param name='wmode' value='transparent' /><param name='movie' value='/new/img/player.swf' /><param name='FlashVars' value='mp3="+tag_musica+"&amp;bgcolor1=ffffff&amp;bgcolor2=cccccc&amp;buttoncolor=999999&amp;buttonovercolor=0&amp;slidercolor1=cccccc&amp;slidercolor2=999999&amp;sliderovercolor=666666&amp;textcolor=0&amp;showvolume=1' /></object>";
 d.innerHTML=htmlps;
 
 ids2 = ids.replace("letra","");
 var head = document.getElementById(ids);
 var eScript = document.createElement('script');
 eScript.setAttribute('src','/acao.php?oper=musica_audio&id='+ids2);
 head.appendChild(eScript);
}

function fecha_youtube(ids) {
 var elemento=document.getElementById(ids);
 elemento.innerHTML='';
 elemento.style.display='none';	
 if(ns) { document.captureEvents(Event.MOUSEMOVE); }
 document.onmousemove = moveMouse;
 //alert('C[' + posx + ' - ' + posy + ']');
}

function altera_tamanho_youtube(tamanho,ids) {	
  switch(tamanho)
  {
   case 1:var largura='170';var altura='138';var x=1;break;
   case 2:var largura='250';var altura='200';var x=2;break;
   case 3:var largura='375';var altura='300';var x=2;break;
   default: var largura='375';var altura='300';var x=2;break;
  }
  var elemento=document.getElementById('det_video');
  elemento=document.getElementById(ids);
  elemento.style.width=largura+'px';
  
  elemento=document.getElementById('obj_video');
  elemento.width=largura;
  elemento.height=altura;
  if(!IE)
  {  
   elemento=document.getElementById('ebd_video');
   elemento.width=largura;
   elemento.height=altura;
  }
}

var DragHandler = {
 _oElem : null,
 attach : function(oElem) {
  oElem.onmousedown = DragHandler._dragBegin;
  // callbacks
  oElem.dragBegin = new Function();
  oElem.drag = new Function();
  oElem.dragEnd = new Function();
  return oElem;
 },

 _dragBegin : function(e) {
  var oElem = DragHandler._oElem = this;
  if (isNaN(parseInt(oElem.style.left))) { oElem.style.left = '0px'; }
  if (isNaN(parseInt(oElem.style.top))) { oElem.style.top = '0px'; }
  var x = parseInt(oElem.style.left);
  var y = parseInt(oElem.style.top);
  e = e ? e : window.event;
  oElem.mouseX = e.clientX;
  oElem.mouseY = e.clientY;
  oElem.dragBegin(oElem, x, y);
  document.onmousemove = DragHandler._drag;
  document.onmouseup = DragHandler._dragEnd;
  return false;
 },

 _drag : function(e) {
  var oElem = DragHandler._oElem;
  var x = parseInt(oElem.style.left);
  var y = parseInt(oElem.style.top);
  e = e ? e : window.event;
  oElem.style.left = x + (e.clientX - oElem.mouseX) + 'px';
  oElem.style.top = y + (e.clientY - oElem.mouseY) + 'px';
  oElem.mouseX = e.clientX;
  oElem.mouseY = e.clientY;
  oElem.drag(oElem, x, y);
  return false;
 },

 _dragEnd : function() {
  var oElem = DragHandler._oElem;
  var x = parseInt(oElem.style.left);
  var y = parseInt(oElem.style.top);
  oElem.dragEnd(oElem, x, y);
  document.onmousemove = null;
  document.onmouseup = null;
  DragHandler._oElem = null;
 }
}

function moveon(elemento){
 DragHandler.attach(elemento);
}

function pos() {
 var ss = document.getElementById('subset');
 var gog = document.getElementById('google');
 if (document.body.clientWidth >= 940){
  ss.style.position = 'absolute';
  ss.style.top = 55+'px';
  ss.style.left = 810+'px';
  gog.style.top = 310+'px';
 } else {
  ss.style.position = 'static';
  gog.style.top = 65+'px';
 }
}
/* END YOUTUBE*/
function voto(v,idd,oper) {
 var head = document.getElementById("idVoto");
 var eScript = document.createElement('script');
 var cor = "EB6A00";
 if (oper == "receita"){ cor = "FFFFFF"; }
 if (oper == "banda") { cor = "174173"; }
 document.getElementById('idVotar').innerHTML = "<span style='color:#"+cor+"'><center>Obrigado!</center></span>";
 document.getElementById('idVoto').innerHTML = "*** votos";
 eScript.setAttribute('src','acao.php?oper='+oper+'&id='+idd+'&voto='+v);
 head.appendChild(eScript); 
}

function acao(idlayer,idlayret,oper,id,id1,id2,id3) {
 var head = document.getElementById(idlayer);
 var eScript = document.createElement('script');
 pr = '';
 if (idlayer != '') { pr = pr + '&idlayer=' + idlayer; }
 if (idlayret != '') { pr = pr + '&idlayret=' + idlayret; }
 if (id != '') { pr = pr + '&id=' + id; }
 if (id1 != '') { pr = pr + '&' + id1 + '=' + document.getElementById(id1).value; }
 if (id2 != '') { pr = pr + '&' + id2 + '=' + document.getElementById(id2).value; }
 if (id3 != '') { pr = pr + '&' + id3 + '=' + document.getElementById(id3).value; }
 eScript.setAttribute('src','?'+oper+pr);
 head.appendChild(eScript);
}

function isNumeric(elem){
 var numericExpression = /^[0-9]+$/;
 if(elem.value.match(numericExpression)){
  return true;
 }else{
  elem.focus();
  elem.value = elem.value.substring(0, (elem.value.length -1));
  return false;
 }
}

function isEmail(val) {
 if (val.match(/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+/)){
  return true;
 }else{
  return false;
 } 
}

function validaFormCad(){
  alert("erro");
  return false;
}

// FONT SIZE MANAGEMENT 
function 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=FindObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ChangeProp(objName,x,theProp,theValue) { //v6.0
var obj = FindObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}

function LoadActualFontSize() {
tempArray = document.cookie.split(";");
for (tA = 0; tA < tempArray.length; tA++){
if (tempArray[tA].indexOf('fontSize') > -1){
fontSizeValue = tempArray[tA].split("=")
ACTUAL_FONTSIZE = parseInt(fontSizeValue[1]);
}
}
}

function SaveActualFontSize() {
var expire = new Date ();
expire.setTime (expire.getTime() + (6000 * 24 * 3600000));
expire = expire.toGMTString();
document.cookie="fontSize="+ACTUAL_FONTSIZE+"; path=/; expires="+expire;
}

function Bigger(tp) {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE+1;
if (ACTUAL_FONTSIZE > LARGEST_FONTSIZE) { ACTUAL_FONTSIZE = LARGEST_FONTSIZE }
ChangeProp(tp,'','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

function Smaller(tp) {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE-1
if (ACTUAL_FONTSIZE < SMALLEST_FONTSIZE) { ACTUAL_FONTSIZE = SMALLEST_FONTSIZE }
ChangeProp(tp,'','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

ACTUAL_FONTSIZE = 13;
SMALLEST_FONTSIZE = 12;
LARGEST_FONTSIZE = 20;

function gradient(id, level)
{
	var box = document.getElementById(id);
	box.style.opacity = level;
	box.style.MozOpacity = level;
	box.style.KhtmlOpacity = level;
	box.style.filter = "alpha(opacity=" + level * 100 + ")";
	box.style.display="block";
	return;
}

function fadein(id) 
{
	var level = 0;
	while(level <= 1)
	{
		setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10);
		level += 0.01;
	}
}

function openbox(fadin)
{
  var box = document.getElementById('cadbox'); 
  document.getElementById('cadfilter').style.display='block';
  
  if(fadin)
  {
	 gradient("cadbox", 0);
	 fadein("cadbox");
  }
  else
  { 	
    box.style.display='block';
  }  	
}

function closebox()
{
   document.getElementById('cadbox').style.display='none';
   document.getElementById('cadfilter').style.display='none';
}

function validafrm(vl,vs,ve){
 pr = ''; pas = '';
 if (vs=='vsenha9') {
  if (document.getElementById('vsenhaold').value == '') {
   alert('Você tem que preencher a senha antiga');
    document.getElementById('vsenhaold').focus();
    pr = '1';
  } else { pas = pas + '&vsenhaold='+document.getElementById('vsenhaold').value; }

  if ((document.getElementById(vs).value == '') && (pr=='')) {
   alert('Você tem que preencher a nova senha');
   document.getElementById(vs).focus();
   pr = '1';
  } else if ((document.getElementById(vs).value != document.getElementById('vsenhacon').value) && (pr == '')) {
   alert('Você tem que preencher a senha e confirmação de senha iguais');
   document.getElementById(vs).value = '';
   document.getElementById('vsenhacon').value = '';
   document.getElementById(vs).focus();
   pr = '1';
  } else if (pr == '') { pas = pas + '&vsenha='+document.getElementById(vs).value; }
  if (pr == '') {
   acao('operindex','','oper=acao&op=senhaalt'+pas,document.getElementById('idpas').value,'','','','raiz');
  }

 } else {
  if ((document.getElementById(vl).value == '') || (document.getElementById(vl).value == 'Login') || (document.getElementById(vl).value == 'Informe o e-mail')) {
   alert('Você tem que preencher o login/email');
   document.getElementById(vl).focus();
   pr = '1';
  } else { pas = pas + '&vemail='+document.getElementById(vl).value; }

  if ((vs != '') && (pr == '')) {
   if ((document.getElementById(vs).value == '') || (document.getElementById(vs).value == 'Senha') || (document.getElementById(vs).value == 'Informe a senha')) {
    alert('Você tem que preencher a senha');
    document.getElementById(vs).focus();
    pr = '1';
   } else { pas = pas + '&vsenha='+document.getElementById(vs).value; }
   ops = 'login';
  } else if (pr=='') { ops = 'senha'; }
  if (pr=='') {
   //alert(pas + ' - ' + document.getElementById('idpas').value);
   if (document.getElementById('sconectado')) {
    pas = pas + '&sconectado='+(document.getElementById('sconectado').checked==true?"1":"");
   }
   acao('operindex','','oper=acao&op='+ops+pas,document.getElementById('idpas').value,'','','','raiz');
  }
 }
 return false;
}
