// JavaScript Document
var imgs_pre = new Array( 
'../img/music.jpg',
'../img/what_2.jpg',
'../img/special.jpg',
'../img/education.jpg',
'../img/word.jpg',
'../img/qa.jpg',
'../img/link.jpg');

var imgs_o_pre = new Array( 
'../img/music_o.jpg',
'../img/what_2_o.jpg',
'../img/special_o.jpg',
'../img/education_o.jpg',
'../img/word_o.jpg',
'../img/qa_o.jpg',
'../img/link_o.jpg');


function MM_findObj(n, d) {
  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 pull_hyouji() {
  var i,p,v,obj,args=pull_hyouji.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;
	}
}


var imgs = new Object(); 
var imgs_o = new Object(); 
var _count = new Array("music","what_2","special","education","word","qa","link");

for (var i = 0; i < _count.length; i++) {
	if (document.images){
		imgs[_count[i]]= new Image(); imgs[_count[i]].src = imgs_pre[i];
		imgs_o[_count[i]]= new Image(); imgs_o[_count[i]].src = imgs_o_pre[i];
 	}
 }

function swapimg_basic(over){
	document.images[over].src = imgs_o[over].src;
}

function swapimg_rtr_basic(out){
	document.images[out].src = imgs[out].src;
}

function all_reset(){
	for(i=0; i<_count.length; i++){
		document.images[_count[i]].src = imgs[_count[i]].src;
	}
	pull_hyouji('pulldown_music','','hide');
	pull_hyouji('pulldown_special','','hide');
	pull_hyouji('pulldown_education','','hide');
	pull_hyouji('pulldown_qa','','hide');
}
