var xmlHttp


//--- showDescription
function showgallery(str)
{
	//document.getElementById("test").innerHTML=str
if (str.length==0)
{ 
document.getElementById("pics").innerHTML=""
return
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return;
} 

xmlHttp.onreadystatechange=StateChanged 
xmlHttp.open("POST","showgallery.php",true)

xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
xmlHttp.send("q="+str)
} 

function StateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("pics").innerHTML=xmlHttp.responseText;
} 
} 

function showgallery3(str){
     if (str.length==0){ 
          document.getElementById("pics").innerHTML=""
          return
     }
     var xmlHttp = GetXmlHttpObject();
     var url = "showgallery.php";
     url += "?q="+str;
     
     if (!xmlHttp){
          alert ("Browser does not support HTTP Request")
          return
     }
     xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
            document.getElementById("pics").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;
}


/*

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 
*/