$(function(){
	obj = 'div.doctor_online';
	$(obj).find('ul').css({'overflow':'hidden','height':'100%'});
	li_len = $('#scrollDoctors ul li').length;//一侧LI数目
	num = Math.round(li_len/2);//获取总行数
	li_height = $('#scrollDoctors ul li:first').height()+6;//获取一个LI的高度，并修正6px
	total_height =  li_height * num;//计算LI的总高度
	ooff = $(obj).offset();//获取对象的坐标数组，需要JQUERY.DIMENSION.JS
	ele_top = ooff.top;//元素顶部相对浏览器坐标
	box_height = $('#scrollDoctors').height();//外框容器的总高度
	$(window || document).scroll(function(){//相应滚动事件
		scroll_height = $(this).scrollTop();
		dis = scroll_height - ele_top
		max = box_height - total_height;
		if(dis > 0 && max > dis){
			$(obj).find('ul').css({'margin-top':dis});
		}else if(dis < 0){
			$(obj).find('ul').css({'margin-top':0})
		}else if(max < dis){
			$(obj).find('ul').css({'margin-top':max})
		}
	})
	//alert($(obj).html());
})