var i = 1;var http = createRequestObject(); function createRequestObject() { var tmpXmlHttpObject; if (window.XMLHttpRequest) { // Mozilla, Safari would use this method ... tmpXmlHttpObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE would use this method ... tmpXmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP"); } return tmpXmlHttpObject; } function haal_gegevens(ref) { http.open('get', '/emailgegevens.php?ref=' + ref + '&t=' + new Date().getTime()); http.onreadystatechange = function() { geef_gegevens(); }; http.send(null); return false; } function geef_gegevens() { if(http.readyState == 4){ eval(http.responseText); } } function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); } if(ReadCookie("ref")!="") haal_gegevens(ReadCookie("ref"));