function sendRequest() {
        try {
                req = new XMLHttpRequest();
                //alert("AJAX Support Mozilla");
        } catch (e) {
        	try {
        		req = new ActiveXObject("Microsoft.XMLHTTP");
        		//alert("AJAX Support IE");
        	} catch (f) {
                //alert("Kein AJAX Support");
            }
        }
 
        req.onreadystatechange = handleResponse;
        req.open('GET', 'streckeanzeige.php');
        req.send(null);
}

function handleResponse() {
		
		if (req.readyState == 1 || req.readyState == 2 ||req.readyState == 3) {
				showProgress();
                
        }
        if ((req.readyState == 4) && (req.status == 200)) {
        	
                document.getElementById('streckenauswahl').innerHTML = req.responseText;
        }
}

function showProgress() {
	
		if (req.readyState == 1 || req.readyState == 2 || req.readyState == 3) {
			document.getElementById('streckenauswahl').innerHTML = "<center>lade KBS-Liste<br><img src='" + loading.src + "'><br>" + Math.round((req.responseText.length*100/44779)) + "% / " + Math.round(req.responseText.length/1024) + " kB</center>";
	
		}
}


loading = new Image();
loading.src = "http://www.fototipp.de/grafiken/loading.gif";