function about() { document.getElementById('aboutdiv').style.visibility = "visible"; } function aboutClose() { document.getElementById('aboutdiv').style.visibility = "hidden"; } function ajax(url, callbackFunction){ /* thanks wikipedia */ var request = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"); if( !window.XMLHttpRequest ) XMLHttpRequest = function(){ try{ return new ActiveXObject("MSXML3.XMLHTTP") }catch(e){} try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){} try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){} throw new Error("Could not find an XMLHttpRequest alternative.") }; request.open("GET", url, true); request.onreadystatechange = function(){ if (request.readyState == 4 && request.status == 200) { if (request.responseText){ callbackFunction(request.responseText); } } }; request.send(null); } function whois_callback(response) { document.getElementById('whois').innerHTML=response; } function whois() { var url = "/whois"; ajax(url, whois_callback); } function pagerank_callback(response) { document.getElementById('pagerank').innerHTML=response; } function pagerank() { var url = "/pagerank"; ajax(url, pagerank_callback); } function screenshot_callback(response) { document.getElementById('webshot').innerHTML=response; } function screenshot() { var url = "/screenshot"; ajax(url, screenshot_callback); } function value_callback(response) { document.getElementById('value').innerHTML=response; } function value() { var url = "/value"; ajax(url, value_callback); } function rapportera(d) { if(confirm("Press OK to report a broken screenshot/webshot!")) { window.location = '/report/' + d; } } function showBud() { document.getElementById('bud').style.visibility = "visible"; } function closeBud() { document.getElementById('bud').style.visibility = "hidden"; } function skickabud_callback(response) { document.getElementById('laggbud').innerHTML=response; }