// JavaScript Document
/* start ----- play img*/
		var curr = 0, next = 0, count = 0;
		$(document).ready(function() {	
			count = $('#img_list a').size();	
			
			t = setInterval('imgPlay()', 3000);
			
			$('#imgs li, #img_list a').hover(function() {
				clearInterval(t);
			}, function() {
				t = setInterval('imgPlay()', 3000);
			});
			
			
			$('#img_list a').click(function() {
				var index = $('#img_list a').index(this);
				if(curr != index) {
					play(index);
					curr = index;
				};
				return false;
			});
			
		});
		
		var imgPlay = function() {
			next = curr + 1;
			if(curr == count-1) next=0;
			play(next);
			
			curr++;
			if(curr > count-1) { curr=0; next = curr +1; }
		};
		
		var play = function(next) {
			$('#imgs li').eq(curr).css({}).animate({'left': '-500px'}, 'slow', function() {
										 	$(this).css({'left': '490px'});
										 }).end()
									 .eq(next).animate({'left': '0px'}, 'slow', function() {
										 	$('#img_list a').siblings('a').removeClass('active').end().eq(next).addClass('active');
										 });
		};
/* endof ----- play img*/

	function innerTop()
	{
	$.ajax({
				type:"post",
				url:"top.aspx",
				data:"action=top",
				beforeSend:function(){
	//                $("#pictures_con").html("正在加载图片列表.....");
				},
				success:function(msg){
					  var almsg=document.getElementById("alid");
					  almsg.innerHTML=msg;                
				},
				error:function(){
					  alert("加载头部出错");
				}
			});
	}

