﻿function getXMLHTTPRequest() {
	try {req = new XMLHttpRequest();} catch(err1) {
		try {req = new ActiveXObject("Msxml2.XMLHTTP");} catch (err2) {
        		try {req = new ActiveXObject("Microsoft.XMLHTTP");} catch (err3) {
            			req = false;}
 	   		}
		}
	return req;
}
  
  
               
// INCLUDE
            
function include(id,file) {
var http = getXMLHTTPRequest();  
	
	http.onreadystatechange = function() {
	
		if (http.readyState == 4){
			
			if (http.status == 200)	{ document.getElementById(id).innerHTML = http.responseText;} 
			else					{ document.getElementById(id).innerHTML = "Error";}

		}
	}

	http.open("GET", file, true);
	http.send(null);
}