
function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function MostrarPagina(pagina,boton){
	cont = document.getElementById('tabs-content');
	
	ajax=objetoAjax();
	
    ajax.open("GET", pagina);
    ajax.onreadystatechange = function(){
		if (ajax.readyState == 4 && ajax.status == 200) {
			cont.innerHTML = ajax.responseText;
		}
	}
	ajax.send(null);
	//----------- configuraciones previas -------------//
	
	//definir los titulos de los botones
	titulo=new Array();
	titulo[0]="erin";
	titulo[1]="travis";
	titulo[2]="laura";
	titulo[3]="ryan";
	titulo[4]="bryan";
	titulo[5]="arik";
	titulo[6]="liz";
	titulo[7]="kat";
	
	//definir numero de botones
	nrobtn=8;
	
	//definir prefijo de botones
	//(esto con el objetivo de no tener
	//problemas al momento de validar
	//nuestra página.)
	pref="boton_";
	
	//-------------------- fin ------------------------//

	//quita el estilo a todos los botones
	for(i=1;i<=nrobtn;i++){
		tit=titulo[i-1];
		btn=document.getElementById(pref+i);
		btn.innerHTML="<span style=\"display:block;	width:97px;	height:30px; line-height:30px; text-align:center; text-transform:uppercase;	background:url(images/a-team-tab2.jpg) no-repeat; font-weight:bold; color:#a3aab4; margin-bottom:2px; cursor:pointer; text-decoration:none; font-size:11px;\">"+tit+"</span>";
	}
	//le da estilo al boton actual
	btnA = document.getElementById(pref+boton);
	tit=titulo[boton-1];
	btnA.innerHTML="<span style=\"display:block;	width:97px;	height:30px; line-height:30px; text-align:center; text-transform:uppercase;	background:url(images/a-team-tab-selected2.jpg) no-repeat; font-weight:bold;	color:#ffffff; margin-bottom:2px; cursor:pointer; text-decoration:none; font-size:11px;\">"+tit+"</span>";
}
