// JavaScript Document

var url = "" ;


function getPagina(caminho)
{
	http.open("GET","pages/"+caminho+"/default.asp", true);
	http.onreadystatechange = troca;
	http.send(null);
		
	
	}
	

function getSubcategoria(caminho, idcat, idsub)
{
	http.open("GET","pages/"+caminho+"/default.asp?cat="+idcat+"&subc="+idsub, true);
	http.onreadystatechange = troca;
	http.send(null);
	url = caminho;

	
}

function troca()
{
	
	if (http.readyState == 4)
	{
		
		document.getElementById('conteudoMeio').innerHTML = http.responseText;
		
		
		
	}
	
}


function getAjax(){
	
	var ajax = null;
	try{
		ajax = new XMLHttpRequest();
	}catch(e){
	    try{
			ajax = new ActiveXObject("Microsoft.XMLHTTP");	
		}catch(e){
				try{
					ajax = new ActiveXObject("MSXML2");
				}catch(e){
					ajax = null;
				}
		}
	}
	return ajax;
}

var http = new getAjax();

