// JavaScript Document
function ShowrankTab(id_num,num){
for(var i=0;i<5;i++)
{
var tap=document.getElementById("rankTab_"+id_num+i);
if(tap!=null)
{
tap.className="rankTabOff"
}
}
for(var i=0;i<5;i++){
var tap=document.getElementById("rankCon_"+id_num+i);
if(tap!=null)
{
tap.style.display="none"
}
}
document.getElementById("rankTab_"+id_num+num).className="rankTabOn";
document.getElementById("rankCon_"+id_num+num).style.display="block";
}




function ShowrancTab(id_num,num){
for(var i=0;i<5;i++)
{
var tap=document.getElementById("rancTab_"+id_num+i);
if(tap!=null)
{
tap.className="rancTabOff"
}
}
for(var i=0;i<5;i++){
var tap=document.getElementById("rancCon_"+id_num+i);
if(tap!=null)
{
tap.style.display="none"
}
}
document.getElementById("rancTab_"+id_num+num).className="rancTabOn";
document.getElementById("rancCon_"+id_num+num).style.display="block";
}

//marquee<SCRIPT>snMarquee("ggmarquee",100,2,"up");
function snMarquee(myid,timeout,step,dir){
	if(!dir)var dir="up";
	if(!timeout)var timeout=20;
	if(!step)var step=1;
	var tmc=document.getElementById(myid);
	tmc.style.overflow="hidden";
	tmc.style.position="relative";
	var twidth=tmc.scrollWidth;
	var theight=tmc.scrollHeight;
	var content=tmc.innerHTML;
	if(dir=="up"){
		tmc.innerHTML="<div style='position:absolute;top:0px;left:0px;height:"+theight+"px; width:"+twidth+"px;' id='"+myid+"_wrap'>"+content+content+"</div>";
		var target=document.getElementById(myid+"_wrap");
		target.mypos=0;
	}else if(dir=="down"){
		tmc.innerHTML="<div style='position:absolute;top:0px;left:0px;height:"+theight+"px; width:"+twidth+"px;' id='"+myid+"_wrap'>"+content+content+"</div>";
		var target=document.getElementById(myid+"_wrap");
		target.mypos=-theight;
	}else if(dir=="left"){
		tmc.innerHTML="<div style='position:absolute;top:0px;left:0px;height:"+theight+"px; width:"+2*twidth+"px;' id='"+myid+"_wrap'><div style='float:left;height:"+theight+"px; width:"+twidth+"px;'>"+content+"</div><div style='float:left;height:"+theight+"px; width:"+twidth+"px;'>"+content+"</div></div>";
		var target=document.getElementById(myid+"_wrap");
		target.mypos=0;
	}else if(dir=="right"){
		tmc.innerHTML="<div style='position:absolute;top:0px;left:0px;height:"+theight+"px; width:"+2*twidth+"px;' id='"+myid+"_wrap'><div style='float:left;height:"+theight+"px; width:"+twidth+"px;'>"+content+"</div><div style='float:left;height:"+theight+"px; width:"+twidth+"px;'>"+content+"</div></div>";
		var target=document.getElementById(myid+"_wrap");
		target.mypos=-twidth;
	}
	target.onmouseover=function(){
		target.rollme=true;
	}
	target.onmouseout=function(){
		target.rollme=false;
	}
	var scrollme=function(){
		if(target.rollme)return;
		if(dir=="up"){
			target.mypos-=step;
			if(target.mypos<-theight)target.mypos=0;
			target.style.top=target.mypos+"px";
		}else if(dir=="down"){
			target.mypos+=step;
			if(target.mypos>=0)target.mypos=-theight;
			target.style.top=target.mypos+"px";
		}else if(dir=="left"){
			target.mypos-=step;
			if(target.mypos<-twidth)target.mypos=0;
			target.style.left=target.mypos+"px";
		}else if(dir=="right"){
			target.mypos+=step;
			if(target.mypos>=0)target.mypos=-twidth;
			target.style.left=target.mypos+"px";
		}
	}
	setInterval(scrollme,timeout);
}

