var xmlHttp5;

function sample()
{ 

xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request");
 return
 }
var randomnumber = Math.floor(Math.random()*1001);
var url="../../ajax/sample.php?d=" + randomnumber;
//url=url+"?q="+str
//url=url+"&sid="+Math.random()
xmlHttp5.onreadystatechange=stateChanged5;
xmlHttp5.open("GET",url,true)
xmlHttp5.send(null)

}

function stateChanged5() 
{ 

if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete"){ 

		var se=Math.floor(Math.random()*10);
		document.getElementById("link" + se).href = xmlHttp5.responseText;
		document.getElementById("link" + se).title = xmlHttp5.responseText;
		document.getElementById("text" + se).innerHTML = xmlHttp5.responseText;

}
  
}

function GetXmlHttpObject5()
{
var xmlHttp5=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp5=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp5=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp5=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp5;
}
