// JavaScript Document

function ajaxFunction(pg,tp)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
else
  {
  alert("Your browser does not support XMLHTTP!");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
  document.getElementById("CenterBox").innerHTML=xmlhttp.responseText;
  }
}
xmlhttp.open("GET","ShowProducts.php?Page="+pg+"&Type="+tp+"&dt="+Date(),true);
xmlhttp.send(null);
}

function ajaxFunction2(arg)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
else
  {
  alert("Your browser does not support XMLHTTP!");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
document.getElementById("CenterBox").innerHTML=xmlhttp.responseText;
}
}

if(arg==1)
xmlhttp.open("GET","AStat.php?"+"dt="+Date(),true);
else if(arg==2)
xmlhttp.open("GET","AMail.php?"+"dt="+Date(),true);
else if(arg==3)
xmlhttp.open("GET","AInsert.php?"+"dt="+Date(),true);


xmlhttp.send(null);
}

