var xmlhttp;
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}
function xmlhttpLoad(fragment_url, element_id) {
    
    var element = document.getElementById(element_id);
    var elementtyp = element.nodeName;

//     if (elementtyp != "IMG" && elementtyp != "SELECT") element.innerHTML = '<p><em>Loading contents ...</em></p>';
    
    xmlhttp.open("GET", fragment_url);
    xmlhttp.onreadystatechange = function() {
	if (xmlhttp.readyState == 4){
        if (xmlhttp.status == 200) {
            if (elementtyp == "IMG"){
               element.src = fragment_url;
            }
            if (elementtyp == "SELECT"){
            eval(xmlhttp.responseText);
             element.options.length = 0;
                for (var i in optionen){
                     var pOption = new Option(optionen[i][0][1],optionen[i][0][0]);
                     //alert(element.options.length);
                     element.options[element.options.length] = pOption;
                }
            }
            else element.innerHTML = xmlhttp.responseText ;
        }
		else if (xmlhttp.status == 404) {
			alert ('URL wurde nicht gefunden:'+fragment_url);
		}
			else alert('Statusmeldung Error'+xmlhttp.status);
   		}
	}
    xmlhttp.send(null);
}