function loader(){

         getGalleries("?a=x");

    }

function getGalleries(str){
  //alert(str);
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4&&xmlhttp.status==200)
    {
    document.getElementById("gallerymenu").innerHTML=xmlhttp.responseText;
    }
  }

xmlhttp.open("GET","getGalleries.php?"+str,true);

xmlhttp.send();



}

function fillGallery(str){

if (str=="")
  {
  document.getElementById("paginate").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4&&xmlhttp.status==200)
    {
    document.getElementById("paginate").innerHTML=xmlhttp.responseText;
    }
  }


xmlhttp.open("GET","getGalleryObjects.php?"+str,true);
xmlhttp.send();
    }



function paginateGallery(str){
 //alert(str);
if (str=="")
  {
  document.getElementById("paginate").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4&&xmlhttp.status==200)
    {
    document.getElementById("paginate").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","paginateGallery.php?"+str,true);
xmlhttp.send();
    }
    
function getPress(str){

if (str=="")
  {
  document.getElementById("paginate").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4&&xmlhttp.status==200)
    {
    document.getElementById("paginate").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","getPress.php?"+str, true);
xmlhttp.send();
    }
    
    function paginatePress(str){

if (str=="")
  {
  document.getElementById("paginate").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4&&xmlhttp.status==200)
    {
    document.getElementById("paginate").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","paginatePress.php?"+str, true);
xmlhttp.send();
    }


