function ChangePic(id)
{
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)
      {
        var picinfo = xmlHttp.responseText.split("|");
        document.getElementById('firstphoto').style.display = 'none';
        document.getElementById('displayinfo').innerHTML = picinfo[1] + "<br><div style='height: 5px;font-size: 1px;'></div><img src='" + picinfo[0] + "' border='0'  width='500' style='border: 1px solid #cecece;'>";
        
      }else{
        document.getElementById('displayinfo').innerHTML = "<table border='0' cellpadding='4' cellspacing='1' width='100%' style='height: 200px;'><tr><td width='100%' valign='center' align='center'><img src='./images/ajaxloader.gif' border='0'></td></tr></table>";
        document.getElementById('firstphoto').style.display = 'none';
      }
    }
  
  xmlHttp.open("GET","./php/loadpic.php?id=" + id,true);
  xmlHttp.send(null);
  
}
