
// Pop Up
function oeffnefenster (url) {
 fenster = window.open(url, "webradiohoeren", "width=550,height=220,status=yes,scrollbars=yes,resizable=no");
 fenster.focus();
}

/* START AJAX LOADING */
var divid = "";
function loadContent(reqUrl, _divid) {
	divid = _divid;
    xmlHttpObject.open('get',reqUrl);
    xmlHttpObject.onreadystatechange = handleContent;
    xmlHttpObject.send(null);
    return false;
}

function handleContent() {
    if (xmlHttpObject.readyState == 4) {
        document.getElementById(divid).innerHTML = xmlHttpObject.responseText;
    } // if end
    else {
        
    } // else end
}


var xmlHttpObject = false;

if (typeof XMLHttpRequest != 'undefined') {
    xmlHttpObject = new XMLHttpRequest();
}
if (!xmlHttpObject) {
    try {
        xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e) {
        try {
            xmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(e) {
            xmlHttpObject = null;
            alert(e);
        }
    }
}

/* END AJAX LOADING */

/* Loads actual song dynamically */
function setScTitle() {
	loadContent('gettitle.php', 'aktueller_titel');
	window.setTimeout("setScTitle()", 1000*60);
}


function loadPlaylist(){
    /* Loads playlist dynamically */
    loadContent("getPlaylist.php", "playlist");    
}
