//////////////////////////////////////////////////////////////////
//
//================================================================
// KOKUYO --- JavaScript
//            Copyright 2004 CATWALK,Inc. All rights reserved.
//            http://www.web-kyoto.com
//================================================================
//
// 右メニュー部分記述用JavaScript
// Created by CATWALK（三原比呂美）
// 2005年03月12日
// このスクリプトに対するお問い合わせは
// 三原　比呂美：hiromi@web-kyoto.com
// 宛に願います。
//
//////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////
// 変数保持オブジェクト
//////////////////////////////////////////////////////////////////
function LinkObject(title, name, url) {
    this.title = title;
    this.name = name;
    this.url = url;
}

//////////////////////////////////////////////////////////////////
// リンクメニュー生成用メソッド
//////////////////////////////////////////////////////////////////
function CWShowPageNavigationMenu(nowurl) {
    var objArray = new Array();
	objArray.push(new LinkObject("ユニバーサルデザインTOP", "", "/yokoku/ud/index.html"));
	objArray.push(new LinkObject("ユニバーサルデザインとは", "", "/yokoku/ud/aboutud/index.html"));
	objArray.push(new LinkObject("ユニバーサルデザインとは", "ロン・メイスの7原則", "/yokoku/ud/aboutud/01.html"));
	objArray.push(new LinkObject("ユニバーサルデザインとは", "ユニバーサルデザインの例（家の中編）", "/yokoku/ud/aboutud/02.html"));
	objArray.push(new LinkObject("ユニバーサルデザインとは", "ユニバーサルデザインの例（街の中編）", "/yokoku/ud/aboutud/03.html"));
	objArray.push(new LinkObject("コクヨのユニバーサルデザイン", "", "/yokoku/ud/aboutkokuyo/index.html"));
	objArray.push(new LinkObject("コクヨのユニバーサルデザイン", "コクヨはユニバーサルデザインナンバーワン", "/yokoku/ud/aboutkokuyo/01.html"));
	objArray.push(new LinkObject("コクヨのユニバーサルデザイン", "6つの要件", "/yokoku/ud/aboutkokuyo/02.html"));
	objArray.push(new LinkObject("コクヨのユニバーサルデザイン", "PPP10原則", "/yokoku/ud/aboutkokuyo/03.html"));
	objArray.push(new LinkObject("ユニバーサルデザインガイド", "", "/yokoku/ud/guide/index.html"));
	objArray.push(new LinkObject("ユニバーサルデザイン製品紹介", "", "/yokoku/ud/products/index.html"));
	objArray.push(new LinkObject("ユニバーサルデザイン製品紹介", "その他の製品も見る", "./index.html"));
	objArray.push(new LinkObject("ユニバーサルデザイン製品を購入するには", "", "/yokoku/ud/purchase/index.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "", "/yokoku/ud/class/index.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "授業の進め方「情報を集めよう」", "/yokoku/ud/class/class01.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "授業の進め方「調べたことを発表しよう」", "/yokoku/ud/class/class02.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "授業の進め方「体験してみよう」", "/yokoku/ud/class/class03.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "授業の進め方「考えてみよう」", "/yokoku/ud/class/class04.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "授業の進め方「考えたことを発表しよう」", "/yokoku/ud/class/class05.html"));
	objArray.push(new LinkObject("ユニバーサルデザインを学ぶ授業のご案内", "授業を行った先生方・児童からの声", "/yokoku/ud/class/voice.html"));
	
    // オブジェクトを取得
    var count = 0;
    for(var i = 0;i < objArray.length;i++) {
        var obj = objArray[i];
        if(nowurl == obj.url) {
            count = i;
            break;
        }
    }

    var separator = '<img src="/common/navi_img/button_line.gif" alt="" width="1" height="24">';
    // 0番目の要素以外の場合はBACKリンク生成
    if(objArray[count].name != "") {
        if(count != 0) {
            if((objArray[count].title == objArray[count-1].title) && (objArray[count-1].name != "")) {
                document.write('<a href="' + objArray[count-1].url + '"><img src="/common/navi_img/button_back.gif" alt="前へ" width="53" height="24" border="0"></a>');
                document.write(separator);
            }
        }
    }
    // PAGETOPリンク生成
    document.write('<a href="javascript:window.scrollTo(0,0);"><img src="/common/navi_img/button_top.gif" alt="先頭へ" width="61" height="24" border="0"></a>');
    // 配列の最後の要素以外の場合はNEXTリンク生成
    if(objArray[count].name != "") {
        if(count != (objArray.length - 1)) {
            if((objArray[count].title == objArray[count + 1].title) && (objArray[count+1].name != "")) {
                document.write(separator);
                document.write('<a href="' + objArray[count+1].url + '"><img src="/common/navi_img/button_next.gif" alt="次へ" width="52" height="24" border="0"></a>');
            }
        }
    }

}
