	    var xmlHttp;
     var xmlHttpac;
	   var xmlHttpds;
	      var xmlHttp2;

	function createXMLHttpRequest() {
	     if (window.ActiveXObject) {
		    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		    xmlHttp2 = new ActiveXObject("Microsoft.XMLHTTP");
				    xmlHttpac = new ActiveXObject("Microsoft.XMLHTTP");
									    xmlHttpds = new ActiveXObject("Microsoft.XMLHTTP");

		 } 
			else if (window.XMLHttpRequest) {
			 xmlHttp = new XMLHttpRequest();
			 xmlHttp2 = new XMLHttpRequest();
			 			 xmlHttpac = new XMLHttpRequest();			
  		 xmlHttpds = new XMLHttpRequest();			
			 }
		}
		
		

		


		function startRequest() {
		    createXMLHttpRequest();
            xmlHttp.open("post", "news.php", true);
            xmlHttp.onreadystatechange = function () {
                if (xmlHttp.readyState == 4) {
                    if (xmlHttp.status == 200) {
                        displayInfo(xmlHttp.responseText);
						   displayInfostop(); 
				                    } else {
                        displayInfostart(); 
                    }
                }            
            };
            xmlHttp.send(null);
        }

			function startRequest2() {
			
	            xmlHttp2.open("post", "news_recommend.php", true);
            xmlHttp2.onreadystatechange = function () {
                if (xmlHttp2.readyState == 4) {
                    if (xmlHttp2.status == 200) {
                        displayInfo2(xmlHttp2.responseText);
						   displayInfostop2(); 
				                    } else {
                        displayInfostart2(); 
                    }
                }            
            };
            xmlHttp2.send(null);
        }
		
		function startRequestac() {
					
            xmlHttpac.open("post", "news_activity.php", true);
            xmlHttpac.onreadystatechange = function () {
                if (xmlHttpac.readyState == 4) {
                    if (xmlHttpac.status == 200) {
                        displayInfoac(xmlHttpac.responseText);
						   displayInfoacstop(); 
				                    } else {
                        displayInfoacstart(); 
                    }
                }            
            };
            xmlHttpac.send(null);
        }
        

	function startRequestds() {
           xmlHttpds.open("post", "slide.php", true);
            xmlHttpds.onreadystatechange = function () {
                if (xmlHttpds.readyState == 4) {
                    if (xmlHttpds.status == 200) {
                        displayInfods(xmlHttpds.responseText);
						  displayInfodsstop(); 
					setTimeout("startRequestds()", 5000);
				                    } else {
                        displayInfodsstart(); 
                    }
                }            
            };
            xmlHttpds.send(null);
        }
        

        function displayInfo() {
            document.getElementById("divInfo").innerHTML = xmlHttp.responseText;
            document.getElementById("divInfostart").innerHTML = xmlHttp.responseTextstart;
        }
		        function displayInfo2() {
            document.getElementById("divInfo2").innerHTML = xmlHttp2.responseText;
            document.getElementById("divInfostart2").innerHTML = xmlHttp2.responseTextstart;
        }
		      function displayInfoac() {
            document.getElementById("divInfoac").innerHTML = xmlHttpac.responseText;
            document.getElementById("divInfoacstart").innerHTML = xmlHttpac.responseTextstart;
        }

		      function displayInfods() {
            document.getElementById("divInfods").innerHTML = xmlHttpds.responseText;
            document.getElementById("divInfodsstart").innerHTML = xmlHttpds.responseTextstart;
        }

		  function displayInfostart() {
           document.getElementById("divInfostart").innerHTML = "<br><br><br><img src=picture/webmaster/loading.gif  align=absmiddle><br><font size=2 color=blue><b>กรุณารอสักครู่..</b></font><br><br><br><br>";
        }
				  function displayInfostart2() {
           document.getElementById("divInfostart2").innerHTML = "<br><br><br><img src=picture/webmaster/loading.gif  align=absmiddle><br><font size=2 color=blue><b>กรุณารอสักครู่..</b></font><br><br><br><br>";
        }
		  function displayInfoacstart() {
           document.getElementById("divInfoacstart").innerHTML = "<br><br><br><img src=picture/webmaster/loading.gif  align=absmiddle><br><font size=2 color=blue><b>กรุณารอสักครู่..</b></font><br><br><br><br>";
        }
		  function displayInfodsstart() {
           document.getElementById("divInfodsstart").innerHTML = "..";
        }

		 function displayInfostop() {
           document.getElementById("divInfostart").innerHTML = "";
        }
				 function displayInfostop2() {
           document.getElementById("divInfostart2").innerHTML = "";
        }
			 function displayInfoacstop() {
           document.getElementById("divInfoacstart").innerHTML = "";
        }
				 function displayInfodsstop() {
           document.getElementById("divInfodsstart").innerHTML = "";
        }


