var xmlHttp = false;
        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            xmlHttp = new XMLHttpRequest();
            if (xmlHttp.overrideMimeType) {
                xmlHttp.overrideMimeType('text/xml');
            }
        } else if (window.ActiveXObject) { // IE
            try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e1)
{
try{
xmlHttp=new ActiveXObject("MSXML2.XMLHTTP");
}
catch(e2){
try{
xmlHttp=new ActiveXObject("MSXML3.XMLHTTP");
}
catch(e3){
alert("创建Ajax失败："+e3)
}
}
}
}
else
{
alert("未能识别的浏览器");
}

//最新图集
function callServer(url) {
  var url = url;
  xmlHttp.open("GET", url, true);
  xmlHttp.onreadystatechange = updatePageTop;
  xmlHttp.send(null);  
}

function updatePageTop() {
if (xmlHttp.readyState == 1)
{
	document.getElementById ('img1').innerHTML ="<div style=color:red;>正在连接服务器... 请稍等</div>";
}
else if (xmlHttp.readyState == 2 || xmlHttp.readyState == 3)
{
	document.getElementById ('img1').innerHTML = "<font color=red>正在读取数据...</font>";
}	
else  if (xmlHttp.readyState == 4) {
	if (xmlHttp.status==200) {
    var response5 = xmlHttp.responseText;	
	document.getElementById ('img1').innerHTML = response5;
  }
  else{}
  
 }
else{
	document.getElementById ('img1').innerHTML = "<font color=red>加载中...</font>";
}
}

//最新推荐

function callServerCommend(url) {
  var url = url;
  xmlHttp.open("GET", url, true);
  xmlHttp.onreadystatechange = updatePageTop2;
  xmlHttp.send(null);  
}

function updatePageTop2() {
if (xmlHttp.readyState == 1)
{
	document.getElementById ('commend').innerHTML ="<div style=color:red;>正在连接服务器... 请稍等</div>";
}
else if (xmlHttp.readyState == 2 || xmlHttp.readyState == 3)
{
	document.getElementById ('commend').innerHTML = "<font color=red>正在读取数据...</font>";
}	
else  if (xmlHttp.readyState == 4) {
	if (xmlHttp.status==200) {
    var response = xmlHttp.responseText;	
	document.getElementById ('commend').innerHTML = response;
  }
  else{}
  
 }
else{
	document.getElementById ('commend').innerHTML = "<font color=red>加载中...</font>";
}
}