DELETE_STRING="delete"; BAR_IMG1="/env/grafics/green-block.png"; BAR_IMG2="/env/grafics/red-block.png"; WORDCACHEBAR_LENGTH=1/4; var statusRPC; var queuesRPC; var refreshInterval=5; var wait=0; var changing=false; //change the interval refresh(); //loadInterval=window.setInterval("refresh()", refreshInterval*1000); countInterval=window.setInterval("countdown()", 1000); function changeInterval(){ if(!changing){ window.clearInterval(countInterval); counter=document.getElementById("nextUpdate"); //counter.innerHTML=''; //document.getElementById("newInterval").focus(); counter.value=refreshInterval; changing=true; } } function newInterval(){ refreshInterval=document.getElementById("nextUpdate").value; refresh(); countInterval=window.setInterval("countdown()", 1000); changing=false; } function countdown(){ document.getElementById("nextUpdate").value=wait; wait--; if(wait==0){ refresh(); } } function refresh(){ wait=refreshInterval; requestStatus(); requestQueues(); } function requestStatus(){ statusRPC=createRequestObject(); statusRPC.open('get', '/xml/status_p.xml'); statusRPC.onreadystatechange = handleStatus; statusRPC.send(null); } function requestQueues(){ queuesRPC=createRequestObject(); queuesRPC.open('get', '/xml/queues_p.xml'); queuesRPC.onreadystatechange = handleQueues; queuesRPC.send(null); } function handleStatus(){ if(statusRPC.readyState != 4){ return; } var statusResponse = statusRPC.responseXML; statusTag=getFirstChild(statusResponse, "status"); ppm=getValue(getFirstChild(statusTag, "ppm")); var ppmNum = document.getElementById("ppmNum"); removeAllChildren(ppmNum); ppmNum.appendChild(document.createTextNode(ppm)); var ppmSpan = document.getElementById("ppmSpan"); removeAllChildren(ppmSpan); for(i=0;i 80) { return url.substr(0, 80) + "..."; } else { return url; } } function createIndexingRow(queue, profile, initiator, depth, modified, anchor, url, size, deletebutton){ row=document.createElement("tr"); row.setAttribute("height", 10); row.appendChild(createCol(queue)); row.appendChild(createCol(profile)); row.appendChild(createCol(initiator)); row.appendChild(createCol(depth)); row.appendChild(createCol(modified)); row.appendChild(createCol(anchor)); row.appendChild(createLinkCol(url, shortenURL(url))); row.appendChild(createCol(size)); row.appendChild(deletebutton); return row; }