var webUrl2 = "http://dzh.mop.com"; 
  //获取cookie
 function getXiaoneiCookie(name)//取cookies函数
	{ 
			  var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); 
		     
			 if(arr != null){
				 
				 return unescape(arr[2]); 
			 }else{
				return null;
			 } 
	 
	}
 //顶踩操作
  function doTop(day,offset,begin,id,flag,doId,event,topFlag,time){    
	
	 jQuery.get("addDaily.jsp?number="+Math.random(),{ sid:id,flag:flag,day:day,offset:offset,begin:begin},function(data){   	
		 		 
				if( data == 1){ 
					if( topFlag == 0 ){//头条操作
						if(  flag == 0 ){//顶成功 
							 jQuery("#top"+doId).attr("src","http://txt.mop.com/images/playread/image/up1.gif"); 
							 //document.getElementById("top"+doId).style.cursor="default";
							 jQuery("#top"+doId).attr("cursor","default");
							 jQuery("#support0").text(parseInt(jQuery("#support0").text()) + 1);
							 jQuery("#support1").text(parseInt(jQuery("#support1").text()) + 1); //累积 
							

						}else if( flag == 1 ){//踩成功  
							 jQuery("#cai"+doId).attr("src","http://txt.mop.com/images/playread/image/down1.gif"); 
							//document.getElementById("cai"+doId).style.cursor="default";
							jQuery("#cai"+doId).attr("cursor","default"); 
							jQuery("#support2").text(parseInt(jQuery("#support2").text()) +1);
							jQuery("#support3").text( parseInt(jQuery("#support3").text()) +1);//累积  
							
						} 
					sendFeedXiaonei(id,flag);
						
					} 
			 //打开关注页
			//	window.location.href="http://xzh.mop.com/zFocus.jsp";	
						 
				}else{
					 if( flag == 0 ){
			 			  alert("您今天已经顶过这个帖子");
					 }else if( flag == 1 ){
						alert("您今天已经踩过这个帖子");
					 } 
				}
				
		 	})  ;

	
 }
 function sendFeedXiaonei(sid,type){
		// xiaonei判断
		 
		if( getXiaoneiCookie("629695a417eb49ada2a6bc2f67b3f7ef_user") != null ){
//发送feed
			jQuery.get("http://dzh.mop.com/common/sendXiaoneidoFeed.jsp?number="+Math.random(),{ sid:sid,type:type},function(data){
				 
			});
			
		}
	}
	 
 
	

 