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;
}

// JavaScript Document
function showcontent(str)
{
	if (str==0)
     { 
     document.getElementById("content").innerHTML="";
     return;
     }
     		
	 
xmlHttp = GetXmlHttpObject();
xmlHttp.onreadystatechange = function()
 {
	if(xmlHttp.readyState == 1)
	    {
			document.getElementById("content").innerHTML = "<img src='../img/loaded.gif' />";
		}
	if(xmlHttp.readyState == 4)
	    {
			document.getElementById("content").innerHTML = xmlHttp.responseText;
			
			//alert (xmlHttp.responseText);
			if(xmlHttp.status == 200) {
            // alert("The server said: " + xmlHttp.responseText);
             } else {
            // issue an error message for
            // any other HTTP response
            alert("An error has occurred: " + xmlHttp.statusText);
            }

		}
	
 }
	var url="http://localhost/siteuri/nicu/inventmedia/gallery.php";
    url=url+"?list="+str;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}

