
 function GetXmlHttpObject()
{ 
  var objXMLHttp = null;
  if (window.XMLHttpRequest)
  {
      objXMLHttp=new XMLHttpRequest()
  }
  else if (window.ActiveXObject)
  {
     objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
  return objXMLHttp;
} 
 function LoadingFAQ(page,id)
 {
	 if (id)
	 {
		 location.href='Online-FAQ.asp'
	 }
	
	 dosearch(page,id)
 }
function dosearch(page,id)
{	
	var url = "FAQResult.asp?action=loading"
	 url +="&page="+page;
	if(id)
	 {
	    url +="&qid="+id;
	 }
  var xmlHttp; 
  var distobj = document.getElementById("FAQ-Content");
  if(!distobj) return 0;
  
  distobj.innerHTML  = "<div style='border: 1px solid #8CCFEF;line-height:20px;'>正在加载<img src='../img/dotload.gif' width='16' height='16' absalign='middle'></img></div>"

  xmlHttp = GetXmlHttpObject();
  if (xmlHttp==null)
  {
      alert ("Browser does not support HTTP Request")
      return 0;
  } 

  xmlHttp.onreadystatechange = function showmsg(){
    if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
		//alert(url);
		//alert(xmlHttp.responseText);
	    distobj.innerHTML = xmlHttp.responseText; 
		xmlHttp = null;
   }   
  }; 

  xmlHttp.open("GET",url,true);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");
  xmlHttp.send(null);
}
function loaddata(url,loadimg)
{
  var xmlHttp; 
  var distobj = document.getElementById("adddiv");
  if(!distobj) return 0;
  
  distobj.innerHTML  = "<span style='background-image:url("+loadimg+");width:16px;height:16px;'>&nbsp;</span> 加载中,请稍后..."

  xmlHttp = GetXmlHttpObject();
  if (xmlHttp==null)
  {
      alert ("Browser does not support HTTP Request")
      return 0;
  } 

  xmlHttp.onreadystatechange = function showmsg(){
    if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
		//alert(url);
		//alert( xmlHttp.responseText);
	    distobj.innerHTML = xmlHttp.responseText; 
		xmlHttp = null;
   }   
  }; 

  xmlHttp.open("GET",url,true);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");
  xmlHttp.send(null);
}

function refreshwin()
{
	dosearch(1);
	closewin();
}
function viewurl(url,title,width,height,loadimg)
{
   var obj = document.getElementById("movediv");
   var newx = (document.body.clientWidth-width)/2;
   var newy = (document.body.clientHeight-height)/2;
   obj.style.width = width;
   obj.style.height = height;
   obj.style.left = newx;
   obj.style.top = newy;
   showmask();
   obj.style.display = '';
   document.all.theaddiv.innerHTML=title;
   loaddata(url,loadimg);
}