<!--


// here we define global variable
var ajaxdestination="";
var running=false;
var i=0;

function getdata(what,where) { 
 try {
    xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
	new ActiveXObject("Msxml2.XMLHTTP.4.0");
    //new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) { /* do nothing */ }
 ajaxdestination=where;
 xmlhttp.onreadystatechange = triggered; 
 xmlhttp.open("GET", what);
 xmlhttp.send(null);
  return false;
}

function triggered() { 
  if (xmlhttp.readyState == 4)  {
    if (xmlhttp.status == 200)    {
		try {
			document.getElementById(ajaxdestination).innerHTML = xmlhttp.responseText;
		}
		catch (e) {
			var smscommunitytable = document.getElementById("smscommunitytable");
			smscommunitytable.style.display = "none";
		}
        running=false;
        setTimeout ( "getLastActivities()", 5000 );
    }
  }
}


getLastActivities();

function getLastActivities ( )
{
    if(running==false) {
        running=true;
        i++;
        if(i<50)
            getdata('http://www.talksms.com/SMSCommunity/SMSCommunity.aspx?ms='+new Date().getTime(),'smscommunity');
    }
}

//-->