<!--
function ajaxplz() {
if (document.forms['bu'].plz.value.length == 5) {
xmlhttpPost('/js/str_cpl.php');
}
}

   function xmlhttpPost(strURL) {
        var xmlHttpReq = false;
        // Mozilla/Safari
        if (window.XMLHttpRequest) {
            xmlHttpReq = new XMLHttpRequest();
            if (xmlHttpReq.overrideMimeType) {
                xmlHttpReq.overrideMimeType('text/xml');
                // See note below about this line
            }
        // IE
        } else if (window.ActiveXObject) { // IE
            try {
                xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
            }
        }
        if (!xmlHttpReq) {
            alert('ERROR AJAX:( Cannot create an XMLHTTP instance');
            return false;
        }   
        xmlHttpReq.open('POST', strURL, true);
        xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        xmlHttpReq.setRequestHeader('Host', 'www.mister-finance.de');

        xmlHttpReq.onreadystatechange = function() { 
            callBackFunction(xmlHttpReq); 
        };
        xmlHttpReq.send("plz=" + escape(document.forms['bu'].plz.value));
    }
            
    function callBackFunction(http_request) {
        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
                var responceString = http_request.responseText;
                res = responceString.split("\r\n");
		document.forms['bu'].ort.value=res[0];
		strassen=res[1];
		document.forms['bu'].ares.value=strassen;

		createlist();

		document.getElementById('strcpl').style.visibility='visible';
            } else {
                alert('ERROR: AJAX request status = ' + http_request.status);
            }
        }
    }

function createlist() {
tag = document.forms['bu'].ares.value.split("#");
suchwort = document.forms['bu'].strasse.value;

if (tag.length > 0) {
document.getElementById('strcpl').style.visibility='visible';
}

if (suchwort.length > 0) {
var neu=new Array();
var pxa=0;

for(i=0;i<tag.length;i++) {
if (tag[i].substr(0,suchwort.length) == document.forms['bu'].strasse.value) {
neu[pxa]=tag[i];
pxa=pxa+1;
}
}



}else{
var neu = tag;
}

liste='';
for($i=0;$i<neu.length;$i++) {
liste=liste + '<li onClick="document.forms[\'bu\'].strasse.value=\''+neu[$i]+'\';">'+neu[$i]+'</li>';
}

document.getElementById('strcpl').innerHTML='<ul>'+liste+'</ul>';
}

function versteck() {
document.getElementById('strcpl').style.visibility='hidden';
}

function zeige() {
createlist();
document.getElementById('strcpl').style.visibility='visible';
}

document.documentElement.onclick=versteck;
//-->