// XML Setup 

    var xmlHttpReq = false;
    var self = this;
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	
		
		function changeIMG(imageID,gallID)
				{
			
						
						if (imageID == '') { window.location='/gallery/'+gallID+'/';quit();}
						
			self.xmlHttpReq.open('POST', '/includes/ajaxfeed.php', true);
			self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			self.xmlHttpReq.onreadystatechange = function() {
						if (self.xmlHttpReq.readyState == 4) {	
		  				    results = self.xmlHttpReq.responseText.split("|");
					 					 
						document.getElementById('imgHTML').innerHTML=results[0];
						document.getElementById('nextA').href=results[1];
						document.getElementById('prevA').href=results[2];
						document.getElementById('imgName').innerHTML=results[3];
						nextFileLink=results[4];
						
						imageCache = new Image();
						imageCache.src = "/image/"+gallID+"/"+nextFileLink+"/";

						
						
							 }
					}
			 
			qstr ='action=pic&imageID='+imageID+'&gallID='+gallID;  
			self.xmlHttpReq.send(qstr);
			
			
			
						

  }
  
  

  
  ///////////////////

function open_win(url)

{
myWin = open(url,"gall",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=710,height=600'); myWin.focus();
}

