function jsCheck(url, gemerkt, base) { var temp = base + "/js/jsCheck.inc.php?gemerkt=" + gemerkt + "&width=" + screen.width + "&height=" + screen.height; aktion = new ajaxRequest("ISO-8859-1", temp, zustand); aktion.doRequest(); function zustand() { if(aktion.req.readyState == 4) { var ok = aktion.req.responseText; if(ok == "OK") document.location = base + url; } } } ajaxRequest = function(charset, u, f, m, b, h, s) { this.url = u; this.wState = f || function() { }; this.method = m || "GET"; this.body = b || null; this.headers = h || false; this.sync = s || true; this.abortReq = false; this.req = (window.XMLHttpRequest) ? new XMLHttpRequest() : ((window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : false); charset = 'text/html; charset=' + charset; if(this.req.overrideMimeType) this.req.overrideMimeType(charset); this.doRequest = function() { this.req.open(this.method,this.url,this.sync); if(this.headers) { for(var i=0; i < this.headers.length; i+=2) { this.req.setRequestHeader(this.headers[i],this.headers[i+1]); } } this.req.onreadystatechange = this.wState; (!this.abortReq) ? this.req.send(this.body) : this.req.abort(); } } jsCheck('/', 'e9734559e1f4618420eba4466e401743', '');