try{
    xmlhttp = new XMLHttpRequest();
	if ( xmlhttp.overrideMimeType)
        xmlhttp.overrideMimeType('text/xml');
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}

function Casulo(){ self.status = "www.casulonet.com"; }

var AtualHash;

function Carrega(arquivo){ 

//	location.href = "#" + arquivo.substring(10);

//	AtualHash = arquivo.substring(10);

	var carrega = document.getElementById("carrega");
	var tela = document.getElementById("tela");

	carrega.innerHTML = '<div style="align:left;"><Table><td><div id="loader"><div align="center">Carregando...</div><div id="loader_bg"><div id="progress"> </div></div></div></td></table></div>';

	xmlhttp.open("GET", arquivo, true);

	xmlhttp.onreadystatechange=function() {

		if (xmlhttp.readyState==4){
			tela.innerHTML = xmlhttp.responseText;
			carrega.innerHTML = "";

		}
	}

	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send(null);

}

function DadosFormulario(num){

	dados = '';

	for(i=0; i<document.forms[num].elements.length; i++){
		dados = dados +'&'+ document.forms[num].elements[i].name +'='+ document.forms[0].elements[i].value
	}

	return dados;

}

function Ampliar(num,sec){
window.open("k/"+sec+"/"+num,"","width=620,height=550,scrollbars=1");
}


function ChecaHash(){

if(location.hash.substring(1)!=AtualHash){

	Carrega('dados.php?'+location.hash.substring(1));
}

}

//setInterval(ChecaHash,500);
