var xmlHttp;
var dropResult;

function GetXmlHttpObject()
{
//var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function aReq(url, param, place) {
	xmlHttp=GetXmlHttpObject(); 
	dropResult = document.getElementById(place);
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	}
	url=url+"?q="+param;
	url=url+"&sid="+Math.random();
	var newWindow = document.createElement("div");
	newWindow.setAttribute("id", 'inschrijven');
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange = function() { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			document.body.appendChild(newWindow);
			document.getElementById('inschrijven').innerHTML = xmlHttp.responseText;
		}
	};
	xmlHttp.send(null);
}


function getInfo(what, place) {
	xmlHttp=GetXmlHttpObject(); 
	dropResult = document.getElementById(place);
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 

	var url="lib/indextext.php";
	url=url+"?q="+what;
	url=url+"&sid="+Math.random();
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange = function() { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			dropResult.innerHTML=xmlHttp.responseText;
			//changeIndexDivs();
		}
	};
	xmlHttp.send(null);
}

function deleteDiv(r) {
	r.parentNode.removeChild(r);	
}

function changeIndexDivs() {
	d = document.getElementById('indexButtons');
	d.style.width = "240px";
	d.style.clear = "none";
	d.style.textAlign = "left";
	d.style.paddingLeft = "30px";
	d.style.cssFloat = "left";
	
	dt = document.getElementById('infobox');
	dt.style.height = "400px";
	dt.style.paddingTop = "10px";
	
	for (y = 1; y<4; y++) {
		i = document.getElementById('img0'+y);
		i.style.width = "126px";
		i.style.height = "96px";
	}
}
