function getElementsByStyleClass(className) {
  var all = document.getElementsByTagName('div');
  var elements = new Array();
  for (var e = 0; e < all.length; e++)
    if (all[e].className == className)
      elements[elements.length] = all[e];
  return elements;
}

function showhide(id,classe) {
  var status = $(id).style.display;
  if (status == 'none') {
    $(id).show();
  } else {
    $(id).hide();
  }
  elements = getElementsByStyleClass(classe);
  for (var e = 0; e < elements.length; e++) {
    if (elements[e].id != id) {
	  $(elements[e].id).hide();
    }
  }
}

//	function imprimir(id) {
//		conteudo = window.document.getElementById(id).innerHTML;
//		new_window = open("","displayWindow","resizable=1,width=500,height=500,left=20,top=20");
//	 	new_window.document.open();
//	 	new_window.document.write("<html>\n");
//	 	new_window.document.write("<head>\n");
//	 	new_window.document.write('<style> ul { list-style: none; margin: 0; } li { margin: 0 0 0 -40px; _margin: 0 0 0 0px; } img.ico { display: none; } span { font-weight: bold } p { font-size: 20px; font-weight: bold; } </style>');
//		new_window.document.write("<title>PROGRAMA CARNE ANGUS CERTIFICADA | ABA - Associa&amp;ccedil;&amp;atilde;o Brasileira de Angus</title>\n");
//		new_window.document.write("</head>\n");
//		new_window.document.write("<body bgcolor=\"#FFFFFF\">\n");
//		new_window.document.write("<div class=\"colunaprincipal\">\n");
//		new_window.document.write("<div id=\"conteudocoluna\">\n");
//		new_window.document.write(conteudo);
//		new_window.document.write("</div>\n");
//		new_window.document.write("</div>\n");
//		new_window.document.write("\n</body></html>");
//		new_window.document.close();
//		//new_window.window.blur();
//		new_window.window.print();
//		new_window.window.close();
//	}
	
	
	
	function enviar() {
		$('envienoticiaimprensa').style.display = 'none';
		document.form_email_noticia.reset();
		div = document.getElementById('envienoticia');
		setTimeout("div.style.display = 'block';document.form_email_noticia.NOME_DESTINATARIO.focus();",300);
	}
    function enviarImprensa() {
		$('envienoticia').style.display = 'none';
    	document.form_email_imprensa.reset();
		div = document.getElementById('envienoticiaimprensa');
		setTimeout("div.style.display = 'block';document.form_email_imprensa.NOME.focus();",300);
	}
