function $(id)
{
   return document.getElementById(id);
}

//
function GetXmlHttpObj()
{ 
  var objXMLHttp = null;
  if (window.XMLHttpRequest)
  {
     objXMLHttp = new XMLHttpRequest()
  }
  else if (window.ActiveXObject)
  {
     objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP")
  }
  return objXMLHttp;
} 

//
function getContent(url,distobj)
{
    var xht; 
	if(!distobj) {
		return 0;
	} 
   
	distobj.innerHTML = "<div style='font-size:12px;'><img src='../images/progress.gif'>正在加载数据,请稍候..</div>"; 

    xht = GetXmlHttpObj();
    if (xht==null)
    {
       alert ("Browser does not support HTTP Request")
       return;
    } 

	xht.onreadystatechange = function statechange(){
    if(xht.readyState==4 || xht.readyState=="complete")
     { 
		if(xht.status==200)
		{
	       //alert(xht.responseText);
		   distobj.innerHTML = xht.responseText; 
		}else
		{
		   alert(xht.responseText);
		}
		xht = null;
     }   
    }; 
    xht.open("GET",url,true);
    xht.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");
    xht.send(null);
}

////
function getScript(url)
{
    var xht; 
	//distobj.innerHTML = "<img src='../images/progress.gif'>正在加载任务,请稍候.."; 

    xht = GetXmlHttpObj();
    if (xht==null)
    {
       alert ("Browser does not support HTTP Request")
       return;
    } 

	xht.onreadystatechange = function statechange(){
    if(xht.readyState==4 || xht.readyState=="complete")
     { 
		if(xht.status==200)
		{
	       //alert(xht.responseText);
		   eval(xht.responseText); 
		}else
		{
		   alert(xht.responseText);
		}
		xht = null;
     }   
    }; 
    xht.open("GET",url,true);
    xht.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");
    xht.send(null);
}

//
function getFinger(sid)
{
    var xht; 
	if(!distobj) {
		return 0;
	} 
   
    xht = GetXmlHttpObj();
    if (xht==null)
    {
       alert ("Browser does not support HTTP Request")
       return;
    } 
    var url = "getfinger.asp?id="+sid+"&nc="+new Date();
	xht.onreadystatechange = function statechange(){
    if(xht.readyState==4 || xht.readyState=="complete")
     { 
		if(xht.status==200)
		{
		   var biokey = xht.responseText; 
           PPTSHelp.SetFPString(biokey);
           PPTSHelp.StartCapture1();
		}else
		{
		   alert(xht.responseText);
		}
		xht = null;
     }   
    }; 
    xht.open("GET",url,true);
    xht.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");
    xht.send(null);
}

function show(obj)
{
   obj.style.display = '';
}

function hide(obj)
{
   obj.style.display = 'none';
}