function checkNavegador (){
  try{
	return new XMLHttpRequest();
  }catch(ee){
    try{
	  return new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
	  try{
		 return new ActiveXObject("Microsoft.XMLHTTP");
	   }catch(E){
		 return false;
	   }
   }
  }
	
}

function enquete(opcao,uId){ 
   xmlhttp = checkNavegador ();
   xmlhttp.onreadystatechange = function(){
   	  			 		 		 	    if (xmlhttp.readyState == 4){
									      if (xmlhttp.status == 200){	
											retorno = xmlhttp.responseXML;
											conteudo = retorno.getElementsByTagName('conteudo');
											if (conteudo.length){
												document.frmEnquete.reset(); 
												janelaCenter('enquete_result.php?uId='+uId, 'Enquente', 'scrollbars=yes', 395,310);
											    	
											}
										  }else 
										    alert ('O servidor retornou um erro!');										  
									    }
  								      } // fim da 
   xmlhttp.open ('GET', 'funcoes.php?act=2&opcao='+opcao+'&uId='+uId,true);
   xmlhttp.setRequestHeader ('Content-Type','application/x-www-form-urlencoded');
   xmlhttp.send(null);
} 	// fim da Funcao bGrupo		
