///////////////////////////////////////////////////////AJAX FUNCTIONS//////////////////////////////////////////////	

//objeto HTTP
var http = getHTTPObject();	

//función genérica de AJAX q crea el objeto HTTP en función del navegador q tenemos
function getHTTPObject() { 
	
    var xmlhttp; 
	
    try { 
		
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
		
    } catch (e) { 
			
        try { 
				
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
				
	} catch (E) { 
					
            xmlhttp = false; 
					
	} 
    }   
				
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 
			
        try { 
				
            xmlhttp = new XMLHttpRequest(); 
				
	} catch (e) { xmlhttp = false; } 
    } 
			
    return xmlhttp;	
} 

//función AJAX q comprueba q el server ha enviado el código HTML de respuesta y lo coloca en el panel pertinente
function handleHttpResponse() {
	
    if (http.readyState == 4 || http.readyState=='complete') {
       
        switch(div){
            
            case 1:
		document.getElementById ('dummy').innerHTML = http.responseText;
		break;	
            case 2:
		document.getElementById ('navigation_buttons').innerHTML = http.responseText;
		break;	
            case 3:
                ventana.document.write(http.responseText);
		break;	
        }
    }
}
	
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////	
