<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT  = "onclick"     ONEVENT="fnDef()" />
<PUBLIC:ATTACH EVENT  = "onmouseover" ONEVENT="Hilite()"  />
<PUBLIC:ATTACH EVENT  = "onmouseout"  ONEVENT="Restore()" />
<PUBLIC:ATTACH EVENT  = "onload" FOR="window" ONEVENT="initColors()" />
<PUBLIC:PROPERTY NAME = "hiliteColor" VALUE = "#1E9952" />
<SCRIPT LANGUAGE="JScript">

// ******************************************************************
// *    HTML Source & CSS Preparation
// ******************************************************************
/*
    - << HTML Source Requirements >> -

    <html  XMLNS:MY>
    var CUSTOM_TAG = "DEF"; // Global Var.
    <BODY onload="initTitles( 'DEF', 'DEF' )">
    // arg1: HTML TAG element name (eg."SPAN")
    // arg2: Element Class name (eg. "DEF")

    Case 1: <MY:DEF TipID='M01'>****</MY:DEF>
    Case 2: <MY:DEF TipID='M01' addMessage='となえる'>****</MY:DEF>
    Case 3: <MY:DEF TipID='M01' onmousedown='fnSetReading();'>****</MY:DEF>

        Causion: Message ID must be more than '00', '00' is reserved as Default

    <SPAN>JJJ−<SPAN ID="M01">EEEEE</SPAN></SPAN>

    - << CSS Requirements >> -

    @media all {
        MY\:DEF {
            cursor:hand;
            font-weight:bold;
            color:Maroon;
            behavior:url(popuptip2.htc); <---- This HTC file
        }
    }

*/

// ******************************************************************
// *    Popup ToolTip Behavior
// ******************************************************************

if (typeof(oPopup) == "undefined"){
    var oPopup = window.createPopup();
}
var STX1 = "<DIV STYLE='background:#FFFFCC;border:1px solid black;padding:4px;width:300px;font-family:Times New Roman,sans-selif;font-size:95%;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=yellowgreen, EndColorStr=#FFFFFF)'><DIV><B>";
var STX2 = ":</B>";
var STX3 = "<HR SIZE='1' STYLE='border:1px solid blue;' />";
var STX4 = "</DIV></DIV>";

function pTips( add, key, tip ){
    this.ADD = add; // Additional information; could be HTML sentence
    this.KEY = key; // Keyword to be same in a sentence; plain sentence
    this.TIP = tip; // Tip description; could be HTML sentence
}
var keys = new Array();
var adds = new Array();
var tips = new Array();
var k = 0;

keys[k++] = "頭文字"    ;
keys[k++] = "品　詞"    ;
keys[k++] = "レベル"    ;
keys[k++] = "検索文字"  ;
keys[k++] = "SORTING"   ;
keys[k++] = "MATCHED"   ;
keys[k++] = "RESET"     ;
keys[k++] = "イ形"      ;
keys[k++] = "ナ形"      ;
keys[k++] = "−たい"    ;
keys[k++] = "−的"  ;

adds[ 0] = "Initial Letter Filter for 読み";
adds[ 1] = "Speech Part Filter for 品詞";
adds[ 2] = "JLP TEST LEVEL";
adds[ 3] = "Text Search Entry for all fields";
adds[ 4] = "Table Sort for all fields";
adds[ 5] = "Current Listing Number";
adds[ 6] = "Initialize Table Status";
adds[ 7] = "<I>I</I>-Adjectives";
adds[ 8] = "<I>Na</I>-Adjectives";
adds[ 9] = "−たい Form/Wanting Form";
adds[10] = "−的：Suffix to form <I>Na</I>-ADJ.";

tips[0] = "Select Initial Letter of word-reading to be listing";
tips[1] = "Select an Adjective Type to be listing."
        + "<br />1.ALL：<I>I</I>-Adjectives & <I>Na</I>-Adjectives."
        + "<br />2.イ形：<I>I</I>-Adjectives only."
        + "<br />3.ナ形：<I>Na</I>-Adjectives only.";
tips[2] = "Select a JP Language Pfoficiency Test Level.<br />"
        + "4: Level 4 Entrirs (Approx. 900 words).<br />"
        + "3: Level 3 Entrirs (Approx. 600 words).";
tips[3] = "There are 5 search methods provided.<br />"
        + "1.Inclusive-match：<b>AB</b> ⇒..[AB]../[AB]../..[AB]<br />"
        + "2.Word-match：<b>#ABC</b> ⇒[ABC]<br />"
        + "3.Head-match：<b>*ABC</b> ⇒[ABC]...<br />"
        + "4.Bottom-match：<b>&ABC</b> ⇒...[ABC]<br />"
        + "5.Exclusive-match：<b>!AB</b> ⇒(ok)..../(ng)..[AB]..<hr />"
        + "Search Type Identifier '*','#','&','!' must be a<br />"
        + "single-width character. (ie. English letter)<br />"
        + "<b>Note</b>：Method 4 searches 読み field only.<hr />"
        + "<b>Sample Usage</b>:<br />"
        + "Case 1：Find Level 4 words only.<br />"
        + "　　　　Keyword ⇒ <b>[ 4 ]</b><br />"
        + "Case 2：Find ナ形 with ending −い only.<br />"
        + "　　　　With 品詞−ナ形, then Keyword ⇒ <b>&い</b><br />"
        + "Case 3：Find all entries except Level 4 words.<br />"
        + "　　　　Clear all Filters, then Keyword ⇒ <b>![ 4 ]</b><br />";
tips[4] = "Select a Table Column to be sorted.<br />"
        + "1.品　詞：Sort by - Speech Part.<br />"
        + "2.読　み：Sort by - Word-Reading.<br />"
        + "3.単　語：Sort by - Word-Entry.<br />"
        + "4.意　味：Sort by - Word-Meaning.<br />"
        + "5.レベル：Sort by - JLP TEST LEVEL.<br />"
        + "6.備　考：Sort by - Remarks.<hr />"
        + "<b>Note</b>：Initial sorting is 読み field.(<img src='dude07232001up.gif' />)";
tips[5] = "This field shows current number of listing.";
tips[6] = "Resume the Table to initial condition.";
tips[7] = "This type adjective ending -い letter(eg.<ruby><rb>美</rb><rp>(</rp><rt>うつく</rt><rp>)</rp></ruby>しい), but not all -い ending words belog to <I>I</I>-Adjective(eg.きれい).";
tips[8] = "Though this word type is called 'Adjective', its native form is a kind of noun. For example きれい can be used in three ways, as shown below:<hr >"
        + "<span style='font-size:10px'>1.この花は<span style='color:red'>きれい</span>です。（きれい ⇒ NOUN）<br />"
        + "2.これは<span style='color:red'>きれいな</span>花です。<br />　（きれいな ⇒ ADJECTIVE;きれい＋<span style='color:red'>な</span>＋NOUN）<br />"
        + "3.この花は<span style='color:red'>きれいに</span>咲きました。<br />　（きれいに ⇒ ADVERB;きれい＋<span style='color:red'>に</span>＋VERB）</span><hr />"
        + "Since this word type uses な(to modify NOUN) and に(to modify VERB), and its native form works as a NOUN, it is also called as なに名詞(<I>Na-Ni</I> Noun).";
tips[9] = "These words are one of VERBS' conjugated forms. This '-たい' form is used as the 'desire/wanting' meaning.<br />"
        + "Eg.食べたい(want to eat)、飲みたい(want to drink)、読みたい(want to read)<br />"
        + "Because these words, now, belong to 'Adjectives', when you make conjugated forms of the word, you must apply the adjective conjugation rules, as shown below:<br />"
        + "Eg.食べたい(want to eat) ⇒ 食べたかった(wanted to eat), 食べる(eat) ⇒ 食べた(ate)";
tips[10] = "Some Na-ADJ ending −<ruby><rb>的</rb><rp>(</rp><rt>てき</rt><rp>)</rp></ruby> are formed from <ruby><rb>漢語</rb><rp>(</rp><rt>かんご</rt><rp>)</rp></ruby>(words of Chinese origin).<br />"
        + "Eg. <ruby><rb>劇的</rb><rp>(</rp><rt>げきてき</rt><rp>)</rp></ruby>(dramatic)、<ruby><rb>幻想的</rb><rp>(</rp><rt>げんそうてき</rt><rp>)</rp></ruby>(fantastic )、<ruby><rb>感動的</rb><rp>(</rp><rt>かんどうてき</rt><rp>)</rp></ruby>(pathetic)";

function makeTipMessage(){
    for (var i=0; i<k; i++){
        this[i] = new pTips( adds[i], keys[i], tips[i] );
    }
    this.length = i;
}
var TIPS_LIST = new makeTipMessage();
var TIPS_LEN  = TIPS_LIST.length;
function fnDef(){
    var e = event.srcElement;
    while (e.tagName != "DEF") e = e.parentElement;
    if (e.innerText != ""){
        var popupBody = oPopup.document.body;
        popupBody.innerHTML = fnSetTipMessage(e.innerText);
        oPopup.show(0, 0, 300, 0);
        var realHeight = popupBody.scrollHeight;
        oPopup.hide();
        oPopup.show(0, 18, 300, realHeight, e);
    }
}
function fnSetTipMessage( key ){
    var messageBody = "Sorry, undefined word.";
    var addMessage  = "";
    for (var i=0; i<TIPS_LEN; i++){
        if (TIPS_LIST[i].KEY == key){
            with(TIPS_LIST[i]){
                messageBody = TIP;
                addMessage  = ADD;
            }
            break;
        }
    }
    return(STX1 + key + STX2 + addMessage + STX3 + messageBody + STX4);
}

// ******************************************************************
// *    OnMouseOver HILIGHT Behavior
// ******************************************************************

var normalColor;        // work for original color saving
var normalFontWeight;   // work for original fontWeight
var normalSpacing;      // work for original spacing saving
var defaultHilightColor = "#1E9952";
var defaultFontWeight   = "bold";
var defaultSpacingSize  = 0;

function initColors(){
    hiliteColor = (hiliteColor == null) ? defaultHilightColor : hiliteColor;
}
function Hilite(){
    with(runtimeStyle){
        normalColor     = color;
        normalFontWeight= fontWeight;
        normalSpacing   = letterSpacing;
        color           = defaultHilightColor;
        fontWeight      = defaultFontWeight;
        letterSpacing   = defaultSpacingSize;
    }
}
function Restore(){
    with(runtimeStyle){
        color         = normalColor;
        fontWeight    = normalFontWeight;
        letterSpacing = normalSpacing;
    }
}
</SCRIPT>
</PUBLIC:COMPONENT>
