function createXMLHttpRequest() {
	var XMLRequest = false;
    
    // create object for IE7, Mozilla, Safari, etc. (native object)
    if (window.XMLHttpRequest) {
    	XMLRequest = new XMLHttpRequest();
    }
    // create object for IE6, IE5, etc. (ActiveX object)
    else if (window.ActiveXObject) {
    	var success = false;
    	var progIDs = new Array(
    		"Msxml2.XMLHTTP.6.0",
    		"Msxml2.XMLHTTP.3.0",
    		"Msxml2.XMLHTTP",
    		"Microsoft.XMLHTTP"
    	);
    	
    	for (i=0; i<progIDs.length && !success; i++) {
    		try {
    			XMLRequest = new ActiveXObject(progIDs[i]);
    			success = true;
    		}
    		catch (failure) {
    			
    		}
    	}
    }
    
    return XMLRequest;
}

function moreItems(page_a, section, prev_next) {
	var post_variables = "page_a=" + page_a + "&section=" + section + "&prev_next=" + prev_next;
        
    AjaxRequest = createXMLHttpRequest();
   
    AjaxRequest.open("POST", "../scripts/ajax-show-new-items.php", true);
    AjaxRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    
    AjaxRequest.onreadystatechange = function() {
    	if (AjaxRequest.readyState == 4 && AjaxRequest.status == 200) {
    		document.getElementById('archives_list').innerHTML=AjaxRequest.responseText;
    	}
    }
    
    AjaxRequest.send(post_variables);
}