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(); changing=true; } } function newInterval(){ refreshInterval=document.getElementById("newInterval").value; refresh(); countInterval=window.setInterval("countdown()", 1000); changing=false; } function countdown(){ document.getElementById("nextUpdate").innerHTML=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