var glossaryCaption;

function mktip(caption)
{

	glossaryCaption = caption;
	ajax = new Ajax();
	ajax.doGet("/gmd/js/glossary.txt",getGlossary);

//	s = getTip(caption);

//	Tip(s,TITLE, caption, WIDTH, 300, FADEIN, 150, FADEOUT, 150, SHADOW, true);
}

function getGlossary (str)
{

		var s = "";
var ss = "";
                var the_term = glossaryCaption;
                var the_words = str.split("\n");
                for (i = 0; i < the_words.length; i++) {
                        var the_word = the_words[i].split("|");
                        if(the_word[0].toUpperCase()==the_term.toUpperCase()) {
//                                if (the_word.length==2) {
                                        s = the_word[1];
	Tip(s,TITLE, glossaryCaption, WIDTH, 300, FADEIN, 100, FADEOUT, 100, SHADOW, true, DELAY, 200);
                                        return;
//                                }
                        }
                }
                s = "<span class=\"red\">Not in glossary</span>";
	Tip(s,TITLE, glossaryCaption, WIDTH, 300, FADEIN, 100, FADEOUT, 100, SHADOW, true, DELAY, 200);
		return;
}

