//Ajax get new messsage
var xmlHttp;
var xmlHttp = CreateXmlHttp();
function CreateXmlHttp()
{
   var xmlHttp;
   if(window.XMLHttpRequest)
   {
     xmlHttp = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
       xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
  return xmlHttp;
}

function ProjectNewMes(sub)
 {
   var MesUrl = "/msadmin/ProjectNewMes/ProjectNewMes.php?subtitle="+sub;
  	 xmlHttp.open("GET",MesUrl,true);
  	 xmlHttp.onreadystatechange = ProjecXmlResponse;
  	 xmlHttp.setRequestHeader("If-Modified-Since","0");
  	 xmlHttp.send(null);
 }
 
 function ProjecXmlResponse()
  {
  	 var div_mes  = document.getElementById('proiect_new_mes');
	 if(xmlHttp.readyState == 4)
	  {
	    if(xmlHttp.status == 200)
	    {
	     var mes = xmlHttp.responseText;
	     div_mes.innerHTML = mes;
	    }
	    else
	    {
	    div_mes.innerHTML = "<span style=\"color: black \">服务器请求失败！"+xmlHttp.statusText+"</span>";
	  }
   }
 }
 
 
 
 
 
 