get_trt_rep=null;
function atualizaDiv(){
	
	var req = null;
    if (window.XMLHttpRequest){
        req = new XMLHttpRequest();

    } else if (window.ActiveXObject){
       req =  new ActiveXObject('Microsoft.XMLHTTP');

    }else{
       req =  new ActiveXObject('Microsoft.XMLHTTP2');

    }    
	
	valida=0;
	get_str = '../lib/call_back_ajax/verifica_dominio.php?dominio='+ document.getElementById('dominio').value;
	
	if(document.getElementById('combr').checked){
		get_str += '&combr=on';
		valida=1;
	}
	
	if(document.getElementById('com').checked){
		get_str += '&com=on';
		valida=1;
	}
	
	if(document.getElementById('org').checked){
		get_str += '&org=on';
		valida=1;
	}
	
	if(document.getElementById('net').checked){
		get_str += '&net=on';
		valida=1;
	}
	
	// Complementando o script
	
	if( document.getElementById('more_extension').value != 0 ){
		get_str += '&'+ document.getElementById('more_extension').value +'=on';
		valida=1;
	}
	
	// fim do complemento 
	
	
	if(valida == 1 && !document.getElementById('dominio').value == "" ){
		if(get_trt_rep != get_str){
			req.open('GET', get_str, true);
			req.send(null);
			document.getElementById("retornoRegistrobr").style.display='block';
			document.getElementById("retornoRegistrobr").innerHTML="<img src='../images/connect_active.gif' style='vertical-align:middle; padding-right:15px;' />Verificando, favor aguarde...";
			
	
			req.onreadystatechange = function(){
				
				if (req.readyState == 4){
				   if (req.status == 200){
					   document.getElementById("retornoRegistrobr").innerHTML='<p>'+req.responseText+'</p>';
					   get_trt_rep = get_str;
	
				   }
				}
				
			}
		}else{
			document.getElementById('errorForm').innerHTML="<strong>Para uma nova consulta especifique dados diferentes a consulta anterior</strong>"
			document.getElementById('errorForm').style.display="block"
			//alert("Para uma nova consulta especifique dados diferentes a consulta anterior");
		}

	}else{
		document.getElementById('errorForm').innerHTML="<strong>O dom&iacute;nio e sua exten&ccedil;&atilde;o devem ser preenchidos!</strong>"
		document.getElementById('errorForm').style.display="block"
		//alert("O domínio e sua extenção devem ser preenchidos!");
	}
	

    //req.send(params);
}