// JScript 文件


//创建XmlHttp对象
var xmlHttp;
var strall="";
function createXMLHttpRequest()
{
 if(window.ActiveXObject)
 {
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 }
 else if(window.XMLHTTPRequest)
 {
  xmlHttp = new XMLHTTPRequest();
 }
}
createXMLHttpRequest();
 var url   = "../Ajax/TOPAjax2.aspx?fd="+Math.random();
 xmlHttp.onreadystatechange = handleStateChange;
 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);

function  handleStateChange()
{
  var Results="";
  if(xmlHttp.readyState == 4)
  {
      if(xmlHttp.status == 200)
       {
         Results = xmlHttp.responseText;
         var stallay=new Array();
         var stallayS=new Array();
         stallay=Results.split("$");
         for(i=0;i<stallay.length-1;i++)
         {
         stallayS=stallay[i].split("|");
         var titel=stallayS[0];
         var cont=stallayS[1];
         var width=stallayS[2];
         var height=stallayS[3];
         openwin(i,titel,cont,width,height);
         }
       }
  }

}
function openwin(i,titel,cont,width,height) 
{openwindow=window.open("",i, "height="+height+", width="+width+",toolbar=no,scrollbars="+scroll+",menubar=no"); 
//写成一行 
openwindow.document.write("<title>"+titel+"</title>") 
openwindow.document.write("<body style=\"margin-top:0px;margin-left: 0px;margin-right: 0px;margin-bottom: 0px;\">") 
openwindow.document.write(cont) 
openwindow.document.write("</body>") 
openwindow.document.write("</html>") 
openwindow.document.close()
} 

