  function getXmlHttpRequest()
  {
    var xmlHttp;
    try
    {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
      // Internet Explorer
      try
      {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
      catch (e)
      {
        try
        {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {
          alert("Your browser does not support AJAX!");
          return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
        document.getElementById( "latestpics" ).innerHTML = xmlHttp.responseText;
      }
    }
    return xmlHttp;
  }

  function getLatestPicsPrev()
  {
    var xmlHttp = getXmlHttpRequest();
    var startPic = parseInt(document.getElementById( "startpic" ).value) - 9;
    xmlHttp.open("GET","/ajax/get_latest_pics.pl?start=" + startPic,true);
    xmlHttp.send(null);
    document.getElementById( "startpic" ).value = startPic;
  }
  function getLatestPicsNext()
  {
    var xmlHttp = getXmlHttpRequest();
    var startPic = parseInt(document.getElementById( "startpic" ).value) + 9;
    xmlHttp.open("GET","/ajax/get_latest_pics.pl?start=" + startPic,true);
    xmlHttp.send(null);
    document.getElementById( "startpic" ).value = startPic;
  }


