//go to top
function ooor(){
	document.getElementById("totop").style.top=document.documentElement.scrollTop +520 +"px";
}
function scall(){
	ooor();
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;


//menu_L2
var sb = 0;
var sba = 0;
var $ = function(i){ return document.getElementById(i); }
function mychg(m){
    if(sba==1) {
	sbb=$("lm"+m).style.display;
	$("lm"+m).style.display=sbb=="none"?"block":"none";
	$("father"+m).className=$("father"+m).className==""?"on":"";
	}
	else {
    if(sb!=0){ 
	$("lm"+sb).style.display="none";
	$("father"+sb).className="";
	}
    if(sb!=m){
        $("lm"+m).style.display="block";
		$("father"+m).className="on";
        sb=m;
    }
	if(sb=m){
        $("lm"+m).style.display="block";
		$("father"+m).className="on";
    }
    else sb=0;
	}
}

//menu_L3
sfHover = function() {
var sfEls = document.getElementById("subnav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className="";
}
}
}
window.onload=sfHover;


function changeMenu(menuNum){
	var c=document.getElementById("submenus").getElementsByTagName("span");
    for(var i=0;i<c.length;i++){
		c[i].style.display = "none"
	}
	document.getElementById(menuNum).style.display = ""
	}


//output Q&A 
function setWBtxt(wb_m){
if (wb_m==0) return;
var wbt = Array();
var wbl = Array();
for(i=1;i<8;i++){                      
	wbt[i] = Array();
	wbl[i] = Array();
	}

wbt[1][1] = "password change";        			//Account Service分类
wbl[1][1] = "http://help.91.com/answer/2009/04/16/3004.shtml";
wbt[1][2] = "Please update your client";
wbl[1][2] = "http://help.91.com/answer/2009/05/06/3737.shtml";
wbt[1][3] = "help";
wbl[1][3] = "http://help.91.com/answer/2009/05/15/4015.shtml";
wbt[1][4] = "What does logged in too quick,forced...";
wbl[1][4] = "http://help.91.com/answer/2009/07/17/15598.shtml";
wbt[1][5] = "Loginproblem - Wrong Password/Login";
wbl[1][5] = "http://help.91.com/answer/2008/12/26/1074.shtml";

wbt[2][1] = "TQ Games FastCards";  			//Purchase&Credit分类
wbl[2][1] = "http://help.91.com/answer/2009/07/26/16520.shtml";
wbt[2][2] = "why did my mailbox phamminhluat5...";
wbl[2][2] = "http://help.91.com/answer/2009/07/23/16212.shtml";
wbt[2][3] = "How much for guns";
wbl[2][3] = "http://help.91.com/answer/2009/07/01/14486.shtml";
wbt[2][4] = "i just bought a tq card";
wbl[2][4] = "http://help.91.com/answer/2009/06/27/14003.shtml";
wbt[2][5] = "Zero points";
wbl[2][5] = "http://help.91.com/answer/2009/06/26/13180.shtml";

wbt[3][1] = "transforms";                   			//Classes&Skills分类
wbl[3][1] = "http://help.91.com/answer/2009/07/14/15380.shtml";
wbt[3][2] = "Transform Help";
wbl[3][2] = "http://help.91.com/answer/2009/06/28/14270.shtml";
wbt[3][3] = "problem with skills";
wbl[3][3] = "http://help.91.com/answer/2008/09/25/394.shtml";
wbt[3][4] = "fuion skils";
wbl[3][4] = "http://help.91.com/answer/2009/05/14/3946.shtml";
wbt[3][5] = "Freezing";
wbl[3][5] = "http://help.91.com/answer/2009/05/10/3848.shtml";

wbt[4][1] = "Ultra itens";                                                              //Items分类
wbl[4][1] = "http://help.91.com/answer/2009/07/30/16901.shtml";
wbt[4][2] = "Stars";
wbl[4][2] = "http://help.91.com/answer/2009/07/27/16645.shtml";
wbt[4][3] = "satellite disks";
wbl[4][3] = "http://help.91.com/answer/2009/07/10/15053.shtml";
wbt[4][4] = "how many red star to get ultra item";
wbl[4][4] = "http://help.91.com/answer/2009/04/08/2821.shtml";
wbt[4][5] = "Which gun is most powerful in PK?";
wbl[4][5] = "http://help.91.com/answer/2008/12/25/1065.shtml";


wbt[5][1] = "how to get the morepower full ultra weapon...";           //units & weapons 分类
wbl[5][1] = "http://help.91.com/answer/2009/07/31/16958.shtml";
wbt[5][2] = "sabor lvl 1?";
wbl[5][2] = "http://help.91.com/answer/2009/07/16/15525.shtml";
wbt[5][3] = "Cryo Artilery Unit";
wbl[5][3] = "http://help.91.com/answer/2009/06/26/13197.shtml";
wbt[5][4] = "coolest unit";
wbl[5][4] = "http://help.91.com/answer/2009/07/10/15047.shtml";
wbt[5][5] = "sniper and gauss gun";
wbl[5][5] = "http://help.91.com/answer/2009/05/17/4069.shtml";

wbt[6][1] = "Where is this Academy?";                       //Missions分类
wbl[6][1] = "http://help.91.com/answer/2009/07/17/15575.shtml";
wbt[6][2] = "Gladiators mission";
wbl[6][2] = "http://help.91.com/answer/2009/05/30/4543.shtml";
wbt[6][3] = "S14 Fortress";
wbl[6][3] = "http://help.91.com/answer/2009/05/29/4518.shtml";
wbt[6][4] = "Help me pls the mission";
wbl[6][4] = "http://help.91.com/answer/2008/12/03/796.shtml";
wbt[6][5] = "titan forstress";
wbl[6][5] = "http://help.91.com/answer/2008/12/03/788.shtmls";


wbt[7][1] = "triple question";                             //Feature分类
wbl[7][1] = "http://help.91.com/answer/2009/07/23/16172.shtml";
wbt[7][2] = "How do i get out of botjail";
wbl[7][2] = "http://help.91.com/answer/2009/07/11/15134.shtml";
wbt[7][3] = "what purpose does cap serve?";
wbl[7][3] = "http://help.91.com/answer/2009/07/03/14609.shtml";
wbt[7][4] = "Something hard";
wbl[7][4] = "http://help.91.com/answer/2009/06/25/13147.shtml";
wbt[7][5] = "Fused unit";
wbl[7][5] = "http://help.91.com/answer/2009/06/07/5010.shtml";


for(k=1;k<wbt[wb_m].length;k++){
	document.writeln("<li><a href=\""+ wbl[wb_m][k] +"\" target=\"_self\">"+ wbt[wb_m][k] +"<\/a><\/li>");
	}
}  

//Output Screenshots
function setSStxt(wb_m){
  var jsurl = "http://p.images.91.com/album91e_js/special/zoss_"
  var jstag ="<script language=\"JavaScript\" type=\"text\/javascript\""
  var ss = jstag+" src=\""+jsurl + wb_m +".js"+"\"><\/script>"
  document.writeln(ss);
}
