var xmlHttp

function ShowAlbum(str)
	{
		document.getElementById('placehold').innerHTML = "";

		if (str==0)
			{
				document.getElementById("placehold-album").innerHTML= "";
				return;
			}

		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
			{
		 		alert ("Browser does not support HTTP Request");
		 		return;
			}

		var url="gallerys/CreateGallery.php";
		url=url+"?q="+str;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=function() {
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
						{
							document.getElementById("placehold-album").innerHTML=xmlHttp.responseText;
				}
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

function ShowImage(album,photo)
	{
		xmlHttp=GetXmlHttpObject();

		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
 				return;
 			}

		var url="gallerys/GetImage.php";
		url=url+"?album="+album+"&photo="+photo;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				document.getElementById('placehold').innerHTML = xmlHttp.responseText;
			}
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
}

function GetXmlHttpObject()
{
var xmlHttp=null;

try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
