var xmlHttpEvent

function getAjaxEvent(position) {
document.getElementById("divAjaxEvent").style.opacity = 0.3;

xmlHttpEvent=GetxmlHttpEventObject()
if (xmlHttpEvent==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
var url
url="module/index/php/ajax_event.php";
url=url+"?position="+position
url=url+"&sid="+Math.random()
xmlHttpEvent.onreadystatechange=stateChangedEvent
xmlHttpEvent.open("GET",url,true)
xmlHttpEvent.send(null)
} 

function stateChangedEvent() 
{ 
if (xmlHttpEvent.readyState==4 || xmlHttpEvent.readyState=="complete")
 { 
  document.getElementById("divAjaxEvent").innerHTML=xmlHttpEvent.responseText
  document.getElementById("divAjaxEvent").style.opacity = 1.0;
 } 
}

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