//***　各ページ共通処理　***//
    var buttonimage = new Array();
    for(i=1;i<4;i++){
        buttonimage[i] = new Image();
        buttonimage[i].src="img/cbtnret" + i + ".gif";
    }
    var buttonimage2 = new Array();
    for(i=1;i<4;i++){
        buttonimage2[i] = new Image();
        buttonimage2[i].src="img/index" + i + ".gif";
    }
    var mapimage = new Array();
    for(i=1;i<5;i++){
        mapimage[i] = new Image();
        mapimage[i].src="img/husuma" + i + ".gif";
    }

//***　戻るボタン画像セット処理　***//
function setimage(pos,n2) {
     document.images["cbtnret" +  pos].src = buttonimage[n2].src;
}

//***　Homeボタン画像セット処理　***//
function setimage2(pos,n2) {
     document.images["cbtnhome" +  pos].src = buttonimage2[n2].src;
}

//*** メニューボタンの再セット処理 ***//
function menuset() {
    if (parent.body == undefined ) {
       document.cookie = location.href
       location.href = "index.html"} 
       else { menuset2()} 
}

function menuset2() {
    var h = parent.body.location.href;
            if (h.lastIndexOf("main") < 0) {parent.menu.index1.src="img/index1.gif"}
                else {parent.menu.index1.src="img/index1a.gif"};
            if (h.lastIndexOf("gaiyo") < 0) {parent.menu.index2.src="img/index4.gif"}
                else {parent.menu.index2.src="img/index4a.gif"};
            if (h.lastIndexOf("seihin") < 0) {parent.menu.index3.src="img/index7.gif"}
                else {parent.menu.index3.src="img/index7a.gif"};
            if (h.lastIndexOf("kojyo") < 0) {parent.menu.index4.src="img/index10.gif"}
                else {parent.menu.index4.src="img/index10a.gif"};
            if (h.lastIndexOf("husuma") < 0) {parent.menu.index5.src="img/index13.gif"}
               else {parent.menu.index5.src="img/index13a.gif"};
            if (h.lastIndexOf("kansou") < 0) {parent.menu.index6.src="img/index16.gif"}
                else {parent.menu.index6.src="img/index16a.gif"};
     parent.body.focus()
}


//***　各ページ毎　***//
//***　ふすまの歴史画像セット　<husuma.html>***//
function setimage5(mapn) {
     document.images["husuma1"].src = mapimage[mapn].src;
}


//***　アンケート送信リセット処理　<kansou.html>***//

function mCheck()  {
    if (confirm("アンケート回答内容をクリアします。よろしいですか？")) {return true}
       else {return false}
}

function mThank()  {
    if (confirm("アンケートご回答ありがとうございました。ＯＫでメール送信します。よろしいですか？")) {return true}
       else {return false}
}

