// JavaScript Document
function funAjax(id){
  $('#'+id).attr('disabled', 'disabled');
  $('#'+id).val('Verificando...');
  
  dados = 'tipo=' + id + '&login=' + $('#loginRU').val() + '&email=' + $('#emailRU').val() + '&loginEO=' + $('#loginEO').val();
  
  $.ajax({
			 type: 'GET',
			 url: 'val_login_email.php',
			 data: dados,
			 success: function (msg){
			   $('#'+id).attr('disabled', false);
			   
			   if(id == 'verificaLogin'){
			     $('#resTesteLogin').html(msg);		   
				 $('#'+id).val('Verifica Login');
				 
			   }else if(id == 'verificaEmail'){
			     $('#resTesteEmail').html(msg);
				 $('#'+id).val('Verifica E-Mail');	 
				 
			   }else if(id == 'verificaLoginEO'){
			     $('#resTesteLoginEO').html(msg);
				 $('#'+id).val('Verifica Login');
				 
			   }
			 }
		 });
  
}



function ajax(perg, categ){
  
  jogo = $('#jogo_sel').val();
  
  if(jogo == ''){
	window.alert('Por favor selecione um jogo!');  
  }else{
    $('#carregando').show();
  
    dados = 'p='+perg+'&c='+categ+'&j='+jogo;
  
    $.ajax({
			 type: 'GET',
			 url: 'scriptFaq.php',
			 data: dados,
			 success: function (msg){
			   $('#carregando').hide();
			   $('#linha_resultado').show();
			   $('#resultado').html(msg);		   
			 }
		   });
	  
	  
  }  
}

function funAjaxCatProb(){
  
  idProblema = $('#problema').val();
  
  dados = 'idProb='+idProblema;
  $('#carregando').show();
  $.ajax({
		   type: 'GET',
		   url: 'scriptCatProb.php',
		   data: dados,
		   success: function (msg){
		   $('#carregando').hide();
		   $('#categProb').html(msg);		   
		 }
	   });  
}

function funAjaxJogo(){
  
  idJogo = $('#jogo').val();
  
  dados = 'idJogo='+idJogo;
  $('#carregandoConta').show();
  $.ajax({
		   type: 'GET',
		   url: 'scriptContasJogo.php',
		   data: dados,
		   success: function (msg){
		   $('#carregandoConta').hide();
		   $('#contasJogo').html(msg);		   
		 }
	   });
}