

var http_request = false
 function send_request(url,type) {//初始化、指定处理函数、发送请求的函数
  http_request = false;
  //开始初始化XMLHttpRequest对象
  if(window.XMLHttpRequest) { //Mozilla 浏览器
   http_request = new XMLHttpRequest();
   if (http_request.overrideMimeType) {//设置MiME类别
    http_request.overrideMimeType('text/xml');
   }
  }
  else if (window.ActiveXObject) { // IE浏览器
   try {
    http_request = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
    try {
     http_request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {}
   }
  }
  if (!http_request) { // 异常，创建对象实例失败
   window.alert("不能创建XMLHttpRequest对象实例.请您使用其他浏览器!");
   return false;
  }
  if(type==1){
  http_request.onreadystatechange = processRequest2;
  }

  http_request.open("GET",url, true);
  http_request.send(null);
 }
  function processRequest2() {
   if (http_request.readyState != 4) { // 判断对象状态
    //  document.getElementById('MerchName').innerHTML="正在加载数据……"; 
   }
   else {
            if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
                var strHTML = http_request.responseText;
               
                if(strHTML!="null"){
					
					$("div:[name=num]").html(strHTML);				
                }else{
                
                   $("div:[name=num]").html("0");
                     
                    
                }
                    
    
            }
         }
    }


// JavaScript Document
document.write("<style type='text/css'>");
document.write("html,body{height:3000px;}#zzjs_net_1,#zzjs_net_2{  width:127px; height:410px; background-color:#eee; border:1px solid #ddd;}");
document.write("</style>");//background:url(http://minyaogroup.com/yinengjing/ynj_img/huodong.jpg);

lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
 diffY = document.documentElement.scrollTop;
else if (document.body)
 diffY = document.body.scrollTop
else
    {/*Netscape stuff*/}
//alert(diffY);
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("zzjs_net_1").style.top=parseInt(document.getElementById("zzjs_net_1").style.top)+percent+"px";
document.getElementById("zzjs_net_2").style.top=parseInt(document.getElementById("zzjs_net_1").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}

j1="<div id=\"zzjs_net_1\" style='left:2px;position:absolute;top:160px;'><span style='display:inline-block;float:right;cursor:pointer' onclick='this.parentNode.style.display=\"none\"'><img src='/yinengjing/ynj_img/guanbibutton.gif'/></a></span><a href='#dinggou'><img src='http://minyaogroup.com/yinengjing/ynj_img/huodong.jpg'/></a></div>"
j2="<div id=\"zzjs_net_2\" style='right:2px;position:absolute;top:160px;'><span style='display:inline-block;float:right;cursor:pointer' onclick='this.parentNode.style.display=\"none\"'><img src='/yinengjing/ynj_img/guanbibutton.gif'/></a></span><a href='#dinggou'><img src='http://minyaogroup.com/yinengjing/ynj_img/huodong.jpg'/></a></div>"
//document.write(j1);
//document.write(j2);
//window.setInterval("heartBeat()",1);
//send_request("/js/ajax.aspx?types=num&id=0&nums=0",1);
//图片格式调用方法
//<a href=http://www.makewing.com/lanren/ target=_blank><img src=images/ad_100x300.jpg border=0></a>
	
