﻿var xmlhttp1;

function showNewsThumbs(page)
{
	url='picNews/load_images.php?pagenum='+ page;
	xmlhttp1=GetXmlHttpObject1();
	if (xmlhttp1==null)
 	{
 		alert ("Browser does not support HTTP Request");
  		return;
  	}
	xmlhttp1.onreadystatechange=ThumbNewsLoad;
	xmlhttp1.open("GET",url,true);
	xmlhttp1.send(null);
}

function ThumbNewsLoad()
{
	if (xmlhttp1.readyState==4)
	{
		document.getElementById('divPicNews').innerHTML =xmlhttp1.responseText;
	}
}

function GetXmlHttpObject1()
{
	if (window.XMLHttpRequest)
	{
  		return new XMLHttpRequest();
  	}
	if (window.ActiveXObject)
	{
  		return new ActiveXObject("Microsoft.XMLHTTP");
  	}
	return null;
}


function showImage(img)
{ 
	//document.getElementById("disPopup").style.display='';
	//document.getElementById("popup").innerHTML = '<div style="width:800px; margin:auto"><img class="bigImage" src="'+img+'" onclick="closeImage()" alt=""></div>';

}

function closeImage()
{
	document.getElementById("popup").innerHTML = '';
	document.getElementById("disPopup").style.display='none';
}
