// #################################################################################
// #    File Name   : jpindex.js
// #    Project     : JPREAD
// #    System      : On-Line Japanese Reading Material
// #    Purpose     : Generate Dynamic Table of Contents
// #    Function    : JPREAD Control
// #    Medel       : his programe is based on the Document Object Model (DOM)
// #    Language    : JavaScript (Client Side Scripting. ver: 5.x)
// #    Include     : jpreadtoc.js
// #    Date Issued : 2006/08/29(Tsu)-11:56:37
// #    Base URL    : http://www.all.co.nz/
// #    Location    : js/
// #    Usage       :
// #    Browsers    : IE5.x and above
// #    Requirement : <BODY ID='oBody'>
// #    Restriction : None
// #    Author      : Hiroto Sekine (Able LL Systems Dpt. CHC, NZL)
// #    Copyright   : (C) 2002 Southern Cross Virtual Co., Ltd. All Rights Reserved.
// #    Contact     : info@all.co.nz
// #    Tab Stop    : 4 (Suitable TAB stop size to view this Source Code)
// # ===============================================================================
// #    ** Revision **
// # Date   Description                                             Sign      Mark
// # ------+-------------------------------------------------------+---------+------
// #
// #################################################################################
@set @DEBUG = 0 // Program Debug Flag: ON(=1)/OFF(=0)
// ###########################################################################
// #                            << NOTICE >>                                 #
// # THIS PROGRAM CODE BELONGS TO SOUTHERN CROSS VIRTUAL CO., LTD. IT IS     #
// # CONSIDERED A TRADE SECRET AND IS NOT TO BE DIVULUGED OR USED BY PARTIES #
// # WHO HAVE NOT RECEIVED WRITTEN AUTHORIZATION FROM THE OWNER.             #
// # ----------------------------------------------------------------------- #
// #                            << 通  知 >>                                 #
// # 本プログラムはSOUTHERN CROSS VIRTUAL CO., LTD.の財産です。本プログラム  #
// # はトレード・シークレットとみなされ、当該権利者の書面による許可なくして、#
// # 漏洩または使用を禁じます。                                              #
// ###########################################################################

function addAddFavoriteFolder(){
   var ua = window.navigator.userAgent ;
   var msie = ua.indexOf ( "MSIE " ) ;
   if (( msie >= 0 ) &&
      ( 4 <= parseInt(ua.substring(msie+5, ua.indexOf( ".", msie ))) )){
      var strMsg = "";
      strMsg += "<P STYLE='text-align:center'><SPAN class='CREDIT' onmouseover='this.style.color=\"red\"; this.style.cursor=\"hand\"' onmouseout='this.style.color=\"blue\";'";
      strMsg += "onclick='window.external.AddFavorite(location.href,document.title);'>";
      strMsg += "Add this page to your favorites</SPAN></P>";
      document.write(strMsg);
   }
}
var oPopup2 = window.createPopup();
function fnDef(){
    if (event.srcElement.id=="oM01"){
        oPopup2.document.body.innerHTML = tM01.innerHTML;
    }
    var popupBody2 = oPopup2.document.body;
        oPopup.show(0, 0, 300, 50);
    var realHeight = popupBody2.scrollHeight;
    //hide the dimension detector popup.
        oPopup2.hide();
    //Show the actual popup with correct width and height.
    oPopup2.show(0, 15 , 300, realHeight, event.srcElement);
}
function fnCreateRecentModifiedList2(){
  var ua = window.navigator;
    var x = F[ "oSelID" ];
    if (x != null){
        var iValue = x.selectedIndex+1;
        with(document.all){
            oTopModCap.innerHTML = "";
            oTopMod.innerHTML    = "";
        }
    if (ua.cookieEnabled){
        setCookieValue( coABLETOP_CAPS, iValue, twoWeeks );
        @if (@DEBUG == 1) window.status = "Top Caps value: " + iValue + " saved."; @end
    }
        fnCreateRecentModifiedList("oTopMod", iValue, false);
    }
}
function fnCreateMostReadTopicList2(){
  var ua = window.navigator;
    var x = F[ "oSelID2" ];
    if (x != null){
        var iValue = x.selectedIndex+1;
        with(document.all){
            oTopReadCap.innerHTML = "";
            oTopRead.innerHTML   = "";
        }
    if (ua.cookieEnabled){
        setCookieValue( coABLETOP_TPOIC, iValue, twoWeeks );
        @if (@DEBUG == 1) window.status = "Top Read value: " + iValue + " saved."; @end
    }
        fnCreateMostReadTopicList("oTopRead", iValue, false);
    }
}
