// JavaScript Document

/*右侧漂浮条*/
lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}

//alert(diffY);
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("ALayer1").style.top=parseInt(document.getElementById("ALayer1").style.top)+percent+"px";
document.getElementById("ALayer2").style.top=parseInt(document.getElementById("ALayer1").style.top)+percent+"px";

lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}
//suspendcode12="<DIV id=\"ALayer1\" style='z-index:1006;right:0px;position:absolute; TOP:126px; float:right; display:none; width:103px;' ><a href=\"javascript:;\" onclick='closepf();'><img src=\"img30/ind_pf_03.png\" border=\"0\"></a><a href=\"javascript:;\" onclick='showBanner();'><img src=\"/img30/ind_pfzk_05.png\" border=\"0\"></a><img src=\"/img30/ind_pf_23.png\" border=\"0\"></div>"
//suspendcode14 = "<div id=\"ALayer2\" style='z-index:1006;right:0px; TOP:126px;position:absolute; float:right;'>";
//suspendcode14 += "<div class=\"numberxone\"><a href=\"javascript:;\" onclick='closepf();'>";
//suspendcode14 += "<img src=\"img30/ind_pf_03.png\" border=\"0\"></a><a href=\"javascript:;\" onclick='closeBanner();'>";
//suspendcode14 += "<img src=\"/img30/ind_pf_05.png\" border=\"0\"></a></div><div class=\"numberxtwo\"><a href=\"http://res.woniu.com/support/support.html\" target=\"_blank\"><img src=\"/img30/ind_pf_06.png\" border=\"0\"></a><img src=\"/img30/ind_pf_07.png\" border=\"0\"><a href=\"http://shop.woniu.com/home/wujie/index.xml\" target=\"_blank\"><img src=\"/img30/ind_pf_08.png\" border=\"0\"></a><a href=\"http://shop.woniu.com/cart/shop_guide.jsp?gameId=4\" target=\"_blank\"><img src=\"/img30/ind_pf_09.png\" border=\"0\"></a><a href=\"http://res.woniu.com/imprest/imprest_main.html\" target=\"_blank\"><img src=\"/img30/ind_pf_10.png\" border=\"0\"></a><a href=\"http://5jq.woniu.com/news/promotions/\" target=\"_blank\"><img src=\"/img30/ind_pf_11.png\" border=\"0\"></a><img src=\"/img30/ind_pf_12.png\" border=\"0\"><img src=\"/img30/ind_pf_13.png\" border=\"0\"><a href=\"http://act.woniu.com/5jq/costume/web/2j.php\" target=\"_blank\"><img src=\"/img30/ind_pf_14.png\" border=\"0\"></a><a href=\"http://act.woniu.com/5jq/costume/web/wdyx_bm.php\" target=\"_blank\"><img src=\"/img30/ind_pf_15.png\" border=\"0\"></a><a href=\"http://act.woniu.com/5jq/costume/web/wdyx_zt.php\" target=\"_blank\"><img src=\"/img30/ind_pf_16.png\" border=\"0\"></a><a href=\"http://act.woniu.com/5jq/costume/web/index.php\" target=\"_blank\"><img src=\"/img30/ind_pf_17.png\" border=\"0\"></a><img src=\"/img30/ind_pf_18.png\" border=\"0\"><a href=\"http://act.woniu.com/5jq/music/web/index.php\" target=\"_blank\"><img src=\"/img30/ind_pf_19.png\" border=\"0\"></a><a href=\"http://passport.woniu.com/PassportDetailPrepare.do?method=findUserInfo\" target=\"_blank\"><img src=\"/img30/ind_pf_20.png\" border=\"0\"></a><a href=\"http://act.woniu.com//5jq/advice090514/web/index.php\" target=\"_blank\"><img src=\"/img30/ind_pf_21.png\" border=\"0\"></a><a href=\"http://5jq.woniu.com/newver/index.html\" target=\"_blank\"><img src=\"/img30/ind_pf_22.png\" border=\"0\"></a><img src=\"/img30/ind_pf_23.png\" border=\"0\"></div></div>";


function im_sousuo(){
 var txt = document.getElementById("haoyoukeywd").value;
 if (txt =='按昵称搜索好友'){txt='';}
 location.href='http://www.woniu.com/home/search.html?searchStyle=exact&nickName='+txt;
 return;
 if (txt.search("^-?\\d+$")){
 location.href='http://www.woniu.com/home/search.html?searchStyle=exact&nickName='+txt;
 }else{
 location.href='http://www.woniu.com/home/search.html?searchStyle=exact&userId='+txt;
 }
}

function closepf(){
 document.getElementById("ALayer1").style.display= 'none';
 document.getElementById("ALayer2").style.display= 'none';
 }
//setTimeout("closeBanner()",6000);
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />



/*新闻滑动门*/
var btnGroup1=new Array(); btnGroup2=new Array();
function init(){
     btnGroup1[0]=new Array();
    btnGroup1[0]['img']=document.getElementById('btnGroup1_1');
	btnGroup1[0]['outbg']="style/images/ind_bottom_42.jpg";
	btnGroup1[0]['overbg']="style/images/ind_bottom2_42.jpg";
	btnGroup1[0]['url']="#";
	btnGroup1[0]['div']=document.getElementById("indxszd");
	btnGroup1[1]=new Array();
	btnGroup1[1]['img']=document.getElementById('btnGroup1_2');
	btnGroup1[1]['outbg']="style/images/ind_bottom_43.jpg";
	btnGroup1[1]['overbg']="style/images/ind_bottom2_43.jpg";
	btnGroup1[1]['url']="#";
	btnGroup1[1]['div']=document.getElementById("indczqh");
	btnGroup1[2]=new Array();
	btnGroup1[2]['img']=document.getElementById('btnGroup1_3');
	btnGroup1[2]['outbg']="style/images/ind_bottom_44.jpg";
	btnGroup1[2]['overbg']="style/images/ind_bottom2_44.jpg";
	btnGroup1[2]['url']="#";
	btnGroup1[2]['div']=document.getElementById("indhxzn");
	btnGroup1[3]=new Array();
	btnGroup1[3]['img']=document.getElementById('btnGroup1_4');
	btnGroup1[3]['outbg']="style/images/ind_bottom_45.jpg";
	btnGroup1[3]['overbg']="style/images/ind_bottom2_45.jpg";
	btnGroup1[3]['url']="#";
	btnGroup1[3]['div']=document.getElementById("indymhw");
	btnGroup1[4]=new Array();
	btnGroup1[4]['img']=document.getElementById('btnGroup1_5');
	btnGroup1[4]['outbg']="style/images/ind_bottom_46.jpg";
	btnGroup1[4]['overbg']="style/images/ind_bottom2_46.jpg";
	btnGroup1[4]['url']="#";
	btnGroup1[4]['div']=document.getElementById("indhdyg");
	btnGroup1[5]=document.getElementById('moremore');
	btnGroup2[0]=new Array();
	btnGroup2[0]['img']=document.getElementById('btnGroup2_1');
	btnGroup2[0]['outbg']="style/images/wjyz_b_27.jpg";
	btnGroup2[0]['overbg']="style/images/wjyz_a_27.jpg";
	btnGroup2[0]['url']="#";
	btnGroup2[0]['div']=document.getElementById("indzhjy");
	btnGroup2[1]=new Array();
	btnGroup2[1]['img']=document.getElementById('btnGroup2_2');
	btnGroup2[1]['outbg']="style/images/wjyz_b_29.jpg";
	btnGroup2[1]['overbg']="style/images/wjyz_a_29.jpg";
	btnGroup2[1]['url']="#";
	btnGroup2[1]['div']=document.getElementById("indzygl");
	btnGroup2[2]=new Array();
	btnGroup2[2]['img']=document.getElementById('btnGroup2_3');
	btnGroup2[2]['outbg']="style/images/wjyz_b_31.jpg";
	btnGroup2[2]['overbg']="style/images/wjyz_a_31.jpg";
	btnGroup2[2]['url']="#";
	btnGroup2[2]['div']=document.getElementById("indxqgw");
	btnGroup2[3]=document.getElementById('morexq');
	
}
function changeBtnBg(btnGroup,btnIndex){
    for (i=0;i<btnGroup.length-1;i++){
	      btnGroup[i]['img'].src= btnGroup[i]['outbg'];
		    btnGroup[i]['div'].style.display="none";
	   }//alert(btnIndex);
	     //alert(btnGroup1[0]['img']);
          btnGroup[btnIndex]['img'].src= btnGroup[btnIndex]['overbg'];
          btnGroup[btnIndex]['div'].style.display="block";
		   btnGroup[btnGroup.length-1].href=btnGroup[btnIndex]['url'];
  }

function hiddenUl(id){document.getElementById(id).style.display='none';}

