function chatSend(aTo,aMessage,aCbFn){
	var xmlHttp = new o_xmlHttp;
	var boundary = generateBoundary();
	if(aMessage && aTo)var data = parseArrayToMultipartFormData({To:aTo,Message:aMessage},boundary);
	xmlHttp.open("POST","/chat/send.php?"+Math.random(),true);//Math Random for no caching..
	xmlHttp.setRequestHeader('Content-Type', 'multipart/form-data; boundary='+boundary);
	xmlHttp.onreadystatechange = function(){
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
			if (xmlHttp.responseText && aCbFn){
				aCbFn(xmlHttp.responseText);
			}
		}
	} 
	xmlHttp.send(data);
}
function chatReceive(aFrom,aCbFn)
{
	var xmlHttp = new o_xmlHttp;

	xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      aCbFn(xmlHttp.responseText);
      }
    }
  xmlHttp.open("GET","/chat/receive.php?From="+aFrom+"&"+Math.random(),true);
  xmlHttp.send(null);
}

/*function DJOajaxChat(UserName ,aCallbackF )
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      aCallbackF(xmlHttp.responseText);
      }
    }
  xmlHttp.open("GET","chat.php?to="+UserName+"&"+Math.round((Math.random()*600)),true);
  xmlHttp.send(null);
  }
*/
