// JavaScript Document
var http = getHTTPObject();

function getHTTPObject()
{
	var xmlhttp;
	try{xmlhttp = new XMLHttpRequest(); /* e.g. Firefox */}
	catch(e)
	{
		try{xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */}
		catch (e)
		{
			try{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */}
			catch (e)
			{
				xmlhttp = false;
			}
		}
	}
	return xmlhttp;
}

function getPages(ind)
{
	var myRandom=parseInt(Math.random()*99999999);  // cache buster
	var url="getPages.php?rand=" + myRandom + "&page=" + ind;
	http.open("GET", url, true);
	http.onreadystatechange = returnGetPages;
	http.send(null);
}

function returnGetPages()
{
	if (http.readyState == 4){
		if(http.responseText!="0" && http.responseText!=""){
			//alert(http.responseText);
			document.getElementById("innerContent").innerHTML = http.responseText;
		}
	}
}