// JavaScript Document - ACTIONS
try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}

function ge(x){ return document.getElementById(x); }
function hideDv(x){ return ge(x).style.display='none'; }
function showDv(x,arg){ return ge(x).style.display=arg; }
function inHTML(x,content){ return ge(x).innerHTML=content; }

function check_frm_dominios(){
	var domain = ge('buscardomain');
	if(domain.value == ""){ 
		showDv('error_buscadom','block'); inHTML('error_buscadom','Digite o domínio desejado!');
		domain.focus();
	} 
	else if(domain.value.indexOf('.') >= 1){
		showDv('error_buscadom','block'); inHTML('error_buscadom','Por favor remova o ( . )!');
		domain.focus();
	} else { document.frmdom.submit(); }
}
function popup(pagina,wi,he){
	window.open('popup_'+pagina+'.htm','INFO','width='+wi+',height='+he+',scrolling=auto,top=29,left=29')
}
function reloadDefaultCaptcha(theplace){
	var place = ge(theplace);
	var pC = new Date().getTime();
	
	place.innerHTML='';
    xmlhttp.open("GET", "incs/reloadDefaultCaptcha.php?pc="+pC,true);
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState == 4){
            var content = xmlhttp.responseText;
            content = content.replace(/\+/g," ");
            content = unescape(content);
			place.innerHTML=content;
        }
	} 
    xmlhttp.send(null);
}

function mudarClasse(id,class){ return ge(id).className=class; }
function mudarClasse_OS(id,class,este,classtoo){ 
	ge(id).className=class;
	ge(este).className=classtoo;
}