var ajaxSecs;
var ajaxTimerID = null;
var ajaxTimerRunning = false;
var delay = 1000;
var x = 0;

function popUp(URL)
{
 day = new Date();
 id = day.getTime();
 eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=500,left = 0,top = 0');");
}

function GetXmlHttpObject(handler)
{
   var objXMLHttp = null;
   if ( window.XMLHttpRequest )
   {
      objXMLHttp=new XMLHttpRequest();
   }
   else if ( window.ActiveXObject )
   {
      objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
   }
   return objXMLHttp;
}

function reqContact(x)
{
 xmlHttp = GetXmlHttpObject()
 if ( xmlHttp == null )
 {
  alert ("Browser does not support HTTP Request")
  return
 }

 var url="request_contact.php?p_id="+x
 xmlHttp.open("GET",url,false)
 xmlHttp.send(null)
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
  alert('Request to contacted made, thank you.');
 }
}

function reqBrochure(x)
{
 xmlHttp = GetXmlHttpObject()
 if ( xmlHttp == null )
 {
  alert ("Browser does not support HTTP Request")
  return
 }

 var url="request_brochure.php?p_id="+x
 xmlHttp.open("GET",url,false)
 xmlHttp.send(null)
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
  alert('Request for brochure made, thank you.');
 }
}

