//ヘッダ右側

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



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_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}





// 上部メニュー用



if (document.images) {

str_path = "../../";

pos = window.location.href.indexOf("/seikei/", 0);

len = 7;

if (pos < 0) {

pos = window.location.href.indexOf("/seiken/", 0);

len = 7;

}

if (pos < 0) {

pos = window.location.href.indexOf("/gse/", 0);

len = 4;

}

if (pos < 0) {

pos = window.location.href.indexOf("/osp/", 0);

len = 6;

}

if (pos < 0) {

pos = window.location.href.indexOf("/ircpea/", 0);

len = 7;

}

if (document.location.href.substring(pos+len) == "/" || document.location.href.substring(pos+len) == "/index.html") {

str_path = "../";

}

else if (document.location.href.indexOf("/contact.html") > 0 ||

         document.location.href.indexOf("/sitemap.html") > 0 ||

         document.location.href.indexOf("/copyright.html") > 0) {

str_path = "./";

}



on_seikei_img = new Image();on_seikei_img.src =  str_path + 'hmenu_img/seikei_on.gif';

on_seiken_img = new Image();on_seiken_img.src =  str_path + 'hmenu_img/seiken_on.gif';

on_gse_img = new Image();on_gse_img.src =  str_path + 'hmenu_img/gse_on.gif';

on_wospm_img = new Image();on_wospm_img.src =  str_path + 'hmenu_img/wospm_on.gif';

on_ircpea_img = new Image();on_ircpea_img.src =  str_path + 'hmenu_img/ircpea_on.gif';



off_seikei_img = new Image();off_seikei_img.src =  str_path + 'hmenu_img/seikei_off.gif';

off_seiken_img = new Image();off_seiken_img.src =  str_path + 'hmenu_img/seiken_off.gif';

off_gse_img = new Image();off_gse_img.src =  str_path + 'hmenu_img/gse_off.gif';

off_wospm_img = new Image();off_wospm_img.src =  str_path + 'hmenu_img/wospm_off.gif';

off_ircpea_img = new Image();off_ircpea_img.src =  str_path + 'hmenu_img/ircpea_off.gif';



on_under_img = new Image();on_under_img.src =  str_path + 'hmenu_img/under_on.gif';

on_unders_img = new Image();on_unders_img.src =  str_path + 'hmenu_img/unders_on.gif';

on_underl_img = new Image();on_underl_img.src =  str_path + 'hmenu_img/underl_on.gif';

on_underr_img = new Image();on_underr_img.src =  str_path + 'hmenu_img/underr_on.gif';



off_under_img = new Image();off_under_img.src =  str_path + 'hmenu_img/under_off.gif';

off_underl_img = new Image();off_underl_img.src =  str_path + 'hmenu_img/underl_off.gif';

off_underr_img = new Image();off_underr_img.src =  str_path + 'hmenu_img/underr_off.gif';



on_l_img = new Image();on_l_img.src =  str_path + 'hmenu_img/l_on.gif';

on_r_img = new Image();on_r_img.src =  str_path + 'hmenu_img/r_on.gif';



off_l_img = new Image();off_l_img.src =  str_path + 'hmenu_img/l_off.gif';

off_r_img = new Image();off_r_img.src =  str_path + 'hmenu_img/r_off.gif';

}

function di(id,name){

  if (document.images) {document.images[id].src=eval(name+".src"); }

}