img = new Image(); img.src = "http://www.db3om.de/js/wait2_ani.gif"; function makeRequest( url, method, strData ) { http_request = false; if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Ihre Browsereinstellungen werden nicht unterstützt.'); } http_request.onreadystatechange = handleResponse; http_request.open(method, url + '?' + strData, true); if(method == 'post') http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); http_request.send(strData); } function handleResponse() { if (http_request.readyState == 4) { if (http_request.status == 200) { eval(http_request.responseText); hideAnimation(); } else { alert('Beim Senden ist ein Problem aufgetreten.'); } } } function jsform(theForm) { globalForm = theForm; data = ''; i = 0; while( i < theForm.length ) { if ((theForm.elements[i].type != 'submit' && theForm.elements[i].type != 'reset' && theForm.elements[i].type != 'radio') || (theForm.elements[i].checked == true)) data += theForm.elements[i].name + '=' + theForm.elements[i].value + '&'; i++; } data += 'mode=js'; showAnimation(); makeRequest(theForm.action, theForm.method, data); return false; } function showAnimation() { i = 0; while(i < globalForm.length) { globalForm.elements[i].disabled = true; i++; } x = 0; y = 0; if (window.innerHeight) { x = (self.innerWidth-400)/2; y = (self.innerHeight-250)/2; } else if (document.documentElement && document.documentElement.clientHeight) { x = (document.documentElement.clientWidth-400)/2; y = (document.documentElement.clientHeight-250)/2; } else if (document.body) { x = (document.body.clientWidth-400)/2; y = (document.body.clientHeight-250)/2; } if (window.pageYOffset) { x = x + window.pageXOffset; y = y + window.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { x = x + document.documentElement.scrollLeft; y = y + document.documentElement.scrollTop; } else if (document.body) { x = x + document.body.scrollLeft; y = y + document.body.scrollTop; } animationDiv = document.createElement('div'); animationDiv.style.position = "absolute"; animationDiv.style.top = y; animationDiv.style.left = x; animationDiv.style.border = "5px solid #9AFF4F"; animationDiv.appendChild(img); document.body.insertBefore(animationDiv, document.body.nextSibling); } function hideAnimation() { document.body.removeChild( animationDiv, document.body.nextSibling); location.reload(true); }