﻿// JScript 文件


var divContent  
//   var xmlhttp;
                             
function getDetails(id,content)//获取细节
{  
    divContent=content;
//    $(id).style.backgroundColor="#FFFFFF";
    $(id).style.textDecoration="underline";
    $(content).innerHTML="<img  src=\"../image/loading.gif\"/><br><br><br><br><br>";
      
    Request.sendGET("Handler.ashx?type=2&Id="+id, returnDetails, null,null,null); 
    
//     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
//        //加载服务器-注意URL参数的使用
//          xmlhttp.Open("GET","Handler.ashx?type=2&Id="+id,true)
//        //异步对象事件挂钩
//          xmlhttp.onreadystatechange=stateChange;
//       //发送请求-无参数
//          xmlhttp.Send(null);

}

// function stateChange()
//    {
//       if(xmlhttp.readystate==4 && xmlhttp.status==200)
//       {
//          //获取所有返回的数据
//          var data=bytes2BSTR(xmlhttp.ResponseBody);
//          //过滤自己需要的数据
// 
// 
//          //填充天气内容
//          document.getElementById(divContent).innerHTML=data;
//          //显示结果
// 
//       }
//    }

function returnDetails(req,data)
{
    if(req)
    {     
     
       $(divContent).innerHTML=req.responseText;  
     }
     else
     $(divContent).innerHTML="系统错误！";
}

function recover(id)//恢复样式
{
//  $(id).style.backgroundColor="#e8eff9";
  $(id).style.textDecoration="none";
}


function getDetails2(id,content)//获取细节
{  
    divContent=content;
//    $(id).style.backgroundColor="#FFFFFF";
    $(id).style.textDecoration="underline";
    $(content).innerHTML="<img  src=\"../image/loading.gif\"/><br><br><br><br><br>";
      
    Request.sendGET("Handler.ashx?type=3&Id="+id, returnDetails, null,null,null); 
   
    
//     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
//        //加载服务器-注意URL参数的使用
//          xmlhttp.Open("GET","Handler.ashx?type=2&Id="+id,true)
//        //异步对象事件挂钩
//          xmlhttp.onreadystatechange=stateChange;
//       //发送请求-无参数
//          xmlhttp.Send(null);

}