var start_record = 0;
var total_record = parseInt(document.getElementById("totalRecord").innerHTML);

function showWaitMessage()
{
	var content = document.getElementById("testimonials-list");
	content.className = 'loading';

	var wrapper = document.getElementById("ajax-wrapper");
	wrapper.className = 'fadein';

}
function xmlhttpPost(strURL) {
	var xmlHttpReq = false;
	var self = this;
	var URL = strURL;
	
	start_record = start_record + 3;
	if (start_record > total_record -1)
	{
		start_record = 0;
	}
	URL = URL + '?start=' + start_record;
	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
		alert('IE');
	}
	self.xmlHttpReq.open('GET', URL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'text/plain;charset=utf-8');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			updatepage(self.xmlHttpReq.responseText);
		} 
		else
		{
			showWaitMessage();
		}
		
	}
	self.xmlHttpReq.send(null);
}
function updatepage(str)
{
	var content = document.getElementById("testimonials-list");
	content.className = '';

	var wrapper = document.getElementById("ajax-wrapper");
	wrapper.className = 'fadeout';

	var contentObj = document.getElementById("testimonials-list");
	contentObj.innerHTML = str;	
}

