document.write(""); var xmlhttpstatus2; function loadXMLDoc(url) { xmlhttpstatus2=null; if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc. xmlhttpstatus2=new XMLHttpRequest(); } else if (window.ActiveXObject) {// code for IE6, IE5 xmlhttpstatus2=new ActiveXObject("Microsoft.XMLHTTP"); } if (xmlhttpstatus2!=null) { xmlhttpstatus2.onreadystatechange=state_Change; xmlhttpstatus2.open("GET",url,true); xmlhttpstatus2.send(null); } else { //alert("Your browser does not support XMLHTTP."); } } function state_Change() { if (xmlhttpstatus2.readyState==4) {// 4 = "loaded" if (xmlhttpstatus2.status==200) {// 200 = "OK" var answer = xmlhttpstatus2.responseText; //alert(answer); var answers=Array(); answers = answer.split(":",2); var boxid = answers[0]; var status = answers[1]; //alert(boxid); //alert("Boxid: " + boxid + " is " + status); numResults++; if(status=="up") { document.getElementById(boxid).innerHTML=""; anyup=1; }else if(status=="down") { document.getElementById(boxid).innerHTML=""; }else if(status=="?") { document.getElementById(boxid).innerHTML=""; } if(numResults==totalSites && anyup==0) { alert("Uh-oh! It appears that all of these links are dead.\n\nIf other users encounter the same thing, this boo will be removed."); loadXMLDoc('deadlinks.php?bh='); } } else { document.getElementById("status2").innerHTML=""; } } } loadXMLDoc('status/Megaupload.php?b=status2&u=http%3A%2F%2Fwww.megaupload.com%2F%3Fd%3D3RO0TMB2');