function executaEval(js){
	eval(js);
}

function swFlash(flash,titulo,id,w,h){
	var so = new SWFObject(flash, titulo, w, h, "7", "#336699");
	so.addParam("wmode", "opaque");
	so.addParam("quality","high")
	so.write(id);
}

function atualizaEditor(rte){
	var txt;				
	if(maxFim(rte, "3000")){
		if (document.all) {
			txt = frames[rte].document.body.innerHTML;	
		} else {
			txt = document.getElementById(rte).contentWindow.document.body.innerHTML;		
		}
		
		document.formCliente.descricaoLonga.value = txt;	
		return true;
	}
	return false;
}

/**
 * Google Analytics 
 */
/*
	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-8964451-1");
		pageTracker._trackPageview();
	} catch(err) {}
	*/
/* ************************************************************************ */

	
/* função usada apenas na pagina de jornais /templates/anunciosJornais.tpl */
function atualizaJornalUltimasNoticias(a){
	f = document.jornalUltimasNoticias;
	f.jornalnoticia.value = a;
	f.submit();
}

function atualizaJornalEdicao(a){
	f = document.jornal;
	f.jornaledicao.value = a;
	f.submit();
}

function atualizaJornal(a,b,c){
	f = document.jornal;
	if(a != '')
		f.jornalsecao.value = a;
	if(b != '')
		f.jornalnumpagina.value = b;
	if(c != '')
		f.jornalnoticia.value = c;
		
	f.submit();
}
/* função usada apenas na pagina de jornais /templates/anunciosJornais.tpl */
	


function paginaAnuncios(e){
	f = document.frmPaginaAnuncios;
	f.numPagina.value = e;
	f.submit();
}

function mostraAnuncioEmpresarial(e, g){
	f = document.formTipoAnuncio;
	f.idAnuncio.value = e;
	f.mostrarTipoPag.value = g;
	f.submit();
}

/********************************* INICIO FUNÇÃO DA MASCARA *****************/
/*
	EXP:
	 onkeyUp="Formata(this, event, '(00) 0000-0000',true, '')" style="text-align:right"
	 onkeyUp="Formata(this, event, '(00) 0000-0000',false, '')" style="text-align:right"
	 onkeyUp="Formata(this, event, '000.000.000,00',false, '')" style="text-align:right"
	 onkeyUp="Formata(this, event, '00.000.000,00',false, '0,00')" style="text-align:right"
*/

	function marcaDesmarcaCheckboxGeral(e,f){	
		f_form = f;		
		for ( i=0; i< f_form.length; i++){			
			if(f_form[i].type == "checkbox"){
				f_form[i].checked = e.checked;
			} 
		}		
	}
	
	
    function Limpar(valor, validos) { 
        var result = ""; 
        var aux; 
        for (var i=0; i < valor.length; i++) { 
            aux = validos.indexOf(valor.substring(i, i+1)); 
            if (aux>=0) { 
                result += aux; 
            } 
        } 
        return result; 
    } 
    
    function formata2(valor2, mascara, js_formatar, miniMasc){
    
        if(miniMasc != ""){
            valor = new String(new Number(valor2));
        } else valor = valor2;
        
        if(valor == "")
            return valor;
        
        var aux2 = "";
        var aux = valor;
        var x = aux.length - 1;
        var contMiniMasc = miniMasc != "" ? miniMasc.length : 0;
        
        for (var i = mascara.length - 1; i >= 0 ; i--) {
            contMiniMasc--;
            if(mascara.charAt(i) != "_"){
	            if(isNaN(mascara.charAt(i)) || mascara.charAt(i) == " "){
	                aux2 = mascara.charAt(i) + aux2;
	                continue;
	            }
            }
            
            if(x == -1){
                if(js_formatar){
                    aux2 = mascara.charAt(i) + aux2;
                } else {
                    if(miniMasc != ""){
                        if(contMiniMasc >= 0){
                            aux2 = miniMasc.charAt(contMiniMasc) + aux2;
                        } else {
                            if(isNaN(aux2.substring(0,1))){
                                aux2 = aux2.substring(1);
                            }
                        }
                    } else {
                        if(isNaN(aux2.substring(0,1))){
                            aux2 = aux2.substring(1);
                        }
                    }
                }                
            } else {
                aux2 = aux.charAt(x) + "" + aux2;
                x--;
            }                       
        }      
        if(aux2.length < mascara.length){
            if(isNaN(aux2.substring(0,1))){
                aux2 = aux2.substring(1);
            }
        }
        return aux2;
    }
    
    

    function Formata(campo, tecla, mascara,js_formatar, miniMasc) {
    	
    	if((tecla.keyCode >= 35 && tecla.keyCode <= 40) || tecla.keyCode == 16)
            return true;
            
        var vr = Limpar(campo.value,"0123456789"); 
        campo.value = formata2(vr, mascara, js_formatar, miniMasc);
        
        return true;
    }
    
    function Formata3(campo, tecla, mascara,js_formatar, miniMasc, js) {
    	
        if((tecla.keyCode >= 35 && tecla.keyCode <= 40) || tecla.keyCode == 16)
            return true;
            
        var vr = Limpar(campo.value,"0123456789"); 
        campo.value = formata2(vr, mascara, js_formatar, miniMasc);
        
        eval(js);
        
        return true;
    }
/**************************** FIM DA MASCARA *************************/

/*Example message arrays for the two demo scrollers*/
/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
	this.content=content //message array content
	this.tickerid=divId //ID of ticker div to display information
	this.delay=delay //Delay between msg change, in miliseconds.
	this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
	this.hiddendivpointer=1 //index of message array for hidden div
	document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
	var scrollerinstance=this
	if (window.addEventListener) //run onload in DOM2 browsers
	window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
	else if (window.attachEvent) //run onload in IE5.5+
	window.attachEvent("onload", function(){scrollerinstance.initialize()})
	else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
	setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
	this.tickerdiv=document.getElementById(this.tickerid)
	this.visiblediv=document.getElementById(this.tickerid+"1")
	this.hiddendiv=document.getElementById(this.tickerid+"2")
	this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
	//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
	this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
	this.getinline(this.visiblediv, this.hiddendiv)
	this.hiddendiv.style.visibility="visible"
	var scrollerinstance=this
	document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
	document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
	if (window.attachEvent) //Clean up loose references in IE
	window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
	setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
	var scrollerinstance=this
	if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
	this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
	this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
	setTimeout(function(){scrollerinstance.animateup()}, 50)
	}
	else{
	this.getinline(this.hiddendiv, this.visiblediv)
	this.swapdivs()
	setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
	}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
	var tempcontainer=this.visiblediv
	this.visiblediv=this.hiddendiv
	this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
	div1.style.top=this.visibledivtop+"px"
	div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
	var scrollerinstance=this
	if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
		setTimeout(function(){scrollerinstance.setmessage()}, 100)
	else{
		var i=this.hiddendivpointer
		var ceiling=this.content.length
		this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
		this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
		this.animateup()
	}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
	if (tickerobj.currentStyle)
		return tickerobj.currentStyle["paddingTop"]
	else if (window.getComputedStyle) //if DOM2
			return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
		else
			return 0
}









over = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	var dispAnuncio = document.getElementById("dispAnuncio");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		
		sfEls[i].onmouseout=function() {			
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}

function menuCliente(a,b){
	f = document.menu;
	f.pag.value = a;
	f.iniK.value = b;
	f.submit();
}

function pesquisaMenu(a,b,c){				
	f = document.menu;
	f.menuTipo.value = a;
	f.menuValor.value = b;
	f.menuOutros.value = c;
	f.submit();
}

function pesquisaItensMenu(a,b,c){				
	f = document.menu2;
	f.mostrarTipoPag.value = a;
	f.itensMenuItem.value = b;
	f.itensMenuMenu.value = c;
	f.submit();
}

function atualizaCidadeSite(e){
	e.submit();
}

function abreFechaAviso(div1,div2){
	var a = document.getElementById(div2);
	if(a.style.display == 'none'){
		document.getElementById(div2).style.display = '';
		document.getElementById(div1).innerHTML = '<a href="javascript:void(0);" onClick="abreFechaAviso(\'' + div1 + '\',\'' + div2 + '\')">Fechar</a>';
	} else {
		document.getElementById(div2).style.display = 'none';
		document.getElementById(div1).innerHTML = '<a href="javascript:void(0);" onClick="abreFechaAviso(\'' + div1 + '\',\'' + div2 + '\')">Abrir</a>';
	}
}

function apagaTudo(){	
	document.getElementById("form2").style.display = 'none';
	document.getElementById("form3").style.display = 'none';
	document.getElementById("form4").style.display = 'none';
}

function apagaTudoD(nome,max,opcional){	
	document.getElementById('xyz1234abc').style.display = '';	
	for(var i = 1; i <= max; i++){		
		document.getElementById(nome + "" + i).style.display = 'none';		
		document.getElementById("botao"+nome+""+opcional).style.color = '#000000';
	}	
	if(opcional != ''){
		
		var jqueryAux = nome+""+opcional;
		
		document.getElementById(nome+""+opcional).style.display = '';
		document.getElementById("botao"+nome+""+opcional).style.color = '#FF0000';
	
		$(document).ready(function() {
			$("*",jqueryAux).each(function() {
				if($(this).is(':input')){
					this.disabled = false; 
				}
			});
		});	
	}	
	
}

function posiciona(tipo){
	for(var i = 1; i <=4; i++){
		if(i == tipo){
			document.getElementById("form"+i).style.display = '';
		} else {
			document.getElementById("form"+i).style.display = 'none';
		} 
	}		
}

function posicionaD(tipo,nome,max){
	
	var div = "";
	var jqueryAux = "";
	document.getElementById('xyz1234abc').style.display = '';	
	
	for(var i = 1; i <=max; i++){
		
		div = document.getElementById(nome+""+i);
		jqueryAux = "#" + nome + "" + i;	
			
			
		if(i == tipo){
			
			div.style.display = '';
			div.style.disabled = false;
			document.getElementById("botao"+nome+""+i).style.color = '#FF0000';
			
			$(document).ready(function() {
				$("*",jqueryAux).each(function() {
					if($(this).is(':input')){
						this.disabled = false; 
					}
				});
			});	
			
			
		} else {
			
			
			div.style.display = 'none';
			div.style.disabled = true;
				
			$(document).ready(function() {
				$("*",jqueryAux).each(function() {
					if($(this).is(':input')){
						this.disabled = true; 
					}
				});
			});	
			
			document.getElementById("botao"+nome+""+i).style.color = '#000000';
			
			
			
		} 
	}		
}
	
function incluiImg(e, div){
	var ie = (document.all) ? true : false;	
	if(ie){
		var divid = document.getElementById(div);
		divid.innerHTML = '<img width="150px" height="100px" src="'+e.value+'">';
	}
}

function atualizaPagina(form){
	form.submit();
}

function novaJanela(url){
	l = (screen.width-600)/2;
	t = ((screen.height-300)/2) - 50;	
	novaJanelaPerson(url,l,t,'600','300');
}

function novaJanela2(url){
	l = 0;
	t = 0;
	w = 780;
	h = 560;
	novaJanelaPerson(url,l,t,w,h);
}

function RandomNumber() {
  today = new Date();
  num= Math.abs(Math.sin(today.getTime()));
  return num;  
}

function random(limits) {
	today = new Date();
	num = today.getTime();
	num = Math.round(Math.abs(Math.sin (num)*1000000)) % limits;
	return num;
}

function novaJanelaPerson(url,l,t,w,h){
	var indiceJanela = random(1000);
	window.open(""+url+"",'MEUANUNCIONANET'+indiceJanela,"height="+h+"px,width="+w+"px,status=no,toolbar=no,menubar=no,location=no,scrollbars = yes,left="+l+", top="+t);
}

function fecha(){
	window.close();
}

function excluir(end){
	alert("AVISO\nExcluindo este registro\napagará todas as suas dependências.");
	if(confirm("Para excluir click em Ok\npara cancelar click em cancel"))
	   document.location.href = end;
}

//////////////////////////////////////////////////////////////////////////
/*
 * exemplo de chamda
 * <form name="name" method="post" action="algumapagina" onSubmit="return validaForm(this)">
 * os campos que começam com x,y,d são verificados
 * ids 
 *  x -> texto pré formatado
 *  z -> validação da data
 *  C, c -> para campos de senha
 *  p -> para cpf ou cnpj
 *  w -> exclusão
 */

function validaForm(form){
	var obx; 	//já vem com um breve texto pronto, adaptando o texto title com o texto pronto	
	var obz; 	//valida a data digitada
	var obp; 	//valida cpf ou cnpj
	var obw; 	//realiza a pergunta se realmente deseja excluir
   
	var comp0; 	//validação das senhas
	var comp1; 	//validação das senhas
	var i;		//auxiliar
	var x;		//auxiliar
	var vlog;	//auxliar para testes booleano

	for (i=0;i<form.length;i++){
		if(form[i].id == "c"){
			if(form[i].value == ""){
				alert("Campo \"Senha\" é obrigatório");
				form[i].focus();
				return false;
			}
			
			if(form[i].value.length < 4){
				alert("Campo \"Senha\" tem que ter no minimo 4 caracteres");
				form[i].value = "";
				form[i].focus();
				return false;
			}
			
			comp0 = i;
		}
	}

	for (i=0;i<form.length;i++){
		if(form[i].id == "C"){
			if(form[i].value == ""){
				alert("Campo \"Repita a Senha\" é obrigatório");
				form[i].focus();
				return false;
			}
			
			if(form[i].value.length < 4){
				alert("Campo \"Repita a Senha\" tem que ter no minimo 4 caracteres");
				form[i].value = "";
				form[i].focus();
				return false;
			}
			comp1 = i;
		}
	}

	if(comp0){
		if(form[comp0].value != form[comp1].value){
			alert("Senhas Diferentes");
			form[comp0].value = "";
			form[comp1].value = "";
			form[comp0].focus();
			return false;
		}
	}


	for (i=0;i<form.length;i++){
		obx = form[i].id.indexOf("x");
		obz = form[i].id.indexOf("z");
		obp = form[i].id.indexOf("p");
		obw = form[i].id.indexOf("w");		
		
		if(obw != -1){
			if(confirm(form[i].title))
				return true;
			return false;
		}
		
		if (obx!=-1){
			if(form[i].type == "select-one"){
				vlog = false;
				for(x = 0; x < form[i].length; x++){
					if(form[i][x].selected == true && form[i][x].value != "null"){
						vlog = true;
						break;
					}
				}
				
				if(!vlog){
					alert(form[i].title);
					form[i].focus();
					return false;
				}			
			} else {
				if (form[i].value == ""){
					alert(form[i].title);
					form[i].focus();
					return false;
				}
			}
		}
	
		if (obz!=-1){
			if (form[i].value == "")
				return true;
				
			var data = form[i].value;
			
			if (!validadata(data)){
				alert("Data inválida :: "+data);
				form[i].value = "";
				form[i].focus();
				return false;
			}
		}
		
		if (obp!=-1){
			
			var valorCpfCnpj;
			valorCpfCnpj = LimpaCampo(form[i].value);
			aux = isCpfCnpj(valorCpfCnpj);
			switch(aux){
				case "cpf" : msgaux = "CPF incorreto !"; break;
				case "cnpj": msgaux = "CNPJ incorreto !"; break;
				case false : msgaux = "CPF/CNPJ incorreto !"; break;
				default : msgaux = "";
			}
			if(msgaux != ""){
				alert(msgaux);
				return false;			
			}
		}		
	}
	return true;
}

function validadata(campo){
    var d=0, m=0, a=0;
    //d - dia
    //m - mes
    //a - ano

	tamanho = campo.length;

	if(tamanho != 10)
		return false;

	d = parseInt(campo.substring(0,2),10);
	m = parseInt(campo.substring(3,5),10);
	a = parseInt(campo.substring(6,10),10);
	
	if((a < 1500 || a > 2040) || (m < 1 || m > 12) || (d < 1 || d > 31))
		return false;
		
	if(m==4 || m==6 || m==9 || m==11)
	{
		if(d < 1 || d > 30)
			return false;
	}
	
	if(m == 2)
		if(d > 29)
			return false;
	
	if(a % 4 != 0)
		if(m == 2)	
			if(d > 28)
				return false;
	
	return true;
}

function closewind(){
	
	//alert("puts");
}

function max(txarea, dig2, rest2, total){
	var dig = document.getElementById(dig2);
	var rest = document.getElementById(rest2);
	var tam = txarea.value.length;	
	
	dig.innerHTML = tam;
	rest.innerHTML = total - tam;	
	if (tam > total){
		aux = txarea.value;
		txarea.value = aux.substring(0,total);
		dig.innerHTML = total;
		rest.innerHTML = 0;
	}
}

function isCpfCnpj(campo){
	if(campo.length < 10)
		return false;

	switch(campo.length){
		case 11 : pType = 1 ;break;
		case 14 : pType = 2 ;break;
		default: return false; break;
	}

	var campo_filtrado = "", valor_1 = " ", valor_2 = " ", ch = "";
	var valido = false;

	for (i = 0; i < campo.length; i++){
		ch = campo.substring(i, i + 1);
		if (ch >= "0" && ch <= "9"){
			campo_filtrado = campo_filtrado.toString() + ch.toString()
			valor_1 = valor_2;
			valor_2 = ch;
		}
		if ((valor_1 != " ") && (!valido))
			valido = !(valor_1 == valor_2);
	}
	
	if (!valido) campo_filtrado = "12345678912";

	if (campo_filtrado.length < 11){
		for (i = 1; i <= (11 - campo_filtrado.length); i++){campo_filtrado = "0" + campo_filtrado;}
	}

	if(pType <= 1){
		if ( ( campo_filtrado.substring(9,11) == checkCPF( campo_filtrado.substring(0,9) ) ) && ( campo_filtrado.substring(11,12)=="") ){return true;}
	}

	if((pType == 2) || (pType == 0)){
		if (campo_filtrado.length >= 14){
			if ( campo_filtrado.substring(12,14) == checkCNPJ( campo_filtrado.substring(0,12) ) ){
				return true;
			}
		}
	}
	
	if(pType == 1)
		return "cpf";

	if(pType == 2)
		return "cnpj";
		
	return false;
}

function checkCNPJ(vCNPJ){
	var mControle = "";
	var aTabCNPJ = new Array(5,4,3,2,9,8,7,6,5,4,3,2);
	for (i = 1 ; i <= 2 ; i++){
		mSoma = 0;
		for (j = 0 ; j < vCNPJ.length ; j++)
			mSoma = mSoma + (vCNPJ.substring(j,j+1) * aTabCNPJ[j]);

		if (i == 2 ) mSoma = mSoma + ( 2 * mDigito );
			mDigito = ( mSoma * 10 ) % 11;

		if (mDigito == 10 ) mDigito = 0;
			mControle1 = mControle ;

		mControle = mDigito;
		aTabCNPJ = new Array(6,5,4,3,2,9,8,7,6,5,4,3);
	}
	return( (mControle1 * 10) + mControle );
}

function checkCPF(vCPF){
	var mControle = ""
	var mContIni = 2, mContFim = 10, mDigito = 0;
	for (j = 1 ; j <= 2 ; j++){
		mSoma = 0;
		for (i = mContIni ; i <= mContFim ; i++)
			mSoma = mSoma + (vCPF.substring((i-j-1),(i-j)) * (mContFim + 1 + j - i));

		if (j == 2 )
			mSoma = mSoma + ( 2 * mDigito );

		mDigito = ( mSoma * 10 ) % 11;
		if (mDigito == 10)
			mDigito = 0;
		
		mControle1 = mControle;
		mControle = mDigito;
		mContIni = 3;
		mContFim = 11;
	}
	return( (mControle1 * 10) + mControle );
}

function LimpaCampo(sValor){
	var iBase = 10;
	var tam = sValor.length
	var saida = new String
	for (i=0;i<tam;i++)
		if (!isNaN(parseInt(sValor.substr(i,1),iBase)))
			saida = saida + String(sValor.substr(i,1));
	return (saida);
}

function formata12345(campo, mask, evt) {
	if(document.all) { // Internet Explorer
    		key = evt.keyCode; 
	} else{ // Nestcape
       		key = evt.which;
     	}

 	string = campo.value;  
 	i = string.length;

 	if (i < mask.length) {
  		if (mask.charAt(i) == '§') {
       			return (key > 47 && key < 58);
      		} else {
       			if (mask.charAt(i) == '!') {  return true;  }
   				for (c = i; c < mask.length; c++) {
         				if (mask.charAt(c) != '§' && mask.charAt(c) != '!')
         					campo.value = campo.value + mask.charAt(c);
      					else if (mask.charAt(c) == '!'){
                					return true;
       					} else {
         					return (key > 47 && key < 58);
          				}
       				}
    		}
  	} else 
  		return false;
}

function resetar(){
	for(x = 0; x < document.forms.length; x++){
     	oform = document.forms[x];
    	for(i = 0; i < oform.elements.length; i++){
    		switch(oform.elements[i].type){
    			case "text": oform.elements[i].value = ""; break;
    		}
    	}
	}
}

function esconde(){
	for(x = 0; x < document.forms.length; x++){
	     	oform = document.forms[x];
        	for(i = 0; i < oform.elements.length; i++){
        		if(oform.elements[i].type == "select-one"){
				oform.elements[i].style.visibility = "hidden";
			}
		}
	}
}


function mostra(){
	for(x = 0; x < document.forms.length; x++){
		oform = document.forms[x];
		for(i = 0; i < oform.elements.length; i++){
			if(oform.elements[i].type == "select-one"){
				oform.elements[i].style.visibility = "visible";
			}
		}
	}
}
