function intplaybanner(container,prebtn,nextbtn,playbtn,stopbtn){
	var root=$(container);
	var lilength;
	var bannerliwidth;
	var bannertotalwidth=0;
	var bannercurpos=0;
	var bannerintervalProcess;
	var bannerplaystate="pre";
	function checkpre(){
		if(bannercurpos<=-bannertotalwidth){
			bannercurpos=bannerliwidth;
			$(" ul",root).animate({left:bannercurpos},0);
			nextbanner("pre");
		}
	}
	function checknext(){
		if(bannercurpos>=bannerliwidth){
			bannercurpos=-bannertotalwidth;
			$(" ul",root).animate({left:bannercurpos},0);
			nextbanner("next");
		}
	}
	function nextbanner(str){
		if(str=="pre"){
			bannercurpos=bannercurpos-bannerliwidth;
			$(" ul",root).animate({left:bannercurpos},1000,checkpre);
		}else{
			bannercurpos=bannercurpos+bannerliwidth;
			$(" ul",root).animate({left:bannercurpos},1000,checknext);
		}
		bannerplaystate=str;
	}
	function checkplaystate(){
		if(bannerplaystate=="pre"){
			nextbanner("pre");
			}else{
			nextbanner("next");
			}
		}
	function autoplaybanner(str){
		if(str=="play"){
			bannerintervalProcess = setInterval(checkplaystate, 5000);
		}else{
			clearInterval(bannerintervalProcess);
		}
	}
	lilength=$(" li",root).length;
	bannerliwidth=$(" li",root).width();
	bannertotalwidth=$(" ul",root).width();
	$(" ul",root).css("width",bannertotalwidth);
	autoplaybanner("play");
	$(prebtn).click(function (){
	 	nextbanner("pre");
		return false;
	});
	$(nextbtn).click(function (){
	 	nextbanner("next");
		return false;
	});
	$(playbtn).click(function (){
	 	autoplaybanner("play");
		return false;
	});
	$(stopbtn).click(function (){
	 	autoplaybanner("stop");
		return false;
	});
}
