function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function show_tab(pre,pree, n, select_n){for (i=1;i <= n;i++){
var intro=document.getElementById(pre+i);
var cha=document.getElementById(pree+i);
var tab1=document.getElementById("top_tab1");
var tab2=document.getElementById("top_tab2");
intro.style.display="none";
cha.className="top_tabbg3";
tab1.className="top_tabbg2";
tab2.className="top_tabbg2";
if(i==select_n){intro.style.display="block";cha.className="top_tabbg1";}
if(select_n==1){tab1.className="top_tabbg1";}
if(select_n==2){tab2.className="top_tabbg1";}
}}
function show_area(pre, n, select_n){for (i=1;i <= n;i++){
var aread=document.getElementById(pre+i);
aread.style.display="none";
if(i==select_n){aread.style.display="block";}
}}
function G(id){return document.getElementById(id);}
function show_intro(pre,pree, n, select_n){
for (i=1;i <= n;i++){
var intro=G(pre+i);
var cha=G(pree+i);
intro.style.display="none";
cha.className="menu_off";
if(i==select_n){
intro.style.display="block";
cha.className="menu_on";
}
}
}
//ÓÒ²à350x250¹ã¸æËæ»úÏÔÊ¾
function show_ad(pre,n){
var id=Math.round(Math.random()*(n-1))+1;
for (i=1;i <= n;i++){
var ad350=G(pre+i);
ad350.style.display="none";
if(i==id){ad350.style.display="block";}
}
}
function wed_tab(pre,pree,cls,n,select_n){
for (i=1;i <= n;i++){
var intro=G(pre+i);
var cha=G(pree+i);
intro.style.display="none";
cha.className=cls+"2";
if(i==select_n){
intro.style.display="block";
cha.className=cls+"1";
}
}
}
