function $(id) {
    return document.getElementById(id);
}
   function getHttpRequest() {
    var xmlhttp = null;
    // Mozilla
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
   
    xmlhttp.open("GET", 'tag_cloud.php', true);
    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState != 4) {
            $('ergebnis').innerHTML = 'Cloud wird geladen ...';
        }
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            $('ergebnis').innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.send(null);
} 
function get_content(c, id) {
   
    var xmlhttp = null;
    // Mozilla
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
   if(id) {
   time = new Date().getTime();
    xmlhttp.open("GET", 'get_content.php?c='+c+'&id='+id, true);
   } else {
    xmlhttp.open("GET", 'get_content.php?c='+c, true);
	}
    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState != 4) {
            $('ergebnis').innerHTML = '<div style="text-align: center;"><img src="images/load.gif" style="margin-top: 150px;"></div>';
        }
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            $('content').innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.send(null);
} 
