/* javascript:if%20(document.createElement){void(pstTagName='%s');void(head=document.getElementsByTagName('head').item(0)); void(script=document.createElement('script'));void(script.src='http://javascript.gibney.org/collector.js');void(script.type='text/javascript');void(head.appendChild(script));} */ /* create a DIV-overlay */ var IEgewurschtel=(navigator.appName=="Microsoft Internet Explorer"); //the usual suspects function createDiv(id,posX,posY,content) { var menuDiv=document.createElement("div"); menuDiv.id=id; menuDiv.innerHTML=content; //setAttribute("style"... is MOZ only with collated string menuDiv.style.textAlign="left"; menuDiv.style.position="fixed"; menuDiv.style.backgroundColor="white"; menuDiv.style.border="1px solid black"; menuDiv.style.padding="0px"; if (IEgewurschtel){ menuDiv.style.position="absolute"; //IE has no "fixed" } menuDiv.style.top =posY+'px'; menuDiv.style.left=posX+'px'; document.getElementsByTagName('body').item(0).appendChild(menuDiv); return menuDiv; } function createForm() { var form='
'; createDiv("Sales", 10,10,form); } function getUrl(Url) { var req = new XMLHttpRequest(); req.open('GET', Url, false); req.send(null); return req.responseText; } function getResults(parameter, regExp) { var url=document.getElementById("CollectorUrl").value; url=url.replace(/\{PARAMETER\}/g,parameter); u=getUrl(url); u=u.replace(/\r\n/mg,' '); // regExp=/EK<\/td>.*?(?:.*?<\/td>){4}.*?>(.*?); regExp=document.getElementById("CollectorRegExp").value; matches = u.match(regExp); if (matches) r=parameter+"\t"+matches[1]+"\n"; else r=parameter+"\tnull\n"; document.getElementById("CollectorOutput").value+=r; } function compute() { values=document.getElementById("CollectorValues").value; values=values.split('\n'); for (var i=0; i