var xmlhttp = getXmlHttpRequest();

function getXmlHttpRequest() {
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
}

function SetItem(id,page) {

	switch(id)
	{
	case 1:
		//document.getElementById("button_home").className = "button_home_hover";
		//document.getElementById("button_passatempo").className = "button_passatempo_hover";
		document.getElementById("button_como").className = "button_como";
		document.getElementById("button_faq").className = "button_faq";
		document.getElementById("button_instalar").className = "button_instalar";
		break;
	case 2:
		//document.getElementById("button_home").className = "button_home";
		//document.getElementById("button_passatempo").className = "button_passatempo";
		document.getElementById("button_como").className = "button_como_hover";
		document.getElementById("button_faq").className = "button_faq";
		document.getElementById("button_instalar").className = "button_instalar";
		break;
	case 3:
		//document.getElementById("button_home").className = "button_home";
		//document.getElementById("button_passatempo").className = "button_passatempo";
		document.getElementById("button_como").className = "button_como";
		document.getElementById("button_faq").className = "button_faq_hover";
		document.getElementById("button_instalar").className = "button_instalar";
		break;	
	case 4:
		//document.getElementById("button_home").className = "button_home";
		//document.getElementById("button_passatempo").className = "button_passatempo";
		document.getElementById("button_como").className = "button_como";
		document.getElementById("button_faq").className = "button_faq";
		document.getElementById("button_instalar").className = "button_instalar_hover";
		break;	
	}	

	xmlhttp.open("GET", page+'.html', true);
	xmlhttp.onreadystatechange = function(){
		if (xmlhttp.readyState==4){
			document.getElementById("loader").innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);

}

function nenhum() {
	if (document.getElementById("div_nenhum").style.display == 'none') {
	   	document.getElementById("div_nenhum").style.display = 'block';
	   	document.getElementById("div_nenhum").style.visibility = 'visible';
	} else {
	   	document.getElementById("div_nenhum").style.display = 'none';
	   	document.getElementById("div_nenhum").style.visibility = 'hidden';
	}	
	

}

