var request26657 = createRequest(); // Books

function Submit_Query_For_Content (Action, Amazon_Category) {	

	if (Amazon_Category == "") 
	{
		Amazon_Category = 53;
	}
		 var url = "AssistingCode/Ajax-2-Content.php?Action=Get_Amazon_Books&Amazon_Category=" + Amazon_Category;
	
			 request26657.open("GET", url, true); /* this line initiates the connection */
			 request26657.onreadystatechange = Update_Content; 
			 request26657.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		 
			 request26657.send(null);

} // Send request for various content [ Submit Query For Content ] 

function Update_Content() {

	if (request26657.readyState == 4) {
		if (request26657.status == 200) {

		var xmlDoc = request26657.responseXML;

			if (xmlDoc.getElementsByTagName ("XML_Request")[0].firstChild.nodeValue == "Amazon_Books") {
				Show_List_Of_Amazon_Books (xmlDoc);	
			}
  		}
	}
} // [ Update Content ]

function Show_List_Of_Amazon_Books (xmlDoc) {

XMLcount = xmlDoc.getElementsByTagName ("Individual_Book").length;

	if (XMLcount > 0) {		 

		var Amazon_Books = document.getElementById("Amazon_Books");
		Amazon_Books.innerHTML = "";

			for (i=0; i < XMLcount; i++) {				
				var XML_Amazon_Books = decodeURIComponent(xmlDoc.getElementsByTagName ("Individual_Book")[i].firstChild.nodeValue);  			
				//http://www.the-art-of-web.com/javascript/escape/
				Amazon_Books.innerHTML = Amazon_Books.innerHTML + XML_Amazon_Books;
			}
			
	//document.getElementById("Left_Navigation_Unit_For_Amazon_Books").style.visibility="visible";				
	}

} // Return a list with checkboxes [ show List of Related Topics ]