////////AJAX functions////////////
function getHTTPObject(){
	var xmlhttp;
	 
	  if(window.XMLHttpRequest){
		xmlhttp = new XMLHttpRequest();
	  }
	  else if (window.ActiveXObject){
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		if (!xmlhttp){
			xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
	   
	}
	  return xmlhttp;
}

// Change the value of the outputText field
function setOutput(){
	if(httpObject.readyState == 4){
    	document.getElementById('photogallery_prevnext').innerHTML= httpObject.responseText;
    }
}
	  
function prevnextImage(i,imax){
	httpObject = getHTTPObject();

	if (httpObject != null) {
		httpObject.open("GET", "photogallery_nextprev_image.php?imgno="+i+"&imgtotal="+imax, true);
		scroll(0,0);
		httpObject.send(null);
		httpObject.onreadystatechange = setOutput;
	}
}

function prevImage() {
	alert('');
}
