window.onload=function(){
  var list = classes("btn_menu");
  var node;
  for (var i=0, len=list.length; i<len; i++) {
    node = list[i];
    node.moto = node.src;
    node.over = node.moto.replace(/02/,"01");

    node.onmouseover = function(){
      this.src = this.over;
    };
    node.onmouseout = function(){
      this.src = this.moto;
    };

//反転 ieで動かず
/*var sr=document.URL.split(".")[0].split("/")[(document.URL.split(".")[0].split("/").length)-1];
var hr=node.getAttribute('src').split('_')[1].split("0")[0];

if (sr==hr){
node.src=node.moto.replace(/02/,"01");
    node.onmouseout = function(){
      this.src = this.src;
    };
}
*/
  }
};
//クラス名によるエレメントノード配列取得
function classes(name){
  var elements = [];
  var all = document.getElementsByTagName('*');
  for (var i=0, len=all.length; i<len; i++) {
    if (all[i].className == name){
      elements.push(all[i]);
    }
  }
  return elements;
}


function wopen(url) {
if (url) {
opwin = window.open(url);
opwin.focus();
}
}

function wopen_list(url) {
if (url) {
opwin = window.open(url,"Wname","width=520,height=520,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no");
opwin.focus();
}
}

function wopen_list2(url,Wname,w,h) {
if (url) {
opwin = window.open(url,Wname,"width="+w+",height="+h+",scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no");
opwin.focus();
}
}

function wclose(){
window.close();
}


 userAgt = navigator.userAgent;

july = " <link rel='stylesheet' type='text/css' href='";

if(userAgt.indexOf('Win') !=-1){
if (document.all) { 
july+="win_IE.css'> ";
} 
if (!document.all && document.getElementById) {
july+="win_NN.css'> ";
} 
if (document.layers) {
july+="win_NN.css'> ";
} 
} else {
if (document.all) { 
july+="mac_IE.css'> ";
} 
if (!document.all && document.getElementById) {
july+="mac_NN.css'> ";
} 
if (document.layers) {
july+="mac_NN.css'> ";
} 
}
document.write(july);



image = 22;            
tb = new Array(
"images/menu_top02.gif",
"images/menu_top01.gif",
"images/menu_genre02.gif",
"images/menu_genre01.gif",
"images/menu_other02.gif",    
"images/menu_other01.gif",   
"images/menu_price02.gif",  
"images/menu_price01.gif",    
"images/menu_catalog02.gif",   
"images/menu_catalog01.gif",    
"images/menu_morita02.gif",   
"images/menu_morita01.gif",   
"images/menu_special02.gif",   
"images/menu_special01.gif",   
"images/menu_plan02.gif",   
"images/menu_plan01.gif",   
"images/menu_ques02.gif",   
"images/menu_ques01.gif",   
"images/menu_hanadeka02.gif",   
"images/menu_hanadeka01.gif",   
"images/menu_map02.gif",   
"images/menu_map01.gif"
);
Imgtb = new Array( image ); 
for (i=0; i<image; i++){       
  Imgtb[i] = new Image();     
  Imgtb[i].src = tb[i]; 
}

function CI( myBtnNo , myTblNo ){  
  document.images["0"+myBtnNo].src = Imgtb[myTblNo].src;
}

            
MO = new Array(22)
MO[0]="images/text_top02.gif";
MO[1]="images/text_top01.gif";
MO[2]="images/text_genre02.gif";
MO[3]="images/text_genre01.gif";
MO[4]="images/text_other02.gif";    
MO[5]="images/text_other01.gif";   
MO[6]="images/text_price02.gif";  
MO[7]="images/text_price01.gif";    
MO[8]="images/text_catalog02.gif";   
MO[9]="images/text_catalog01.gif";    
MO[10]="images/text_morita02.gif";   
MO[11]="images/text_morita01.gif";   
MO[12]="images/text_special02.gif";   
MO[13]="images/text_special01.gif";   
MO[14]="images/text_plan02.gif";   
MO[15]="images/text_plan01.gif";   
MO[16]="images/text_ques02.gif";   
MO[17]="images/text_ques01.gif";   
MO[18]="images/text_hanadeka02.gif";   
MO[19]="images/text_hanadeka01.gif";   
MO[20]="images/text_map02.gif";   
MO[21]="images/text_map01.gif";

function mOver(name,num){  
  document.images[name].src = MO[num];
}

function mOut(name,num){  
  document.images[name].src = MO[num];
}

function PPT(url){
if (url) {
opwin = window.open(url,"sub","width=450,height=500,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no");
opwin.focus();
}
}

function PPW(url){
if (url) {
opwin = window.open(url,"sub","width=450,height=550,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no");
opwin.focus();
}
}

morita = new Array(6)
morita[0]="images/morita_profile01.gif";
morita[1]="images/morita_profile02.gif";
morita[2]="images/morita_pub01.gif";
morita[3]="images/morita_pub02.gif";
morita[4]="images/morita_media01.gif";    
morita[5]="images/morita_media02.gif";  

function mouseO(name,num){  
  document.images[name].src = morita[num];
}

function mouseOu(name,num){  
  document.images[name].src = morita[num];
}

function m_p(id){
MM = document.getElementById(id).style;
/*alert(MM);*/
MM = "background: transparent url(./images/morita_media01.gif) no-repeat 80% 50%";
}
