//var i=<?=$j?>;
//var k=<?=$j?>; 
 
function nxt(domain) 
{	 
var h=0;
h=document.getElementById("hid").value;
h=Number(h);
var i=0;
i=document.getElementById("tot").value;

i=Number(i);
 if(h<i)
 {
		if(http)
		{ 
			var url="";
			url=domain+"/testimon.php?id="+h+"&status=n";			
			http.open("GET",url,true);
			http.onreadystatechange=handleHttpResponseTestimonial;
			http.send(null);
		}
  }
}


function prv(domain) 
{	
var h=document.getElementById("hid").value;
var i=document.getElementById("tot").value;

 if(h>1)
 {
		if(http)
		{ 
			var url="";
			url=domain+"/testimon.php?id="+h+"&status=p";			
			http.open("GET",url,true);
			http.onreadystatechange=handleHttpResponseTestimonial;
			http.send(null);
		}
  }
		 
}

function handleHttpResponseTestimonial()
{
	if(http.readyState==4)
	{
		if(http.responseText.indexOf('invalid')==-1)		
		{			
			var textdoc=http.responseText;
				//alert(textdoc);
			
				document.getElementById("showData").innerHTML=textdoc;
			
			}	
			 
	}
}	

function getHTTPObject() 
{

		var xmlhttp;
		
		if (window.XMLHttpRequest)
		{
			return new XMLHttpRequest();
		}
		else if(window.ActiveXObject)
		{
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
		else
		{
			alert('Status: Cound not create XmlHttpRequest Object.' + 'Consider upgrading your browser.');
		//document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object.' + 'Consider upgrading your browser.';
		}
		
}

var http=getHTTPObject();