var obj;

function GetXMLHttpRequest(url) 
{
    var object = null;
    
    if (window.XMLHttpRequest) 
    {
       obj = new XMLHttpRequest();
       obj.onreadystatechange = processChange;
       obj.open("GET", url, true);
       obj.send(null);
    } 
    else if (window.ActiveXObject) 
    {
        try
        {
            obj = new ActiveXObject("Msxml2.XMLHTTP");
            obj.onreadystatechange = processChange;
           obj.open("GET", url, true);
           obj.send(null);
        }
        catch(e)
        {
        }
        
        if (object == null)
        {
            try
            {
                obj = new ActiveXObject("Microsoft.XMLHTTP");
                obj.onreadystatechange = processChange;
                obj.open("GET", url, true);
                obj.send(null);

}
            catch(e)
            {
            }
        }
    }
    /*
    if (object == null)
    {
        alert("Your browser does not support AJAX");
    }*/
    
    return object;
}




function processChange() {
    // 4 means the response has been returned and ready to be processed
    if (obj.readyState == 4) {
        // 200 means "OK"
		  document.getElementById("bd").display="none";

        if (obj.status == 200) 
		       {
  document.getElementById("bd").innerHTML=obj.responseText;
             }
		  else {

	document.getElementById("bd").innerHTML="<div class='full-box' style='margin-top: 15px;'><div class='full-box-inner' style='position: relative;'><div class='waiting'>非常抱歉！系统加载数据时出现未知错误：请您联系13603057565……</div></div></div>";
             }
    }
	else
	{
	document.getElementById("bd").innerHTML="<div class='full-box' style='margin-top: 15px;'><div class='full-box-inner' style='position: relative;'><div class='waiting'><img src='img/jzsj.gif' alt='正在加载数据，请您稍候……'/></div></div></div>";

	
	
	   document.getElementById("bd").display="none";
	}
}
	
	
	
	
function AjaxGoAllweb()
{
var keyword=document.getElementById('keyword').value;
	 url  =  'AjaxShowAllweb.asp?Type=Allweb&keyword=' + escape(keyword);
	 //alert(url);
//false;

      GetXMLHttpRequest(url);
	}
	
function AjaxGoOrder()
{
var OrderNo=document.getElementById('OrderNo').value;
	 url  =  'AjaxShowOrder.asp?Type=Order&OrderNo=' + escape(OrderNo);
	 //alert(url);
//false;

      GetXMLHttpRequest(url);
	}


function   isArray   (object)   {   
  if(   object.constructor   ==   window.Array)   
  return true;
  else   
  return false;  
  } 
