// Search for epgevents and check for future programming
function checkrecord (name) {
    var fnWhenDone = function (oXML, sData) {
        if(oXML.responseText != 'ok') {
            var text = oXML.responseText.split(':');
            document.getElementById(sData).className = 'problem';
            document.getElementById(sData).title = '<?% gettext('When you want this timer save then has him a conflict with timer: ') %?>' + text[0];
        } else {
            document.getElementById(sData).className = 'noproblem';
            document.getElementById(sData).title = '';
        }
     };

    var fnWorking = function (oXML, sData) {  };

    var tags = document.getElementsByName('recordlink');
    for (var i = 0; i < tags.length; i++) {
        var epgid = tags[i].id;
        var url = "cmd=conflict&data=" + epgid + "&ajax=text";
        var aconn = new XHConn();
        var hosturl = 'http://' + window.location.host;
        aconn.connect(hosturl, 'GET', url, fnWhenDone, fnWorking, epgid);
    }
}

window.onLoad = window.setTimeout("checkrecord('recordlink')", 1000);
