var xmlHttp;
if (window.ActiveXObject){
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} else {
	xmlHttp = new XMLHttpRequest();
}


function getId(id){
	xmlHttp.open('get','ajax.php?ajax=1&image='+id);
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4){
			if(xmlHttp.status == 200 || xmlHttp.status == 304){
				//window.document.getElementById('pic') = xmlHttp.responseText;
				response = xmlHttp.responseText;
				responseArray = response.split('_/_');
				pic = new Image();
				pic.src = 'images/original/'+responseArray[0];
				//alert(pic.src);
				//document.images[divPic+'_'+i].src = eval(divPic+'_'+state+'_'+i+".src");
				document.images['picture'].src = eval('pic.src');
				window.document.getElementById('imageTitle').innerHTML = responseArray[1];
				window.document.getElementById('imageDescription').innerHTML = responseArray[2];
				if (responseArray[3] < responseArray[4]){
					window.document.getElementById('picture').className = 'photoH';
				}else{
					window.document.getElementById('picture').className = 'photoV';	
				}
				
			}
	
		}
	}
	xmlHttp.send(null);
}