function getXMLHTTPRequest() {

try {
req = new XMLHttpRequest(); /* p.e. Firefox */
} catch(e) {
  try {
  req = new ActiveXObject("Msxml2.XMLHTTP");
  /* algunas versiones IE */
  } catch (e) {
    try {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    /* algunas versiones IE */
    } catch (e) {
      req = false;
    }
  }
}
return req;

}
var http = getXMLHTTPRequest();


function carga_filoseccion(seccion_nueva) {
	
	var filosec= new Array(6);
	filosec[0]='precision';
	filosec[1]='inventiva';
	filosec[2]='compromiso';
	filosec[3]='versatil';
	filosec[4]='celeridad';
	filosec[5]='profesional';
	
   for(i=0;i<6;i++){
   		document.images[filosec[i]].src='imagenes/'+filosec[i]+'.jpg';
   }
   
   
   document.images[seccion_nueva].src='imagenes/'+seccion_nueva+'_select.jpg';
   
   var myurl = 'includes/'+seccion_nueva+'.php';
  
    myRand = parseInt(Math.random()*999999999999999);
    // saltarse la cache
   
   var modurl = myurl+"?rand="+myRand;

   http.open("GET", modurl, true);
   http.onreadystatechange = useHttpResponseFilo;
   http.send(null);
}

function useHttpResponseFilo() {
   //Selecciona el div donde ira todo el contenido que se obtenga
   var area = document.getElementById("filocontent");
   
   if (http.readyState == 4) {
	   if(http.status == 200) {
		   
		//Mete en el div contenido, el contenido de la pagina consultada
	    area.innerHTML = http.responseText;
	   }
	}
  else
  {
	  area.innerHTML = '<div id="centracontent">cargando ...</div>';
  }
}

