/**
 * capscr.js - 6 September 2002 Version 2.2
 * Marius van der Colff
 * Copyright (c) 2002 MVDC IT
 *
 */
var mt = 0;
var cc = 0;
var caps = new Array();
var ss = 4;

var lc = 0;
var ets = new Array();
var etc = 0;

/* Start of user editable region for captions data */
caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;x'cellence,</strong> " +
							"n. Surpassing merit; thing in which person etc. excels. " +
							"[F, f. L <em>excellentia</em> (as prec., see -ENCE)]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;nterprise,</strong> " +
							"n. Undertaking, esp. bold or difficult one. " +
							"[f. <em>entreprendre</em> (<em>entre</em> between + <em>prendre</em> take)]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;qu'ity,</strong> " +
							"n. Fairness; recourse to principles of justice. " +
							"[f. OF <em>equit&eacute;</em> f. L <em>aequitatem</em> (<em>auquus</em> fair, see -TY)]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;d'ify,</strong> " +
							"v.t. Benefit spiritually; improve morally. So <strong>&ecirc;di</strong>fica'tion n. " +
							"[f. F <em>&eacute;difier</em> (as prec., see -FY)]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;njoy'ment,</strong> " +
							"n. act or state of enjoying, that which causes pleasure. " +
							"[f. OF EN(<em>joier</em> f. <em>joie</em> JOY)]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;mpow'er,</strong> " +
							"v.t. Authorize, license, (person <em>to</em> do); enable. So <strong>&ecirc;m</strong>power'ment n." +
							"[EM-]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&egrave;ffec'tive,</strong> " +
							"a. &amp; n. powerfull in effect. Hence ~NESS n." +
							"[f. L <em>effectivus</em> (as EFFECT, see -IVE)]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&egrave;thu'siasm,</strong> " +
							"n. Ardent zeal (<em>for, about</em> an object, cause etc). " +
							"[f. EN(<em>theos</em> god) possessed by a god]";

caps[caps.length] =  "<strong>&nbsp;&nbsp;&ecirc;qual'ity,</strong> " +
							"n. Condition of being equal. " +
							"[f. OF <em>&eacute;qualit&eacute;</em> f. L <em>aequalitatem</em> (as EQUAL, see -TY)]";
/* End of user editable region for captions data */


function changeCaption() {
	if (document.all) {
   	if (lc == 0) {
   			clearInterval(mt);
   			mt = setInterval('changeCaption()', 20);
            cc++;
   	}
		if ((cc < 0) || (cc >= caps.length))	cc = 0;
		
      for(counter = 0; counter < ss; counter++) {
   		if (lc <= caps[cc].length) {
            parseHTML();
            lc++;
         }
      }

      outstr = "<a href=\"javascript:quickChange();\" class=\"dict\">" + caps[cc].substring(0, lc);
      for(counter = etc; counter > 0; counter --)
         outstr = outstr + ets[counter-1];
      document.all.edef.innerHTML = outstr + '</a>';
      
		if (lc > caps[cc].length) {
			lc = 0;
			clearInterval(mt);
			mt = setInterval('changeCaption()', 10000);
		}
	}
}

function parseHTML() {
	if (caps[cc].charAt(lc) == '<') {
		tagEnd = caps[cc].indexOf('>', lc);
		if (caps[cc].charAt(lc + 1) != '/') {
			ets[etc] = '</' + caps[cc].substring(lc + 1, tagEnd+1);
         etc++;
		}
      else {
         etc--;
      }
		lc = tagEnd+1;
	}
	
	if (caps[cc].charAt(lc) == '&') {
		entityEnd = caps[cc].indexOf(';', lc);
		lc = entityEnd;
	}

   if ((caps[cc].charAt(lc) == '&') || (caps[cc].charAt(lc) == '<')) parseHTML();
}

function quickChange() {
	lc = 0;
	changeCaption();
}
