function nuevoAjax(){
	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 cargarPagina(sCual, sDonde){
	var contenedor;
	contenedor = document.getElementById(sDonde);
	ajax=nuevoAjax();
	ajax.open("GET", sCual + '?sRuta=../../../', true);
	ajax.setRequestHeader("Content-Type","text/html; charset=iso-8859-1");		
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			contenedor.innerHTML = ajax.responseText;
			cambiarPestania(sCual);
		}
	}
	ajax.send(null)
}

function cambiarPestania(sCual) {

	if (sCual == '/inc/aplicacionesPerso/destacadosHome/noticias.asp') {
		document.getElementById('destNoticias').className='activo';
		document.getElementById('destAgenda').className='';
		document.getElementById('destTablon').className='';
	}
	if (sCual == '/inc/aplicacionesPerso/destacadosHome/agenda.asp') {
		document.getElementById('destNoticias').className='';
		document.getElementById('destAgenda').className='activo';
		document.getElementById('destTablon').className='';
	}
	if (sCual == '/inc/aplicacionesPerso/destacadosHome/tablon.asp') {
		document.getElementById('destNoticias').className='';
		document.getElementById('destAgenda').className='';
		document.getElementById('destTablon').className='activo';
	}
}
