function getxmlhttp() {

//创建一个布尔型变量，用来检查是否有效的IE实例。
var xmlhttp = false;

//检查是否使用的是IE。
try {
  //如果javascript的版本大于5
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
  //如果不是，则使用老版本的Active对象。
    try {
	  //如果使用的是IE浏览器。
	  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch(E) {
	  //否则使用非IE浏览器。
	  xmlhttp = false;
	}
}

//如果使用的是非IE浏览器，则创建该对象的Javascript实例
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  xmlhttp = new XMLHttpRequest();
}

return xmlhttp;

}


function proInfo(evt,wind,serverPage,objID) {
	
	//获得层位置
	var  winWidth  =   0 ;
             var  winHeight  =   0 ;
             // 获得窗口宽度 
               if (window.innerWidth)   {
                winWidth  =  window.innerWidth;
            }   else   if ((document.body)  &&  (document.body.clientWidth))   {
                winWidth  =  document.body.clientWidth;
            } 
 
             // 获得窗口高度 
               if (window.innerHeight)   {
                winHeight  =  window.innerHeight;
            }   else   if ((document.body)  &&  (document.body.clientHeight))   {
                winHeight  =  document.body.clientHeight;
            } 
 
              if (document.documnetElement  &&  document.documnetElement.clientHeight  &&  document.documnetElement.clientWidth)   {
                winWidth  =  document.documnetElement.clientWidth;
                winHeight  =  document.documnetElement.clientHeight;
            } 

	var x=evt.clientX+wind.scrollLeft-10;
	var y=evt.clientY+wind.scrollTop+15;
	if ((winWidth-x)<250){x=x-250;}
  

  //取得要POST传递的表单值。
  var xmlhttp = getxmlhttp();
  var obj = document.getElementById(objID);
  	xmlhttp.open("GET", serverPage);
    var x = x + "px"; 
    var y = y + "px"; 
    xmlhttp.onreadystatechange = function() {
	  if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
		obj.style.display = "block";
		obj.style.left = x;
		obj.style.top = y;
		obj.innerHTML = xmlhttp.responseText;
	  } else {
		obj.style.display = "block";
        obj.style.left = x;
		obj.style.top = y;
	  }
    }
    xmlhttp.send(null);
}

function nothing (objID) {
  var obj = document.getElementById(objID);
  obj.innerHTML = "<img src=\"/img/loading.gif\" alt=\"正在加载...\" />";
  obj.style.display = "none";
}

